Amazon Elastic Compute Cloud

2025/08/26 - Amazon Elastic Compute Cloud - 5 new 8 updated api methods

Changes  Add new APIs for viewing how your shared AMIs are used by other accounts, and identify resources in your account that are dependent on particular AMIs

DescribeImageUsageReports (new) Link ¶

Describes the configuration and status of image usage reports, filtered by report IDs or image IDs.

For more information, see View your AMI usage in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

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

list

param ImageIds:

The IDs of the images for filtering the reports. If specified, only reports containing these images are returned.

  • (string) --

type ReportIds:

list

param ReportIds:

The IDs of the image usage reports.

  • (string) --

type NextToken:

string

param NextToken:

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

type Filters:

list

param Filters:

The filters.

  • creation-time - The time when the report was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2025-11-29T11:04:43.305Z. You can use a wildcard ( *), for example, 2025-11-29T*, which matches an entire day.

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

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

    If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (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 MaxResults:

integer

param 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.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'ImageUsageReports': [
        {
            'ImageId': 'string',
            'ReportId': 'string',
            'ResourceTypes': [
                {
                    'ResourceType': 'string',
                    'ResourceTypeOptions': [
                        {
                            'OptionName': 'string',
                            'OptionValues': [
                                'string',
                            ]
                        },
                    ]
                },
            ],
            'AccountIds': [
                'string',
            ],
            'State': 'string',
            'StateReason': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'ExpirationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      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.

    • ImageUsageReports (list) --

      The image usage reports.

      • (dict) --

        The configuration and status of an image usage report.

        • ImageId (string) --

          The ID of the image that was specified when the report was created.

        • ReportId (string) --

          The ID of the report.

        • ResourceTypes (list) --

          The resource types that were specified when the report was created.

          • (dict) --

            A resource type to include in the report. Associated options can also be specified if the resource type is a launch template.

            • ResourceType (string) --

              The resource type.

              Valid values: ec2:Instance | ec2:LaunchTemplate

            • ResourceTypeOptions (list) --

              The options that affect the scope of the report. Valid only when ResourceType is ec2:LaunchTemplate.

              • (dict) --

                The options that affect the scope of the report.

                • OptionName (string) --

                  The name of the option.

                • OptionValues (list) --

                  The number of launch template versions to check.

                  • (string) --

        • AccountIds (list) --

          The IDs of the Amazon Web Services accounts that were specified when the report was created.

          • (string) --

        • State (string) --

          The current state of the report. Possible values:

          • available - The report is available to view.

          • pending - The report is being created and not available to view.

          • error - The report could not be created.

        • StateReason (string) --

          Provides additional details when the report is in an error state.

        • CreationTime (datetime) --

          The date and time when the report was created.

        • ExpirationTime (datetime) --

          The date and time when Amazon EC2 will delete the report (30 days after the report was created).

        • Tags (list) --

          Any tags assigned to the report.

          • (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 256 Unicode characters.

CreateImageUsageReport (new) Link ¶

Creates a report that shows how your image is used across other Amazon Web Services accounts. The report provides visibility into which accounts are using the specified image, and how many resources (EC2 instances or launch templates) are referencing it.

For more information, see View your AMI usage in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

client.create_image_usage_report(
    ImageId='string',
    DryRun=True|False,
    ResourceTypes=[
        {
            'ResourceType': 'string',
            'ResourceTypeOptions': [
                {
                    'OptionName': 'string',
                    'OptionValues': [
                        'string',
                    ]
                },
            ]
        },
    ],
    AccountIds=[
        'string',
    ],
    ClientToken='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'declarative-policies-report'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'image-usage-report'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'outpost-lag'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'service-link-virtual-interface'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'route-server'|'route-server-endpoint'|'route-server-peer'|'ipam-resource-discovery'|'ipam-resource-discovery-association'|'instance-connect-endpoint'|'verified-access-endpoint-target'|'ipam-external-resource-verification-token'|'capacity-block'|'mac-modification-task',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
type ImageId:

string

param ImageId:

[REQUIRED]

The ID of the image to report on.

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 ResourceTypes:

list

param ResourceTypes:

[REQUIRED]

The resource types to include in the report.

  • (dict) --

    A resource type to include in the report. Associated options can also be specified if the resource type is a launch template.

    • ResourceType (string) --

      The resource type.

      Valid values: ec2:Instance | ec2:LaunchTemplate

    • ResourceTypeOptions (list) --

      The options that affect the scope of the report. Valid only when ResourceType is ec2:LaunchTemplate.

      • (dict) --

        The options that affect the scope of the report.

        • OptionName (string) --

          The name of the option.

          Valid value: version-depth - The number of launch template versions to check.

        • OptionValues (list) --

          A value for the specified option.

          Valid values: Integers between 1 and 10000

          Default: 20

          • (string) --

type AccountIds:

list

param AccountIds:

The Amazon Web Services account IDs to include in the report. To include all accounts, omit this parameter.

  • (string) --

type ClientToken:

string

param ClientToken:

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

This field is autopopulated if not provided.

type TagSpecifications:

list

param TagSpecifications:

The tags to apply to the report on creation. The ResourceType must be set to image-usage-report; any other value will cause the report creation to fail.

To tag a report after it has been created, see CreateTags.

  • (dict) --

    The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.

    • ResourceType (string) --

      The type of resource to tag on creation.

    • Tags (list) --

      The tags to apply to the resource.

      • (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 256 Unicode characters.

rtype:

dict

returns:

Response Syntax

{
    'ReportId': 'string'
}

Response Structure

  • (dict) --

    • ReportId (string) --

      The ID of the report.

DeleteImageUsageReport (new) Link ¶

Deletes the specified image usage report.

For more information, see View your AMI usage in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

client.delete_image_usage_report(
    ReportId='string',
    DryRun=True|False
)
type ReportId:

string

param ReportId:

[REQUIRED]

The ID of the report to delete.

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

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

DescribeImageUsageReportEntries (new) Link ¶

Describes the entries in image usage reports, showing how your images are used across other Amazon Web Services accounts.

For more information, see View your AMI usage in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

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

list

param ImageIds:

The IDs of the images for filtering the report entries. If specified, only report entries containing these images are returned.

  • (string) --

type ReportIds:

list

param ReportIds:

The IDs of the usage reports.

  • (string) --

type NextToken:

string

param NextToken:

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

type Filters:

list

param Filters:

The filters.

  • account-id - A 12-digit Amazon Web Services account ID.

  • creation-time - The time when the report was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2025-11-29T11:04:43.305Z. You can use a wildcard ( *), for example, 2025-11-29T*, which matches an entire day.

  • resource-type - The resource type ( ec2:Instance | ec2:LaunchTemplate).

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

    If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (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 MaxResults:

integer

param 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.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'ImageUsageReportEntries': [
        {
            'ResourceType': 'string',
            'ReportId': 'string',
            'UsageCount': 123,
            'AccountId': 'string',
            'ImageId': 'string',
            'ReportCreationTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      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.

    • ImageUsageReportEntries (list) --

      The content of the usage reports.

      • (dict) --

        A single entry in an image usage report, detailing how an image is being used by a specific Amazon Web Services account and resource type.

        • ResourceType (string) --

          The type of resource ( ec2:Instance or ec2:LaunchTemplate).

        • ReportId (string) --

          The ID of the report.

        • UsageCount (integer) --

          The number of times resources of this type reference this image in the account.

        • AccountId (string) --

          The ID of the account that uses the image.

        • ImageId (string) --

          The ID of the image.

        • ReportCreationTime (datetime) --

          The date and time the report creation was initiated.

DescribeImageReferences (new) Link ¶

Describes your Amazon Web Services resources that are referencing the specified images.

For more information, see Identiy your resources referencing selected AMIs in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

client.describe_image_references(
    ImageIds=[
        'string',
    ],
    IncludeAllResourceTypes=True|False,
    ResourceTypes=[
        {
            'ResourceType': 'ec2:Instance'|'ec2:LaunchTemplate'|'ssm:Parameter'|'imagebuilder:ImageRecipe'|'imagebuilder:ContainerRecipe',
            'ResourceTypeOptions': [
                {
                    'OptionName': 'state-name'|'version-depth',
                    'OptionValues': [
                        'string',
                    ]
                },
            ]
        },
    ],
    NextToken='string',
    DryRun=True|False,
    MaxResults=123
)
type ImageIds:

list

param ImageIds:

[REQUIRED]

The IDs of the images to check for resource references.

  • (string) --

type IncludeAllResourceTypes:

boolean

param IncludeAllResourceTypes:

Specifies whether to check all supported Amazon Web Services resource types for image references. When specified, default values are applied for ResourceTypeOptions. For the default values, see How AMI reference checks work in the Amazon EC2 User Guide. If you also specify ResourceTypes with ResourceTypeOptions, your specified values override the default values.

Supported resource types: ec2:Instance | ec2:LaunchTemplate | ssm:Parameter | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe

Either IncludeAllResourceTypes or ResourceTypes must be specified.

type ResourceTypes:

list

param ResourceTypes:

The Amazon Web Services resource types to check for image references.

Either IncludeAllResourceTypes or ResourceTypes must be specified.

  • (dict) --

    A resource type to check for image references. Associated options can also be specified if the resource type is an EC2 instance or launch template.

    • ResourceType (string) --

      The resource type.

    • ResourceTypeOptions (list) --

      The options that affect the scope of the response. Valid only when ResourceType is ec2:Instance or ec2:LaunchTemplate.

      • (dict) --

        The options that affect the scope of the response.

        • OptionName (string) --

          The name of the option.

          • For ec2:Instance: Specify state-name - The current state of the EC2 instance.

          • For ec2:LaunchTemplate: Specify version-depth - The number of launch template versions to check, starting from the most recent version.

        • OptionValues (list) --

          A value for the specified option.

          • For state-name:

            • Valid values: pending | running | shutting-down | terminated | stopping | stopped

            • Default: All states

          • For version-depth:

            • Valid values: Integers between 1 and 10000

            • Default: 10

          • (string) --

type NextToken:

string

param NextToken:

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

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 MaxResults:

integer

param 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.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'ImageReferences': [
        {
            'ImageId': 'string',
            'ResourceType': 'ec2:Instance'|'ec2:LaunchTemplate'|'ssm:Parameter'|'imagebuilder:ImageRecipe'|'imagebuilder:ContainerRecipe',
            'Arn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      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.

    • ImageReferences (list) --

      The resources that are referencing the specified images.

      • (dict) --

        A resource that is referencing an image.

        • ImageId (string) --

          The ID of the referenced image.

        • ResourceType (string) --

          The type of resource referencing the image.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the resource referencing the image.

CreateLaunchTemplate (updated) Link ¶
Changes (request)
{'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'image-usage-report'}}}}
CreateLaunchTemplateVersion (updated) Link ¶
Changes (request, response)
Request
{'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'image-usage-report'}}}}
Response
{'LaunchTemplateVersion': {'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'image-usage-report'}}}}}
DescribeLaunchTemplateVersions (updated) Link ¶
Changes (response)
{'LaunchTemplateVersions': {'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'image-usage-report'}}}}}
DescribeSpotFleetRequests (updated) Link ¶
Changes (response)
{'SpotFleetRequestConfigs': {'SpotFleetRequestConfig': {'LaunchSpecifications': {'TagSpecifications': {'ResourceType': {'image-usage-report'}}},
                                                        'TagSpecifications': {'ResourceType': {'image-usage-report'}}}}}
DescribeTags (updated) Link ¶
Changes (response)
{'Tags': {'ResourceType': {'image-usage-report'}}}

Describes the specified tags for your EC2 resources.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.

See also: AWS API Documentation

Request Syntax

client.describe_tags(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='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 Filters:

list

param Filters:

The filters.

  • key - The tag key.

  • resource-id - The ID of the resource.

  • resource-type - The resource type. For a list of possible values, see TagSpecification.

  • tag:<key> - The key/value combination of the tag. For example, specify "tag:Owner" for the filter name and "TeamA" for the filter value to find resources with the tag "Owner=TeamA".

  • value - 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.

    If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (string) --

type MaxResults:

integer

param MaxResults:

The maximum number of items to return for this request. This value can be between 5 and 1000. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

type NextToken:

string

param NextToken:

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

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'Tags': [
        {
            'Key': 'string',
            'ResourceId': 'string',
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'declarative-policies-report'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'image-usage-report'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'outpost-lag'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'service-link-virtual-interface'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'route-server'|'route-server-endpoint'|'route-server-peer'|'ipam-resource-discovery'|'ipam-resource-discovery-association'|'instance-connect-endpoint'|'verified-access-endpoint-target'|'ipam-external-resource-verification-token'|'capacity-block'|'mac-modification-task',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      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.

    • Tags (list) --

      The tags.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The tag key.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The resource type.

        • Value (string) --

          The tag value.

GetLaunchTemplateData (updated) Link ¶
Changes (response)
{'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'image-usage-report'}}}}
ProvisionByoipCidr (updated) Link ¶
Changes (request)
{'PoolTagSpecifications': {'ResourceType': {'image-usage-report'}}}

Provisions an IPv4 or IPv6 address range for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and creates a corresponding address pool. After the address range is provisioned, it is ready to be advertised.

Amazon Web Services verifies that you own the address range and are authorized to advertise it. You must ensure that the address range is registered to you and that you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise the address range. For more information, see Bring your own IP addresses (BYOIP) in the Amazon EC2 User Guide.

Provisioning an address range is an asynchronous operation, so the call returns immediately, but the address range is not ready to use until its status changes from pending-provision to provisioned. For more information, see Onboard your address range.

See also: AWS API Documentation

Request Syntax

client.provision_byoip_cidr(
    Cidr='string',
    CidrAuthorizationContext={
        'Message': 'string',
        'Signature': 'string'
    },
    PubliclyAdvertisable=True|False,
    Description='string',
    DryRun=True|False,
    PoolTagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'declarative-policies-report'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'image-usage-report'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'outpost-lag'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'service-link-virtual-interface'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'route-server'|'route-server-endpoint'|'route-server-peer'|'ipam-resource-discovery'|'ipam-resource-discovery-association'|'instance-connect-endpoint'|'verified-access-endpoint-target'|'ipam-external-resource-verification-token'|'capacity-block'|'mac-modification-task',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    MultiRegion=True|False,
    NetworkBorderGroup='string'
)
type Cidr:

string

param Cidr:

[REQUIRED]

The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 prefix that you can specify is /24. The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /56 for CIDRs that are not publicly advertisable. The address range cannot overlap with another address range that you've brought to this or another Region.

type CidrAuthorizationContext:

dict

param CidrAuthorizationContext:

A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.

  • Message (string) -- [REQUIRED]

    The plain-text authorization message for the prefix and account.

  • Signature (string) -- [REQUIRED]

    The signed authorization message for the prefix and account.

type PubliclyAdvertisable:

boolean

param PubliclyAdvertisable:

(IPv6 only) Indicate whether the address range will be publicly advertised to the internet.

Default: true

type Description:

string

param Description:

A description for the address range and the address pool.

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 PoolTagSpecifications:

list

param PoolTagSpecifications:

The tags to apply to the address pool.

  • (dict) --

    The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.

    • ResourceType (string) --

      The type of resource to tag on creation.

    • Tags (list) --

      The tags to apply to the resource.

      • (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 256 Unicode characters.

type MultiRegion:

boolean

param MultiRegion:

Reserved.

type NetworkBorderGroup:

string

param NetworkBorderGroup:

If you have Local Zones enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group.

You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups:

  • us-east-1-dfw-2

  • us-west-2-lax-1

  • us-west-2-phx-2

rtype:

dict

returns:

Response Syntax

{
    'ByoipCidr': {
        'Cidr': 'string',
        'Description': 'string',
        'AsnAssociations': [
            {
                'Asn': 'string',
                'Cidr': 'string',
                'StatusMessage': 'string',
                'State': 'disassociated'|'failed-disassociation'|'failed-association'|'pending-disassociation'|'pending-association'|'associated'
            },
        ],
        'StatusMessage': 'string',
        'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'|'provisioned-not-publicly-advertisable',
        'NetworkBorderGroup': 'string'
    }
}

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address range.

      • Cidr (string) --

        The address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • AsnAssociations (list) --

        The BYOIP CIDR associations with ASNs.

        • (dict) --

          An Autonomous System Number (ASN) and BYOIP CIDR association.

          • Asn (string) --

            The association's ASN.

          • Cidr (string) --

            The association's CIDR.

          • StatusMessage (string) --

            The association's status message.

          • State (string) --

            The association's state.

      • StatusMessage (string) --

        Upon success, contains the ID of the address pool. Otherwise, contains an error message.

      • State (string) --

        The state of the address range.

        • advertised: The address range is being advertised to the internet by Amazon Web Services.

        • deprovisioned: The address range is deprovisioned.

        • failed-deprovision: The request to deprovision the address range was unsuccessful. Ensure that all EIPs from the range have been deallocated and try again.

        • failed-provision: The request to provision the address range was unsuccessful.

        • pending-deprovision: You’ve submitted a request to deprovision an address range and it's pending.

        • pending-provision: You’ve submitted a request to provision an address range and it's pending.

        • provisioned: The address range is provisioned and can be advertised. The range is not currently advertised.

        • provisioned-not-publicly-advertisable: The address range is provisioned and cannot be advertised.

      • NetworkBorderGroup (string) --

        If you have Local Zones enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group.

        You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups:

        • us-east-1-dfw-2

        • us-west-2-lax-1

        • us-west-2-phx-2

RequestSpotFleet (updated) Link ¶
Changes (request)
{'SpotFleetRequestConfig': {'LaunchSpecifications': {'TagSpecifications': {'ResourceType': {'image-usage-report'}}},
                            'TagSpecifications': {'ResourceType': {'image-usage-report'}}}}