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

********************
create_access_source
********************



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

  

  Creates an access source for a DNS view. Access sources define IP addresses or CIDR ranges that are allowed to send DNS queries to the Route 53 Global Resolver, along with the permitted DNS protocols.

  

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


  **Request Syntax**
  ::

    response = client.create_access_source(
        cidr='string',
        clientToken='string',
        ipAddressType='IPV4'|'IPV6',
        name='string',
        dnsViewId='string',
        protocol='DO53'|'DOH'|'DOT',
        tags={
            'string': 'string'
        }
    )
    
  :type cidr: string
  :param cidr: **[REQUIRED]** 

    The IP address or CIDR range that is allowed to send DNS queries to the Route 53 Global Resolver.

    

  
  :type clientToken: string
  :param clientToken: 

    A unique string that identifies the request and ensures idempotency.

    This field is autopopulated if not provided.

  
  :type ipAddressType: string
  :param ipAddressType: 

    The IP address type for this access source. Valid values are IPv4 and IPv6 (if the Route 53 Global Resolver supports dual-stack).

    

  
  :type name: string
  :param name: 

    A descriptive name for the access source.

    

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

    The ID of the DNS view to associate with this access source.

    

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

    The DNS protocol that is permitted for this access source. Valid values are Do53 (DNS over port 53), DoT (DNS over TLS), and DoH (DNS over HTTPS).

    

  
  :type tags: dict
  :param tags: 

    Tags to associate with the access source.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'arn': 'string',
          'cidr': 'string',
          'createdAt': datetime(2015, 1, 1),
          'id': 'string',
          'ipAddressType': 'IPV4'|'IPV6',
          'name': 'string',
          'dnsViewId': 'string',
          'protocol': 'DO53'|'DOH'|'DOT',
          'status': 'CREATING'|'OPERATIONAL'|'UPDATING'|'DELETING',
          'updatedAt': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

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

        
      

      - **cidr** *(string) --* 

        The IP address or CIDR range that is allowed to send DNS queries to the Route 53 Global Resolver.

        
      

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

        The date and time when the access source was created.

        
      

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

        The unique identifier for the access source.

        
      

      - **ipAddressType** *(string) --* 

        The IP address type for this access source (IPv4 or IPv6).

        
      

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

        The descriptive name of the access source.

        
      

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

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

        
      

      - **protocol** *(string) --* 

        The DNS protocol that is permitted for this access source (Do53, DoT, or DoH).

        
      

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

        The operational status of the access source.

        
      

      - **updatedAt** *(datetime) --* 

        The date and time when the access source was last updated.

        
  
  **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`

  