DeleteSecondaryNetwork - Amazon Elastic Compute Cloud

DeleteSecondaryNetwork

Deletes a secondary network. You must delete all secondary subnets in the secondary network before you can delete the secondary network.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

ClientToken

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.

Type: String

Required: No

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.

Type: Boolean

Required: No

SecondaryNetworkId

The ID of the secondary network.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.

clientToken

Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

Type: String

requestId

The ID of the request.

Type: String

secondaryNetwork

Information about the secondary network.

Type: SecondaryNetwork object

Errors

For information about the errors that are common to all actions, see Common client error codes.

Examples

Example

This example deletes a secondary network.

Sample Request

https://ec2.amazonaws.com/?Action=DeleteSecondaryNetwork &SecondaryNetworkId=sn-0123456789abcdef0 &ClientToken=550e8400-e29b-41d4-a716-446655440000 &AUTHPARAMS

Sample Response

<DeleteSecondaryNetworkResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <secondaryNetwork> <secondaryNetworkId>sn-0123456789abcdef0</secondaryNetworkId> <secondaryNetworkArn>arn:aws:ec2:us-east-2:123456789012:secondary-network/sn-0123456789abcdef0</secondaryNetworkArn> <ownerId>123456789012</ownerId> <type>rdma</type> <state>delete-in-progress</state> <ipv4CidrBlockAssociations> <item> <associationId>sn-cidr-assoc-56789901234abcdef0</associationId> <cidrBlock>10.0.0.0/16</cidrBlock> <state>disassociating</state> </item> </ipv4CidrBlockAssociations> <tagSet> <item> <key>Name</key> <value>Prod Secondary Network</value> </item> </tagSet> </secondaryNetwork> <clientToken>550e8400-e29b-41d4-a716-446655440000</clientToken> </DeleteSecondaryNetworkResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: