Class CfnGlobalTableProps
Properties for defining a CfnGlobalTable
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnGlobalTableProps : Object, ICfnGlobalTableProps
Syntax (vb)
Public Class CfnGlobalTableProps
Inherits Object
Implements ICfnGlobalTableProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html
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 cfnGlobalTableProps = 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
},
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
},
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
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"
},
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
CfnGlobalTableProps() |
Properties
AttributeDefinitions | A list of attributes that describe the key schema for the global table and indexes. |
BillingMode | Specifies how you are charged for read and write throughput and how you manage capacity. Valid values are:. |
GlobalSecondaryIndexes | Global secondary indexes to be created on the global table. |
KeySchema | Specifies the attributes that make up the primary key for the table. |
LocalSecondaryIndexes | Local secondary indexes to be created on the table. |
Replicas | Specifies the list of replicas for your global table. |
SseSpecification | Specifies the settings to enable server-side encryption. |
StreamSpecification | Specifies the streams settings on your global table. |
TableName | A name for the global table. |
TimeToLiveSpecification | Specifies the time to live (TTL) settings for the table. |
WriteProvisionedThroughputSettings | Specifies an auto scaling policy for write capacity. |
Constructors
CfnGlobalTableProps()
public CfnGlobalTableProps()
Properties
AttributeDefinitions
A list of attributes that describe the key schema for the global table and indexes.
public object AttributeDefinitions { get; set; }
Property Value
System.Object
Remarks
BillingMode
Specifies how you are charged for read and write throughput and how you manage capacity. Valid values are:.
public string BillingMode { get; set; }
Property Value
System.String
Remarks
All replicas in your global table will have the same billing mode. If you use PROVISIONED
billing mode, you must provide an auto scaling configuration via the WriteProvisionedThroughputSettings
property. The default value of this property is PROVISIONED
.
GlobalSecondaryIndexes
Global secondary indexes to be created on the global table.
public object GlobalSecondaryIndexes { get; set; }
Property Value
System.Object
Remarks
You can create up to 20 global secondary indexes. Each replica in your global table will have the same global secondary index settings. You can only create or delete one global secondary index in a single stack operation.
Since the backfilling of an index could take a long time, CloudFormation does not wait for the index to become active. If a stack operation rolls back, CloudFormation might not delete an index that has been added. In that case, you will need to delete the index manually.
KeySchema
Specifies the attributes that make up the primary key for the table.
public object KeySchema { get; set; }
Property Value
System.Object
Remarks
The attributes in the KeySchema
property must also be defined in the AttributeDefinitions
property.
LocalSecondaryIndexes
Local secondary indexes to be created on the table.
public object LocalSecondaryIndexes { get; set; }
Property Value
System.Object
Remarks
You can create up to five local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes. Each replica in your global table will have the same local secondary index settings.
Replicas
Specifies the list of replicas for your global table.
public object Replicas { get; set; }
Property Value
System.Object
Remarks
The list must contain at least one element, the region where the stack defining the global table is deployed. For example, if you define your table in a stack deployed to us-east-1, you must have an entry in Replicas
with the region us-east-1. You cannot remove the replica in the stack region.
Adding a replica might take a few minutes for an empty table, or up to several hours for large tables. If you want to add or remove a replica, we recommend submitting an UpdateStack
operation containing only that change.
If you add or delete a replica during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new replica, you might need to manually delete the replica.
You can create a new global table with as many replicas as needed. You can add or remove replicas after table creation, but you can only add or remove a single replica in each update.
SseSpecification
Specifies the settings to enable server-side encryption.
public object SseSpecification { get; set; }
Property Value
System.Object
Remarks
These settings will be applied to all replicas. If you plan to use customer-managed KMS keys, you must provide a key for each replica using the ReplicaSpecification.ReplicaSSESpecification
property.
StreamSpecification
Specifies the streams settings on your global table.
public object StreamSpecification { get; set; }
Property Value
System.Object
Remarks
You must provide a value for this property if your global table contains more than one replica. You can only change the streams settings if your global table has only one replica.
TableName
A name for the global table.
public string TableName { get; set; }
Property Value
System.String
Remarks
If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID as the table name. For more information, see Name type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
TimeToLiveSpecification
Specifies the time to live (TTL) settings for the table.
public object TimeToLiveSpecification { get; set; }
Property Value
System.Object
Remarks
This setting will be applied to all replicas.
WriteProvisionedThroughputSettings
Specifies an auto scaling policy for write capacity.
public object WriteProvisionedThroughputSettings { get; set; }
Property Value
System.Object
Remarks
This policy will be applied to all replicas. This setting must be specified if BillingMode
is set to PROVISIONED
.