Delete VPC operation for the Amazon EC2 REST adapter


The Delete VPC operation enables you to delete a VPC. You must first detach or delete all gateways or other objects that depend on the VPC. For example, you must terminate all running instances, delete all VPC security groups (except the default), delete all the route tables (except the default), and so on before deleting the VPC.

The following figure shows a sample <items> XML element for the Delete VPC operation. 

Sample <items> XML element for the Delete VPC operation

<items>
 <item>
   <parameters>
     <vpc-id></vpc-id>
   </parameters>
 </item>
</items>

The following table describes the elements for this adapter request. 

Adapter request elements for the Delete VPC operation

Element

Definition

Required

<wsdl-location>

Specifies the target Web Service Description Language (WSDL) URL for Amazon EC2

Examples:

Conditional:

  • Required if not specified in the configuration
  • If specified in the configuration and request, the value in the request overrides the value in the configuration
<endpoint-address>

Specifies the web service endpoint for the adapter to use while performing operations on Amazon EC2 instances across different regions

Default value: US East region, http://us-east-1.ec2.amazonaws.com/

No

<signature-properties>

Specifies the mode for signing the adapter request

Conditional:

  • Required if not specified in the configuration
  • If mode is set to "key-files", requires <private-key-file> and <certificate-file>
  • If mode is set to "key-data", requires <private-key-data> and <certificate-data>
<operation-name>

Contains the name of the operation: delete-vpc

Yes

<parameters>

Contains the <vpc-id> element required to execute the operation

Yes

<vpc-id>

Specifies the ID of the VPC that you want to delete

Yes

The following figure shows a sample adapter request for the Delete VPC operation. 

Sample adapter request for the Delete VPC operation

<amazon-ec2-request>
   <wsdl-location>http://ec2.amazonaws.com/doc/2011-02-28/</wsdl-location>
   <endpoint-address>http://us-east-1.ec2.amazonaws.com/</endpoint-address>
   <signature-properties mode = "key-files">
       <private-key-file>C:\Security\
pk-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</private-key-file>
       <certificate-file>C:\Security\
cert-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</certificate-file>
   </signature-properties>
   <operation-name>delete-vpc</operation-name>
   <parameters>
     <vpc-id>vpc-daa184b3</vpc-id>
   </parameters>
</amazon-ec2-request>

The following figure shows the response for the sample Delete VPC operation. 

Sample adapter response for the Delete VPC operation

<amazon-ec2-response>
 <metadata>
   <status>success</status>
 </metadata>
 <DeleteVpcResponse>
   <requestId>31d15881-c163-4555-b19b-9812b35255dc</requestId>
   <return>true</return>
 </DeleteVpcResponse>
</amazon-ec2-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*