Amazon Elastic Compute Cloud

2019/03/06 - Amazon Elastic Compute Cloud - 3 updated api methods

Changes  Update ec2 client to latest version

DescribeInternetGateways (updated) Link ¶
Changes (request, response)
Request
{'MaxResults': 'integer', 'NextToken': 'string'}
Response
{'NextToken': 'string'}

Describes one or more of your internet gateways.

See also: AWS API Documentation

Request Syntax

client.describe_internet_gateways(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    InternetGatewayIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
type Filters:

list

param Filters:

One or more filters.

  • attachment.state - The current state of the attachment between the gateway and the VPC ( available). Present only if a VPC is attached.

  • attachment.vpc-id - The ID of an attached VPC.

  • internet-gateway-id - The ID of the Internet gateway.

  • owner-id - The ID of the AWS account that owns the internet gateway.

  • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs. The filters supported by a describe operation are documented with the describe operation. For example:

    • DescribeAvailabilityZones

    • DescribeImages

    • DescribeInstances

    • DescribeKeyPairs

    • DescribeSecurityGroups

    • DescribeSnapshots

    • DescribeSubnets

    • DescribeTags

    • DescribeVolumes

    • DescribeVpcs

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type DryRun:

boolean

param 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 InternetGatewayIds:

list

param InternetGatewayIds:

One or more internet gateway IDs.

Default: Describes all your internet gateways.

  • (string) --

type NextToken:

string

param NextToken:

The token for the next page of results.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

rtype:

dict

returns:

Response Syntax

{
    'InternetGateways': [
        {
            'Attachments': [
                {
                    'State': 'attaching'|'attached'|'detaching'|'detached',
                    'VpcId': 'string'
                },
            ],
            'InternetGatewayId': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InternetGateways (list) --

      Information about one or more internet gateways.

      • (dict) --

        Describes an internet gateway.

        • Attachments (list) --

          Any VPCs attached to the internet gateway.

          • (dict) --

            Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

            • State (string) --

              The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            • VpcId (string) --

              The ID of the VPC.

        • InternetGatewayId (string) --

          The ID of the internet gateway.

        • OwnerId (string) --

          The ID of the AWS account that owns the internet gateway.

        • Tags (list) --

          Any tags assigned to the internet gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

    • NextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

DescribeNetworkAcls (updated) Link ¶
Changes (request, response)
Request
{'MaxResults': 'integer', 'NextToken': 'string'}
Response
{'NextToken': 'string'}

Describes one or more of your network ACLs.

For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

See also: AWS API Documentation

Request Syntax

client.describe_network_acls(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NetworkAclIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
type Filters:

list

param Filters:

One or more filters.

  • association.association-id - The ID of an association ID for the ACL.

  • association.network-acl-id - The ID of the network ACL involved in the association.

  • association.subnet-id - The ID of the subnet involved in the association.

  • default - Indicates whether the ACL is the default network ACL for the VPC.

  • entry.cidr - The IPv4 CIDR range specified in the entry.

  • entry.icmp.code - The ICMP code specified in the entry, if any.

  • entry.icmp.type - The ICMP type specified in the entry, if any.

  • entry.ipv6-cidr - The IPv6 CIDR range specified in the entry.

  • entry.port-range.from - The start of the port range specified in the entry.

  • entry.port-range.to - The end of the port range specified in the entry.

  • entry.protocol - The protocol specified in the entry ( tcp | udp | icmp or a protocol number).

  • entry.rule-action - Allows or denies the matching traffic ( allow | deny).

  • entry.rule-number - The number of an entry (in other words, rule) in the set of ACL entries.

  • network-acl-id - The ID of the network ACL.

  • owner-id - The ID of the AWS account that owns the network ACL.

  • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

  • vpc-id - The ID of the VPC for the network ACL.

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs. The filters supported by a describe operation are documented with the describe operation. For example:

    • DescribeAvailabilityZones

    • DescribeImages

    • DescribeInstances

    • DescribeKeyPairs

    • DescribeSecurityGroups

    • DescribeSnapshots

    • DescribeSubnets

    • DescribeTags

    • DescribeVolumes

    • DescribeVpcs

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type DryRun:

boolean

param 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 NetworkAclIds:

list

param NetworkAclIds:

One or more network ACL IDs.

Default: Describes all your network ACLs.

  • (string) --

type NextToken:

string

param NextToken:

The token for the next page of results.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

rtype:

dict

returns:

Response Syntax

{
    'NetworkAcls': [
        {
            'Associations': [
                {
                    'NetworkAclAssociationId': 'string',
                    'NetworkAclId': 'string',
                    'SubnetId': 'string'
                },
            ],
            'Entries': [
                {
                    'CidrBlock': 'string',
                    'Egress': True|False,
                    'IcmpTypeCode': {
                        'Code': 123,
                        'Type': 123
                    },
                    'Ipv6CidrBlock': 'string',
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'Protocol': 'string',
                    'RuleAction': 'allow'|'deny',
                    'RuleNumber': 123
                },
            ],
            'IsDefault': True|False,
            'NetworkAclId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string',
            'OwnerId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NetworkAcls (list) --

      Information about one or more network ACLs.

      • (dict) --

        Describes a network ACL.

        • Associations (list) --

          Any associations between the network ACL and one or more subnets

          • (dict) --

            Describes an association between a network ACL and a subnet.

            • NetworkAclAssociationId (string) --

              The ID of the association between a network ACL and a subnet.

            • NetworkAclId (string) --

              The ID of the network ACL.

            • SubnetId (string) --

              The ID of the subnet.

        • Entries (list) --

          One or more entries (rules) in the network ACL.

          • (dict) --

            Describes an entry in a network ACL.

            • CidrBlock (string) --

              The IPv4 network range to allow or deny, in CIDR notation.

            • Egress (boolean) --

              Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

            • IcmpTypeCode (dict) --

              ICMP protocol: The ICMP type and code.

              • Code (integer) --

                The ICMP code. A value of -1 means all codes for the specified ICMP type.

              • Type (integer) --

                The ICMP type. A value of -1 means all types.

            • Ipv6CidrBlock (string) --

              The IPv6 network range to allow or deny, in CIDR notation.

            • PortRange (dict) --

              TCP or UDP protocols: The range of ports the rule applies to.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • Protocol (string) --

              The protocol number. A value of "-1" means all protocols.

            • RuleAction (string) --

              Indicates whether to allow or deny the traffic that matches the rule.

            • RuleNumber (integer) --

              The rule number for the entry. ACL entries are processed in ascending order by rule number.

        • IsDefault (boolean) --

          Indicates whether this is the default network ACL for the VPC.

        • NetworkAclId (string) --

          The ID of the network ACL.

        • Tags (list) --

          Any tags assigned to the network ACL.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • VpcId (string) --

          The ID of the VPC for the network ACL.

        • OwnerId (string) --

          The ID of the AWS account that owns the network ACL.

    • NextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

DescribeVpcs (updated) Link ¶
Changes (request, response)
Request
{'MaxResults': 'integer', 'NextToken': 'string'}
Response
{'NextToken': 'string'}

Describes one or more of your VPCs.

See also: AWS API Documentation

Request Syntax

client.describe_vpcs(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpcIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
type Filters:

list

param Filters:

One or more filters.

  • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28).

  • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.

  • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.

  • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.

  • dhcp-options-id - The ID of a set of DHCP options.

  • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.

  • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.

  • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.

  • isDefault - Indicates whether the VPC is the default VPC.

  • owner-id - The ID of the AWS account that owns the VPC.

  • state - The state of the VPC ( pending | available).

  • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

  • vpc-id - The ID of the VPC.

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs. The filters supported by a describe operation are documented with the describe operation. For example:

    • DescribeAvailabilityZones

    • DescribeImages

    • DescribeInstances

    • DescribeKeyPairs

    • DescribeSecurityGroups

    • DescribeSnapshots

    • DescribeSubnets

    • DescribeTags

    • DescribeVolumes

    • DescribeVpcs

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type VpcIds:

list

param VpcIds:

One or more VPC IDs.

Default: Describes all your VPCs.

  • (string) --

type DryRun:

boolean

param 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 NextToken:

string

param NextToken:

The token for the next page of results.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

rtype:

dict

returns:

Response Syntax

{
    'Vpcs': [
        {
            'CidrBlock': 'string',
            'DhcpOptionsId': 'string',
            'State': 'pending'|'available',
            'VpcId': 'string',
            'OwnerId': 'string',
            'InstanceTenancy': 'default'|'dedicated'|'host',
            'Ipv6CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'Ipv6CidrBlock': 'string',
                    'Ipv6CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'CidrBlock': 'string',
                    'CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'IsDefault': True|False,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Vpcs (list) --

      Information about one or more VPCs.

      • (dict) --

        Describes a VPC.

        • CidrBlock (string) --

          The primary IPv4 CIDR block for the VPC.

        • DhcpOptionsId (string) --

          The ID of the set of DHCP options you've associated with the VPC (or default if the default options are associated with the VPC).

        • State (string) --

          The current state of the VPC.

        • VpcId (string) --

          The ID of the VPC.

        • OwnerId (string) --

          The ID of the AWS account that owns the VPC.

        • InstanceTenancy (string) --

          The allowed tenancy of instances launched into the VPC.

        • Ipv6CidrBlockAssociationSet (list) --

          Information about the IPv6 CIDR blocks associated with the VPC.

          • (dict) --

            Describes an IPv6 CIDR block associated with a VPC.

            • AssociationId (string) --

              The association ID for the IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

            • Ipv6CidrBlockState (dict) --

              Information about the state of the CIDR block.

              • State (string) --

                The state of the CIDR block.

              • StatusMessage (string) --

                A message about the status of the CIDR block, if applicable.

        • CidrBlockAssociationSet (list) --

          Information about the IPv4 CIDR blocks associated with the VPC.

          • (dict) --

            Describes an IPv4 CIDR block associated with a VPC.

            • AssociationId (string) --

              The association ID for the IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

            • CidrBlockState (dict) --

              Information about the state of the CIDR block.

              • State (string) --

                The state of the CIDR block.

              • StatusMessage (string) --

                A message about the status of the CIDR block, if applicable.

        • IsDefault (boolean) --

          Indicates whether the VPC is the default VPC.

        • Tags (list) --

          Any tags assigned to the VPC.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

    • NextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.