AWS Billing and Cost Management Pricing Calculator

2024/11/22 - AWS Billing and Cost Management Pricing Calculator - 36 new api methods

Changes  Initial release of the AWS Billing and Cost Management Pricing Calculator API.

UpdateBillEstimate (new) Link ¶

Updates an existing bill estimate.

See also: AWS API Documentation

Request Syntax

client.update_bill_estimate(
    identifier='string',
    name='string',
    expiresAt=datetime(2015, 1, 1)
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the bill estimate to update.

type name:

string

param name:

The new name for the bill estimate.

type expiresAt:

datetime

param expiresAt:

The new expiration date for the bill estimate.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'status': 'IN_PROGRESS'|'COMPLETE'|'FAILED',
    'failureMessage': 'string',
    'billInterval': {
        'start': datetime(2015, 1, 1),
        'end': datetime(2015, 1, 1)
    },
    'costSummary': {
        'totalCostDifference': {
            'historicalCost': {
                'amount': 123.0,
                'currency': 'USD'
            },
            'estimatedCost': {
                'amount': 123.0,
                'currency': 'USD'
            }
        },
        'serviceCostDifferences': {
            'string': {
                'historicalCost': {
                    'amount': 123.0,
                    'currency': 'USD'
                },
                'estimatedCost': {
                    'amount': 123.0,
                    'currency': 'USD'
                }
            }
        }
    },
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the updated bill estimate.

    • name (string) --

      The updated name of the bill estimate.

    • status (string) --

      The current status of the updated bill estimate.

    • failureMessage (string) --

      An error message if the bill estimate update failed.

    • billInterval (dict) --

      The time period covered by the updated bill estimate.

      • start (datetime) --

        The start date and time of the interval.

      • end (datetime) --

        The end date and time of the interval.

    • costSummary (dict) --

      A summary of the updated estimated costs.

      • totalCostDifference (dict) --

        The total difference in cost between the estimated and historical costs.

        • historicalCost (dict) --

          The historical cost amount.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

        • estimatedCost (dict) --

          The estimated cost amount.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

      • serviceCostDifferences (dict) --

        A breakdown of cost differences by Amazon Web Services service.

        • (string) --

          • (dict) --

            Represents the difference between historical and estimated costs.

            • historicalCost (dict) --

              The historical cost amount.

              • amount (float) --

                The numeric value of the cost.

              • currency (string) --

                The currency code for the cost amount.

            • estimatedCost (dict) --

              The estimated cost amount.

              • amount (float) --

                The numeric value of the cost.

              • currency (string) --

                The currency code for the cost amount.

    • createdAt (datetime) --

      The timestamp when the bill estimate was originally created.

    • expiresAt (datetime) --

      The updated expiration timestamp for the bill estimate.

ListBillEstimateInputCommitmentModifications (new) Link ¶

Lists the input commitment modifications associated with a bill estimate.

See also: AWS API Documentation

Request Syntax

client.list_bill_estimate_input_commitment_modifications(
    billEstimateId='string',
    nextToken='string',
    maxResults=123
)
type billEstimateId:

string

param billEstimateId:

[REQUIRED]

The unique identifier of the bill estimate to list input commitment modifications for.

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'commitmentAction': {
                'addReservedInstanceAction': {
                    'reservedInstancesOfferingId': 'string',
                    'instanceCount': 123
                },
                'addSavingsPlanAction': {
                    'savingsPlanOfferingId': 'string',
                    'commitment': 123.0
                },
                'negateReservedInstanceAction': {
                    'reservedInstancesId': 'string'
                },
                'negateSavingsPlanAction': {
                    'savingsPlanId': 'string'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of input commitment modifications associated with the bill estimate.

      • (dict) --

        Summarizes an input commitment modification for a bill estimate.

        • id (string) --

          The unique identifier of the commitment modification.

        • group (string) --

          The group identifier for the commitment modification.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this commitment modification.

        • commitmentAction (dict) --

          The specific commitment action taken in this modification.

          • addReservedInstanceAction (dict) --

            Action to add a Reserved Instance to the scenario.

            • reservedInstancesOfferingId (string) --

              The ID of the Reserved Instance offering to add. For more information, see DescribeReservedInstancesOfferings.

            • instanceCount (integer) --

              The number of instances to add for this Reserved Instance offering.

          • addSavingsPlanAction (dict) --

            Action to add a Savings Plan to the scenario.

            • savingsPlanOfferingId (string) --

              The ID of the Savings Plan offering to add. For more information, see DescribeSavingsPlansOfferings.

            • commitment (float) --

              The hourly commitment, in the same currency of the savingsPlanOfferingId. This is a value between 0.001 and 1 million. You cannot specify more than five digits after the decimal point.

          • negateReservedInstanceAction (dict) --

            Action to remove a Reserved Instance from the scenario.

            • reservedInstancesId (string) --

              The ID of the Reserved Instance to remove.

          • negateSavingsPlanAction (dict) --

            Action to remove a Savings Plan from the scenario.

            • savingsPlanId (string) --

              The ID of the Savings Plan to remove.

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

ListBillScenarioCommitmentModifications (new) Link ¶

Lists the commitment modifications associated with a bill scenario.

See also: AWS API Documentation

Request Syntax

client.list_bill_scenario_commitment_modifications(
    billScenarioId='string',
    nextToken='string',
    maxResults=123
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The unique identifier of the bill scenario to list commitment modifications for.

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'usageAccountId': 'string',
            'group': 'string',
            'commitmentAction': {
                'addReservedInstanceAction': {
                    'reservedInstancesOfferingId': 'string',
                    'instanceCount': 123
                },
                'addSavingsPlanAction': {
                    'savingsPlanOfferingId': 'string',
                    'commitment': 123.0
                },
                'negateReservedInstanceAction': {
                    'reservedInstancesId': 'string'
                },
                'negateSavingsPlanAction': {
                    'savingsPlanId': 'string'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of commitment modifications associated with the bill scenario.

      • (dict) --

        Represents a commitment modification item in a bill scenario.

        • id (string) --

          The unique identifier of the commitment modification.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this commitment modification.

        • group (string) --

          The group identifier for the commitment modification.

        • commitmentAction (dict) --

          The specific commitment action taken in this modification.

          • addReservedInstanceAction (dict) --

            Action to add a Reserved Instance to the scenario.

            • reservedInstancesOfferingId (string) --

              The ID of the Reserved Instance offering to add. For more information, see DescribeReservedInstancesOfferings.

            • instanceCount (integer) --

              The number of instances to add for this Reserved Instance offering.

          • addSavingsPlanAction (dict) --

            Action to add a Savings Plan to the scenario.

            • savingsPlanOfferingId (string) --

              The ID of the Savings Plan offering to add. For more information, see DescribeSavingsPlansOfferings.

            • commitment (float) --

              The hourly commitment, in the same currency of the savingsPlanOfferingId. This is a value between 0.001 and 1 million. You cannot specify more than five digits after the decimal point.

          • negateReservedInstanceAction (dict) --

            Action to remove a Reserved Instance from the scenario.

            • reservedInstancesId (string) --

              The ID of the Reserved Instance to remove.

          • negateSavingsPlanAction (dict) --

            Action to remove a Savings Plan from the scenario.

            • savingsPlanId (string) --

              The ID of the Savings Plan to remove.

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

BatchCreateWorkloadEstimateUsage (new) Link ¶

Create Amazon Web Services service usage that you want to model in a Workload Estimate.

See also: AWS API Documentation

Request Syntax

client.batch_create_workload_estimate_usage(
    workloadEstimateId='string',
    usage=[
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'key': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'amount': 123.0,
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            }
        },
    ],
    clientToken='string'
)
type workloadEstimateId:

string

param workloadEstimateId:

[REQUIRED]

The ID of the Workload estimate for which you want to create the modeled usage.

type usage:

list

param usage:

[REQUIRED]

List of usage that you want to model in the Workload estimate.

  • (dict) --

    Represents an entry in a batch operation to create workload estimate usage.

    • serviceCode (string) -- [REQUIRED]

      The Amazon Web Services service code for this usage estimate.

    • usageType (string) -- [REQUIRED]

      The type of usage being estimated.

    • operation (string) -- [REQUIRED]

      The specific operation associated with this usage estimate.

    • key (string) -- [REQUIRED]

      A unique identifier for this entry in the batch operation.

    • group (string) --

      An optional group identifier for the usage estimate.

    • usageAccountId (string) -- [REQUIRED]

      The Amazon Web Services account ID associated with this usage estimate.

    • amount (float) -- [REQUIRED]

      The estimated usage amount.

    • historicalUsage (dict) --

      Historical usage data associated with this estimate, if available.

      • serviceCode (string) -- [REQUIRED]

        The Amazon Web Services service code associated with the usage.

      • usageType (string) -- [REQUIRED]

        The type of usage.

      • operation (string) -- [REQUIRED]

        The specific operation associated with the usage.

      • location (string) --

        The location associated with the usage.

      • usageAccountId (string) -- [REQUIRED]

        The Amazon Web Services account ID associated with the usage.

      • billInterval (dict) -- [REQUIRED]

        The time interval for the historical usage data.

        • start (datetime) --

          The start date and time of the interval.

        • end (datetime) --

          The end date and time of the interval.

      • filterExpression (dict) -- [REQUIRED]

        An optional filter expression to apply to the historical usage data.

        • and (list) --

          A list of expressions to be combined with AND logic.

          • (dict) --

            Represents a complex filtering expression for cost and usage data.

        • or (list) --

          A list of expressions to be combined with OR logic.

          • (dict) --

            Represents a complex filtering expression for cost and usage data.

        • not (dict) --

          An expression to be negated.

        • costCategories (dict) --

          Filters based on cost categories.

          • key (string) --

            The key or attribute to filter on.

          • matchOptions (list) --

            The match options for the filter (e.g., equals, contains).

            • (string) --

          • values (list) --

            The values to match against.

            • (string) --

        • dimensions (dict) --

          Filters based on dimensions (e.g., service, operation).

          • key (string) --

            The key or attribute to filter on.

          • matchOptions (list) --

            The match options for the filter (e.g., equals, contains).

            • (string) --

          • values (list) --

            The values to match against.

            • (string) --

        • tags (dict) --

          Filters based on resource tags.

          • key (string) --

            The key or attribute to filter on.

          • matchOptions (list) --

            The match options for the filter (e.g., equals, contains).

            • (string) --

          • values (list) --

            The values to match against.

            • (string) --

type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'location': 'string',
            'id': 'string',
            'usageAccountId': 'string',
            'group': 'string',
            'quantity': {
                'unit': 'string',
                'amount': 123.0
            },
            'cost': 123.0,
            'currency': 'USD',
            'status': 'VALID'|'INVALID'|'STALE',
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            },
            'key': 'string'
        },
    ],
    'errors': [
        {
            'key': 'string',
            'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • items (list) --

      Returns the list of successful usage line items that were created for the Workload estimate.

      • (dict) --

        Represents a successfully created item in a batch operation for workload estimate usage.

        • serviceCode (string) --

          The Amazon Web Services service code for this usage estimate.

        • usageType (string) --

          The type of usage that was estimated.

        • operation (string) --

          The specific operation associated with this usage estimate.

        • location (string) --

          The location associated with this usage estimate.

        • id (string) --

          The unique identifier assigned to the created usage estimate.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with the created usage estimate.

        • group (string) --

          The group identifier for the created usage estimate.

        • quantity (dict) --

          The estimated usage quantity.

          • unit (string) --

            The unit of measurement for the usage quantity.

          • amount (float) --

            The numeric value of the usage quantity.

        • cost (float) --

          The estimated cost associated with this usage.

        • currency (string) --

          The currency of the estimated cost.

        • status (string) --

          The current status of the created usage estimate.

        • historicalUsage (dict) --

          Historical usage data associated with this estimate, if available.

          • serviceCode (string) --

            The Amazon Web Services service code associated with the usage.

          • usageType (string) --

            The type of usage.

          • operation (string) --

            The specific operation associated with the usage.

          • location (string) --

            The location associated with the usage.

          • usageAccountId (string) --

            The Amazon Web Services account ID associated with the usage.

          • billInterval (dict) --

            The time interval for the historical usage data.

            • start (datetime) --

              The start date and time of the interval.

            • end (datetime) --

              The end date and time of the interval.

          • filterExpression (dict) --

            An optional filter expression to apply to the historical usage data.

            • and (list) --

              A list of expressions to be combined with AND logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • or (list) --

              A list of expressions to be combined with OR logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • not (dict) --

              An expression to be negated.

            • costCategories (dict) --

              Filters based on cost categories.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • dimensions (dict) --

              Filters based on dimensions (e.g., service, operation).

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • tags (dict) --

              Filters based on resource tags.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

        • key (string) --

          The key of the successfully created entry.

    • errors (list) --

      Returns the list of errors reason and the usage item keys that cannot be created in the Workload estimate.

      • (dict) --

        Represents an error that occurred during a batch create operation for workload estimate usage.

        • key (string) --

          The key of the entry that caused the error.

        • errorCode (string) --

          The error code associated with the failed operation.

        • errorMessage (string) --

          A descriptive message for the error that occurred.

ListTagsForResource (new) Link ¶

Lists all tags associated with a specified resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    arn='string'
)
type arn:

string

param arn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to list tags for.

rtype:

dict

returns:

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      The list of tags associated with the specified resource.

      • (string) --

        • (string) --

ListWorkloadEstimates (new) Link ¶

Lists all workload estimates for the account.

See also: AWS API Documentation

Request Syntax

client.list_workload_estimates(
    createdAtFilter={
        'afterTimestamp': datetime(2015, 1, 1),
        'beforeTimestamp': datetime(2015, 1, 1)
    },
    expiresAtFilter={
        'afterTimestamp': datetime(2015, 1, 1),
        'beforeTimestamp': datetime(2015, 1, 1)
    },
    filters=[
        {
            'name': 'STATUS'|'NAME',
            'values': [
                'string',
            ],
            'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
        },
    ],
    nextToken='string',
    maxResults=123
)
type createdAtFilter:

dict

param createdAtFilter:

Filter workload estimates based on their creation date.

  • afterTimestamp (datetime) --

    Include results after this timestamp.

  • beforeTimestamp (datetime) --

    Include results before this timestamp.

type expiresAtFilter:

dict

param expiresAtFilter:

Filter workload estimates based on their expiration date.

  • afterTimestamp (datetime) --

    Include results after this timestamp.

  • beforeTimestamp (datetime) --

    Include results before this timestamp.

type filters:

list

param filters:

Filters to apply to the list of workload estimates.

  • (dict) --

    Represents a filter for listing workload estimates.

    • name (string) -- [REQUIRED]

      The name of the filter attribute.

    • values (list) -- [REQUIRED]

      The values to filter by.

      • (string) --

    • matchOption (string) --

      The match option for the filter (e.g., equals, contains).

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'createdAt': datetime(2015, 1, 1),
            'expiresAt': datetime(2015, 1, 1),
            'rateType': 'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
            'rateTimestamp': datetime(2015, 1, 1),
            'status': 'UPDATING'|'VALID'|'INVALID'|'ACTION_NEEDED',
            'totalCost': 123.0,
            'costCurrency': 'USD',
            'failureMessage': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of workload estimates for the account.

      • (dict) --

        Provides a summary of a workload estimate.

        • id (string) --

          The unique identifier of the workload estimate.

        • name (string) --

          The name of the workload estimate.

        • createdAt (datetime) --

          The timestamp when the workload estimate was created.

        • expiresAt (datetime) --

          The timestamp when the workload estimate will expire.

        • rateType (string) --

          The type of pricing rates used for the estimate.

        • rateTimestamp (datetime) --

          The timestamp of the pricing rates used for the estimate.

        • status (string) --

          The current status of the workload estimate.

        • totalCost (float) --

          The total estimated cost for the workload.

        • costCurrency (string) --

          The currency of the estimated cost.

        • failureMessage (string) --

          An error message if the workload estimate creation or processing failed.

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

BatchCreateBillScenarioCommitmentModification (new) Link ¶

Create Compute Savings Plans, EC2 Instance Savings Plans, or EC2 Reserved Instances commitments that you want to model in a Bill Scenario.

See also: AWS API Documentation

Request Syntax

client.batch_create_bill_scenario_commitment_modification(
    billScenarioId='string',
    commitmentModifications=[
        {
            'key': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'commitmentAction': {
                'addReservedInstanceAction': {
                    'reservedInstancesOfferingId': 'string',
                    'instanceCount': 123
                },
                'addSavingsPlanAction': {
                    'savingsPlanOfferingId': 'string',
                    'commitment': 123.0
                },
                'negateReservedInstanceAction': {
                    'reservedInstancesId': 'string'
                },
                'negateSavingsPlanAction': {
                    'savingsPlanId': 'string'
                }
            }
        },
    ],
    clientToken='string'
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The ID of the Bill Scenario for which you want to create the modeled commitment.

type commitmentModifications:

list

param commitmentModifications:

[REQUIRED]

List of commitments that you want to model in the Bill Scenario.

  • (dict) --

    Represents an entry object in the batch operation to create bill scenario commitment modifications.

    • key (string) -- [REQUIRED]

      A unique identifier for this entry in the batch operation. This can be any valid string. This key is useful to identify errors associated with any commitment entry as any error is returned with this key.

    • group (string) --

      An optional group identifier for the commitment modification.

    • usageAccountId (string) -- [REQUIRED]

      The Amazon Web Services account ID to which this commitment will be applied to.

    • commitmentAction (dict) -- [REQUIRED]

      The specific commitment action to be taken (e.g., adding a Reserved Instance or Savings Plan).

      • addReservedInstanceAction (dict) --

        Action to add a Reserved Instance to the scenario.

        • reservedInstancesOfferingId (string) --

          The ID of the Reserved Instance offering to add. For more information, see DescribeReservedInstancesOfferings.

        • instanceCount (integer) --

          The number of instances to add for this Reserved Instance offering.

      • addSavingsPlanAction (dict) --

        Action to add a Savings Plan to the scenario.

        • savingsPlanOfferingId (string) --

          The ID of the Savings Plan offering to add. For more information, see DescribeSavingsPlansOfferings.

        • commitment (float) --

          The hourly commitment, in the same currency of the savingsPlanOfferingId. This is a value between 0.001 and 1 million. You cannot specify more than five digits after the decimal point.

      • negateReservedInstanceAction (dict) --

        Action to remove a Reserved Instance from the scenario.

        • reservedInstancesId (string) --

          The ID of the Reserved Instance to remove.

      • negateSavingsPlanAction (dict) --

        Action to remove a Savings Plan from the scenario.

        • savingsPlanId (string) --

          The ID of the Savings Plan to remove.

type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'key': 'string',
            'id': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'commitmentAction': {
                'addReservedInstanceAction': {
                    'reservedInstancesOfferingId': 'string',
                    'instanceCount': 123
                },
                'addSavingsPlanAction': {
                    'savingsPlanOfferingId': 'string',
                    'commitment': 123.0
                },
                'negateReservedInstanceAction': {
                    'reservedInstancesId': 'string'
                },
                'negateSavingsPlanAction': {
                    'savingsPlanId': 'string'
                }
            }
        },
    ],
    'errors': [
        {
            'key': 'string',
            'errorMessage': 'string',
            'errorCode': 'CONFLICT'|'INTERNAL_SERVER_ERROR'|'INVALID_ACCOUNT'
        },
    ]
}

