Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - set_auth_token - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
17.20
Published
November 2022
ft:locale
en-US
ft:lastEdition
2024-02-21
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage
teradataml.scriptmgmt.lls_utils.set_auth_token = set_auth_token(ues_url, client_id=None)
DESCRIPTION:
    Function to set the Authentication token to connect to User Environment Service
    in VantageCloud Lake.
    Note:
        User must have a privilage to login with a NULL password to use set_auth_token().
        Please refer to GRANT LOGON section in Teradata Documentation for more details.
 
 
PARAMETERS:
    ues_url:
        Required Argument.
        Specifies the URL for User Environment Service in VantageCloud Lake.
        Types: str
 
    client_id:
        Optional Argument.
        Specifies the id of the application that requests the access token from
        VantageCloud Lake.
        Types: str
 
 
RETURNS:
    True, if the operation is successful.
 
RAISES:
    TeradataMlException, RuntimeError.
 
EXAMPLES:
 
    # Example 1: Set the Authentication token using default client_id.
    >>> import getpass
    >>> set_auth_token(ues_url=getpass.getpass("ues_url : "))
 
    # Example 2: Set the Authentication token by specifying the client_id.
    >>> set_auth_token(ues_url=getpass.getpass("ues_url : "),
    ...                client_id=getpass.getpass("client_id : "))