DynamoDB / Client / update_table_replica_auto_scaling

update_table_replica_auto_scaling#

DynamoDB.Client.update_table_replica_auto_scaling(**kwargs)#

Updates auto scaling settings on your global tables at once.

Warning

This operation only applies to Version 2019.11.21 (Current) of global tables.

See also: AWS API Documentation

Request Syntax

response = client.update_table_replica_auto_scaling(
    GlobalSecondaryIndexUpdates=[
        {
            'IndexName': 'string',
            'ProvisionedWriteCapacityAutoScalingUpdate': {
                'MinimumUnits': 123,
                'MaximumUnits': 123,
                'AutoScalingDisabled': True|False,
                'AutoScalingRoleArn': 'string',
                'ScalingPolicyUpdate': {
                    'PolicyName': 'string',
                    'TargetTrackingScalingPolicyConfiguration': {
                        'DisableScaleIn': True|False,
                        'ScaleInCooldown': 123,
                        'ScaleOutCooldown': 123,
                        'TargetValue': 123.0
                    }
                }
            }
        },
    ],
    TableName='string',
    ProvisionedWriteCapacityAutoScalingUpdate={
        'MinimumUnits': 123,
        'MaximumUnits': 123,
        'AutoScalingDisabled': True|False,
        'AutoScalingRoleArn': 'string',
        'ScalingPolicyUpdate': {
            'PolicyName': 'string',
            'TargetTrackingScalingPolicyConfiguration': {
                'DisableScaleIn': True|False,
                'ScaleInCooldown': 123,
                'ScaleOutCooldown': 123,
                'TargetValue': 123.0
            }
        }
    },
    ReplicaUpdates=[
        {
            'RegionName': 'string',
            'ReplicaGlobalSecondaryIndexUpdates': [
                {
                    'IndexName': 'string',
                    'ProvisionedReadCapacityAutoScalingUpdate': {
                        'MinimumUnits': 123,
                        'MaximumUnits': 123,
                        'AutoScalingDisabled': True|False,
                        'AutoScalingRoleArn': 'string',
                        'ScalingPolicyUpdate': {
                            'PolicyName': 'string',
                            'TargetTrackingScalingPolicyConfiguration': {
                                'DisableScaleIn': True|False,
                                'ScaleInCooldown': 123,
                                'ScaleOutCooldown': 123,
                                'TargetValue': 123.0
                            }
                        }
                    }
                },
            ],
            'ReplicaProvisionedReadCapacityAutoScalingUpdate': {
                'MinimumUnits': 123,
                'MaximumUnits': 123,
                'AutoScalingDisabled': True|False,
                'AutoScalingRoleArn': 'string',
                'ScalingPolicyUpdate': {
                    'PolicyName': 'string',
                    'TargetTrackingScalingPolicyConfiguration': {
                        'DisableScaleIn': True|False,
                        'ScaleInCooldown': 123,
                        'ScaleOutCooldown': 123,
                        'TargetValue': 123.0
                    }
                }
            }
        },
    ]
)
Parameters:
  • GlobalSecondaryIndexUpdates (list) –

    Represents the auto scaling settings of the global secondary indexes of the replica to be updated.

    • (dict) –

      Represents the auto scaling settings of a global secondary index for a global table that will be modified.

      • IndexName (string) –

        The name of the global secondary index.

      • ProvisionedWriteCapacityAutoScalingUpdate (dict) –

        Represents the auto scaling settings to be modified for a global table or global secondary index.

        • MinimumUnits (integer) –

          The minimum capacity units that a global table or global secondary index should be scaled down to.

        • MaximumUnits (integer) –

          The maximum capacity units that a global table or global secondary index should be scaled up to.

        • AutoScalingDisabled (boolean) –

          Disabled auto scaling for this global table or global secondary index.

        • AutoScalingRoleArn (string) –

          Role ARN used for configuring auto scaling policy.

        • ScalingPolicyUpdate (dict) –

          The scaling policy to apply for scaling target global table or global secondary index capacity units.

          • PolicyName (string) –

            The name of the scaling policy.

          • TargetTrackingScalingPolicyConfiguration (dict) – [REQUIRED]

            Represents a target tracking scaling policy configuration.

            • DisableScaleIn (boolean) –

              Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won’t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.

            • ScaleInCooldown (integer) –

              The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application’s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately.

            • ScaleOutCooldown (integer) –

              The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.

            • TargetValue (float) – [REQUIRED]

              The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

  • TableName (string) –

    [REQUIRED]

    The name of the global table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

  • ProvisionedWriteCapacityAutoScalingUpdate (dict) –

    Represents the auto scaling settings to be modified for a global table or global secondary index.

    • MinimumUnits (integer) –

      The minimum capacity units that a global table or global secondary index should be scaled down to.

    • MaximumUnits (integer) –

      The maximum capacity units that a global table or global secondary index should be scaled up to.

    • AutoScalingDisabled (boolean) –

      Disabled auto scaling for this global table or global secondary index.

    • AutoScalingRoleArn (string) –

      Role ARN used for configuring auto scaling policy.

    • ScalingPolicyUpdate (dict) –

      The scaling policy to apply for scaling target global table or global secondary index capacity units.

      • PolicyName (string) –

        The name of the scaling policy.

      • TargetTrackingScalingPolicyConfiguration (dict) – [REQUIRED]

        Represents a target tracking scaling policy configuration.

        • DisableScaleIn (boolean) –

          Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won’t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.

        • ScaleInCooldown (integer) –

          The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application’s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately.

        • ScaleOutCooldown (integer) –

          The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.

        • TargetValue (float) – [REQUIRED]

          The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

  • ReplicaUpdates (list) –

    Represents the auto scaling settings of replicas of the table that will be modified.

    • (dict) –

      Represents the auto scaling settings of a replica that will be modified.

      • RegionName (string) – [REQUIRED]

        The Region where the replica exists.

      • ReplicaGlobalSecondaryIndexUpdates (list) –

        Represents the auto scaling settings of global secondary indexes that will be modified.

        • (dict) –

          Represents the auto scaling settings of a global secondary index for a replica that will be modified.

          • IndexName (string) –

            The name of the global secondary index.

          • ProvisionedReadCapacityAutoScalingUpdate (dict) –

            Represents the auto scaling settings to be modified for a global table or global secondary index.

            • MinimumUnits (integer) –

              The minimum capacity units that a global table or global secondary index should be scaled down to.

            • MaximumUnits (integer) –

              The maximum capacity units that a global table or global secondary index should be scaled up to.

            • AutoScalingDisabled (boolean) –

              Disabled auto scaling for this global table or global secondary index.

            • AutoScalingRoleArn (string) –

              Role ARN used for configuring auto scaling policy.

            • ScalingPolicyUpdate (dict) –

              The scaling policy to apply for scaling target global table or global secondary index capacity units.

              • PolicyName (string) –

                The name of the scaling policy.

              • TargetTrackingScalingPolicyConfiguration (dict) – [REQUIRED]

                Represents a target tracking scaling policy configuration.

                • DisableScaleIn (boolean) –

                  Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won’t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.

                • ScaleInCooldown (integer) –

                  The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application’s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately.

                • ScaleOutCooldown (integer) –

                  The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.

                • TargetValue (float) – [REQUIRED]

                  The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

      • ReplicaProvisionedReadCapacityAutoScalingUpdate (dict) –

        Represents the auto scaling settings to be modified for a global table or global secondary index.

        • MinimumUnits (integer) –

          The minimum capacity units that a global table or global secondary index should be scaled down to.

        • MaximumUnits (integer) –

          The maximum capacity units that a global table or global secondary index should be scaled up to.

        • AutoScalingDisabled (boolean) –

          Disabled auto scaling for this global table or global secondary index.

        • AutoScalingRoleArn (string) –

          Role ARN used for configuring auto scaling policy.

        • ScalingPolicyUpdate (dict) –

          The scaling policy to apply for scaling target global table or global secondary index capacity units.

          • PolicyName (string) –

            The name of the scaling policy.

          • TargetTrackingScalingPolicyConfiguration (dict) – [REQUIRED]

            Represents a target tracking scaling policy configuration.

            • DisableScaleIn (boolean) –

              Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won’t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.

            • ScaleInCooldown (integer) –

              The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application’s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately.

            • ScaleOutCooldown (integer) –

              The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.

            • TargetValue (float) – [REQUIRED]

              The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