Response Structure

  • (dict) --

    • items (list) --

      Returns the list of successful commitment line items that were created for the Bill Scenario.

      • (dict) --

        Represents a successfully created item in a batch operation for bill scenario commitment modifications.

        • key (string) --

          The key of the successfully created entry. This can be any valid string. This key is useful to identify errors associated with any commitment entry as any error is returned with this key.

        • id (string) --

          The unique identifier assigned to the created commitment modification.

        • group (string) --

          The group identifier for the created commitment modification.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with the created commitment modification.

        • commitmentAction (dict) --

          The specific commitment action that was taken.

          • addReservedInstanceAction (dict) --

            Action to add a Reserved Instance to the scenario.

            • reservedInstancesOfferingId (string) --

              The ID of the Reserved Instance offering to add. For more information, see DescribeReservedInstancesOfferings.

            • instanceCount (integer) --

              The number of instances to add for this Reserved Instance offering.

          • addSavingsPlanAction (dict) --

            Action to add a Savings Plan to the scenario.

            • savingsPlanOfferingId (string) --

              The ID of the Savings Plan offering to add. For more information, see DescribeSavingsPlansOfferings.

            • commitment (float) --

              The hourly commitment, in the same currency of the savingsPlanOfferingId. This is a value between 0.001 and 1 million. You cannot specify more than five digits after the decimal point.

          • negateReservedInstanceAction (dict) --

            Action to remove a Reserved Instance from the scenario.

            • reservedInstancesId (string) --

              The ID of the Reserved Instance to remove.

          • negateSavingsPlanAction (dict) --

            Action to remove a Savings Plan from the scenario.

            • savingsPlanId (string) --

              The ID of the Savings Plan to remove.

    • errors (list) --

      Returns the list of errors reason and the commitment item keys that cannot be created in the Bill Scenario.

      • (dict) --

        Represents an error that occurred during a batch create operation for bill scenario commitment modifications.

        • key (string) --

          The key of the entry that caused the error.

        • errorMessage (string) --

          A descriptive message for the error that occurred.

        • errorCode (string) --

          The error code associated with the failed operation.

