:doc:`Route53GlobalResolver <../../route53globalresolver>` / Client / create_access_token

*******************
create_access_token
*******************



.. py:method:: Route53GlobalResolver.Client.create_access_token(**kwargs)

  

  Creates an access token for a DNS view. Access tokens provide token-based authentication for DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) connections to the Route 53 Global Resolver.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/route53globalresolver-2022-09-27/CreateAccessToken>`_  


  **Request Syntax**
  ::

    response = client.create_access_token(
        clientToken='string',
        dnsViewId='string',
        expiresAt=datetime(2015, 1, 1),
        name='string',
        tags={
            'string': 'string'
        }
    )
    
  :type clientToken: string
  :param clientToken: 

    A unique, case-sensitive identifier to ensure idempotency. This means that making the same request multiple times with the same ``clientToken`` has the same result every time.

    This field is autopopulated if not provided.

  
  :type dnsViewId: string
  :param dnsViewId: **[REQUIRED]** 

    The ID of the DNS view to associate with this token.

    

  
  :type expiresAt: datetime
  :param expiresAt: 

    The date and time when the token expires. Tokens can have a minimum expiration of 30 days and maximum of 365 days from creation.

    

  
  :type name: string
  :param name: 

    A descriptive name for the access token.

    

  
  :type tags: dict
  :param tags: 

    An array of user-defined keys and optional values. These tags can be used for categorization and organization.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'id': 'string',
          'arn': 'string',
          'clientToken': 'string',
          'createdAt': datetime(2015, 1, 1),
          'dnsViewId': 'string',
          'expiresAt': datetime(2015, 1, 1),
          'name': 'string',
          'status': 'CREATING'|'OPERATIONAL'|'DELETING',
          'value': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **id** *(string) --* 

        The unique identifier for the access token.

        
      

      - **arn** *(string) --* 

        The Amazon Resource Name (ARN) of the access token.

        
      

      - **clientToken** *(string) --* 

        The unique string that identifies the request and ensures idempotency.

        
      

      - **createdAt** *(datetime) --* 

        The date and time when the access token was created.

        
      

      - **dnsViewId** *(string) --* 

        The ID of the DNS view associated with this access token.

        
      

      - **expiresAt** *(datetime) --* 

        The date and time when the access token expires.

        
      

      - **name** *(string) --* 

        The name of the access token.

        
      

      - **status** *(string) --* 

        The operational status of the access token.

        
      

      - **value** *(string) --* 

        The access token value. This token should be included in DoH and DoT requests for authentication. Keep this value secure as it provides access to your Route 53 Global Resolver.

        
  
  **Exceptions**
  
  *   :py:class:`Route53GlobalResolver.Client.exceptions.InternalServerException`

  
  *   :py:class:`Route53GlobalResolver.Client.exceptions.ValidationException`

  
  *   :py:class:`Route53GlobalResolver.Client.exceptions.ConflictException`

  
  *   :py:class:`Route53GlobalResolver.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`Route53GlobalResolver.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Route53GlobalResolver.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Route53GlobalResolver.Client.exceptions.ResourceNotFoundException`

  