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

**********************
delete_carrier_gateway
**********************



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

  

  Deletes a carrier gateway.

   

  .. warning::

     

    If you do not delete the route that contains the carrier gateway as the Target, the route is a blackhole route. For information about how to delete a route, see `DeleteRoute <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRoute.html>`__.

    

  

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


  **Request Syntax**
  ::

    response = client.delete_carrier_gateway(
        CarrierGatewayId='string',
        DryRun=True|False
    )
    
  :type CarrierGatewayId: string
  :param CarrierGatewayId: **[REQUIRED]** 

    The ID of the carrier gateway.

    

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

    

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

    
    ::

      {
          'CarrierGateway': {
              'CarrierGatewayId': 'string',
              'VpcId': 'string',
              'State': 'pending'|'available'|'deleting'|'deleted',
              'OwnerId': 'string',
              'Tags': [
                  {
                      'Key': 'string',
                      'Value': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **CarrierGateway** *(dict) --* 

        Information about the carrier gateway.

        
        

        - **CarrierGatewayId** *(string) --* 

          The ID of the carrier gateway.

          
        

        - **VpcId** *(string) --* 

          The ID of the VPC associated with the carrier gateway.

          
        

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

          The state of the carrier gateway.

          
        

        - **OwnerId** *(string) --* 

          The Amazon Web Services account ID of the owner of the carrier gateway.

          
        

        - **Tags** *(list) --* 

          The tags assigned to the carrier gateway.

          
          

          - *(dict) --* 

            Describes a tag.

            
            

            - **Key** *(string) --* 

              The key of the tag.

               

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``.

              
            

            - **Value** *(string) --* 

              The value of the tag.

               

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

              
        
      
    
  