ListBillEstimateCommitments (new) Link ¶

Lists the commitments associated with a bill estimate.

See also: AWS API Documentation

Request Syntax

client.list_bill_estimate_commitments(
    billEstimateId='string',
    nextToken='string',
    maxResults=123
)
type billEstimateId:

string

param billEstimateId:

[REQUIRED]

The unique identifier of the bill estimate to list commitments for.

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'purchaseAgreementType': 'SAVINGS_PLANS'|'RESERVED_INSTANCE',
            'offeringId': 'string',
            'usageAccountId': 'string',
            'region': 'string',
            'termLength': 'string',
            'paymentOption': 'string',
            'upfrontPayment': {
                'amount': 123.0,
                'currency': 'USD'
            },
            'monthlyPayment': {
                'amount': 123.0,
                'currency': 'USD'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of commitments associated with the bill estimate.

      • (dict) --

        Provides a summary of commitment-related information for a bill estimate.

        • id (string) --

          The unique identifier of the commitment.

        • purchaseAgreementType (string) --

          The type of purchase agreement (e.g., Reserved Instance, Savings Plan).

        • offeringId (string) --

          The identifier of the specific offering associated with this commitment.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this commitment.

        • region (string) --

          The Amazon Web Services region associated with this commitment.

        • termLength (string) --

          The length of the commitment term.

        • paymentOption (string) --

          The payment option chosen for this commitment (e.g., All Upfront, Partial Upfront, No Upfront).

        • upfrontPayment (dict) --

          The upfront payment amount for this commitment, if applicable.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

        • monthlyPayment (dict) --

          The monthly payment amount for this commitment, if applicable.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

BatchDeleteWorkloadEstimateUsage (new) Link ¶

Delete usage that you have created in a Workload estimate. You can only delete usage that you had added and cannot model deletion (or removal) of a existing usage. If you want model removal of an existing usage, see BatchUpdateWorkloadEstimateUsage.

See also: AWS API Documentation

Request Syntax

client.batch_delete_workload_estimate_usage(
    workloadEstimateId='string',
    ids=[
        'string',
    ]
)
type workloadEstimateId:

string

param workloadEstimateId:

[REQUIRED]

The ID of the Workload estimate for which you want to delete the modeled usage.

type ids:

list

param ids:

[REQUIRED]

List of usage that you want to delete from the Workload estimate.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'errors': [
        {
            'id': 'string',
            'errorMessage': 'string',
            'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR'
        },
    ]
}

Response Structure

  • (dict) --

    • errors (list) --

      Returns the list of errors reason and the usage item keys that cannot be deleted from the Workload estimate.

      • (dict) --

        Represents an error that occurred when deleting usage in a workload estimate.

        • id (string) --

          The ID of the error.

        • errorMessage (string) --

          The message that describes the error.

        • errorCode (string) --

          The code associated with the error.

ListBillEstimateInputUsageModifications (new) Link ¶

Lists the input usage modifications associated with a bill estimate.

See also: AWS API Documentation

Request Syntax

client.list_bill_estimate_input_usage_modifications(
    billEstimateId='string',
    filters=[
        {
            'name': 'USAGE_ACCOUNT_ID'|'SERVICE_CODE'|'USAGE_TYPE'|'OPERATION'|'LOCATION'|'USAGE_GROUP'|'HISTORICAL_USAGE_ACCOUNT_ID'|'HISTORICAL_SERVICE_CODE'|'HISTORICAL_USAGE_TYPE'|'HISTORICAL_OPERATION'|'HISTORICAL_LOCATION',
            'values': [
                'string',
            ],
            'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
        },
    ],
    nextToken='string',
    maxResults=123
)
type billEstimateId:

string

param billEstimateId:

[REQUIRED]

The unique identifier of the bill estimate to list input usage modifications for.

type filters:

list

param filters:

Filters to apply to the list of input usage modifications.

  • (dict) --

    Represents a filter for listing usage data.

    • name (string) -- [REQUIRED]

      The name of the filter attribute.

    • values (list) -- [REQUIRED]

      The values to filter by.

      • (string) --

    • matchOption (string) --

      The match option for the filter (e.g., equals, contains).

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'location': 'string',
            'availabilityZone': 'string',
            'id': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'quantities': [
                {
                    'startHour': datetime(2015, 1, 1),
                    'unit': 'string',
                    'amount': 123.0
                },
            ],
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of input usage modifications associated with the bill estimate.

      • (dict) --

        Summarizes an input usage modification for a bill estimate.

        • serviceCode (string) --

          The Amazon Web Services service code for this usage modification.

        • usageType (string) --

          The type of usage being modified.

        • operation (string) --

          The specific operation associated with this usage modification.

        • location (string) --

          The location associated with this usage modification.

        • availabilityZone (string) --

          The availability zone associated with this usage modification, if applicable.

        • id (string) --

          The unique identifier of the usage modification.

        • group (string) --

          The group identifier for the usage modification.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this usage modification.

        • quantities (list) --

          The modified usage quantities.

          • (dict) --

            Represents a usage quantity with associated unit and time period.

            • startHour (datetime) --

              The start hour of the usage period.

            • unit (string) --

              The unit of measurement for the usage quantity.

            • amount (float) --

              The numeric value of the usage quantity.

        • historicalUsage (dict) --

          Historical usage data associated with this modification, if available.

          • serviceCode (string) --

            The Amazon Web Services service code associated with the usage.

          • usageType (string) --

            The type of usage.

          • operation (string) --

            The specific operation associated with the usage.

          • location (string) --

            The location associated with the usage.

          • usageAccountId (string) --

            The Amazon Web Services account ID associated with the usage.

          • billInterval (dict) --

            The time interval for the historical usage data.

            • start (datetime) --

              The start date and time of the interval.

            • end (datetime) --

              The end date and time of the interval.

          • filterExpression (dict) --

            An optional filter expression to apply to the historical usage data.

            • and (list) --

              A list of expressions to be combined with AND logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • or (list) --

              A list of expressions to be combined with OR logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • not (dict) --

              An expression to be negated.

            • costCategories (dict) --

              Filters based on cost categories.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • dimensions (dict) --

              Filters based on dimensions (e.g., service, operation).

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • tags (dict) --

              Filters based on resource tags.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

ListBillEstimates (new) Link ¶

Lists all bill estimates for the account.

See also: AWS API Documentation

Request Syntax

client.list_bill_estimates(
    filters=[
        {
            'name': 'STATUS'|'NAME',
            'values': [
                'string',
            ],
            'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
        },
    ],
    createdAtFilter={
        'afterTimestamp': datetime(2015, 1, 1),
        'beforeTimestamp': datetime(2015, 1, 1)
    },
    expiresAtFilter={
        'afterTimestamp': datetime(2015, 1, 1),
        'beforeTimestamp': datetime(2015, 1, 1)
    },
    nextToken='string',
    maxResults=123
)
type filters:

list

param filters:

Filters to apply to the list of bill estimates.

  • (dict) --

    Represents a filter for listing bill estimates.

    • name (string) -- [REQUIRED]

      The name of the filter attribute.

    • values (list) -- [REQUIRED]

      The values to filter by.

      • (string) --

    • matchOption (string) --

      The match option for the filter (e.g., equals, contains).

type createdAtFilter:

dict

param createdAtFilter:

Filter bill estimates based on their creation date.

  • afterTimestamp (datetime) --

    Include results after this timestamp.

  • beforeTimestamp (datetime) --

    Include results before this timestamp.

type expiresAtFilter:

dict

param expiresAtFilter:

Filter bill estimates based on their expiration date.

  • afterTimestamp (datetime) --

    Include results after this timestamp.

  • beforeTimestamp (datetime) --

    Include results before this timestamp.

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'status': 'IN_PROGRESS'|'COMPLETE'|'FAILED',
            'billInterval': {
                'start': datetime(2015, 1, 1),
                'end': datetime(2015, 1, 1)
            },
            'createdAt': datetime(2015, 1, 1),
            'expiresAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of bill estimates for the account.

      • (dict) --

        Provides a summary of a bill estimate.

        • id (string) --

          The unique identifier of the bill estimate.

        • name (string) --

          The name of the bill estimate.

        • status (string) --

          The current status of the bill estimate.

        • billInterval (dict) --

          The time period covered by the bill estimate.

          • start (datetime) --

            The start date and time of the interval.

          • end (datetime) --

            The end date and time of the interval.

        • createdAt (datetime) --

          The timestamp when the bill estimate was created.

        • expiresAt (datetime) --

          The timestamp when the bill estimate will expire.

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

BatchDeleteBillScenarioCommitmentModification (new) Link ¶

Delete commitment that you have created in a Bill Scenario. You can only delete a commitment that you had added and cannot model deletion (or removal) of a existing commitment. If you want model deletion of an existing commitment, see the negate BillScenarioCommitmentModificationAction of BatchCreateBillScenarioCommitmentModification operation.

See also: AWS API Documentation

Request Syntax

client.batch_delete_bill_scenario_commitment_modification(
    billScenarioId='string',
    ids=[
        'string',
    ]
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The ID of the Bill Scenario for which you want to delete the modeled commitment.

type ids:

list

param ids:

[REQUIRED]

List of commitments that you want to delete from the Bill Scenario.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'errors': [
        {
            'id': 'string',
            'errorCode': 'BAD_REQUEST'|'CONFLICT'|'INTERNAL_SERVER_ERROR',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • errors (list) --

      Returns the list of errors reason and the commitment item keys that cannot be deleted from the Bill Scenario.

      • (dict) --

        Represents an error that occurred when deleting a commitment in a Bill Scenario.

        • id (string) --

          The ID of the error.

        • errorCode (string) --

          The code associated with the error.

        • errorMessage (string) --

          The message that describes the error.

BatchCreateBillScenarioUsageModification (new) Link ¶

Create Amazon Web Services service usage that you want to model in a Bill Scenario.

See also: AWS API Documentation

Request Syntax

client.batch_create_bill_scenario_usage_modification(
    billScenarioId='string',
    usageModifications=[
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'availabilityZone': 'string',
            'key': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'amounts': [
                {
                    'startHour': datetime(2015, 1, 1),
                    'amount': 123.0
                },
            ],
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            }
        },
    ],
    clientToken='string'
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The ID of the Bill Scenario for which you want to create the modeled usage.

type usageModifications:

list

param usageModifications:

[REQUIRED]

List of usage that you want to model in the Bill Scenario.

  • (dict) --

    Represents an entry in a batch operation to create bill scenario usage modifications.

    • serviceCode (string) -- [REQUIRED]

      The Amazon Web Services service code for this usage modification. This identifies the specific Amazon Web Services service to the customer as a unique short abbreviation. For example, AmazonEC2 and AWSKMS.

    • usageType (string) -- [REQUIRED]

      Describes the usage details of the usage line item.

    • operation (string) -- [REQUIRED]

      The specific operation associated with this usage modification. Describes the specific Amazon Web Services operation that this usage line models. For example, RunInstances indicates the operation of an Amazon EC2 instance.

    • availabilityZone (string) --

      The Availability Zone that this usage line uses.

    • key (string) -- [REQUIRED]

      A unique identifier for this entry in the batch operation. This can be any valid string. This key is useful to identify errors associated with any usage entry as any error is returned with this key.

    • group (string) --

      An optional group identifier for the usage modification.

    • usageAccountId (string) -- [REQUIRED]

      The Amazon Web Services account ID to which this usage will be applied to.

    • amounts (list) --

      The amount of usage you want to create for the service use you are modeling.

      • (dict) --

        Represents a usage amount for a specific time period.

        • startHour (datetime) -- [REQUIRED]

          The start hour of the usage period.

        • amount (float) -- [REQUIRED]

          The usage amount for the period.

    • historicalUsage (dict) --

      Historical usage data associated with this modification, if available.

      • serviceCode (string) -- [REQUIRED]

        The Amazon Web Services service code associated with the usage.

      • usageType (string) -- [REQUIRED]

        The type of usage.

      • operation (string) -- [REQUIRED]

        The specific operation associated with the usage.

      • location (string) --

        The location associated with the usage.

      • usageAccountId (string) -- [REQUIRED]

        The Amazon Web Services account ID associated with the usage.

      • billInterval (dict) -- [REQUIRED]

        The time interval for the historical usage data.

        • start (datetime) --

          The start date and time of the interval.

        • end (datetime) --

          The end date and time of the interval.

      • filterExpression (dict) -- [REQUIRED]

        An optional filter expression to apply to the historical usage data.

        • and (list) --

          A list of expressions to be combined with AND logic.

          • (dict) --

            Represents a complex filtering expression for cost and usage data.

        • or (list) --

          A list of expressions to be combined with OR logic.

          • (dict) --

            Represents a complex filtering expression for cost and usage data.

        • not (dict) --

          An expression to be negated.

        • costCategories (dict) --

          Filters based on cost categories.

          • key (string) --

            The key or attribute to filter on.

          • matchOptions (list) --

            The match options for the filter (e.g., equals, contains).

            • (string) --

          • values (list) --

            The values to match against.

            • (string) --

        • dimensions (dict) --

          Filters based on dimensions (e.g., service, operation).

          • key (string) --

            The key or attribute to filter on.

          • matchOptions (list) --

            The match options for the filter (e.g., equals, contains).

            • (string) --

          • values (list) --

            The values to match against.

            • (string) --

        • tags (dict) --

          Filters based on resource tags.

          • key (string) --

            The key or attribute to filter on.

          • matchOptions (list) --

            The match options for the filter (e.g., equals, contains).

            • (string) --

          • values (list) --

            The values to match against.

            • (string) --

type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'location': 'string',
            'availabilityZone': 'string',
            'id': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'quantities': [
                {
                    'startHour': datetime(2015, 1, 1),
                    'unit': 'string',
                    'amount': 123.0
                },
            ],
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            },
            'key': 'string'
        },
    ],
    'errors': [
        {
            'key': 'string',
            'errorMessage': 'string',
            'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR'
        },
    ]
}

Response Structure

  • (dict) --

    • items (list) --

      Returns the list of successful usage line items that were created for the Bill Scenario.

      • (dict) --

        Represents a successfully created item in a batch operation for bill scenario usage modifications.

        • serviceCode (string) --

          The Amazon Web Services service code for this usage modification.

        • usageType (string) --

          The type of usage that was modified.

        • operation (string) --

          The specific operation associated with this usage modification.

        • location (string) --

          The location associated with this usage modification.

        • availabilityZone (string) --

          The availability zone associated with this usage modification, if applicable.

        • id (string) --

          The unique identifier assigned to the created usage modification.

        • group (string) --

          The group identifier for the created usage modification.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with the created usage modification.

        • quantities (list) --

          The modified usage quantities.

          • (dict) --

            Represents a usage quantity with associated unit and time period.

            • startHour (datetime) --

              The start hour of the usage period.

            • unit (string) --

              The unit of measurement for the usage quantity.

            • amount (float) --

              The numeric value of the usage quantity.

        • historicalUsage (dict) --

          Historical usage data associated with this modification, if available.

          • serviceCode (string) --

            The Amazon Web Services service code associated with the usage.

          • usageType (string) --

            The type of usage.

          • operation (string) --

            The specific operation associated with the usage.

          • location (string) --

            The location associated with the usage.

          • usageAccountId (string) --

            The Amazon Web Services account ID associated with the usage.

          • billInterval (dict) --

            The time interval for the historical usage data.

            • start (datetime) --

              The start date and time of the interval.

            • end (datetime) --

              The end date and time of the interval.

          • filterExpression (dict) --

            An optional filter expression to apply to the historical usage data.

            • and (list) --

              A list of expressions to be combined with AND logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • or (list) --

              A list of expressions to be combined with OR logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • not (dict) --

              An expression to be negated.

            • costCategories (dict) --

              Filters based on cost categories.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • dimensions (dict) --

              Filters based on dimensions (e.g., service, operation).

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • tags (dict) --

              Filters based on resource tags.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

        • key (string) --

          The key of the successfully created entry.

    • errors (list) --

      Returns the list of errors reason and the usage item keys that cannot be created in the Bill Scenario.

      • (dict) --

        Represents an error that occurred during a batch create operation for bill scenario usage modifications.

        • key (string) --

          The key of the entry that caused the error.

        • errorMessage (string) --

          A descriptive message for the error that occurred.

        • errorCode (string) --

          The error code associated with the failed operation.

TagResource (new) Link ¶

Adds one or more tags to a specified resource.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    arn='string',
    tags={
        'string': 'string'
    }
)
type arn:

string

param arn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to add tags to.

type tags:

dict

param tags:

[REQUIRED]

The tags to add to the resource.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetBillScenario (new) Link ¶

Retrieves details of a specific bill scenario.

See also: AWS API Documentation

Request Syntax

client.get_bill_scenario(
    identifier='string'
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the bill scenario to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'billInterval': {
        'start': datetime(2015, 1, 1),
        'end': datetime(2015, 1, 1)
    },
    'status': 'READY'|'LOCKED'|'FAILED',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the retrieved bill scenario.

    • name (string) --

      The name of the retrieved bill scenario.

    • billInterval (dict) --

      The time period covered by the bill scenario.

      • start (datetime) --

        The start date and time of the interval.

      • end (datetime) --

        The end date and time of the interval.

    • status (string) --

      The current status of the bill scenario.

    • createdAt (datetime) --

      The timestamp when the bill scenario was created.

    • expiresAt (datetime) --

      The timestamp when the bill scenario will expire.

    • failureMessage (string) --

      An error message if the bill scenario retrieval failed.

CreateWorkloadEstimate (new) Link ¶

Creates a new workload estimate to model costs for a specific workload.

See also: AWS API Documentation

Request Syntax

client.create_workload_estimate(
    name='string',
    clientToken='string',
    rateType='BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    tags={
        'string': 'string'
    }
)
type name:

string

param name:

[REQUIRED]

A descriptive name for the workload estimate.

type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

type rateType:

string

param rateType:

The type of pricing rates to use for the estimate.

type tags:

dict

param tags:

The tags to apply to the workload estimate.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'rateType': 'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    'rateTimestamp': datetime(2015, 1, 1),
    'status': 'UPDATING'|'VALID'|'INVALID'|'ACTION_NEEDED',
    'totalCost': 123.0,
    'costCurrency': 'USD',
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    Mixin for common fields returned by CRUD APIs

    • id (string) --

      The unique identifier for the created workload estimate.

    • name (string) --

      The name of the created workload estimate.

    • createdAt (datetime) --

      The timestamp when the workload estimate was created.

    • expiresAt (datetime) --

      The timestamp when the workload estimate will expire.

    • rateType (string) --

      The type of pricing rates used for the estimate.

    • rateTimestamp (datetime) --

      The timestamp of the pricing rates used for the estimate.

    • status (string) --

      The current status of the workload estimate.

    • totalCost (float) --

      The total estimated cost for the workload.

    • costCurrency (string) --

      The currency of the estimated cost.

    • failureMessage (string) --

      An error message if the workload estimate creation failed.

ListBillScenarios (new) Link ¶

Lists all bill scenarios for the account.

See also: AWS API Documentation

Request Syntax

client.list_bill_scenarios(
    filters=[
        {
            'name': 'STATUS'|'NAME',
            'values': [
                'string',
            ],
            'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
        },
    ],
    createdAtFilter={
        'afterTimestamp': datetime(2015, 1, 1),
        'beforeTimestamp': datetime(2015, 1, 1)
    },
    expiresAtFilter={
        'afterTimestamp': datetime(2015, 1, 1),
        'beforeTimestamp': datetime(2015, 1, 1)
    },
    nextToken='string',
    maxResults=123
)
type filters:

list

param filters:

Filters to apply to the list of bill scenarios.

  • (dict) --

    Represents a filter for listing bill scenarios.

    • name (string) -- [REQUIRED]

      The name of the filter attribute.

    • values (list) -- [REQUIRED]

      The values to filter by.

      • (string) --

    • matchOption (string) --

      The match option for the filter (e.g., equals, contains).

type createdAtFilter:

dict

param createdAtFilter:

Filter bill scenarios based on their creation date.

  • afterTimestamp (datetime) --

    Include results after this timestamp.

  • beforeTimestamp (datetime) --

    Include results before this timestamp.

type expiresAtFilter:

dict

param expiresAtFilter:

Filter bill scenarios based on their expiration date.

  • afterTimestamp (datetime) --

    Include results after this timestamp.

  • beforeTimestamp (datetime) --

    Include results before this timestamp.

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'billInterval': {
                'start': datetime(2015, 1, 1),
                'end': datetime(2015, 1, 1)
            },
            'status': 'READY'|'LOCKED'|'FAILED',
            'createdAt': datetime(2015, 1, 1),
            'expiresAt': datetime(2015, 1, 1),
            'failureMessage': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of bill scenarios for the account.

      • (dict) --

        Provides a summary of a bill scenario.

        • id (string) --

          The unique identifier of the bill scenario.

        • name (string) --

          The name of the bill scenario.

        • billInterval (dict) --

          The time period covered by the bill scenario.

          • start (datetime) --

            The start date and time of the interval.

          • end (datetime) --

            The end date and time of the interval.

        • status (string) --

          The current status of the bill scenario.

        • createdAt (datetime) --

          The timestamp when the bill scenario was created.

        • expiresAt (datetime) --

          The timestamp when the bill scenario will expire.

        • failureMessage (string) --

          An error message if the bill scenario creation or processing failed.

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

DeleteWorkloadEstimate (new) Link ¶

Deletes an existing workload estimate.

See also: AWS API Documentation

Request Syntax

client.delete_workload_estimate(
    identifier='string'
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the workload estimate to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

BatchUpdateWorkloadEstimateUsage (new) Link ¶

Update a newly added or existing usage lines. You can update the usage amounts and usage group based on a usage ID and a Workload estimate ID.

See also: AWS API Documentation

Request Syntax

client.batch_update_workload_estimate_usage(
    workloadEstimateId='string',
    usage=[
        {
            'id': 'string',
            'group': 'string',
            'amount': 123.0
        },
    ]
)
type workloadEstimateId:

string

param workloadEstimateId:

[REQUIRED]

The ID of the Workload estimate for which you want to modify the usage lines.

type usage:

list

param usage:

[REQUIRED]

List of usage line amounts and usage group that you want to update in a Workload estimate identified by the usage ID.

  • (dict) --

    Represents an entry in a batch operation to update workload estimate usage.

    • id (string) -- [REQUIRED]

      The unique identifier of the usage estimate to update.

    • group (string) --

      The updated group identifier for the usage estimate.

    • amount (float) --

      The updated estimated usage amount.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'location': 'string',
            'id': 'string',
            'usageAccountId': 'string',
            'group': 'string',
            'quantity': {
                'unit': 'string',
                'amount': 123.0
            },
            'cost': 123.0,
            'currency': 'USD',
            'status': 'VALID'|'INVALID'|'STALE',
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            }
        },
    ],
    'errors': [
        {
            'id': 'string',
            'errorMessage': 'string',
            'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR'
        },
    ]
}

Response Structure

  • (dict) --

    • items (list) --

      Returns the list of successful usage line items that were updated for a Workload estimate.

      • (dict) --

        Represents a usage item in a workload estimate.

        • serviceCode (string) --

          The Amazon Web Services service code associated with this usage item.

        • usageType (string) --

          The type of usage for this item.

        • operation (string) --

          The specific operation associated with this usage item.

        • location (string) --

          The location associated with this usage item.

        • id (string) --

          The unique identifier of this usage item.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this usage item.

        • group (string) --

          The group identifier for this usage item.

        • quantity (dict) --

          The estimated usage quantity for this item.

          • unit (string) --

            The unit of measurement for the usage quantity.

          • amount (float) --

            The numeric value of the usage quantity.

        • cost (float) --

          The estimated cost for this usage item.

        • currency (string) --

          The currency of the estimated cost.

        • status (string) --

          The current status of this usage item.

        • historicalUsage (dict) --

          Historical usage data associated with this item, if available.

          • serviceCode (string) --

            The Amazon Web Services service code associated with the usage.

          • usageType (string) --

            The type of usage.

          • operation (string) --

            The specific operation associated with the usage.

          • location (string) --

            The location associated with the usage.

          • usageAccountId (string) --

            The Amazon Web Services account ID associated with the usage.

          • billInterval (dict) --

            The time interval for the historical usage data.

            • start (datetime) --

              The start date and time of the interval.

            • end (datetime) --

              The end date and time of the interval.

          • filterExpression (dict) --

            An optional filter expression to apply to the historical usage data.

            • and (list) --

              A list of expressions to be combined with AND logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • or (list) --

              A list of expressions to be combined with OR logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • not (dict) --

              An expression to be negated.

            • costCategories (dict) --

              Filters based on cost categories.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • dimensions (dict) --

              Filters based on dimensions (e.g., service, operation).

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • tags (dict) --

              Filters based on resource tags.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

    • errors (list) --

      Returns the list of error reasons and usage line item IDs that could not be updated for the Workload estimate.

      • (dict) --

        Represents an error that occurred when updating usage in a workload estimate.

        • id (string) --

          The ID of the error.

        • errorMessage (string) --

          The message that describes the error.

        • errorCode (string) --

          The code associated with the error.

UntagResource (new) Link ¶

Removes one or more tags from a specified resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    arn='string',
    tagKeys=[
        'string',
    ]
)
type arn:

string

param arn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to remove tags from.

type tagKeys:

list

param tagKeys:

[REQUIRED]

The keys of the tags to remove from the resource.

  • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetWorkloadEstimate (new) Link ¶

Retrieves details of a specific workload estimate.

See also: AWS API Documentation

Request Syntax

