Class Attribute
Represents an attribute for describing the key schema for the table and indexes.
Inheritance
System.Object
Attribute
Implements
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Attribute : Object, IAttribute
Syntax (vb)
Public Class Attribute
Inherits Object
Implements IAttribute
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK;
var app = new App();
var stack = new Stack(app, "Stack", new StackProps { Env = new Environment { Region = "us-west-2" } });
var globalTable = new TableV2(stack, "GlobalTable", new TablePropsV2 {
PartitionKey = new Attribute { Name = "pk", Type = AttributeType.STRING },
// applys to all replicas, i.e., us-west-2, us-east-1, us-east-2
RemovalPolicy = RemovalPolicy.DESTROY,
Replicas = new [] { new ReplicaTableProps { Region = "us-east-1" }, new ReplicaTableProps { Region = "us-east-2" } }
});
Synopsis
Constructors
Attribute() |
Properties
Name | The name of an attribute. |
Type | The data type of an attribute. |
Constructors
Attribute()
public Attribute()
Properties
Name
The name of an attribute.
public string Name { get; set; }
Property Value
System.String