global_tables
Creates, updates, deletes or gets a global_table resource or lists global_tables in a region
Overview
| Name | global_tables |
| Type | Resource |
| Description | Version: None. Resource Type definition for AWS::DynamoDB::GlobalTable |
| Id | awscc.dynamodb.global_tables |
Fields
| Name | Datatype | Description |
|---|---|---|
multi_region_consistency | string | |
table_id | string | |
sse_specification | object | Represents the settings used to enable server-side encryption. |
stream_specification | object | Represents the DynamoDB Streams configuration for a table in DynamoDB. |
warm_throughput | object | Provides 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. |
replicas | array | |
write_provisioned_throughput_settings | object | |
write_on_demand_throughput_settings | object | |
global_table_witnesses | array | |
table_name | string | |
attribute_definitions | array | |
billing_mode | string | |
global_secondary_indexes | array | |
key_schema | array | |
local_secondary_indexes | array | |
arn | string | |
stream_arn | string | |
time_to_live_specification | object | Represents the settings used to enable or disable Time to Live (TTL) for the specified table. |
region | string | AWS region. |
For more information, see AWS::DynamoDB::GlobalTable.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | KeySchema, AttributeDefinitions, Replicas, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, 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 = 'us-east-1' AND data__Identifier = '<TableName>';
INSERT example
Use the following StackQL query and manifest file to create a new global_table resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.dynamodb.global_tables (
Replicas,
AttributeDefinitions,
KeySchema,
region
)
SELECT
'{{ Replicas }}',
'{{ AttributeDefinitions }}',
'{{ KeySchema }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.dynamodb.global_tables (
MultiRegionConsistency,
SSESpecification,
StreamSpecification,
WarmThroughput,
Replicas,
WriteProvisionedThroughputSettings,
WriteOnDemandThroughputSettings,
GlobalTableWitnesses,
TableName,
AttributeDefinitions,
BillingMode,
GlobalSecondaryIndexes,
KeySchema,
LocalSecondaryIndexes,
TimeToLiveSpecification,
region
)
SELECT
'{{ MultiRegionConsistency }}',
'{{ SSESpecification }}',
'{{ StreamSpecification }}',
'{{ WarmThroughput }}',
'{{ Replicas }}',
'{{ WriteProvisionedThroughputSettings }}',
'{{ WriteOnDemandThroughputSettings }}',
'{{ GlobalTableWitnesses }}',
'{{ TableName }}',
'{{ AttributeDefinitions }}',
'{{ BillingMode }}',
'{{ GlobalSecondaryIndexes }}',
'{{ KeySchema }}',
'{{ LocalSecondaryIndexes }}',
'{{ TimeToLiveSpecification }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: global_table
props:
- name: MultiRegionConsistency
value: '{{ MultiRegionConsistency }}'
- name: SSESpecification
value:
SSEEnabled: '{{ SSEEnabled }}'
SSEType: '{{ SSEType }}'
KMSMasterKeyId: '{{ KMSMasterKeyId }}'
- name: StreamSpecification
value:
StreamViewType: '{{ StreamViewType }}'
ResourcePolicy:
PolicyDocument: {}
- name: WarmThroughput
value:
ReadUnitsPerSecond: '{{ ReadUnitsPerSecond }}'
WriteUnitsPerSecond: '{{ WriteUnitsPerSecond }}'
- name: Replicas
value:
- SSESpecification:
KMSMasterKeyId: '{{ KMSMasterKeyId }}'
KinesisStreamSpecification:
ApproximateCreationDateTimePrecision: '{{ ApproximateCreationDateTimePrecision }}'
StreamArn: '{{ StreamArn }}'
ContributorInsightsSpecification:
Mode: '{{ Mode }}'
Enabled: '{{ Enabled }}'
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: '{{ PointInTimeRecoveryEnabled }}'
RecoveryPeriodInDays: '{{ RecoveryPeriodInDays }}'
ReplicaStreamSpecification:
ResourcePolicy: null
GlobalSecondaryIndexes:
- IndexName: '{{ IndexName }}'
ContributorInsightsSpecification: null
ReadProvisionedThroughputSettings:
ReadCapacityUnits: '{{ ReadCapacityUnits }}'
ReadCapacityAutoScalingSettings:
MinCapacity: '{{ MinCapacity }}'
SeedCapacity: '{{ SeedCapacity }}'
TargetTrackingScalingPolicyConfiguration:
ScaleOutCooldown: '{{ ScaleOutCooldown }}'
TargetValue: null
DisableScaleIn: '{{ DisableScaleIn }}'
ScaleInCooldown: '{{ ScaleInCooldown }}'
MaxCapacity: '{{ MaxCapacity }}'
ReadOnDemandThroughputSettings:
MaxReadRequestUnits: '{{ MaxReadRequestUnits }}'
Region: '{{ Region }}'
ResourcePolicy: null
ReadProvisionedThroughputSettings: null
TableClass: '{{ TableClass }}'
DeletionProtectionEnabled: '{{ DeletionProtectionEnabled }}'
Tags:
- Value: '{{ Value }}'
Key: '{{ Key }}'
ReadOnDemandThroughputSettings: null
- name: WriteProvisionedThroughputSettings
value:
WriteCapacityAutoScalingSettings: null
- name: WriteOnDemandThroughputSettings
value:
MaxWriteRequestUnits: '{{ MaxWriteRequestUnits }}'
- name: GlobalTableWitnesses
value:
- Region: '{{ Region }}'
- name: TableName
value: '{{ TableName }}'
- name: AttributeDefinitions
value:
- AttributeType: '{{ AttributeType }}'
AttributeName: '{{ AttributeName }}'
- name: BillingMode
value: '{{ BillingMode }}'
- name: GlobalSecondaryIndexes
value:
- IndexName: '{{ IndexName }}'
OnDemandThroughput:
MaxReadRequestUnits: '{{ MaxReadRequestUnits }}'
MaxWriteRequestUnits: '{{ MaxWriteRequestUnits }}'
ContributorInsightsSpecification: null
Projection:
NonKeyAttributes:
- '{{ NonKeyAttributes[0] }}'
ProjectionType: '{{ ProjectionType }}'
ProvisionedThroughput:
WriteCapacityUnits: '{{ WriteCapacityUnits }}'
ReadCapacityUnits: '{{ ReadCapacityUnits }}'
KeySchema:
- KeyType: '{{ KeyType }}'
AttributeName: '{{ AttributeName }}'
WarmThroughput: null
- name: KeySchema
value:
- null
- name: LocalSecondaryIndexes
value:
- IndexName: '{{ IndexName }}'
Projection: null
KeySchema:
- null
- name: TimeToLiveSpecification
value:
Enabled: '{{ Enabled }}'
AttributeName: '{{ AttributeName }}'
DELETE example
/*+ delete */
DELETE FROM awscc.dynamodb.global_tables
WHERE data__Identifier = '<TableName>'
AND region = 'us-east-1';
Permissions
To operate on the global_tables resource, the following permissions are required:
Read
dynamodb:Describe*,
dynamodb:GetResourcePolicy,
application-autoscaling:Describe*,
cloudwatch:PutMetricData,
dynamodb:ListTagsOfResource,
kms:DescribeKey
Create
dynamodb:CreateTable,
dynamodb:CreateTableReplica,
dynamodb:Describe*,
dynamodb:UpdateTimeToLive,
dynamodb:UpdateContributorInsights,
dynamodb:UpdateContinuousBackups,
dynamodb:ListTagsOfResource,
dynamodb:Query,
dynamodb:Scan,
dynamodb:UpdateItem,
dynamodb:PutItem,
dynamodb:GetItem,
dynamodb:DeleteItem,
dynamodb:BatchWriteItem,
dynamodb:TagResource,
dynamodb:EnableKinesisStreamingDestination,
dynamodb:DisableKinesisStreamingDestination,
dynamodb:UpdateTableReplicaAutoScaling,
dynamodb:TagResource,
dynamodb:GetResourcePolicy,
dynamodb:PutResourcePolicy,
application-autoscaling:DeleteScalingPolicy,
application-autoscaling:DeleteScheduledAction,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:Describe*,
application-autoscaling:PutScalingPolicy,
application-autoscaling:PutScheduledAction,
application-autoscaling:RegisterScalableTarget,
kinesis:ListStreams,
kinesis:DescribeStream,
kinesis:PutRecords,
kms:CreateGrant,
kms:DescribeKey,
kms:ListAliases,
kms:Decrypt,
kms:RevokeGrant,
cloudwatch:PutMetricData,
iam:CreateServiceLinkedRole
Update
dynamodb:Describe*,
dynamodb:CreateTableReplica,
dynamodb:UpdateTable,
dynamodb:UpdateTimeToLive,
dynamodb:UpdateContinuousBackups,
dynamodb:UpdateContributorInsights,
dynamodb:ListTagsOfResource,
dynamodb:Query,
dynamodb:Scan,
dynamodb:UpdateItem,
dynamodb:PutItem,
dynamodb:GetItem,
dynamodb:DeleteItem,
dynamodb:BatchWriteItem,
dynamodb:DeleteTable,
dynamodb:DeleteTableReplica,
dynamodb:UpdateItem,
dynamodb:TagResource,
dynamodb:UntagResource,
dynamodb:EnableKinesisStreamingDestination,
dynamodb:DisableKinesisStreamingDestination,
dynamodb:UpdateTableReplicaAutoScaling,
dynamodb:UpdateKinesisStreamingDestination,
dynamodb:GetResourcePolicy,
dynamodb:PutResourcePolicy,
dynamodb:DeleteResourcePolicy,
application-autoscaling:DeleteScalingPolicy,
application-autoscaling:DeleteScheduledAction,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:Describe*,
application-autoscaling:PutScalingPolicy,
application-autoscaling:PutScheduledAction,
application-autoscaling:RegisterScalableTarget,
kinesis:ListStreams,
kinesis:DescribeStream,
kinesis:PutRecords,
kms:CreateGrant,
kms:DescribeKey,
kms:ListAliases,
kms:RevokeGrant,
cloudwatch:PutMetricData
List
dynamodb:ListTables,
cloudwatch:PutMetricData
Delete
dynamodb:Describe*,
dynamodb:DeleteTable,
application-autoscaling:DeleteScalingPolicy,
application-autoscaling:DeleteScheduledAction,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:Describe*,
application-autoscaling:PutScalingPolicy,
application-autoscaling:PutScheduledAction,
application-autoscaling:RegisterScalableTarget