Skip to main content

global_tables

Creates, updates, deletes or gets a global_table resource or lists global_tables in a region

Overview

Nameglobal_tables
TypeResource
DescriptionVersion: None. Resource Type definition for AWS::DynamoDB::GlobalTable
Idawscc.dynamodb.global_tables

Fields

NameDatatypeDescription
multi_region_consistencystring
table_idstring
sse_specificationobjectRepresents the settings used to enable server-side encryption.
stream_specificationobjectRepresents the DynamoDB Streams configuration for a table in DynamoDB.
warm_throughputobjectProvides visibility into the number of read and write operations your table or secondary index can instantaneously support. The settings can be modified using the UpdateTable operation to meet the throughput requirements of an upcoming peak event.
replicasarray
write_provisioned_throughput_settingsobject
write_on_demand_throughput_settingsobject
global_table_witnessesarray
table_namestring
attribute_definitionsarray
billing_modestring
global_secondary_indexesarray
key_schemaarray
local_secondary_indexesarray
arnstring
stream_arnstring
time_to_live_specificationobjectRepresents the settings used to enable or disable Time to Live (TTL) for the specified table.
regionstringAWS region.

For more information, see AWS::DynamoDB::GlobalTable.

Methods

NameResourceAccessible byRequired Params
create_resourceglobal_tablesINSERTKeySchema, AttributeDefinitions, Replicas, region
delete_resourceglobal_tablesDELETEIdentifier, region
update_resourceglobal_tablesUPDATEIdentifier, PatchDocument, region
list_resourcesglobal_tables_list_onlySELECTregion
get_resourceglobal_tablesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual global_table.

SELECT
region,
multi_region_consistency,
table_id,
sse_specification,
stream_specification,
warm_throughput,
replicas,
write_provisioned_throughput_settings,
write_on_demand_throughput_settings,
global_table_witnesses,
table_name,
attribute_definitions,
billing_mode,
global_secondary_indexes,
key_schema,
local_secondary_indexes,
arn,
stream_arn,
time_to_live_specification
FROM awscc.dynamodb.global_tables
WHERE
region = '{{ region }}' AND
Identifier = '{{ table_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new global_table resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.dynamodb.global_tables (
Replicas,
AttributeDefinitions,
KeySchema,
region
)
SELECT
'{{ replicas }}',
'{{ attribute_definitions }}',
'{{ key_schema }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a global_table resource, using stack-deploy.

/*+ update */
UPDATE awscc.dynamodb.global_tables
SET PatchDocument = string('{{ {
"MultiRegionConsistency": multi_region_consistency,
"SSESpecification": sse_specification,
"StreamSpecification": stream_specification,
"WarmThroughput": warm_throughput,
"Replicas": replicas,
"WriteProvisionedThroughputSettings": write_provisioned_throughput_settings,
"WriteOnDemandThroughputSettings": write_on_demand_throughput_settings,
"GlobalTableWitnesses": global_table_witnesses,
"AttributeDefinitions": attribute_definitions,
"BillingMode": billing_mode,
"GlobalSecondaryIndexes": global_secondary_indexes,
"TimeToLiveSpecification": time_to_live_specification
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ table_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.dynamodb.global_tables
WHERE
Identifier = '{{ table_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the global_tables resource, the following permissions are required:

dynamodb:Describe*,
dynamodb:GetResourcePolicy,
application-autoscaling:Describe*,
cloudwatch:PutMetricData,
dynamodb:ListTagsOfResource,
kms:DescribeKey