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

***********************
deprovision_ipam_byoasn
***********************



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

  

  Deprovisions your Autonomous System Number (ASN) from your Amazon Web Services account. This action can only be called after any BYOIP CIDR associations are removed from your Amazon Web Services account with `DisassociateIpamByoasn <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIpamByoasn.html>`__. 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/DeprovisionIpamByoasn>`_  


  **Request Syntax**
  ::

    response = client.deprovision_ipam_byoasn(
        DryRun=True|False,
        IpamId='string',
        Asn='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]** 

    The IPAM ID.

    

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

    An ASN.

    

  
  
  :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.

          
    
  