Class CfnGlobalTable
The AWS::DynamoDB::GlobalTable
resource enables you to create and manage a Version 2019.11.21 global table. This resource cannot be used to create or manage a Version 2017.11.29 global table. For more information, see Global tables .
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnGlobalTable : CfnResource, IInspectable
Syntax (vb)
Public Class CfnGlobalTable
Inherits CfnResource
Implements IInspectable
Remarks
You cannot convert a resource of type AWS::DynamoDB::Table
into a resource of type AWS::DynamoDB::GlobalTable
by changing its type in your template. Doing so might result in the deletion of your DynamoDB table.
You can instead use the GlobalTable resource to create a new table in a single Region. This will be billed the same as a single Region table. If you later update the stack to add other Regions then Global Tables pricing will apply.
You should be aware of the following behaviors when working with DynamoDB global tables.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html
CloudformationResource: AWS::DynamoDB::GlobalTable
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DynamoDB;
var policyDocument;
var cfnGlobalTable = new CfnGlobalTable(this, "MyCfnGlobalTable", new CfnGlobalTableProps {
AttributeDefinitions = new [] { new AttributeDefinitionProperty {
AttributeName = "attributeName",
AttributeType = "attributeType"
} },
KeySchema = new [] { new KeySchemaProperty {
AttributeName = "attributeName",
KeyType = "keyType"
} },
Replicas = new [] { new ReplicaSpecificationProperty {
Region = "region",
// the properties below are optional
ContributorInsightsSpecification = new ContributorInsightsSpecificationProperty {
Enabled = false
},
DeletionProtectionEnabled = false,
GlobalSecondaryIndexes = new [] { new ReplicaGlobalSecondaryIndexSpecificationProperty {
IndexName = "indexName",
// the properties below are optional
ContributorInsightsSpecification = new ContributorInsightsSpecificationProperty {
Enabled = false
},
ReadOnDemandThroughputSettings = new ReadOnDemandThroughputSettingsProperty {
MaxReadRequestUnits = 123
},
ReadProvisionedThroughputSettings = new ReadProvisionedThroughputSettingsProperty {
ReadCapacityAutoScalingSettings = new CapacityAutoScalingSettingsProperty {
MaxCapacity = 123,
MinCapacity = 123,
TargetTrackingScalingPolicyConfiguration = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
DisableScaleIn = false,
ScaleInCooldown = 123,
ScaleOutCooldown = 123
},
// the properties below are optional
SeedCapacity = 123
},
ReadCapacityUnits = 123
}
} },
KinesisStreamSpecification = new KinesisStreamSpecificationProperty {
StreamArn = "streamArn",
// the properties below are optional
ApproximateCreationDateTimePrecision = "approximateCreationDateTimePrecision"
},
PointInTimeRecoverySpecification = new PointInTimeRecoverySpecificationProperty {
PointInTimeRecoveryEnabled = false,
RecoveryPeriodInDays = 123
},
ReadOnDemandThroughputSettings = new ReadOnDemandThroughputSettingsProperty {
MaxReadRequestUnits = 123
},
ReadProvisionedThroughputSettings = new ReadProvisionedThroughputSettingsProperty {
ReadCapacityAutoScalingSettings = new CapacityAutoScalingSettingsProperty {
MaxCapacity = 123,
MinCapacity = 123,
TargetTrackingScalingPolicyConfiguration = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
DisableScaleIn = false,
ScaleInCooldown = 123,
ScaleOutCooldown = 123
},
// the properties below are optional
SeedCapacity = 123
},
ReadCapacityUnits = 123
},
ReplicaStreamSpecification = new ReplicaStreamSpecificationProperty {
ResourcePolicy = new ResourcePolicyProperty {
PolicyDocument = policyDocument
}
},
ResourcePolicy = new ResourcePolicyProperty {
PolicyDocument = policyDocument
},
SseSpecification = new ReplicaSSESpecificationProperty {
KmsMasterKeyId = "kmsMasterKeyId"
},
TableClass = "tableClass",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
} },
// the properties below are optional
BillingMode = "billingMode",
GlobalSecondaryIndexes = new [] { new GlobalSecondaryIndexProperty {
IndexName = "indexName",
KeySchema = new [] { new KeySchemaProperty {
AttributeName = "attributeName",
KeyType = "keyType"
} },
Projection = new ProjectionProperty {
NonKeyAttributes = new [] { "nonKeyAttributes" },
ProjectionType = "projectionType"
},
// the properties below are optional
WarmThroughput = new WarmThroughputProperty {
ReadUnitsPerSecond = 123,
WriteUnitsPerSecond = 123
},
WriteOnDemandThroughputSettings = new WriteOnDemandThroughputSettingsProperty {
MaxWriteRequestUnits = 123
},
WriteProvisionedThroughputSettings = new WriteProvisionedThroughputSettingsProperty {
WriteCapacityAutoScalingSettings = new CapacityAutoScalingSettingsProperty {
MaxCapacity = 123,
MinCapacity = 123,
TargetTrackingScalingPolicyConfiguration = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
DisableScaleIn = false,
ScaleInCooldown = 123,
ScaleOutCooldown = 123
},
// the properties below are optional
SeedCapacity = 123
}
}
} },
LocalSecondaryIndexes = new [] { new LocalSecondaryIndexProperty {
IndexName = "indexName",
KeySchema = new [] { new KeySchemaProperty {
AttributeName = "attributeName",
KeyType = "keyType"
} },
Projection = new ProjectionProperty {
NonKeyAttributes = new [] { "nonKeyAttributes" },
ProjectionType = "projectionType"
}
} },
SseSpecification = new SSESpecificationProperty {
SseEnabled = false,
// the properties below are optional
SseType = "sseType"
},
StreamSpecification = new StreamSpecificationProperty {
StreamViewType = "streamViewType"
},
TableName = "tableName",
TimeToLiveSpecification = new TimeToLiveSpecificationProperty {
Enabled = false,
// the properties below are optional
AttributeName = "attributeName"
},
WarmThroughput = new WarmThroughputProperty {
ReadUnitsPerSecond = 123,
WriteUnitsPerSecond = 123
},
WriteOnDemandThroughputSettings = new WriteOnDemandThroughputSettingsProperty {
MaxWriteRequestUnits = 123
},
WriteProvisionedThroughputSettings = new WriteProvisionedThroughputSettingsProperty {
WriteCapacityAutoScalingSettings = new CapacityAutoScalingSettingsProperty {
MaxCapacity = 123,
MinCapacity = 123,
TargetTrackingScalingPolicyConfiguration = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
DisableScaleIn = false,
ScaleInCooldown = 123,
ScaleOutCooldown = 123
},
// the properties below are optional
SeedCapacity = 123
}
}
});
Synopsis
Constructors
Cfn |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Cfn |
Used by jsii to construct an instance of this class from DeputyProps |
Cfn |
Properties
Attr |
The Amazon Resource Name (ARN) of the DynamoDB table, such as |
Attribute |
A list of attributes that describe the key schema for the global table and indexes. |
Attr |
The ARN of the DynamoDB stream, such as |
Attr |
Unique identifier for the table, such as |
Billing |
Specifies how you are charged for read and write throughput and how you manage capacity. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
Cfn |
|
Global |
Global secondary indexes to be created on the global table. |
Key |
Specifies the attributes that make up the primary key for the table. |
Local |
Local secondary indexes to be created on the table. |
Replicas | Specifies the list of replicas for your global table. |
Sse |
Specifies the settings to enable server-side encryption. |
Stream |
Specifies the streams settings on your global table. |
Table |
A name for the global table. |
Time |
Specifies the time to live (TTL) settings for the table. |
Warm |
Provides visibility into the number of read and write operations your table or secondary index can instantaneously support. |
Write |
Sets the write request settings for a global table or a global secondary index. |
Write |
Specifies an auto scaling policy for write capacity. |
Methods
Inspect(Tree |
Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnGlobalTable(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnGlobalTable(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
CfnGlobalTable(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnGlobalTable(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
CfnGlobalTable(Construct, String, ICfnGlobalTableProps)
public CfnGlobalTable(Construct scope, string id, ICfnGlobalTableProps props)
Parameters
- scope Constructs.
Construct Scope in which this resource is defined.
- id System.
String Construct identifier for this resource (unique in its scope).
- props ICfn
Global Table Props Resource properties.
Properties
AttrArn
The Amazon Resource Name (ARN) of the DynamoDB table, such as arn:aws:dynamodb:us-east-2:123456789012:table/myDynamoDBTable
.
public virtual string AttrArn { get; }
Property Value
System.
Remarks
The ARN returned is that of the replica in the region the stack is deployed to.
CloudformationAttribute: Arn
AttributeDefinitions
A list of attributes that describe the key schema for the global table and indexes.
public virtual object AttributeDefinitions { get; set; }
Property Value
System.
AttrStreamArn
The ARN of the DynamoDB stream, such as arn:aws:dynamodb:us-east-1:123456789012:table/testddbstack-myDynamoDBTable-012A1SL7SMP5Q/stream/2015-11-30T20:10:00.000
. The StreamArn
returned is that of the replica in the region the stack is deployed to.
public virtual string AttrStreamArn { get; }
Property Value
System.
Remarks
You must specify the StreamSpecification
property to use this attribute.
CloudformationAttribute: StreamArn
AttrTableId
Unique identifier for the table, such as a123b456-01ab-23cd-123a-111222aaabbb
.
public virtual string AttrTableId { get; }
Property Value
System.
Remarks
The TableId
returned is that of the replica in the region the stack is deployed to.
CloudformationAttribute: TableId
BillingMode
Specifies how you are charged for read and write throughput and how you manage capacity.
public virtual string BillingMode { get; set; }
Property Value
System.
Remarks
Valid values are:.
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.
Overrides
GlobalSecondaryIndexes
Global secondary indexes to be created on the global table.
public virtual object GlobalSecondaryIndexes { get; set; }
Property Value
System.
KeySchema
Specifies the attributes that make up the primary key for the table.
public virtual object KeySchema { get; set; }
Property Value
System.
LocalSecondaryIndexes
Local secondary indexes to be created on the table.
public virtual object LocalSecondaryIndexes { get; set; }
Property Value
System.
Replicas
Specifies the list of replicas for your global table.
public virtual object Replicas { get; set; }
Property Value
System.
SseSpecification
Specifies the settings to enable server-side encryption.
public virtual object SseSpecification { get; set; }
Property Value
System.
StreamSpecification
Specifies the streams settings on your global table.
public virtual object StreamSpecification { get; set; }
Property Value
System.
TableName
A name for the global table.
public virtual string TableName { get; set; }
Property Value
System.
TimeToLiveSpecification
Specifies the time to live (TTL) settings for the table.
public virtual object TimeToLiveSpecification { get; set; }
Property Value
System.
WarmThroughput
Provides visibility into the number of read and write operations your table or secondary index can instantaneously support.
public virtual object WarmThroughput { get; set; }
Property Value
System.
WriteOnDemandThroughputSettings
Sets the write request settings for a global table or a global secondary index.
public virtual object WriteOnDemandThroughputSettings { get; set; }
Property Value
System.
WriteProvisionedThroughputSettings
Specifies an auto scaling policy for write capacity.
public virtual object WriteProvisionedThroughputSettings { get; set; }
Property Value
System.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector Tree
Inspector tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.
Collections. <System.Generic. IDictionary String , System.Object >
Returns
System.