AWS amazondynamodb documentation change
Summary
Added PowerShell V5 examples demonstrating table creation with primary keys, local secondary indexes, and pipeline usage
Security assessment
The changes add operational examples for creating DynamoDB tables with different configurations but contain no security-related content. There is no mention of security policies, access controls, encryption, or vulnerability mitigations.
Diff
diff --git a/amazondynamodb/latest/developerguide/example_dynamodb_CreateTable_section.md b/amazondynamodb/latest/developerguide/example_dynamodb_CreateTable_section.md index 8a3da4899..9f1edb865 100644 --- a//amazondynamodb/latest/developerguide/example_dynamodb_CreateTable_section.md +++ b//amazondynamodb/latest/developerguide/example_dynamodb_CreateTable_section.md @@ -20,0 +21,4 @@ Action examples are code excerpts from larger programs and must be run in contex + * [Create and manage global tables demonstrating MREC](./example_dynamodb_Scenario_GlobalTableOperations_section.html) + + * [Create and manage MRSC global tables](./example_dynamodb_Scenario_MRSCGlobalTables_section.html) + @@ -27 +31 @@ Action examples are code excerpts from larger programs and must be run in contex - * [Work with global tables and multi-region replication](./example_dynamodb_Scenario_MultiRegionReplication_section.html) + * [Work with global tables and multi-Region replication eventual consistency (MREC)](./example_dynamodb_Scenario_MultiRegionReplication_section.html) @@ -1682,0 +1687,79 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example creates a table named Thread that has a primary key consisting of 'ForumName' (key type hash) and 'Subject' (key type range). The schema used to construct the table can be piped into each cmdlet as shown or specified using the -Schema parameter.** + + + $schema = New-DDBTableSchema + $schema | Add-DDBKeySchema -KeyName "ForumName" -KeyDataType "S" + $schema | Add-DDBKeySchema -KeyName "Subject" -KeyType RANGE -KeyDataType "S" + $schema | New-DDBTable -TableName "Thread" -ReadCapacity 10 -WriteCapacity 5 + + +**Output:** + + + AttributeDefinitions : {ForumName, Subject} + TableName : Thread + KeySchema : {ForumName, Subject} + TableStatus : CREATING + CreationDateTime : 10/28/2013 4:39:49 PM + ProvisionedThroughput : Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription + TableSizeBytes : 0 + ItemCount : 0 + LocalSecondaryIndexes : {} + +**Example 2: This example creates a table named Thread that has a primary key consisting of 'ForumName' (key type hash) and 'Subject' (key type range). A local secondary index is also defined. The key of the local secondary index will be set automatically from the primary hash key on the table (ForumName). The schema used to construct the table can be piped into each cmdlet as shown or specified using the -Schema parameter.** + + + $schema = New-DDBTableSchema + $schema | Add-DDBKeySchema -KeyName "ForumName" -KeyDataType "S" + $schema | Add-DDBKeySchema -KeyName "Subject" -KeyDataType "S" + $schema | Add-DDBIndexSchema -IndexName "LastPostIndex" -RangeKeyName "LastPostDateTime" -RangeKeyDataType "S" -ProjectionType "keys_only" + $schema | New-DDBTable -TableName "Thread" -ReadCapacity 10 -WriteCapacity 5 + + +**Output:** + + + AttributeDefinitions : {ForumName, LastPostDateTime, Subject} + TableName : Thread + KeySchema : {ForumName, Subject} + TableStatus : CREATING + CreationDateTime : 10/28/2013 4:39:49 PM + ProvisionedThroughput : Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription + TableSizeBytes : 0 + ItemCount : 0 + LocalSecondaryIndexes : {LastPostIndex} + +**Example 3: This example shows how to use a single pipeline to create a table named Thread that has a primary key consisting of 'ForumName' (key type hash) and 'Subject' (key type range) and a local secondary index. The Add-DDBKeySchema and Add-DDBIndexSchema create a new TableSchema object for you if one is not supplied from the pipeline or the -Schema parameter.** + + + New-DDBTableSchema | + Add-DDBKeySchema -KeyName "ForumName" -KeyDataType "S" | + Add-DDBKeySchema -KeyName "Subject" -KeyDataType "S" | + Add-DDBIndexSchema -IndexName "LastPostIndex" ` + -RangeKeyName "LastPostDateTime" ` + -RangeKeyDataType "S" ` + -ProjectionType "keys_only" | + New-DDBTable -TableName "Thread" -ReadCapacity 10 -WriteCapacity 5 + + +**Output:** + + + AttributeDefinitions : {ForumName, LastPostDateTime, Subject} + TableName : Thread + KeySchema : {ForumName, Subject} + TableStatus : CREATING + CreationDateTime : 10/28/2013 4:39:49 PM + ProvisionedThroughput : Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription + TableSizeBytes : 0 + ItemCount : 0 + LocalSecondaryIndexes : {LastPostIndex} + + * For API details, see [CreateTable](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +