SavingsPlans / Client / describe_savings_plans

describe_savings_plans#

SavingsPlans.Client.describe_savings_plans(**kwargs)#

Describes the specified Savings Plans.

See also: AWS API Documentation

Request Syntax

response = client.describe_savings_plans(
    savingsPlanArns=[
        'string',
    ],
    savingsPlanIds=[
        'string',
    ],
    nextToken='string',
    maxResults=123,
    states=[
        'payment-pending'|'payment-failed'|'active'|'retired'|'queued'|'queued-deleted'|'pending-return'|'returned',
    ],
    filters=[
        {
            'name': 'region'|'ec2-instance-family'|'commitment'|'upfront'|'term'|'savings-plan-type'|'payment-option'|'start'|'end',
            'values': [
                'string',
            ]
        },
    ]
)
Parameters:
  • savingsPlanArns (list) –

    The Amazon Resource Names (ARN) of the Savings Plans.

    • (string) –

  • savingsPlanIds (list) –

    The IDs of the Savings Plans.

    • (string) –

  • nextToken (string) – The token for the next page of results.

  • maxResults (integer) – The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.

  • states (list) –

    The current states of the Savings Plans.

    • (string) –

  • filters (list) –

    The filters.

    • (dict) –

      Information about a Savings Plan filter.

      • name (string) –

        The filter name.

      • values (list) –

        The filter value.

        • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'savingsPlans': [
        {
            'offeringId': 'string',
            'savingsPlanId': 'string',
            'savingsPlanArn': 'string',
            'description': 'string',
            'start': 'string',
            'end': 'string',
            'state': 'payment-pending'|'payment-failed'|'active'|'retired'|'queued'|'queued-deleted'|'pending-return'|'returned',
            'region': 'string',
            'ec2InstanceFamily': 'string',
            'savingsPlanType': 'Compute'|'EC2Instance'|'SageMaker',
            'paymentOption': 'All Upfront'|'Partial Upfront'|'No Upfront',
            'productTypes': [
                'EC2'|'Fargate'|'Lambda'|'SageMaker',
            ],
            'currency': 'CNY'|'USD',
            'commitment': 'string',
            'upfrontPaymentAmount': 'string',
            'recurringPaymentAmount': 'string',
            'termDurationInSeconds': 123,
            'tags': {
                'string': 'string'
            },
            'returnableUntil': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • savingsPlans (list) –

      Information about the Savings Plans.

      • (dict) –

        Information about a Savings Plan.

        • offeringId (string) –

          The ID of the offering.

        • savingsPlanId (string) –

          The ID of the Savings Plan.

        • savingsPlanArn (string) –

          The Amazon Resource Name (ARN) of the Savings Plan.

        • description (string) –

          The description.

        • start (string) –

          The start time.

        • end (string) –

          The end time.

        • state (string) –

          The current state.

        • region (string) –

          The Amazon Web Services Region.

        • ec2InstanceFamily (string) –

          The EC2 instance family.

        • savingsPlanType (string) –

          The plan type.

        • paymentOption (string) –

          The payment option.

        • productTypes (list) –

          The product types.

          • (string) –

        • currency (string) –

          The currency.

        • commitment (string) –

          The hourly commitment amount in the specified currency.

        • upfrontPaymentAmount (string) –

          The up-front payment amount.

        • recurringPaymentAmount (string) –

          The recurring payment amount.

        • termDurationInSeconds (integer) –

          The duration of the term, in seconds.

        • tags (dict) –

          One or more tags.

          • (string) –

            • (string) –

        • returnableUntil (string) –

          The time until when a return for the Savings Plan can be requested. If the Savings Plan is not returnable, the field reflects the Savings Plan start time.

    • nextToken (string) –

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Exceptions

  • SavingsPlans.Client.exceptions.InternalServerException

  • SavingsPlans.Client.exceptions.ValidationException