Amazon Elastic Compute Cloud

2020/07/07 - Amazon Elastic Compute Cloud - 1 updated api methods

Changes  Update ec2 client to latest version

DescribeAvailabilityZones (updated) Link ΒΆ
Changes (response)
{'AvailabilityZones': {'ParentZoneId': 'string',
                       'ParentZoneName': 'string',
                       'ZoneType': 'string'}}

Describes the Availability Zones and Local Zones that are available to you. If there is an event impacting an Availability Zone or Local Zone, you can use this request to view the state and any provided messages for that Availability Zone or Local Zone.

For more information about Availability Zones and Local Zones, see Regions and Availability Zones in the Amazon Elastic Compute Cloud User Guide.

See also: AWS API Documentation

Request Syntax

client.describe_availability_zones(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ZoneNames=[
        'string',
    ],
    ZoneIds=[
        'string',
    ],
    AllAvailabilityZones=True|False,
    DryRun=True|False
)
type Filters:

list

param Filters:

The filters.

  • group-name - For Availability Zones, use the Region name. For Local Zones, use the name of the group associated with the Local Zone (for example, us-west-2-lax-1).

  • message - The Zone message.

  • opt-in-status - The opt in status ( opted-in, and not-opted-in | opt-in-not-required).

  • region-name - The name of the Region for the Zone (for example, us-east-1).

  • state - The state of the Availability Zone or Local Zone ( available | information | impaired | unavailable).

  • zone-id - The ID of the Availability Zone (for example, use1-az1) or the Local Zone (for example, use usw2-lax1-az1).

  • zone-name - The name of the Availability Zone (for example, us-east-1a) or the Local Zone (for example, use us-west-2-lax-1a).

  • (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) --

      The filter values. Filter values are case-sensitive.

      • (string) --

type ZoneNames:

list

param ZoneNames:

The names of the Zones.

  • (string) --

type ZoneIds:

list

param ZoneIds:

The IDs of the Zones.

  • (string) --

type AllAvailabilityZones:

boolean

param AllAvailabilityZones:

Include all Availability Zones and Local Zones regardless of your opt in status.

If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.

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.

rtype:

dict

returns:

Response Syntax

{
    'AvailabilityZones': [
        {
            'State': 'available'|'information'|'impaired'|'unavailable',
            'OptInStatus': 'opt-in-not-required'|'opted-in'|'not-opted-in',
            'Messages': [
                {
                    'Message': 'string'
                },
            ],
            'RegionName': 'string',
            'ZoneName': 'string',
            'ZoneId': 'string',
            'GroupName': 'string',
            'NetworkBorderGroup': 'string',
            'ZoneType': 'string',
            'ParentZoneName': 'string',
            'ParentZoneId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • AvailabilityZones (list) --

      Information about the Zones.

      • (dict) --

        Describes a Zone.

        • State (string) --

          The state of the Zone.

        • OptInStatus (string) --

          For Availability Zones, this parameter always has the value of opt-in-not-required.

          For Local Zones, this parameter is the opt in status. The possible values are opted-in, and not-opted-in.

        • Messages (list) --

          Any messages about the Zone.

          • (dict) --

            Describes a message about a Zone.

            • Message (string) --

              The message about the Zone.

        • RegionName (string) --

          The name of the Region.

        • ZoneName (string) --

          The name of the Zone.

        • ZoneId (string) --

          The ID of the Zone.

        • GroupName (string) --

          For Availability Zones, this parameter has the same value as the Region name.

          For Local Zones, the name of the associated group, for example us-west-2-lax-1.

        • NetworkBorderGroup (string) --

          The name of the location from which the address is advertised.

        • ZoneType (string) --

          The type of zone. The valid values are availability-zone and local-zone.

        • ParentZoneName (string) --

          The name of the zone that handles some of the Local Zone control plane operations, such as API calls.

        • ParentZoneId (string) --

          The ID of the zone that handles some of the Local Zone control plane operations, such as API calls.