Create VPC operation for the Amazon EC2 REST adapter
The Create VPC operation enables you to create a Virtual Private Cloud (VPC) with the Classless Inter-Domain Routing (CIDR) block that you specify. CIDR is a method for allocating IP addresses and routing packets.
The smallest VPC that you can create uses a /28 netmask (16 IP addresses) and the largest uses a /16 netmask (65,536 IP addresses).
The following figure shows a sample <items> XML element for the Create VPC operation.
Sample <items> XML element for the Create VPC operation
<item>
<parameters>
<cidr-block></cidr-block>
<!--Optional:-->
<instance-tenancy></instance-tenancy>
</parameters>
</item>
</items>
The following table describes the elements for this adapter request.
Adapter request elements for the Create VPC operation
Element | Definition | Required |
---|---|---|
<wsdl-location> | Specifies the target Web Service Description Language (WSDL) URL for Amazon EC2 | Conditional:
|
<endpoint-address> | Specifies the web service endpoint for the adapter to use while performing operations on Amazon EC2 instances across different regions | No |
<signature-properties> | Specifies the mode for signing the adapter request | Conditional:
|
<operation-name> | Contains the name of the operation: create-vpc | Yes |
<parameters> | Contains the elements required to execute the operation | Yes |
<cidr-block> | Specifies the CIDR block that you want the VPC to cover (for example, 10.0.0.0/16) | Yes |
<instance-tenancy> | Specifies the allowed tenancy of instances launched into the VPC
| No |
The following figure shows a sample adapter request for the Create VPC operation.
Sample adapter request for the Create VPC operation
<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>create-vpc</operation-name>
<parameters>
<cidr-block>10.0.0.0/24</cidr-block>
<!--Optional:-->
<instance-tenancy>default</instance-tenancy>
</parameters>
</amazon-ec2-request>
The following figure shows the response for the sample Create VPC operation.
Sample adapter response for the Create VPC operation
<metadata>
<status>success</status>
</metadata>
<CreateVpcResponse>
<requestId>297679fe-cc6e-4701-9dbd-0e84a55c41ed</requestId>
<vpc>
<vpcId>vpc-daa184b3</vpcId>
<state>pending</state>
<cidrBlock>10.0.0.0/24</cidrBlock>
<dhcpOptionsId>dopt-07defb6e</dhcpOptionsId>
<instanceTenancy>default</instanceTenancy>
</vpc>
</CreateVpcResponse>
</amazon-ec2-response>