client.get_workload_estimate(
    identifier='string'
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the workload estimate to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'rateType': 'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    'rateTimestamp': datetime(2015, 1, 1),
    'status': 'UPDATING'|'VALID'|'INVALID'|'ACTION_NEEDED',
    'totalCost': 123.0,
    'costCurrency': 'USD',
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    Mixin for common fields returned by CRUD APIs

    • id (string) --

      The unique identifier of the retrieved workload estimate.

    • name (string) --

      The name of the retrieved workload estimate.

    • createdAt (datetime) --

      The timestamp when the workload estimate was created.

    • expiresAt (datetime) --

      The timestamp when the workload estimate will expire.

    • rateType (string) --

      The type of pricing rates used for the estimate.

    • rateTimestamp (datetime) --

      The timestamp of the pricing rates used for the estimate.

    • status (string) --

      The current status of the workload estimate.

    • totalCost (float) --

      The total estimated cost for the workload.

    • costCurrency (string) --

      The currency of the estimated cost.

    • failureMessage (string) --

      An error message if the workload estimate retrieval failed.

UpdateBillScenario (new) Link ¶

Updates an existing bill scenario.

See also: AWS API Documentation

Request Syntax

client.update_bill_scenario(
    identifier='string',
    name='string',
    expiresAt=datetime(2015, 1, 1)
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the bill scenario to update.

type name:

string

param name:

The new name for the bill scenario.

type expiresAt:

datetime

param expiresAt:

The new expiration date for the bill scenario.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'billInterval': {
        'start': datetime(2015, 1, 1),
        'end': datetime(2015, 1, 1)
    },
    'status': 'READY'|'LOCKED'|'FAILED',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the updated bill scenario.

    • name (string) --

      The updated name of the bill scenario.

    • billInterval (dict) --

      The time period covered by the updated bill scenario.

      • start (datetime) --

        The start date and time of the interval.

      • end (datetime) --

        The end date and time of the interval.

    • status (string) --

      The current status of the updated bill scenario.

    • createdAt (datetime) --

      The timestamp when the bill scenario was originally created.

    • expiresAt (datetime) --

      The updated expiration timestamp for the bill scenario.

    • failureMessage (string) --

      An error message if the bill scenario update failed.

BatchUpdateBillScenarioCommitmentModification (new) Link ¶

Update a newly added or existing commitment. You can update the commitment group based on a commitment ID and a Bill scenario ID.

See also: AWS API Documentation

Request Syntax

client.batch_update_bill_scenario_commitment_modification(
    billScenarioId='string',
    commitmentModifications=[
        {
            'id': 'string',
            'group': 'string'
        },
    ]
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The ID of the Bill Scenario for which you want to modify the commitment group of a modeled commitment.

type commitmentModifications:

list

param commitmentModifications:

[REQUIRED]

List of commitments that you want to update in a Bill Scenario.

  • (dict) --

    Represents an entry in a batch operation to update bill scenario commitment modifications.

    • id (string) -- [REQUIRED]

      The unique identifier of the commitment modification to update.

    • group (string) --

      The updated group identifier for the commitment modification.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'usageAccountId': 'string',
            'group': 'string',
            'commitmentAction': {
                'addReservedInstanceAction': {
                    'reservedInstancesOfferingId': 'string',
                    'instanceCount': 123
                },
                'addSavingsPlanAction': {
                    'savingsPlanOfferingId': 'string',
                    'commitment': 123.0
                },
                'negateReservedInstanceAction': {
                    'reservedInstancesId': 'string'
                },
                'negateSavingsPlanAction': {
                    'savingsPlanId': 'string'
                }
            }
        },
    ],
    'errors': [
        {
            'id': 'string',
            'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • items (list) --

      Returns the list of successful commitment line items that were updated for a Bill Scenario.

      • (dict) --

        Represents a commitment modification item in a bill scenario.

        • id (string) --

          The unique identifier of the commitment modification.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this commitment modification.

        • group (string) --

          The group identifier for the commitment modification.

        • commitmentAction (dict) --

          The specific commitment action taken in this modification.

          • addReservedInstanceAction (dict) --

            Action to add a Reserved Instance to the scenario.

            • reservedInstancesOfferingId (string) --

              The ID of the Reserved Instance offering to add. For more information, see DescribeReservedInstancesOfferings.

            • instanceCount (integer) --

              The number of instances to add for this Reserved Instance offering.

          • addSavingsPlanAction (dict) --

            Action to add a Savings Plan to the scenario.

            • savingsPlanOfferingId (string) --

              The ID of the Savings Plan offering to add. For more information, see DescribeSavingsPlansOfferings.

            • commitment (float) --

              The hourly commitment, in the same currency of the savingsPlanOfferingId. This is a value between 0.001 and 1 million. You cannot specify more than five digits after the decimal point.

          • negateReservedInstanceAction (dict) --

            Action to remove a Reserved Instance from the scenario.

            • reservedInstancesId (string) --

              The ID of the Reserved Instance to remove.

          • negateSavingsPlanAction (dict) --

            Action to remove a Savings Plan from the scenario.

            • savingsPlanId (string) --

              The ID of the Savings Plan to remove.

    • errors (list) --

      Returns the list of error reasons and commitment line item IDs that could not be updated for the Bill Scenario.

      • (dict) --

        Represents an error that occurred when updating a commitment in a Bill Scenario.

        • id (string) --

          The ID of the error.

        • errorCode (string) --

          The code associated with the error.

        • errorMessage (string) --

          The message that describes the error.

CreateBillScenario (new) Link ¶

Creates a new bill scenario to model potential changes to Amazon Web Services usage and costs.

See also: AWS API Documentation

Request Syntax

client.create_bill_scenario(
    name='string',
    clientToken='string',
    tags={
        'string': 'string'
    }
)
type name:

string

param name:

[REQUIRED]

A descriptive name for the bill scenario.

type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

type tags:

dict

param tags:

The tags to apply to the bill scenario.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'billInterval': {
        'start': datetime(2015, 1, 1),
        'end': datetime(2015, 1, 1)
    },
    'status': 'READY'|'LOCKED'|'FAILED',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier for the created bill scenario.

    • name (string) --

      The name of the created bill scenario.

    • billInterval (dict) --

      The time period covered by the bill scenario.

      • start (datetime) --

        The start date and time of the interval.

      • end (datetime) --

        The end date and time of the interval.

    • status (string) --

      The current status of the bill scenario.

    • createdAt (datetime) --

      The timestamp when the bill scenario was created.

    • expiresAt (datetime) --

      The timestamp when the bill scenario will expire.

    • failureMessage (string) --

      An error message if the bill scenario creation failed.

BatchUpdateBillScenarioUsageModification (new) Link ¶

Update a newly added or existing usage lines. You can update the usage amounts, usage hour, and usage group based on a usage ID and a Bill scenario ID.

See also: AWS API Documentation

Request Syntax

client.batch_update_bill_scenario_usage_modification(
    billScenarioId='string',
    usageModifications=[
        {
            'id': 'string',
            'group': 'string',
            'amounts': [
                {
                    'startHour': datetime(2015, 1, 1),
                    'amount': 123.0
                },
            ]
        },
    ]
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The ID of the Bill Scenario for which you want to modify the usage lines.

type usageModifications:

list

param usageModifications:

[REQUIRED]

List of usage lines that you want to update in a Bill Scenario identified by the usage ID.

  • (dict) --

    Represents an entry in a batch operation to update bill scenario usage modifications.

    • id (string) -- [REQUIRED]

      The unique identifier of the usage modification to update.

    • group (string) --

      The updated group identifier for the usage modification.

    • amounts (list) --

      The updated usage amounts for the modification.

      • (dict) --

        Represents a usage amount for a specific time period.

        • startHour (datetime) -- [REQUIRED]

          The start hour of the usage period.

        • amount (float) -- [REQUIRED]

          The usage amount for the period.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'location': 'string',
            'availabilityZone': 'string',
            'id': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'quantities': [
                {
                    'startHour': datetime(2015, 1, 1),
                    'unit': 'string',
                    'amount': 123.0
                },
            ],
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            }
        },
    ],
    'errors': [
        {
            'id': 'string',
            'errorMessage': 'string',
            'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR'
        },
    ]
}

Response Structure

  • (dict) --

    • items (list) --

      Returns the list of successful usage line items that were updated for a Bill Scenario.

      • (dict) --

        Represents a usage modification item in a bill scenario.

        • serviceCode (string) --

          The Amazon Web Services service code for this usage modification.

        • usageType (string) --

          The type of usage being modified.

        • operation (string) --

          The specific operation associated with this usage modification.

        • location (string) --

          The location associated with this usage modification.

        • availabilityZone (string) --

          The availability zone associated with this usage modification, if applicable.

        • id (string) --

          The unique identifier of the usage modification.

        • group (string) --

          The group identifier for the usage modification.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this usage modification.

        • quantities (list) --

          The modified usage quantities.

          • (dict) --

            Represents a usage quantity with associated unit and time period.

            • startHour (datetime) --

              The start hour of the usage period.

            • unit (string) --

              The unit of measurement for the usage quantity.

            • amount (float) --

              The numeric value of the usage quantity.

        • historicalUsage (dict) --

          Historical usage data associated with this modification, if available.

          • serviceCode (string) --

            The Amazon Web Services service code associated with the usage.

          • usageType (string) --

            The type of usage.

          • operation (string) --

            The specific operation associated with the usage.

          • location (string) --

            The location associated with the usage.

          • usageAccountId (string) --

            The Amazon Web Services account ID associated with the usage.

          • billInterval (dict) --

            The time interval for the historical usage data.

            • start (datetime) --

              The start date and time of the interval.

            • end (datetime) --

              The end date and time of the interval.

          • filterExpression (dict) --

            An optional filter expression to apply to the historical usage data.

            • and (list) --

              A list of expressions to be combined with AND logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • or (list) --

              A list of expressions to be combined with OR logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • not (dict) --

              An expression to be negated.

            • costCategories (dict) --

              Filters based on cost categories.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • dimensions (dict) --

              Filters based on dimensions (e.g., service, operation).

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • tags (dict) --

              Filters based on resource tags.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

    • errors (list) --

      Returns the list of error reasons and usage line item IDs that could not be updated for the Bill Scenario.

      • (dict) --

        Represents an error that occurred when updating usage in a Bill Scenario.

        • id (string) --

          The ID of the error.

        • errorMessage (string) --

          The message that describes the error.

        • errorCode (string) --

          The code associated with the error.

DeleteBillScenario (new) Link ¶

Deletes an existing bill scenario.

See also: AWS API Documentation

Request Syntax

