- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateGlobalTableSettingsCommand
Updates settings for a global table.
This documentation is for version 2017.11.29 (Legacy) of global tables, which should be avoided for new global tables. Customers should use Global Tables version 2019.11.21 (Current) when possible, because it provides greater flexibility, higher efficiency, and consumes less write capacity than 2017.11.29 (Legacy).
To determine which version you're using, see Determining the global table version you are using . To update existing global tables from version 2017.11.29 (Legacy) to version 2019.11.21 (Current), see Upgrading global tables .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DynamoDBClient, UpdateGlobalTableSettingsCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
// const { DynamoDBClient, UpdateGlobalTableSettingsCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
const client = new DynamoDBClient(config);
const input = { // UpdateGlobalTableSettingsInput
GlobalTableName: "STRING_VALUE", // required
GlobalTableBillingMode: "PROVISIONED" || "PAY_PER_REQUEST",
GlobalTableProvisionedWriteCapacityUnits: Number("long"),
GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate: { // AutoScalingSettingsUpdate
MinimumUnits: Number("long"),
MaximumUnits: Number("long"),
AutoScalingDisabled: true || false,
AutoScalingRoleArn: "STRING_VALUE",
ScalingPolicyUpdate: { // AutoScalingPolicyUpdate
PolicyName: "STRING_VALUE",
TargetTrackingScalingPolicyConfiguration: { // AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
DisableScaleIn: true || false,
ScaleInCooldown: Number("int"),
ScaleOutCooldown: Number("int"),
TargetValue: Number("double"), // required
},
},
},
GlobalTableGlobalSecondaryIndexSettingsUpdate: [ // GlobalTableGlobalSecondaryIndexSettingsUpdateList
{ // GlobalTableGlobalSecondaryIndexSettingsUpdate
IndexName: "STRING_VALUE", // required
ProvisionedWriteCapacityUnits: Number("long"),
ProvisionedWriteCapacityAutoScalingSettingsUpdate: {
MinimumUnits: Number("long"),
MaximumUnits: Number("long"),
AutoScalingDisabled: true || false,
AutoScalingRoleArn: "STRING_VALUE",
ScalingPolicyUpdate: {
PolicyName: "STRING_VALUE",
TargetTrackingScalingPolicyConfiguration: {
DisableScaleIn: true || false,
ScaleInCooldown: Number("int"),
ScaleOutCooldown: Number("int"),
TargetValue: Number("double"), // required
},
},
},
},
],
ReplicaSettingsUpdate: [ // ReplicaSettingsUpdateList
{ // ReplicaSettingsUpdate
RegionName: "STRING_VALUE", // required
ReplicaProvisionedReadCapacityUnits: Number("long"),
ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate: {
MinimumUnits: Number("long"),
MaximumUnits: Number("long"),
AutoScalingDisabled: true || false,
AutoScalingRoleArn: "STRING_VALUE",
ScalingPolicyUpdate: {
PolicyName: "STRING_VALUE",
TargetTrackingScalingPolicyConfiguration: {
DisableScaleIn: true || false,
ScaleInCooldown: Number("int"),
ScaleOutCooldown: Number("int"),
TargetValue: Number("double"), // required
},
},
},
ReplicaGlobalSecondaryIndexSettingsUpdate: [ // ReplicaGlobalSecondaryIndexSettingsUpdateList
{ // ReplicaGlobalSecondaryIndexSettingsUpdate
IndexName: "STRING_VALUE", // required
ProvisionedReadCapacityUnits: Number("long"),
ProvisionedReadCapacityAutoScalingSettingsUpdate: "<AutoScalingSettingsUpdate>",
},
],
ReplicaTableClass: "STANDARD" || "STANDARD_INFREQUENT_ACCESS",
},
],
};
const command = new UpdateGlobalTableSettingsCommand(input);
const response = await client.send(command);
// { // UpdateGlobalTableSettingsOutput
// GlobalTableName: "STRING_VALUE",
// ReplicaSettings: [ // ReplicaSettingsDescriptionList
// { // ReplicaSettingsDescription
// RegionName: "STRING_VALUE", // required
// ReplicaStatus: "CREATING" || "CREATION_FAILED" || "UPDATING" || "DELETING" || "ACTIVE" || "REGION_DISABLED" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS",
// ReplicaBillingModeSummary: { // BillingModeSummary
// BillingMode: "PROVISIONED" || "PAY_PER_REQUEST",
// LastUpdateToPayPerRequestDateTime: new Date("TIMESTAMP"),
// },
// ReplicaProvisionedReadCapacityUnits: Number("long"),
// ReplicaProvisionedReadCapacityAutoScalingSettings: { // AutoScalingSettingsDescription
// MinimumUnits: Number("long"),
// MaximumUnits: Number("long"),
// AutoScalingDisabled: true || false,
// AutoScalingRoleArn: "STRING_VALUE",
// ScalingPolicies: [ // AutoScalingPolicyDescriptionList
// { // AutoScalingPolicyDescription
// PolicyName: "STRING_VALUE",
// TargetTrackingScalingPolicyConfiguration: { // AutoScalingTargetTrackingScalingPolicyConfigurationDescription
// DisableScaleIn: true || false,
// ScaleInCooldown: Number("int"),
// ScaleOutCooldown: Number("int"),
// TargetValue: Number("double"), // required
// },
// },
// ],
// },
// ReplicaProvisionedWriteCapacityUnits: Number("long"),
// ReplicaProvisionedWriteCapacityAutoScalingSettings: {
// MinimumUnits: Number("long"),
// MaximumUnits: Number("long"),
// AutoScalingDisabled: true || false,
// AutoScalingRoleArn: "STRING_VALUE",
// ScalingPolicies: [
// {
// PolicyName: "STRING_VALUE",
// TargetTrackingScalingPolicyConfiguration: {
// DisableScaleIn: true || false,
// ScaleInCooldown: Number("int"),
// ScaleOutCooldown: Number("int"),
// TargetValue: Number("double"), // required
// },
// },
// ],
// },
// ReplicaGlobalSecondaryIndexSettings: [ // ReplicaGlobalSecondaryIndexSettingsDescriptionList
// { // ReplicaGlobalSecondaryIndexSettingsDescription
// IndexName: "STRING_VALUE", // required
// IndexStatus: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE",
// ProvisionedReadCapacityUnits: Number("long"),
// ProvisionedReadCapacityAutoScalingSettings: {
// MinimumUnits: Number("long"),
// MaximumUnits: Number("long"),
// AutoScalingDisabled: true || false,
// AutoScalingRoleArn: "STRING_VALUE",
// ScalingPolicies: [
// {
// PolicyName: "STRING_VALUE",
// TargetTrackingScalingPolicyConfiguration: {
// DisableScaleIn: true || false,
// ScaleInCooldown: Number("int"),
// ScaleOutCooldown: Number("int"),
// TargetValue: Number("double"), // required
// },
// },
// ],
// },
// ProvisionedWriteCapacityUnits: Number("long"),
// ProvisionedWriteCapacityAutoScalingSettings: {
// MinimumUnits: Number("long"),
// MaximumUnits: Number("long"),
// AutoScalingDisabled: true || false,
// AutoScalingRoleArn: "STRING_VALUE",
// ScalingPolicies: [
// {
// PolicyName: "STRING_VALUE",
// TargetTrackingScalingPolicyConfiguration: {
// DisableScaleIn: true || false,
// ScaleInCooldown: Number("int"),
// ScaleOutCooldown: Number("int"),
// TargetValue: Number("double"), // required
// },
// },
// ],
// },
// },
// ],
// ReplicaTableClassSummary: { // TableClassSummary
// TableClass: "STANDARD" || "STANDARD_INFREQUENT_ACCESS",
// LastUpdateDateTime: new Date("TIMESTAMP"),
// },
// },
// ],
// };
UpdateGlobalTableSettingsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
GlobalTableName Required | string | undefined | The name of the global table |
GlobalTableBillingMode | BillingMode | undefined | The billing mode of the global table. If
|
GlobalTableGlobalSecondaryIndexSettingsUpdate | GlobalTableGlobalSecondaryIndexSettingsUpdate[] | undefined | Represents the settings of a global secondary index for a global table that will be modified. |
GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate | AutoScalingSettingsUpdate | undefined | Auto scaling settings for managing provisioned write capacity for the global table. |
GlobalTableProvisionedWriteCapacityUnits | number | undefined | The maximum number of writes consumed per second before DynamoDB returns a |
ReplicaSettingsUpdate | ReplicaSettingsUpdate[] | undefined | Represents the settings for a global table in a Region that will be modified. |
UpdateGlobalTableSettingsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
GlobalTableName | string | undefined | The name of the global table. |
ReplicaSettings | ReplicaSettingsDescription[] | undefined | The Region-specific settings for the global table. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
GlobalTableNotFoundException | client | The specified global table does not exist. |
IndexNotFoundException | client | The operation tried to access a nonexistent index. |
InternalServerError | server | An error occurred on the server side. |
InvalidEndpointException | client | |
LimitExceededException | client | There is no limit to the number of daily on-demand backups that can be taken. For most purposes, up to 500 simultaneous table operations are allowed per account. These operations include When you are creating a table with one or more secondary indexes, you can have up to 250 such requests running at a time. However, if the table or index specifications are complex, then DynamoDB might temporarily reduce the number of concurrent operations. When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account. There is a soft account quota of 2,500 tables. GetRecords was called with a value of more than 1000 for the limit request parameter. More than 2 processes are reading from the same streams shard at the same time. Exceeding this limit may result in request throttling. |
ReplicaNotFoundException | client | The specified replica is no longer part of the global table. |
ResourceInUseException | client | The operation conflicts with the resource's availability. For example:
When appropriate, wait for the ongoing update to complete and attempt the request again. |
DynamoDBServiceException | Base exception class for all service exceptions from DynamoDB service. |