Amazon Elastic Compute Cloud
API Reference (API Version 2012-04-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

CreateNetworkInterface

Description

Creates a network interface in the specified subnet.

Request Parameters

NameDescriptionRequired

SubnetId

The ID of the subnet to associate with the network interface.

Type: String

Default: None

Yes

PrivateIpAddress

The private IP address of the network interface.

Type: String

Default: None

No

Description

The description of the network interface.

Type: String

Default: None

No

SecurityGroupId.n

Lists the group IDs for use by the network interface.

Type: SecurityGroupIdSetItemType

Default: None

No

Response Elements

The elements in the following table are wrapped in an CreateNetworkInterface structure.

NameDescription

requestId

The ID of the request to create a network interface.

Type: String

networkInterface

The network interface that was created.

Type: NetworkInterfaceType

Examples

Example Request

This example creates an elastic network interface (ENI) in the specified subnet.

https://ec2.amazonaws.com/?Action=CreateNetworkInterface
&SubnetId=subnet-b2a249da
&AUTHPARAMS

Example Response

<CreateNetworkInterfaceResponse xmlns='http://ec2.amazonaws.com/doc/2011-11-15/'>
    <requestId>86c6c651-be3a-4bec-83d7-711ee24c515f</requestId>
    <networkInterface>
        <networkInterfaceId>eni-ffda3197</networkInterfaceId>
        <subnetId>subnet-b2a249da</subnetId>
        <vpcId>vpc-1ea24976</vpcId>
        <availabilityZone>us-east-1b</availabilityZone>
        <description/>
        <ownerId>111122223333</ownerId>
        <requesterManaged>false</requesterManaged>
        <status>pending</status>
        <macAddress>06:01:92:a4:43:77</macAddress>
        <privateIpAddress>10.0.0.182</privateIpAddress>
        <sourceDestCheck>true</sourceDestCheck>
        <groupSet>
            <item>
                <groupId>sg-050c1369</groupId>
                <groupName>default</groupName>
            </item>
        </groupSet>
        <tagSet/>
    </networkInterface>
</CreateNetworkInterfaceResponse>