client.delete_bill_scenario(
    identifier='string'
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the bill scenario to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DeleteBillEstimate (new) Link ¶

Deletes an existing bill estimate.

See also: AWS API Documentation

Request Syntax

client.delete_bill_estimate(
    identifier='string'
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the bill estimate to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

CreateBillEstimate (new) Link ¶

Create a Bill estimate from a Bill scenario. In the Bill scenario you can model usage addition, usage changes, and usage removal. You can also model commitment addition and commitment removal. After all changes in a Bill scenario is made satisfactorily, you can call this API with a Bill scenario ID to generate the Bill estimate. Bill estimate calculates the pre-tax cost for your consolidated billing family, incorporating all modeled usage and commitments alongside existing usage and commitments from your most recent completed anniversary bill, with any applicable discounts applied.

See also: AWS API Documentation

Request Syntax

client.create_bill_estimate(
    billScenarioId='string',
    name='string',
    clientToken='string',
    tags={
        'string': 'string'
    }
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The ID of the Bill Scenario for which you want to create a Bill estimate.

type name:

string

param name:

[REQUIRED]

The name of the Bill estimate that will be created. Names must be unique for an account.

type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

type tags:

dict

param tags:

An optional list of tags to associate with the specified BillEstimate. You can use resource tags to control access to your BillEstimate using IAM policies. Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:

  • Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services.

  • The maximum length of a key is 128 characters.

  • The maximum length of a value is 256 characters.

  • Keys and values can only contain alphanumeric characters, spaces, and any of the following: _.:/=+@-.

  • Keys and values are case sensitive.

  • Keys and values are trimmed for any leading or trailing whitespaces.

  • Don't use aws: as a prefix for your keys. This prefix is reserved for Amazon Web Services.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'status': 'IN_PROGRESS'|'COMPLETE'|'FAILED',
    'failureMessage': 'string',
    'billInterval': {
        'start': datetime(2015, 1, 1),
        'end': datetime(2015, 1, 1)
    },
    'costSummary': {
        'totalCostDifference': {
            'historicalCost': {
                'amount': 123.0,
                'currency': 'USD'
            },
            'estimatedCost': {
                'amount': 123.0,
                'currency': 'USD'
            }
        },
        'serviceCostDifferences': {
            'string': {
                'historicalCost': {
                    'amount': 123.0,
                    'currency': 'USD'
                },
                'estimatedCost': {
                    'amount': 123.0,
                    'currency': 'USD'
                }
            }
        }
    },
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of your newly created Bill estimate.

    • name (string) --

      The name of your newly created Bill estimate.

    • status (string) --

      The status of your newly created Bill estimate. Bill estimate creation can take anywhere between 8 to 12 hours. The status will allow you to identify when the Bill estimate is complete or has failed.

    • failureMessage (string) --

      This attribute provides the reason if a Bill estimate result generation fails.

    • billInterval (dict) --

      The bill month start and end timestamp that was used to create the Bill estimate. This is set to the last complete anniversary bill month start and end timestamp.

      • start (datetime) --

        The start date and time of the interval.

      • end (datetime) --

        The end date and time of the interval.

    • costSummary (dict) --

      Returns summary-level cost information once a Bill estimate is successfully generated. This summary includes: 1) the total cost difference, showing the pre-tax cost change for the consolidated billing family between the completed anniversary bill and the estimated bill, and 2) total cost differences per service, detailing the pre-tax cost of each service, comparing the completed anniversary bill to the estimated bill on a per-service basis.

      • totalCostDifference (dict) --

        The total difference in cost between the estimated and historical costs.

        • historicalCost (dict) --

          The historical cost amount.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

        • estimatedCost (dict) --

          The estimated cost amount.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

      • serviceCostDifferences (dict) --

        A breakdown of cost differences by Amazon Web Services service.

        • (string) --

          • (dict) --

            Represents the difference between historical and estimated costs.

            • historicalCost (dict) --

              The historical cost amount.

              • amount (float) --

                The numeric value of the cost.

              • currency (string) --

                The currency code for the cost amount.

            • estimatedCost (dict) --

              The estimated cost amount.

              • amount (float) --

                The numeric value of the cost.

              • currency (string) --

                The currency code for the cost amount.

    • createdAt (datetime) --

      The timestamp of when the Bill estimate create process was started (not when it successfully completed or failed).

    • expiresAt (datetime) --

      The timestamp of when the Bill estimate will expire. A Bill estimate becomes inaccessible after expiration.

GetPreferences (new) Link ¶

Retrieves the current preferences for the Amazon Web Services Cost Explorer service.

See also: AWS API Documentation

Request Syntax

client.get_preferences()
rtype:

dict

returns:

Response Syntax

{
    'managementAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    ],
    'memberAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    ]
}

Response Structure

  • (dict) --

    • managementAccountRateTypeSelections (list) --

      The preferred rate types for the management account.

      • (string) --

    • memberAccountRateTypeSelections (list) --

      The preferred rate types for member accounts.

      • (string) --

ListBillScenarioUsageModifications (new) Link ¶

Lists the usage modifications associated with a bill scenario.

See also: AWS API Documentation

Request Syntax

client.list_bill_scenario_usage_modifications(
    billScenarioId='string',
    filters=[
        {
            'name': 'USAGE_ACCOUNT_ID'|'SERVICE_CODE'|'USAGE_TYPE'|'OPERATION'|'LOCATION'|'USAGE_GROUP'|'HISTORICAL_USAGE_ACCOUNT_ID'|'HISTORICAL_SERVICE_CODE'|'HISTORICAL_USAGE_TYPE'|'HISTORICAL_OPERATION'|'HISTORICAL_LOCATION',
            'values': [
                'string',
            ],
            'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
        },
    ],
    nextToken='string',
    maxResults=123
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The unique identifier of the bill scenario to list usage modifications for.

type filters:

list

param filters:

Filters to apply to the list of usage modifications.

  • (dict) --

    Represents a filter for listing usage data.

    • name (string) -- [REQUIRED]

      The name of the filter attribute.

    • values (list) -- [REQUIRED]

      The values to filter by.

      • (string) --

    • matchOption (string) --

      The match option for the filter (e.g., equals, contains).

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'location': 'string',
            'availabilityZone': 'string',
            'id': 'string',
            'group': 'string',
            'usageAccountId': 'string',
            'quantities': [
                {
                    'startHour': datetime(2015, 1, 1),
                    'unit': 'string',
                    'amount': 123.0
                },
            ],
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of usage modifications associated with the bill scenario.

      • (dict) --

        Represents a usage modification item in a bill scenario.

        • serviceCode (string) --

          The Amazon Web Services service code for this usage modification.

        • usageType (string) --

          The type of usage being modified.

        • operation (string) --

          The specific operation associated with this usage modification.

        • location (string) --

          The location associated with this usage modification.

        • availabilityZone (string) --

          The availability zone associated with this usage modification, if applicable.

        • id (string) --

          The unique identifier of the usage modification.

        • group (string) --

          The group identifier for the usage modification.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this usage modification.

        • quantities (list) --

          The modified usage quantities.

          • (dict) --

            Represents a usage quantity with associated unit and time period.

            • startHour (datetime) --

              The start hour of the usage period.

            • unit (string) --

              The unit of measurement for the usage quantity.

            • amount (float) --

              The numeric value of the usage quantity.

        • historicalUsage (dict) --

          Historical usage data associated with this modification, if available.

          • serviceCode (string) --

            The Amazon Web Services service code associated with the usage.

          • usageType (string) --

            The type of usage.

          • operation (string) --

            The specific operation associated with the usage.

          • location (string) --

            The location associated with the usage.

          • usageAccountId (string) --

            The Amazon Web Services account ID associated with the usage.

          • billInterval (dict) --

            The time interval for the historical usage data.

            • start (datetime) --

              The start date and time of the interval.

            • end (datetime) --

              The end date and time of the interval.

          • filterExpression (dict) --

            An optional filter expression to apply to the historical usage data.

            • and (list) --

              A list of expressions to be combined with AND logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • or (list) --

              A list of expressions to be combined with OR logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • not (dict) --

              An expression to be negated.

            • costCategories (dict) --

              Filters based on cost categories.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • dimensions (dict) --

              Filters based on dimensions (e.g., service, operation).

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • tags (dict) --

              Filters based on resource tags.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

BatchDeleteBillScenarioUsageModification (new) Link ¶

Delete usage that you have created in a Bill Scenario. You can only delete usage that you had added and cannot model deletion (or removal) of a existing usage. If you want model removal of an existing usage, see BatchUpdateBillScenarioUsageModification.

See also: AWS API Documentation

Request Syntax

client.batch_delete_bill_scenario_usage_modification(
    billScenarioId='string',
    ids=[
        'string',
    ]
)
type billScenarioId:

string

param billScenarioId:

[REQUIRED]

The ID of the Bill Scenario for which you want to delete the modeled usage.

type ids:

list

param ids:

[REQUIRED]

List of usage that you want to delete from the Bill Scenario.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'errors': [
        {
            'id': 'string',
            'errorMessage': 'string',
            'errorCode': 'BAD_REQUEST'|'CONFLICT'|'INTERNAL_SERVER_ERROR'
        },
    ]
}

Response Structure

  • (dict) --

    • errors (list) --

      Returns the list of errors reason and the usage item keys that cannot be deleted from the Bill Scenario.

      • (dict) --

        Represents an error that occurred when deleting usage in a Bill Scenario.

        • id (string) --

          The ID of the error.

        • errorMessage (string) --

          The message that describes the error.

        • errorCode (string) --

          The code associated with the error.

ListWorkloadEstimateUsage (new) Link ¶

Lists the usage associated with a workload estimate.

See also: AWS API Documentation

Request Syntax

client.list_workload_estimate_usage(
    workloadEstimateId='string',
    filters=[
        {
            'name': 'USAGE_ACCOUNT_ID'|'SERVICE_CODE'|'USAGE_TYPE'|'OPERATION'|'LOCATION'|'USAGE_GROUP'|'HISTORICAL_USAGE_ACCOUNT_ID'|'HISTORICAL_SERVICE_CODE'|'HISTORICAL_USAGE_TYPE'|'HISTORICAL_OPERATION'|'HISTORICAL_LOCATION',
            'values': [
                'string',
            ],
            'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
        },
    ],
    nextToken='string',
    maxResults=123
)
type workloadEstimateId:

string

param workloadEstimateId:

[REQUIRED]

The unique identifier of the workload estimate to list usage for.

type filters:

list

param filters:

Filters to apply to the list of usage items.

  • (dict) --

    Represents a filter for listing usage data.

    • name (string) -- [REQUIRED]

      The name of the filter attribute.

    • values (list) -- [REQUIRED]

      The values to filter by.

      • (string) --

    • matchOption (string) --

      The match option for the filter (e.g., equals, contains).

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'location': 'string',
            'id': 'string',
            'usageAccountId': 'string',
            'group': 'string',
            'quantity': {
                'unit': 'string',
                'amount': 123.0
            },
            'cost': 123.0,
            'currency': 'USD',
            'status': 'VALID'|'INVALID'|'STALE',
            'historicalUsage': {
                'serviceCode': 'string',
                'usageType': 'string',
                'operation': 'string',
                'location': 'string',
                'usageAccountId': 'string',
                'billInterval': {
                    'start': datetime(2015, 1, 1),
                    'end': datetime(2015, 1, 1)
                },
                'filterExpression': {
                    'and': [
                        {'... recursive ...'},
                    ],
                    'or': [
                        {'... recursive ...'},
                    ],
                    'not': {'... recursive ...'},
                    'costCategories': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'dimensions': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    },
                    'tags': {
                        'key': 'string',
                        'matchOptions': [
                            'string',
                        ],
                        'values': [
                            'string',
                        ]
                    }
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of usage items associated with the workload estimate.

      • (dict) --

        Represents a usage item in a workload estimate.

        • serviceCode (string) --

          The Amazon Web Services service code associated with this usage item.

        • usageType (string) --

          The type of usage for this item.

        • operation (string) --

          The specific operation associated with this usage item.

        • location (string) --

          The location associated with this usage item.

        • id (string) --

          The unique identifier of this usage item.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with this usage item.

        • group (string) --

          The group identifier for this usage item.

        • quantity (dict) --

          The estimated usage quantity for this item.

          • unit (string) --

            The unit of measurement for the usage quantity.

          • amount (float) --

            The numeric value of the usage quantity.

        • cost (float) --

          The estimated cost for this usage item.

        • currency (string) --

          The currency of the estimated cost.

        • status (string) --

          The current status of this usage item.

        • historicalUsage (dict) --

          Historical usage data associated with this item, if available.

          • serviceCode (string) --

            The Amazon Web Services service code associated with the usage.

          • usageType (string) --

            The type of usage.

          • operation (string) --

            The specific operation associated with the usage.

          • location (string) --

            The location associated with the usage.

          • usageAccountId (string) --

            The Amazon Web Services account ID associated with the usage.

          • billInterval (dict) --

            The time interval for the historical usage data.

            • start (datetime) --

              The start date and time of the interval.

            • end (datetime) --

              The end date and time of the interval.

          • filterExpression (dict) --

            An optional filter expression to apply to the historical usage data.

            • and (list) --

              A list of expressions to be combined with AND logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • or (list) --

              A list of expressions to be combined with OR logic.

              • (dict) --

                Represents a complex filtering expression for cost and usage data.

            • not (dict) --

              An expression to be negated.

            • costCategories (dict) --

              Filters based on cost categories.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • dimensions (dict) --

              Filters based on dimensions (e.g., service, operation).

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

            • tags (dict) --

              Filters based on resource tags.

              • key (string) --

                The key or attribute to filter on.

              • matchOptions (list) --

                The match options for the filter (e.g., equals, contains).

                • (string) --

              • values (list) --

                The values to match against.

                • (string) --

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

GetBillEstimate (new) Link ¶

Retrieves details of a specific bill estimate.

See also: AWS API Documentation

Request Syntax

client.get_bill_estimate(
    identifier='string'
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the bill estimate to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'status': 'IN_PROGRESS'|'COMPLETE'|'FAILED',
    'failureMessage': 'string',
    'billInterval': {
        'start': datetime(2015, 1, 1),
        'end': datetime(2015, 1, 1)
    },
    'costSummary': {
        'totalCostDifference': {
            'historicalCost': {
                'amount': 123.0,
                'currency': 'USD'
            },
            'estimatedCost': {
                'amount': 123.0,
                'currency': 'USD'
            }
        },
        'serviceCostDifferences': {
            'string': {
                'historicalCost': {
                    'amount': 123.0,
                    'currency': 'USD'
                },
                'estimatedCost': {
                    'amount': 123.0,
                    'currency': 'USD'
                }
            }
        }
    },
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the retrieved bill estimate.

    • name (string) --

      The name of the retrieved bill estimate.

    • status (string) --

      The current status of the bill estimate.

    • failureMessage (string) --

      An error message if the bill estimate retrieval failed.

    • billInterval (dict) --

      The time period covered by the bill estimate.

      • start (datetime) --

        The start date and time of the interval.

      • end (datetime) --

        The end date and time of the interval.

    • costSummary (dict) --

      A summary of the estimated costs.

      • totalCostDifference (dict) --

        The total difference in cost between the estimated and historical costs.

        • historicalCost (dict) --

          The historical cost amount.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

        • estimatedCost (dict) --

          The estimated cost amount.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

      • serviceCostDifferences (dict) --

        A breakdown of cost differences by Amazon Web Services service.

        • (string) --

          • (dict) --

            Represents the difference between historical and estimated costs.

            • historicalCost (dict) --

              The historical cost amount.

              • amount (float) --

                The numeric value of the cost.

              • currency (string) --

                The currency code for the cost amount.

            • estimatedCost (dict) --

              The estimated cost amount.

              • amount (float) --

                The numeric value of the cost.

              • currency (string) --

                The currency code for the cost amount.

    • createdAt (datetime) --

      The timestamp when the bill estimate was created.

    • expiresAt (datetime) --

      The timestamp when the bill estimate will expire.

UpdatePreferences (new) Link ¶

Updates the preferences for the Amazon Web Services Cost Explorer service.

See also: AWS API Documentation

Request Syntax

client.update_preferences(
    managementAccountRateTypeSelections=[
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    ],
    memberAccountRateTypeSelections=[
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    ]
)
type managementAccountRateTypeSelections:

list

param managementAccountRateTypeSelections:

The updated preferred rate types for the management account.

  • (string) --

type memberAccountRateTypeSelections:

list

param memberAccountRateTypeSelections:

The updated preferred rate types for member accounts.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'managementAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    ],
    'memberAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    ]
}

Response Structure

  • (dict) --

    • managementAccountRateTypeSelections (list) --

      The updated preferred rate types for the management account.

      • (string) --

    • memberAccountRateTypeSelections (list) --

      The updated preferred rate types for member accounts.

      • (string) --

ListBillEstimateLineItems (new) Link ¶

Lists the line items associated with a bill estimate.

See also: AWS API Documentation

Request Syntax

client.list_bill_estimate_line_items(
    billEstimateId='string',
    filters=[
        {
            'name': 'USAGE_ACCOUNT_ID'|'SERVICE_CODE'|'USAGE_TYPE'|'OPERATION'|'LOCATION'|'LINE_ITEM_TYPE',
            'values': [
                'string',
            ],
            'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
        },
    ],
    nextToken='string',
    maxResults=123
)
type billEstimateId:

string

param billEstimateId:

[REQUIRED]

The unique identifier of the bill estimate to list line items for.

type filters:

list

param filters:

Filters to apply to the list of line items.

  • (dict) --

    Represents a filter for listing bill estimate line items.

    • name (string) -- [REQUIRED]

      The name of the filter attribute.

    • values (list) -- [REQUIRED]

      The values to filter by.

      • (string) --

    • matchOption (string) --

      The match option for the filter (e.g., equals, contains).

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'serviceCode': 'string',
            'usageType': 'string',
            'operation': 'string',
            'location': 'string',
            'availabilityZone': 'string',
            'id': 'string',
            'lineItemId': 'string',
            'lineItemType': 'string',
            'payerAccountId': 'string',
            'usageAccountId': 'string',
            'estimatedUsageQuantity': {
                'amount': 123.0,
                'unit': 'string'
            },
            'estimatedCost': {
                'amount': 123.0,
                'currency': 'USD'
            },
            'historicalUsageQuantity': {
                'amount': 123.0,
                'unit': 'string'
            },
            'historicalCost': {
                'amount': 123.0,
                'currency': 'USD'
            },
            'savingsPlanArns': [
                'string',
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of line items associated with the bill estimate.

      • (dict) --

        Provides a summary of a line item in a bill estimate.

        • serviceCode (string) --

          The Amazon Web Services service code associated with this line item.

        • usageType (string) --

          The type of usage for this line item.

        • operation (string) --

          The specific operation associated with this line item.

        • location (string) --

          The location associated with this line item.

        • availabilityZone (string) --

          The availability zone associated with this line item, if applicable.

        • id (string) --

          The unique identifier of this line item.

        • lineItemId (string) --

          The line item identifier from the original bill.

        • lineItemType (string) --

          The type of this line item (e.g., Usage, Tax, Credit).

        • payerAccountId (string) --

          The Amazon Web Services account ID of the payer for this line item.

        • usageAccountId (string) --

          The Amazon Web Services account ID associated with the usage for this line item.

        • estimatedUsageQuantity (dict) --

          The estimated usage quantity for this line item.

          • amount (float) --

            The numeric value of the usage quantity result.

          • unit (string) --

            The unit of measurement for the usage quantity result.

        • estimatedCost (dict) --

          The estimated cost for this line item.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

        • historicalUsageQuantity (dict) --

          The historical usage quantity for this line item.

          • amount (float) --

            The numeric value of the usage quantity result.

          • unit (string) --

            The unit of measurement for the usage quantity result.

        • historicalCost (dict) --

          The historical cost for this line item.

          • amount (float) --

            The numeric value of the cost.

          • currency (string) --

            The currency code for the cost amount.

        • savingsPlanArns (list) --

          The Amazon Resource Names (ARNs) of any Savings Plans applied to this line item.

          • (string) --

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

UpdateWorkloadEstimate (new) Link ¶

Updates an existing workload estimate.

See also: AWS API Documentation

Request Syntax

client.update_workload_estimate(
    identifier='string',
    name='string',
    expiresAt=datetime(2015, 1, 1)
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the workload estimate to update.

type name:

string

param name:

The new name for the workload estimate.

type expiresAt:

datetime

param expiresAt:

The new expiration date for the workload estimate.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'rateType': 'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
    'rateTimestamp': datetime(2015, 1, 1),
    'status': 'UPDATING'|'VALID'|'INVALID'|'ACTION_NEEDED',
    'totalCost': 123.0,
    'costCurrency': 'USD',
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    Mixin for common fields returned by CRUD APIs

    • id (string) --

      The unique identifier of the updated workload estimate.

    • name (string) --

      The updated name of the workload estimate.

    • createdAt (datetime) --

      The timestamp when the workload estimate was originally created.

    • expiresAt (datetime) --

      The updated expiration timestamp for the workload estimate.

    • rateType (string) --

      The type of pricing rates used for the updated estimate.

    • rateTimestamp (datetime) --

      The timestamp of the pricing rates used for the updated estimate.

    • status (string) --

      The current status of the updated workload estimate.

    • totalCost (float) --

      The updated total estimated cost for the workload.

    • costCurrency (string) --

      The currency of the updated estimated cost.

    • failureMessage (string) --

      An error message if the workload estimate update failed.