Class GlobalTable
Manages DynamoDB Global Tables V1 (version 2017.11.29). These are layered on top of existing DynamoDB Tables.
NOTE: To instead manage DynamoDB Global Tables V2 (version 2019.11.21), use the
aws.dynamodb.Tableresourcereplicaconfiguration block.
Note: There are many restrictions before you can properly create DynamoDB Global Tables in multiple regions. See the AWS DynamoDB Global Table Requirements for more information.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var us_east_1 = new Aws.Provider("us-east-1", new Aws.ProviderArgs
{
Region = "us-east-1",
});
var us_west_2 = new Aws.Provider("us-west-2", new Aws.ProviderArgs
{
Region = "us-west-2",
});
var us_east_1Table = new Aws.DynamoDB.Table("us-east-1Table", new Aws.DynamoDB.TableArgs
{
Attributes =
{
new Aws.DynamoDB.Inputs.TableAttributeArgs
{
Name = "myAttribute",
Type = "S",
},
},
HashKey = "myAttribute",
ReadCapacity = 1,
StreamEnabled = true,
StreamViewType = "NEW_AND_OLD_IMAGES",
WriteCapacity = 1,
});
var us_west_2Table = new Aws.DynamoDB.Table("us-west-2Table", new Aws.DynamoDB.TableArgs
{
Attributes =
{
new Aws.DynamoDB.Inputs.TableAttributeArgs
{
Name = "myAttribute",
Type = "S",
},
},
HashKey = "myAttribute",
ReadCapacity = 1,
StreamEnabled = true,
StreamViewType = "NEW_AND_OLD_IMAGES",
WriteCapacity = 1,
});
var myTable = new Aws.DynamoDB.GlobalTable("myTable", new Aws.DynamoDB.GlobalTableArgs
{
Replicas =
{
new Aws.DynamoDB.Inputs.GlobalTableReplicaArgs
{
RegionName = "us-east-1",
},
new Aws.DynamoDB.Inputs.GlobalTableReplicaArgs
{
RegionName = "us-west-2",
},
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.DynamoDB
Assembly: Pulumi.Aws.dll
Syntax
public class GlobalTable : CustomResource
Constructors
View SourceGlobalTable(String, GlobalTableArgs, CustomResourceOptions)
Create a GlobalTable resource with the given unique name, arguments, and options.
Declaration
public GlobalTable(string name, GlobalTableArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| GlobalTableArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
The ARN of the DynamoDB Global Table
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the global table. Must match underlying DynamoDB Table names in all regions.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Replicas
Underlying DynamoDB Table. At least 1 replica must be defined. See below.
Declaration
public Output<ImmutableArray<GlobalTableReplica>> Replicas { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<GlobalTableReplica>> |
Methods
View SourceGet(String, Input<String>, GlobalTableState, CustomResourceOptions)
Get an existing GlobalTable resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static GlobalTable Get(string name, Input<string> id, GlobalTableState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| GlobalTableState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| GlobalTable |