2026/11/13 - Amazon Elastic Compute Cloud - 8 new8 updated api methods
Changes Adds support for Networking Flexible Cost Allocation APIs, enabling Network Admin, Architect, and Engineers to break down shared networking costs by the resources that generated the traffic.
Creates a flex cost allocation policy for Networking Flexible Cost Allocation (FCA), a feature of Amazon Virtual Private Cloud (Amazon VPC). The policy allocates the charges of a shared networking resource at the reporting granularity that you specify. You can create a policy for one of the following resource types: NAT gateways, Amazon VPC peering connections, or EC2 instances. Policies can allocate data transfer charges for all three types, and data processing charges for NAT gateways.
You can have up to 100 policies per account in each Amazon Web Services Region, plus one additional policy per network resource type created by a declarative policy, for a maximum of 103 policies in an Amazon Web Services Region.
See also: AWS API Documentation
Request Syntax
client.create_networking_flex_cost_allocation_policy(
NetworkResourceType='natgw'|'pcx'|'ec2',
NatFcaPolicyDocument={
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
InstanceFcaPolicyDocument={
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
PcxFcaPolicyDocument={
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
ShowBackEnabled=True|False,
Description='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'|'fca-policy'|'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-metering-policy'|'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'|'vpc-encryption-control'|'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'|'ipam-prefix-list-resolver'|'ipam-policy'|'ipam-prefix-list-resolver-target'|'ipam-internet-registry-association'|'secondary-interface'|'secondary-network'|'secondary-subnet'|'capacity-manager-data-export'|'vpn-concentrator'|'ipam-pool-allocation'|'capacity-reservation-cancellation-quote'|'application-status-check'|'capacity-reservation-modification-quote'|'metric-category',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
],
ClientToken='string',
DryRun=True|False
)
string
[REQUIRED]
The type of network resource that the policy applies to. This parameter is required. Valid values are natgw (NAT gateway), pcx (Amazon VPC peering connection), and ec2 (EC2 instance).
Specify the policy document that matches the resource type: NatFcaPolicyDocument for natgw, InstanceFcaPolicyDocument for ec2, or PcxFcaPolicyDocument for pcx. Don't specify a policy document for a different resource type.
dict
The policy document that defines cost allocation for NAT gateways. Provide this document when NetworkResourceType is natgw.
ReportingGranularity (list) -- [REQUIRED]
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) -- [REQUIRED]
The cost dimensions to report. This parameter is required. Valid values are data-transfer and data-processing.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) -- [REQUIRED]
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) -- [REQUIRED]
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) -- [REQUIRED]
The CIDR range. This parameter is required.
CidrLabel (string) -- [REQUIRED]
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
dict
The policy document that defines cost allocation for EC2 instances. Provide this document when NetworkResourceType is ec2.
ReportingGranularity (list) -- [REQUIRED]
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) -- [REQUIRED]
The cost dimensions to report. This parameter is required. The only valid value is data-transfer.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) -- [REQUIRED]
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) -- [REQUIRED]
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) -- [REQUIRED]
The CIDR range. This parameter is required.
CidrLabel (string) -- [REQUIRED]
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
dict
The policy document that defines cost allocation for Amazon VPC peering connections. Provide this document when NetworkResourceType is pcx.
ReportingGranularity (list) -- [REQUIRED]
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) -- [REQUIRED]
The cost dimensions to report. This parameter is required. The only valid value is data-transfer.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) -- [REQUIRED]
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) -- [REQUIRED]
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) -- [REQUIRED]
The CIDR range. This parameter is required.
CidrLabel (string) -- [REQUIRED]
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
boolean
Specifies whether showback reporting is enabled for the policy.
Default: true
string
A description for the policy. The description can be up to 1024 characters long.
list
The tags to assign to the policy.
(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.
string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
This field is autopopulated if not provided.
boolean
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.
dict
Response Syntax
{
'FcaPolicyId': 'string',
'FcaPolicyArn': 'string',
'CreatedAt': datetime(2015, 1, 1),
'ExpectedEffectiveAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
FcaPolicyId (string) --
The ID of the flex cost allocation policy.
FcaPolicyArn (string) --
The Amazon Resource Name (ARN) of the flex cost allocation policy.
CreatedAt (datetime) --
The date and time when the policy was created.
ExpectedEffectiveAt (datetime) --
The date and time when the policy is expected to apply to network traffic.
Associates a flex cost allocation policy with one or more network resources. You can associate the policy directly with specific resources by resource ID, or you can associate it with a scope of resources in an account, Amazon VPC, or subnet.
The following limits apply:
A request can associate up to 20 resources.
A policy can have up to 100 active associations.
A network resource can have only one active association, across all policies. If a resource is already associated, the response includes it in the failures with the code ResourceAlreadyAssociated.
See also: AWS API Documentation
Request Syntax
client.associate_networking_flex_cost_allocation_policy(
FcaPolicyId='string',
NetworkResourceIds=[
'string',
],
NetworkResourceScope={
'ResourceType': 'account'|'vpc'|'subnet',
'ResourceIds': [
'string',
]
},
ClientToken='string',
DryRun=True|False
)
string
[REQUIRED]
The ID of the flex cost allocation policy to associate. This parameter is required.
list
The IDs of the network resources to associate with the policy. You can specify from 1 to 20 resource IDs.
You must specify NetworkResourceIds, NetworkResourceScope, or both. A request can include at most 20 distinct resources in total.
(string) --
dict
The scope of network resources to associate with the policy. Use a scope to associate the policy with the resources in an account, Amazon VPC, or subnet.
You must specify NetworkResourceScope, NetworkResourceIds, or both.
ResourceType (string) -- [REQUIRED]
The type of scope. This parameter is required. Valid values are account, vpc, and subnet.
ResourceIds (list) -- [REQUIRED]
The IDs of the resources owned by you that define the scope. You can specify from 1 to 20 IDs. This parameter is required.
(string) --
string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
This field is autopopulated if not provided.
boolean
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.
dict
Response Syntax
{
'FcaPolicyAssociations': [
{
'FcaPolicyAssociationId': 'string',
'FcaPolicyId': 'string',
'NetworkResourceId': 'string',
'OwnerAccount': 'string',
'AssociatedAt': datetime(2015, 1, 1),
'ExpectedEffectiveAt': datetime(2015, 1, 1),
'AssociationMode': 'direct'|'scope',
'ManagedBy': 'account'|'declarative-policy'
},
],
'FcaPolicyAssociationFailures': [
{
'ResourceId': 'string',
'FailureCode': 'string',
'FailureReason': 'string'
},
]
}
Response Structure
(dict) --
FcaPolicyAssociations (list) --
Information about the policy associations that were created.
(dict) --
Describes an association between a flex cost allocation policy and a network resource.
FcaPolicyAssociationId (string) --
The ID of the policy association.
FcaPolicyId (string) --
The ID of the policy.
NetworkResourceId (string) --
The ID of the associated network resource.
OwnerAccount (string) --
The ID of the account that owns the association.
AssociatedAt (datetime) --
The date and time when the association was created.
ExpectedEffectiveAt (datetime) --
The date and time when the association is expected to apply to network traffic.
AssociationMode (string) --
The mode of the association. Valid values:
direct - The policy is associated with specific resources by resource ID.
scope - The policy is associated with a scope of resources in an account, Amazon VPC, or subnet.
ManagedBy (string) --
The entity that manages the association. Valid values are:
account - The account that owns the association created it.
declarative-policy - An Amazon Web Services Organizations declarative policy created the association. You can't remove the association.
FcaPolicyAssociationFailures (list) --
Information about the network resources that could not be associated with the policy.
(dict) --
Describes a policy, association, or network resource that a Networking Flexible Cost Allocation operation failed to process.
ResourceId (string) --
The ID of the resource that could not be processed.
FailureCode (string) --
The code that identifies the type of failure. Possible values are:
ResourceNotFound - ( DeleteNetworkingFlexCostAllocationPolicies) The policy doesn't exist or isn't owned by your account.
InvalidResourceState - ( DeleteNetworkingFlexCostAllocationPolicies) The policy has active associations.
InvalidResource - ( AssociateNetworkingFlexCostAllocationPolicy) The resource ID is malformed, the resource type doesn't match the policy, or the scope is an account other than yours. ( DisassociateNetworkingFlexCostAllocationPolicy) The association doesn't exist or was already removed.
ResourceAlreadyAssociated - ( AssociateNetworkingFlexCostAllocationPolicy) The resource already has an active association.
InternalError - An internal error occurred. Retry the request.
FailureReason (string) --
The reason for the failure.
Retrieves the versions of a flex cost allocation policy.
See also: AWS API Documentation
Request Syntax
client.get_networking_flex_cost_allocation_policy_versions(
FcaPolicyId='string',
VersionsToInclude=[
123,
],
DryRun=True|False
)
string
[REQUIRED]
The ID of the flex cost allocation policy. This parameter is required.
list
The policy versions to include in the results.
(integer) --
boolean
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.
dict
Response Syntax
{
'FcaPolicyVersions': [
{
'FcaPolicyId': 'string',
'Version': 123,
'NetworkResourceType': 'natgw'|'pcx'|'ec2',
'NatFcaPolicyDocument': {
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
'InstanceFcaPolicyDocument': {
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
'PcxFcaPolicyDocument': {
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
'ShowBackEnabled': True|False,
'Description': 'string',
'ExpectedEffectiveAt': datetime(2015, 1, 1),
'CreatedAt': datetime(2015, 1, 1)
},
]
}
Response Structure
(dict) --
FcaPolicyVersions (list) --
Information about the policy versions.
(dict) --
Describes a version of a flex cost allocation policy.
FcaPolicyId (string) --
The ID of the policy.
Version (integer) --
The version number.
NetworkResourceType (string) --
The type of network resource that the policy applies to.
NatFcaPolicyDocument (dict) --
The policy document that defines cost allocation for NAT gateways.
ReportingGranularity (list) --
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) --
The cost dimensions to report. This parameter is required. Valid values are data-transfer and data-processing.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) --
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) --
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) --
The CIDR range. This parameter is required.
CidrLabel (string) --
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
InstanceFcaPolicyDocument (dict) --
The policy document that defines cost allocation for EC2 instances.
ReportingGranularity (list) --
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) --
The cost dimensions to report. This parameter is required. The only valid value is data-transfer.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) --
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) --
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) --
The CIDR range. This parameter is required.
CidrLabel (string) --
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
PcxFcaPolicyDocument (dict) --
The policy document that defines cost allocation for Amazon VPC peering connections.
ReportingGranularity (list) --
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) --
The cost dimensions to report. This parameter is required. The only valid value is data-transfer.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) --
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) --
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) --
The CIDR range. This parameter is required.
CidrLabel (string) --
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
ShowBackEnabled (boolean) --
Indicates whether showback reporting is enabled for this version of the policy.
Description (string) --
The description of this version of the policy.
ExpectedEffectiveAt (datetime) --
The date and time when this version of the policy is expected to apply to network traffic.
CreatedAt (datetime) --
The date and time when this version of the policy was created.
Deletes one or more flex cost allocation policies.
See also: AWS API Documentation
Request Syntax
client.delete_networking_flex_cost_allocation_policies(
FcaPolicyIds=[
'string',
],
DryRun=True|False
)
list
[REQUIRED]
The IDs of the flex cost allocation policies to delete. You can specify up to 50 policy IDs. This parameter is required.
(string) --
boolean
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.
dict
Response Syntax
{
'Successful': [
'string',
],
'Failed': [
{
'ResourceId': 'string',
'FailureCode': 'string',
'FailureReason': 'string'
},
]
}
Response Structure
(dict) --
Successful (list) --
The IDs of the policies that were successfully deleted.
(string) --
Failed (list) --
Information about the policies that could not be deleted.
(dict) --
Describes a policy, association, or network resource that a Networking Flexible Cost Allocation operation failed to process.
ResourceId (string) --
The ID of the resource that could not be processed.
FailureCode (string) --
The code that identifies the type of failure. Possible values are:
ResourceNotFound - ( DeleteNetworkingFlexCostAllocationPolicies) The policy doesn't exist or isn't owned by your account.
InvalidResourceState - ( DeleteNetworkingFlexCostAllocationPolicies) The policy has active associations.
InvalidResource - ( AssociateNetworkingFlexCostAllocationPolicy) The resource ID is malformed, the resource type doesn't match the policy, or the scope is an account other than yours. ( DisassociateNetworkingFlexCostAllocationPolicy) The association doesn't exist or was already removed.
ResourceAlreadyAssociated - ( AssociateNetworkingFlexCostAllocationPolicy) The resource already has an active association.
InternalError - An internal error occurred. Retry the request.
FailureReason (string) --
The reason for the failure.
Describes the associations between your flex cost allocation policies and network resources. We recommend using pagination to ensure that the operation returns quickly and successfully.
See also: AWS API Documentation
Request Syntax
client.describe_networking_flex_cost_allocation_policy_associations(
FcaPolicyAssociationIds=[
'string',
],
MaxResults=123,
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
NextToken='string',
DryRun=True|False
)
list
The IDs of the policy associations to describe.
(string) --
integer
The maximum number of results to return in a single call. The range is 5 to 1000. To retrieve the remaining results, make another call with the returned nextToken value.
Default: 100
list
The filters.
fca-policy-id - The ID of the policy.
managed-by - The entity that manages the association ( account | declarative-policy).
resource-id - The ID of the associated network resource.
(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) --
string
The token for the next page of results.
boolean
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.
dict
Response Syntax
{
'FcaPolicyAssociations': [
{
'FcaPolicyAssociationId': 'string',
'FcaPolicyId': 'string',
'NetworkResourceId': 'string',
'OwnerAccount': 'string',
'AssociatedAt': datetime(2015, 1, 1),
'ExpectedEffectiveAt': datetime(2015, 1, 1),
'AssociationMode': 'direct'|'scope',
'ManagedBy': 'account'|'declarative-policy'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
FcaPolicyAssociations (list) --
Information about the policy associations.
(dict) --
Describes an association between a flex cost allocation policy and a network resource.
FcaPolicyAssociationId (string) --
The ID of the policy association.
FcaPolicyId (string) --
The ID of the policy.
NetworkResourceId (string) --
The ID of the associated network resource.
OwnerAccount (string) --
The ID of the account that owns the association.
AssociatedAt (datetime) --
The date and time when the association was created.
ExpectedEffectiveAt (datetime) --
The date and time when the association is expected to apply to network traffic.
AssociationMode (string) --
The mode of the association. Valid values:
direct - The policy is associated with specific resources by resource ID.
scope - The policy is associated with a scope of resources in an account, Amazon VPC, or subnet.
ManagedBy (string) --
The entity that manages the association. Valid values are:
account - The account that owns the association created it.
declarative-policy - An Amazon Web Services Organizations declarative policy created the association. You can't remove the association.
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.
Describes one or more of your flex cost allocation policies. We recommend using pagination to ensure that the operation returns quickly and successfully.
See also: AWS API Documentation
Request Syntax
client.describe_networking_flex_cost_allocation_policies(
FcaPolicyIds=[
'string',
],
MaxResults=123,
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
NextToken='string',
DryRun=True|False
)
list
The IDs of the flex cost allocation policies to describe.
(string) --
integer
The maximum number of results to return in a single call. The range is 5 to 1000. To retrieve the remaining results, make another call with the returned nextToken value.
Default: 100
list
The filters.
fca-policy-id - The ID of the policy.
managed-by - The entity that manages the policy ( account | declarative-policy).
network-resource-type - The type of network resource that the policy applies to ( natgw | ec2 | pcx).
showback-enabled - Indicates whether showback reporting is enabled for the policy ( true | false).
(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) --
string
The token for the next page of results.
boolean
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.
dict
Response Syntax
{
'FlexCostAllocationPolicies': [
{
'FcaPolicyId': 'string',
'FcaPolicyArn': 'string',
'NetworkResourceType': 'natgw'|'pcx'|'ec2',
'NatFcaPolicyDocument': {
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
'InstanceFcaPolicyDocument': {
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
'PcxFcaPolicyDocument': {
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
'ShowBackEnabled': True|False,
'OwnerAccount': 'string',
'Description': 'string',
'LatestVersion': 123,
'VersionExpectedEffectiveAt': datetime(2015, 1, 1),
'PolicyCreatedAt': datetime(2015, 1, 1),
'UpdatedAt': datetime(2015, 1, 1),
'ManagedBy': 'account'|'declarative-policy',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
FlexCostAllocationPolicies (list) --
Information about the flex cost allocation policies.
(dict) --
Describes a flex cost allocation policy.
FcaPolicyId (string) --
The ID of the policy.
FcaPolicyArn (string) --
The Amazon Resource Name (ARN) of the policy.
NetworkResourceType (string) --
The type of network resource that the policy applies to.
NatFcaPolicyDocument (dict) --
The policy document that defines cost allocation for NAT gateways.
ReportingGranularity (list) --
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) --
The cost dimensions to report. This parameter is required. Valid values are data-transfer and data-processing.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) --
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) --
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) --
The CIDR range. This parameter is required.
CidrLabel (string) --
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
InstanceFcaPolicyDocument (dict) --
The policy document that defines cost allocation for EC2 instances.
ReportingGranularity (list) --
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) --
The cost dimensions to report. This parameter is required. The only valid value is data-transfer.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) --
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) --
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) --
The CIDR range. This parameter is required.
CidrLabel (string) --
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
PcxFcaPolicyDocument (dict) --
The policy document that defines cost allocation for Amazon VPC peering connections.
ReportingGranularity (list) --
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) --
The cost dimensions to report. This parameter is required. The only valid value is data-transfer.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) --
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) --
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) --
The CIDR range. This parameter is required.
CidrLabel (string) --
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
ShowBackEnabled (boolean) --
Indicates whether showback reporting is enabled for the policy.
OwnerAccount (string) --
The ID of the account that owns the policy.
Description (string) --
The description of the policy.
LatestVersion (integer) --
The number of the latest version of the policy.
VersionExpectedEffectiveAt (datetime) --
The date and time when the latest version of the policy is expected to apply to network traffic. The policy configuration in this response is from the latest version.
PolicyCreatedAt (datetime) --
The date and time when the policy was created.
UpdatedAt (datetime) --
The date and time when the policy was last updated.
ManagedBy (string) --
The entity that manages the policy. Valid values are:
account - The account that owns the policy created it.
declarative-policy - An Amazon Web Services Organizations declarative policy created the policy. You can't modify or delete the policy.
Tags (list) --
The tags assigned to the policy.
(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.
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.
Disassociates a flex cost allocation policy from one or more network resources.
See also: AWS API Documentation
Request Syntax
client.disassociate_networking_flex_cost_allocation_policy(
FcaPolicyAssociationIds=[
'string',
],
DryRun=True|False
)
list
[REQUIRED]
The IDs of the policy associations to remove. You can specify up to 100 association IDs. This parameter is required.
(string) --
boolean
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.
dict
Response Syntax
{
'FcaPolicyDisassociations': [
'string',
],
'FcaPolicyDisassociationFailures': [
{
'ResourceId': 'string',
'FailureCode': 'string',
'FailureReason': 'string'
},
]
}
Response Structure
(dict) --
FcaPolicyDisassociations (list) --
The IDs of the policy associations that were removed.
(string) --
FcaPolicyDisassociationFailures (list) --
Information about the policy associations that could not be removed.
(dict) --
Describes a policy, association, or network resource that a Networking Flexible Cost Allocation operation failed to process.
ResourceId (string) --
The ID of the resource that could not be processed.
FailureCode (string) --
The code that identifies the type of failure. Possible values are:
ResourceNotFound - ( DeleteNetworkingFlexCostAllocationPolicies) The policy doesn't exist or isn't owned by your account.
InvalidResourceState - ( DeleteNetworkingFlexCostAllocationPolicies) The policy has active associations.
InvalidResource - ( AssociateNetworkingFlexCostAllocationPolicy) The resource ID is malformed, the resource type doesn't match the policy, or the scope is an account other than yours. ( DisassociateNetworkingFlexCostAllocationPolicy) The association doesn't exist or was already removed.
ResourceAlreadyAssociated - ( AssociateNetworkingFlexCostAllocationPolicy) The resource already has an active association.
InternalError - An internal error occurred. Retry the request.
FailureReason (string) --
The reason for the failure.
Modifies a flex cost allocation policy. Changing a policy document or ShowBackEnabled creates a new version of the policy. Changing only the description doesn't create a new version.
A policy can have up to 100 versions. Versions are never removed, so after a policy reaches 100 versions, you can't change its policy document or ShowBackEnabled. Policies that are managed by a declarative policy aren't subject to this limit.
See also: AWS API Documentation
Request Syntax
client.modify_networking_flex_cost_allocation_policy(
FcaPolicyId='string',
NatFcaPolicyDocument={
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
InstanceFcaPolicyDocument={
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
PcxFcaPolicyDocument={
'ReportingGranularity': [
'eni'|'ec2'|'subnet'|'vpc'|'account'|'peering-id'|'cidr',
],
'Dimensions': [
'data-transfer'|'data-processing',
],
'CidrRangeSpecifications': {
'PrefixesType': 'string',
'Prefixes': [
{
'CidrRange': 'string',
'CidrLabel': 'string'
},
]
}
},
ShowBackEnabled=True|False,
Description='string',
ClientToken='string',
DryRun=True|False
)
string
[REQUIRED]
The ID of the flex cost allocation policy to modify. This parameter is required.
dict
The updated policy document that defines cost allocation for NAT gateways.
ReportingGranularity (list) -- [REQUIRED]
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) -- [REQUIRED]
The cost dimensions to report. This parameter is required. Valid values are data-transfer and data-processing.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) -- [REQUIRED]
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) -- [REQUIRED]
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) -- [REQUIRED]
The CIDR range. This parameter is required.
CidrLabel (string) -- [REQUIRED]
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
dict
The updated policy document that defines cost allocation for EC2 instances.
ReportingGranularity (list) -- [REQUIRED]
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) -- [REQUIRED]
The cost dimensions to report. This parameter is required. The only valid value is data-transfer.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) -- [REQUIRED]
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) -- [REQUIRED]
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) -- [REQUIRED]
The CIDR range. This parameter is required.
CidrLabel (string) -- [REQUIRED]
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
dict
The updated policy document that defines cost allocation for Amazon VPC peering connections.
ReportingGranularity (list) -- [REQUIRED]
The resource granularity level at which networking costs are allocated. This parameter is required. Specify exactly one value. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
(string) --
The resource granularity level at which networking costs are allocated. Valid values are eni, ec2, subnet, vpc, account, peering-id, and cidr.
Which values you can use depends on the policy document. peering-id is valid only in a PcxFcaPolicyDocument.
Dimensions (list) -- [REQUIRED]
The cost dimensions to report. This parameter is required. The only valid value is data-transfer.
(string) --
A cost dimension used for allocation. Valid values are data-transfer and data-processing. data-processing is valid only in a NatFcaPolicyDocument.
CidrRangeSpecifications (dict) --
The CIDR range mappings to use for cost allocation. Specify this value when ReportingGranularity is cidr, and omit it otherwise.
PrefixesType (string) -- [REQUIRED]
The type of prefixes to use. This parameter is required. Valid values are source-prefixes and destination-prefixes.
Prefixes (list) -- [REQUIRED]
The CIDR range to label mappings. You can specify from 1 to 100 mappings. This parameter is required.
(dict) --
Maps a CIDR range to a label for cost allocation reporting.
CidrRange (string) -- [REQUIRED]
The CIDR range. This parameter is required.
CidrLabel (string) -- [REQUIRED]
The label to assign to the CIDR range. The label can be up to 64 characters long. It can contain letters, numbers, hyphens ( -), and underscores ( _), and must start with a letter or a number. This parameter is required.
boolean
Specifies whether showback reporting is enabled for the policy. If you omit this parameter, the current setting is unchanged.
string
A description for the policy. The description can be up to 1024 characters long.
string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
This field is autopopulated if not provided.
boolean
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.
dict
Response Syntax
{
'FcaPolicyId': 'string',
'UpdatedAt': datetime(2015, 1, 1),
'Version': 123,
'VersionExpectedEffectiveAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
FcaPolicyId (string) --
The ID of the flex cost allocation policy.
UpdatedAt (datetime) --
The date and time when the policy was updated.
Version (integer) --
The version number of the policy that this modification created.
VersionExpectedEffectiveAt (datetime) --
The date and time when the new version of the policy is expected to apply to network traffic.
{'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'fca-policy'}}}}
{'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'fca-policy'}}}}
Response {'LaunchTemplateVersion': {'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'fca-policy'}}}}}
{'LaunchTemplateVersions': {'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'fca-policy'}}}}}
{'SpotFleetRequestConfigs': {'SpotFleetRequestConfig': {'LaunchSpecifications': {'TagSpecifications': {'ResourceType': {'fca-policy'}}},
'TagSpecifications': {'ResourceType': {'fca-policy'}}}}}
{'Tags': {'ResourceType': {'fca-policy'}}}
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'
)
boolean
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.
list
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) --
integer
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.
string
The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
dict
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'|'fca-policy'|'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-metering-policy'|'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'|'vpc-encryption-control'|'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'|'ipam-prefix-list-resolver'|'ipam-policy'|'ipam-prefix-list-resolver-target'|'ipam-internet-registry-association'|'secondary-interface'|'secondary-network'|'secondary-subnet'|'capacity-manager-data-export'|'vpn-concentrator'|'ipam-pool-allocation'|'capacity-reservation-cancellation-quote'|'application-status-check'|'capacity-reservation-modification-quote'|'metric-category',
'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.
{'LaunchTemplateData': {'TagSpecifications': {'ResourceType': {'fca-policy'}}}}
{'PoolTagSpecifications': {'ResourceType': {'fca-policy'}}}
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 the Amazon Web Services GovCloud (US) Regions, authorize only ASN 8987. For the Amazon Web Services European Sovereign Cloud, authorize ASNs 16509 and 214101. 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'|'fca-policy'|'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-metering-policy'|'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'|'vpc-encryption-control'|'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'|'ipam-prefix-list-resolver'|'ipam-policy'|'ipam-prefix-list-resolver-target'|'ipam-internet-registry-association'|'secondary-interface'|'secondary-network'|'secondary-subnet'|'capacity-manager-data-export'|'vpn-concentrator'|'ipam-pool-allocation'|'capacity-reservation-cancellation-quote'|'application-status-check'|'capacity-reservation-modification-quote'|'metric-category',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
],
MultiRegion=True|False,
NetworkBorderGroup='string'
)
string
[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.
dict
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.
boolean
(IPv6 only) Indicate whether the address range will be publicly advertised to the internet.
Default: true
string
A description for the address range and the address pool.
boolean
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.
list
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.
boolean
Reserved.
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
dict
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-advertising'|'pending-deprovision'|'pending-provision'|'pending-withdrawal'|'provisioned'|'provisioned-not-publicly-advertisable',
'NetworkBorderGroup': 'string',
'AdvertisementType': 'string',
'PoolId': 'string',
'IpamPoolId': '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
AdvertisementType (string) --
Specifies the advertisement method for the BYOIP CIDR. Valid values are:
unicast: IP is advertised from a single location (regional services like EC2)
anycast: IP is advertised from multiple global locations simultaneously (global services like CloudFront)
For more information, see Bring your own IP to CloudFront using IPAM in the Amazon VPC IPAM User Guide.
PoolId (string) --
The ID of the address pool associated with the CIDR.
IpamPoolId (string) --
The ID of the IPAM pool associated with the CIDR.
{'SpotFleetRequestConfig': {'LaunchSpecifications': {'TagSpecifications': {'ResourceType': {'fca-policy'}}},
'TagSpecifications': {'ResourceType': {'fca-policy'}}}}