:doc:`MWAA <../../mwaa>` / Client / create_cli_token

****************
create_cli_token
****************



.. py:method:: MWAA.Client.create_cli_token(**kwargs)

  

  Creates a CLI token for the Airflow CLI. To learn more, see `Creating an Apache Airflow CLI token <https://docs.aws.amazon.com/mwaa/latest/userguide/call-mwaa-apis-cli.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mwaa-2020-07-01/CreateCliToken>`_  


  **Request Syntax**
  ::

    response = client.create_cli_token(
        Name='string'
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the Amazon MWAA environment. For example, ``MyMWAAEnvironment``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'CliToken': 'string',
          'WebServerHostname': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **CliToken** *(string) --* 

        An Airflow CLI login token.

        
      

      - **WebServerHostname** *(string) --* 

        The Airflow web server hostname for the environment.

        
  
  **Exceptions**
  
  *   :py:class:`MWAA.Client.exceptions.ResourceNotFoundException`

  