Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions gov2/dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ Code examples that show you how to perform the essential operations within a ser
Code excerpts that show you how to call individual service functions.

- [BatchExecuteStatement](actions/partiql.go#L7)
- [BatchWriteItem](actions/table_basics.go#L177)
- [BatchWriteItem](actions/table_basics.go#L175)
- [CreateTable](actions/table_basics.go#L54)
- [DeleteItem](actions/table_basics.go#L332)
- [DeleteTable](actions/table_basics.go#L347)
- [DeleteItem](actions/table_basics.go#L330)
- [DeleteTable](actions/table_basics.go#L345)
- [DescribeTable](actions/table_basics.go#L31)
- [ExecuteStatement](actions/partiql.go#L7)
- [GetItem](actions/table_basics.go#L221)
- [ListTables](actions/table_basics.go#L99)
- [PutItem](actions/table_basics.go#L121)
- [Query](actions/table_basics.go#L243)
- [Scan](actions/table_basics.go#L285)
- [UpdateItem](actions/table_basics.go#L140)
- [GetItem](actions/table_basics.go#L219)
- [ListTables](actions/table_basics.go#L97)
- [PutItem](actions/table_basics.go#L119)
- [Query](actions/table_basics.go#L241)
- [Scan](actions/table_basics.go#L283)
- [UpdateItem](actions/table_basics.go#L138)

### Scenarios

Expand Down Expand Up @@ -160,4 +160,4 @@ in the `gov2` folder.

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: Apache-2.0
8 changes: 3 additions & 5 deletions gov2/dynamodb/actions/table_basics.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,8 @@ func (basics TableBasics) CreateMovieTable(ctx context.Context) (*types.TableDes
AttributeName: aws.String("title"),
KeyType: types.KeyTypeRange,
}},
TableName: aws.String(basics.TableName),
ProvisionedThroughput: &types.ProvisionedThroughput{
ReadCapacityUnits: aws.Int64(10),
WriteCapacityUnits: aws.Int64(10),
},
TableName: aws.String(basics.TableName),
BillingMode: types.BillingModePayPerRequest,
})
if err != nil {
log.Printf("Couldn't create table %v. Here's why: %v\n", basics.TableName, err)
Expand All @@ -90,6 +87,7 @@ func (basics TableBasics) CreateMovieTable(ctx context.Context) (*types.TableDes
log.Printf("Wait for table exists failed. Here's why: %v\n", err)
}
tableDesc = table.TableDescription
log.Printf("Ccreating table test")
}
return tableDesc, err
}
Expand Down
5 changes: 1 addition & 4 deletions gov2/dynamodb/stubs/table_basics_stubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ func StubCreateTable(tableName string, raiseErr *testtools.StubError) testtools.
AttributeName: aws.String("title"),
KeyType: types.KeyTypeRange,
}},
ProvisionedThroughput: &types.ProvisionedThroughput{
ReadCapacityUnits: aws.Int64(10),
WriteCapacityUnits: aws.Int64(10),
},
BillingMode: types.BillingModePayPerRequest,
},
Output: &dynamodb.CreateTableOutput{TableDescription: &types.TableDescription{
TableName: aws.String(tableName)}},
Expand Down
Loading