Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

ModifyNetworkInterfaceAttribute

Description

Modifies a network interface attribute. You can specify only one attribute at a time.

Request Parameters

NetworkInterfaceId

The ID of the network interface.

Type: String

Default: None

Required: Yes

Description.Value

The description of the network interface.

Type: String

Default: None

Required: No

SecurityGroupId.n

Changes the security groups that a network interface is in. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the group ID and not the group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.

Type: String

Default: None

Required: No

SourceDestCheck.Value

Enables a Network Address Translation (NAT) instance in a VPC to perform NAT. The attribute controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

Type: Boolean

Default: None

Required: No

Attachment.AttachmentId

The ID of the interface attachment.

Type: String

Default: None

Required: Conditional

Condition: This parameter is required if you are modifying the DeleteOnTermination attribute of an interface attachment.

Attachment.DeleteOnTermination

Specifies whether to delete the attachment when terminating the instance.

Type: Boolean

Default: None

Required: Conditional

Condition: You must specify a specific attachment ID to change this attribute.

Response Elements

The following elements are returned in a ModifyNetworkInterfaceAttributeResponse element.

requestId

The ID of the request.

Type: xsd:string

return

Returns true if the request succeeds. Otherwise, returns an error.

Type: xsd:boolean

Examples

Example Request

This example sets source/destination checking to false for the elastic network interface (ENI) eni-ffda3197.

https://ec2.amazonaws.com/?Action=ModifyNetworkInterfaceAttribute
&NetworkInterfaceId=eni-ffda3197
&SourceDestCheck.Value=false
&AUTHPARAMS

Example Response

<ModifyNetworkInterfaceAttributeResponse xmlns='http://ec2.amazonaws.com/doc/2013-02-01/'>
    <requestId>657a4623-5620-4232-b03b-427e852d71cf</requestId>
    <return>true</return>
</ModifyNetworkInterfaceAttributeResponse>