Interface Attribute
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
Attribute.Jsii$Proxy
@Generated(value="jsii-pacmak/1.110.0 (build 336b265)",
date="2025-04-22T23:08:10.492Z")
@Stability(Stable)
public interface Attribute
extends software.amazon.jsii.JsiiSerializable
Represents an attribute for describing the key schema for the table and indexes.
Example:
import software.amazon.awscdk.*;
App app = new App();
Stack stack = Stack.Builder.create(app, "Stack").env(Environment.builder().region("us-west-2").build()).build();
TableV2 globalTable = TableV2.Builder.create(stack, "GlobalTable")
.partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
// applies to all replicas, i.e., us-west-2, us-east-1, us-east-2
.removalPolicy(RemovalPolicy.DESTROY)
.replicas(List.of(ReplicaTableProps.builder().region("us-east-1").build(), ReplicaTableProps.builder().region("us-east-2").build()))
.build();
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Attribute.Builderbuilder()getName()The name of an attribute.getType()The data type of an attribute.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getName
The name of an attribute. -
getType
The data type of an attribute. -
builder
- Returns:
- a
Attribute.BuilderofAttribute
-