EC2 / Paginator / DescribeNetworkingFlexCostAllocationPolicies

DescribeNetworkingFlexCostAllocationPolicies

class EC2.Paginator.DescribeNetworkingFlexCostAllocationPolicies
paginator = client.get_paginator('describe_networking_flex_cost_allocation_policies')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_networking_flex_cost_allocation_policies().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    FcaPolicyIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • FcaPolicyIds (list) –

    The IDs of the flex cost allocation policies to describe.

    • (string) –

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

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

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

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'
                },
            ]
        },
    ],

}

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.