:doc:`EC2 <../../ec2>` / Client / provision_ipam_byoasn

*********************
provision_ipam_byoasn
*********************



.. py:method:: EC2.Client.provision_ipam_byoasn(**kwargs)

  

  Provisions your Autonomous System Number (ASN) for use in your Amazon Web Services account. This action requires authorization context for Amazon to bring the ASN to an Amazon Web Services account. For more information, see `Tutorial\: Bring your ASN to IPAM <https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoasn.html>`__ in the *Amazon VPC IPAM guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionIpamByoasn>`_  


  **Request Syntax**
  ::

    response = client.provision_ipam_byoasn(
        DryRun=True|False,
        IpamId='string',
        Asn='string',
        AsnAuthorizationContext={
            'Message': 'string',
            'Signature': 'string'
        }
    )
    
  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

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

    An IPAM ID.

    

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

    A public 2-byte or 4-byte ASN.

    

  
  :type AsnAuthorizationContext: dict
  :param AsnAuthorizationContext: **[REQUIRED]** 

    An ASN authorization context.

    

  
    - **Message** *(string) --* **[REQUIRED]** 

      The authorization context's message.

      

    
    - **Signature** *(string) --* **[REQUIRED]** 

      The authorization context's signature.

      

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

    
    ::

      {
          'Byoasn': {
              'Asn': 'string',
              'IpamId': 'string',
              'StatusMessage': 'string',
              'State': 'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Byoasn** *(dict) --* 

        An ASN and BYOIP CIDR association.

        
        

        - **Asn** *(string) --* 

          A public 2-byte or 4-byte ASN.

          
        

        - **IpamId** *(string) --* 

          An IPAM ID.

          
        

        - **StatusMessage** *(string) --* 

          The status message.

          
        

        - **State** *(string) --* 

          The provisioning state of the BYOASN.

          
    
  