Return type:

dict

Returns:

Response Syntax

{
    'TableAutoScalingDescription': {
        'TableName': 'string',
        'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED',
        'Replicas': [
            {
                'RegionName': 'string',
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE',
                        'ProvisionedReadCapacityAutoScalingSettings': {
                            'MinimumUnits': 123,
                            'MaximumUnits': 123,
                            'AutoScalingDisabled': True|False,
                            'AutoScalingRoleArn': 'string',
                            'ScalingPolicies': [
                                {
                                    'PolicyName': 'string',
                                    'TargetTrackingScalingPolicyConfiguration': {
                                        'DisableScaleIn': True|False,
                                        'ScaleInCooldown': 123,
                                        'ScaleOutCooldown': 123,
                                        'TargetValue': 123.0
                                    }
                                },
                            ]
                        },
                        'ProvisionedWriteCapacityAutoScalingSettings': {
                            'MinimumUnits': 123,
                            'MaximumUnits': 123,
                            'AutoScalingDisabled': True|False,
                            'AutoScalingRoleArn': 'string',
                            'ScalingPolicies': [
                                {
                                    'PolicyName': 'string',
                                    'TargetTrackingScalingPolicyConfiguration': {
                                        'DisableScaleIn': True|False,
                                        'ScaleInCooldown': 123,
                                        'ScaleOutCooldown': 123,
                                        'TargetValue': 123.0
                                    }
                                },
                            ]
                        }
                    },
                ],
                'ReplicaProvisionedReadCapacityAutoScalingSettings': {
                    'MinimumUnits': 123,
                    'MaximumUnits': 123,
                    'AutoScalingDisabled': True|False,
                    'AutoScalingRoleArn': 'string',
                    'ScalingPolicies': [
                        {
                            'PolicyName': 'string',
                            'TargetTrackingScalingPolicyConfiguration': {
                                'DisableScaleIn': True|False,
                                'ScaleInCooldown': 123,
                                'ScaleOutCooldown': 123,
                                'TargetValue': 123.0
                            }
                        },
                    ]
                },
                'ReplicaProvisionedWriteCapacityAutoScalingSettings': {
                    'MinimumUnits': 123,
                    'MaximumUnits': 123,
                    'AutoScalingDisabled': True|False,
                    'AutoScalingRoleArn': 'string',
                    'ScalingPolicies': [
                        {
                            'PolicyName': 'string',
                            'TargetTrackingScalingPolicyConfiguration': {
                                'DisableScaleIn': True|False,
                                'ScaleInCooldown': 123,
                                'ScaleOutCooldown': 123,
                                'TargetValue': 123.0
                            }
                        },
                    ]
                },
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • TableAutoScalingDescription (dict) –

      Returns information about the auto scaling settings of a table with replicas.

      • TableName (string) –

        The name of the table.

      • TableStatus (string) –

        The current state of the table:

        • CREATING - The table is being created.

        • UPDATING - The table is being updated.

        • DELETING - The table is being deleted.

        • ACTIVE - The table is ready for use.

      • Replicas (list) –

        Represents replicas of the global table.

        • (dict) –

          Represents the auto scaling settings of the replica.

          • RegionName (string) –

            The Region where the replica exists.

          • GlobalSecondaryIndexes (list) –

            Replica-specific global secondary index auto scaling settings.

            • (dict) –

              Represents the auto scaling configuration for a replica global secondary index.

              • IndexName (string) –

                The name of the global secondary index.

              • IndexStatus (string) –

                The current state of the replica global secondary index:

                • CREATING - The index is being created.

                • UPDATING - The table/index configuration is being updated. The table/index remains available for data operations when UPDATING

                • DELETING - The index is being deleted.

                • ACTIVE - The index is ready for use.

              • ProvisionedReadCapacityAutoScalingSettings (dict) –

                Represents the auto scaling settings for a global table or global secondary index.

                • MinimumUnits (integer) –

                  The minimum capacity units that a global table or global secondary index should be scaled down to.

                • MaximumUnits (integer) –

                  The maximum capacity units that a global table or global secondary index should be scaled up to.

                • AutoScalingDisabled (boolean) –

                  Disabled auto scaling for this global table or global secondary index.

                • AutoScalingRoleArn (string) –

                  Role ARN used for configuring the auto scaling policy.

                • ScalingPolicies (list) –

                  Information about the scaling policies.

                  • (dict) –

                    Represents the properties of the scaling policy.

                    • PolicyName (string) –

                      The name of the scaling policy.

                    • TargetTrackingScalingPolicyConfiguration (dict) –

                      Represents a target tracking scaling policy configuration.

                      • DisableScaleIn (boolean) –

                        Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won’t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.

                      • ScaleInCooldown (integer) –

                        The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application’s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately.

                      • ScaleOutCooldown (integer) –

                        The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.

                      • TargetValue (float) –

                        The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

              • ProvisionedWriteCapacityAutoScalingSettings (dict) –

                Represents the auto scaling settings for a global table or global secondary index.

                • MinimumUnits (integer) –

                  The minimum capacity units that a global table or global secondary index should be scaled down to.

                • MaximumUnits (integer) –

                  The maximum capacity units that a global table or global secondary index should be scaled up to.

                • AutoScalingDisabled (boolean) –

                  Disabled auto scaling for this global table or global secondary index.

                • AutoScalingRoleArn (string) –

                  Role ARN used for configuring the auto scaling policy.

                • ScalingPolicies (list) –

                  Information about the scaling policies.

                  • (dict) –

                    Represents the properties of the scaling policy.

                    • PolicyName (string) –

                      The name of the scaling policy.

                    • TargetTrackingScalingPolicyConfiguration (dict) –

                      Represents a target tracking scaling policy configuration.

                      • DisableScaleIn (boolean) –

                        Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won’t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.

                      • ScaleInCooldown (integer) –

                        The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application’s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately.

                      • ScaleOutCooldown (integer) –

                        The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.

                      • TargetValue (float) –

                        The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

          • ReplicaProvisionedReadCapacityAutoScalingSettings (dict) –

            Represents the auto scaling settings for a global table or global secondary index.

            • MinimumUnits (integer) –

              The minimum capacity units that a global table or global secondary index should be scaled down to.

            • MaximumUnits (integer) –

              The maximum capacity units that a global table or global secondary index should be scaled up to.

            • AutoScalingDisabled (boolean) –

              Disabled auto scaling for this global table or global secondary index.

            • AutoScalingRoleArn (string) –

              Role ARN used for configuring the auto scaling policy.

            • ScalingPolicies (list) –

              Information about the scaling policies.

              • (dict) –

                Represents the properties of the scaling policy.

                • PolicyName (string) –

                  The name of the scaling policy.

                • TargetTrackingScalingPolicyConfiguration (dict) –

                  Represents a target tracking scaling policy configuration.

                  • DisableScaleIn (boolean) –

                    Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won’t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.

                  • ScaleInCooldown (integer) –

                    The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application’s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately.

                  • ScaleOutCooldown (integer) –

                    The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.

                  • TargetValue (float) –

                    The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

          • ReplicaProvisionedWriteCapacityAutoScalingSettings (dict) –

            Represents the auto scaling settings for a global table or global secondary index.

            • MinimumUnits (integer) –

              The minimum capacity units that a global table or global secondary index should be scaled down to.

            • MaximumUnits (integer) –

              The maximum capacity units that a global table or global secondary index should be scaled up to.

            • AutoScalingDisabled (boolean) –

              Disabled auto scaling for this global table or global secondary index.

            • AutoScalingRoleArn (string) –

              Role ARN used for configuring the auto scaling policy.

            • ScalingPolicies (list) –

              Information about the scaling policies.

              • (dict) –

                Represents the properties of the scaling policy.

                • PolicyName (string) –

                  The name of the scaling policy.

                • TargetTrackingScalingPolicyConfiguration (dict) –

                  Represents a target tracking scaling policy configuration.

                  • DisableScaleIn (boolean) –

                    Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won’t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.

                  • ScaleInCooldown (integer) –

                    The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application’s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately.

                  • ScaleOutCooldown (integer) –

                    The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.

                  • TargetValue (float) –

                    The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

          • ReplicaStatus (string) –

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

Exceptions