A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html below:

DescribeSubnets - Amazon Elastic Compute Cloud

DescribeSubnets

Describes your subnets. The default is to describe all your subnets. Alternatively, you can specify specific subnet IDs or filter the results to include only the subnets that match specific criteria.

For more information, see Subnets in the Amazon VPC User Guide.

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.

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

Filter.N

The filters.

Type: Array of Filter objects

Required: No

MaxResults

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

Type: Integer

Valid Range: Minimum value of 5. Maximum value of 1000.

Required: No

NextToken

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

Type: String

Required: No

SubnetId.N

The IDs of the subnets.

Default: Describes all your subnets.

Type: Array of strings

Required: No

Response Elements

The following elements are returned by the service.

nextToken

The token to include in another request to get the next page of items. This value is null when there are no more items to return.

Type: String

requestId

The ID of the request.

Type: String

subnetSet

Information about the subnets.

Type: Array of Subnet objects

Errors

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

Examples Example 1

This example describes the subnets.

Sample Request
https://ec2.amazonaws.com/?Action=DescribeSubnets
&AUTHPARAMS
Sample Response
<DescribeSubnetsResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
    <requestId>1927e20c-0ed0-4a02-a6d7-d955fbd2d13c</requestId>
    <subnetSet>
        <item>
            <subnetId>subnet-0bb1c79de301436ee</subnetId>
            <subnetArn>arn:aws:ec2:us-east-2:111122223333:subnet/subnet-0bb1c79de3EXAMPLE</subnetArn>
            <state>available</state>
            <ownerId>111122223333</ownerId>
            <vpcId>vpc-0ee975135dEXAMPLE</vpcId>
            <cidrBlock>10.0.2.0/24</cidrBlock>
            <ipv6CidrBlockAssociationSet/>
            <availableIpAddressCount>251</availableIpAddressCount>
            <availabilityZone>us-east-2c</availabilityZone>
            <availabilityZoneId>use2-az3</availabilityZoneId>
            <defaultForAz>false</defaultForAz>
            <mapPublicIpOnLaunch>false</mapPublicIpOnLaunch>
            <assignIpv6AddressOnCreation>false</assignIpv6AddressOnCreation>
        </item>
        <item>
            <subnetId>subnet-02bf4c428bf44ebce</subnetId>
            <subnetArn>arn:aws:ec2:us-east-2:111122223333:subnet/subnet-02bf4c428bEXAMPLE</subnetArn>
            <state>available</state>
            <ownerId>111122223333</ownerId>
            <vpcId>vpc-07e8ffd50fEXAMPLE</vpcId>
            <cidrBlock>10.0.0.0/24</cidrBlock>
            <ipv6CidrBlockAssociationSet>
                <item>
                    <ipv6CidrBlock>2600:1f16:115:200::/64</ipv6CidrBlock>
                    <associationId>subnet-cidr-assoc-002afb9f3cEXAMPLE</associationId>
                    <ipv6CidrBlockState>
                        <state>associated</state>
                    </ipv6CidrBlockState>
                </item>
            </ipv6CidrBlockAssociationSet>
            <availableIpAddressCount>251</availableIpAddressCount>
            <availabilityZone>us-east-2b</availabilityZone>
            <availabilityZoneId>use2-az2</availabilityZoneId>
            <defaultForAz>false</defaultForAz>
            <mapPublicIpOnLaunch>false</mapPublicIpOnLaunch>
            <assignIpv6AddressOnCreation>false</assignIpv6AddressOnCreation>
        </item>
    </subnetSet>
</DescribeSubnetsResponse>
Example 2

This example uses filters to describe any subnet you own that is in the VPC with the ID vpc-0056ae9ffdEXAMPLE or vpc-0096ae9ffdEXAMPLE, and whose state is available.

Sample Request
https://ec2.amazonaws.com/?Action=DescribeSubnets
&Filter.1.Name=vpc-id
&Filter.1.Value.1=vpc-0056ae9ffdEXAMPLE
&Filter.1.Value.2=vpc-0096ae9ffdEXAMPLE
&Filter.2.Name=state
&Filter.2.Value.1=available
&AUTHPARAMS
Sample Response
<DescribeSubnetsResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
    <requestId>43e9cb52-0e10-40fe-b457-988c8fbfea26</requestId>
    <subnetSet>
        <item>
            <subnetId>subnet-0f8c6c2f37EXAMPLE</subnetId>
            <subnetArn>arn:aws:ec2:us-west-2:123456789012:subnet/subnet-0f8c6c2f37903e9dc</subnetArn>
            <state>available</state>
            <ownerId>123456789012</ownerId>
            <vpcId>vpc-0056ae9ffdEXAMPLE</vpcId>
            <cidrBlock>172.168.0.0/16</cidrBlock>
            <ipv6CidrBlockAssociationSet/>
            <availableIpAddressCount>65531</availableIpAddressCount>
            <availabilityZone>us-west-2b</availabilityZone>
            <availabilityZoneId>usw2-az2</availabilityZoneId>
            <defaultForAz>false</defaultForAz>
            <mapPublicIpOnLaunch>false</mapPublicIpOnLaunch>
            <assignIpv6AddressOnCreation>false</assignIpv6AddressOnCreation>
        </item>
    </subnetSet>
</DescribeSubnetsResponse>
See Also

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4