PricingPlanManager / Client / update_subscription

update_subscription

PricingPlanManager.Client.update_subscription(**kwargs)

Changes the plan tier of an existing subscription.

Note

Upgrades take effect immediately. Downgrades are scheduled and the current tier remains unchanged until the end of the billing cycle (calendar month). You cannot update a subscription while a scheduled change is pending. To make a new change, first cancel the pending change using CancelSubscriptionChange.

This operation replaces the plan tier value. If you omit the optional usageLevel field, it is reset to the default.

See also: AWS API Documentation

Request Syntax

response = client.update_subscription(
    arn='string',
    planTier='string',
    usageLevel='string',
    ifMatch='string',
    clientToken='string'
)
Parameters:
  • arn (string) –

    [REQUIRED]

    The ARN of the subscription to update.

  • planTier (string) –

    [REQUIRED]

    The new tier level for the subscription.

  • usageLevel (string) – The usage level within the plan tier. Specify DEFAULT for the base configuration. If omitted, the usage level is reset to the default.

  • ifMatch (string) –

    [REQUIRED]

    The ETag value from a previous GetSubscription or ListSubscriptions response. This ensures you are updating the expected version of the subscription.

  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the request is handled only once.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'subscription': {
        'arn': 'string',
        'planFamily': 'string',
        'planTier': 'string',
        'usageLevel': 'string',
        'scheduledChange': {
            'changeType': 'DOWNGRADE'|'CANCELLATION',
            'effectiveDate': datetime(2015, 1, 1),
            'planTier': 'string',
            'usageLevel': 'string'
        },
        'status': 'PENDING_APPROVAL'|'ACTIVE'|'SYNC_IN_PROGRESS'|'FAILED',
        'statusReason': 'string',
        'resourceArns': [
            'string',
        ],
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    },
    'eTag': 'string'
}

Response Structure

  • (dict) –

    • subscription (dict) –

      The details of the updated subscription. For downgrades, the current tier remains unchanged and a scheduledChange indicates the pending change.

      • arn (string) –

        The Amazon Resource Name (ARN) that uniquely identifies this subscription.

      • planFamily (string) –

        The pricing plan family for the subscription, such as CloudFront.

      • planTier (string) –

        The current tier level of the pricing plan, such as FREE, PRO, BUSINESS, or PREMIUM.

      • usageLevel (string) –

        The usage level within the plan tier. When present, indicates a specific capacity configuration beyond the base tier.

      • scheduledChange (dict) –

        A pending change that will take effect at the end of the current billing period. This field is present only when a downgrade or cancellation is scheduled.

        • changeType (string) –

          The type of pending change. Possible values are DOWNGRADE (a tier change to a lower level) and CANCELLATION (subscription termination).

        • effectiveDate (datetime) –

          The date and time when the change takes effect, in ISO 8601 format. This value is populated after the change is confirmed by the billing system.

        • planTier (string) –

          For downgrades, the tier level that the subscription will change to. Not present for cancellations.

        • usageLevel (string) –

          For downgrades, the target usage level after the change takes effect.

      • status (string) –

        The current status of the subscription. For the list of possible values, see the Status type.

      • statusReason (string) –

        A human-readable explanation of the current status, present when additional context is available.

      • resourceArns (list) –

        The ARNs of the AWS resources covered by this subscription.

        • (string) –

      • createdAt (datetime) –

        The date and time when the subscription was created, in ISO 8601 format.

      • updatedAt (datetime) –

        The date and time when the subscription was last modified, in ISO 8601 format.

    • eTag (string) –

      The updated entity tag for concurrency control.

Exceptions

  • PricingPlanManager.Client.exceptions.AccessDeniedException

  • PricingPlanManager.Client.exceptions.InternalServerException

  • PricingPlanManager.Client.exceptions.ValidationException

  • PricingPlanManager.Client.exceptions.ConflictException

  • PricingPlanManager.Client.exceptions.ServiceQuotaExceededException

  • PricingPlanManager.Client.exceptions.ResourceNotFoundException

  • PricingPlanManager.Client.exceptions.ThrottlingException