-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dynamodb table class support #880
Add dynamodb table class support #880
Conversation
Build failed.
|
Build failed.
|
Build failed.
|
e9f6cd4
to
f98b2f4
Compare
Build failed.
|
Build succeeded.
|
ce9e55a
to
877315e
Compare
Build succeeded.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only some suggestions! May I ask you to update the RETURN statement please?
Build succeeded (third-party-check pipeline).
|
plugins/modules/dynamodb_table.py
Outdated
description: The current table class. | ||
returned: when state present | ||
type: str | ||
sample: STANDARD_INFREQUENT_ACCESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual RETURN statement, I guess it should reflect this.
changed: [testhost] => {
"billing_mode": "PROVISIONED",
"changed": true,
"hash_key_name": "id",
"hash_key_type": "NUMBER",
"indexes": [],
"invocation": {},
"range_key_name": null,
"range_key_type": null,
"read_capacity": 1,
"region": "us-east-1",
"resource_actions": [
"dynamodb:ListTagsOfResource",
"dynamodb:DescribeTable",
"dynamodb:CreateTable"
],
"table": {
"arn": "arn:aws:dynamodb:us-east-1:721066863947:table/ansible-test-table",
"attribute_definitions": [
{
"attribute_name": "id",
"attribute_type": "N"
}
],
"billing_mode": "PROVISIONED",
"creation_date_time": "2022-02-04T13:36:01.578000+00:00",
"id": "533b45fe-0870-4b66-9b00-d2afcfe96f19",
"item_count": 0,
"key_schema": [
{
"attribute_name": "id",
"key_type": "HASH"
}
],
"name": "ansible-test-14482047-alinas-mbp",
"provisioned_throughput": {
"number_of_decreases_today": 0,
"read_capacity_units": 1,
"write_capacity_units": 1
},
"size": 0,
"status": "ACTIVE",
"table_arn": "arn:aws:dynamodb:us-east-1:721066863947:table/ansible-test-table",
"table_id": "533b45fe-0870-4b66-9b00-d2afcfe96f19",
"table_name": "ansible-test-table",
"table_size_bytes": 0,
"table_status": "ACTIVE",
"tags": {}
},
"table_class": null,
"table_name": "ansible-test-table",
"table_status": "ACTIVE",
"tags": {},
"write_capacity": 1
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alinabuzachis I am wondering if everything bar the actual table
object and maybe table_status
should be deprecated and future dropped as the table
object contains all actual fields from the AWS describe call whereas the rest is basically a mirror of the inputted params.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe if I doc just table
for now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do something like this in RETURN:
...
table:
description: Add description
type: complex
sample: {
"arn": "arn:aws:dynamodb:us-east-1:721066863947:table/ansible-test-table",
"attribute_definitions": [
{
"attribute_name": "id",
"attribute_type": "N"
}
],
"billing_mode": "PROVISIONED",
"creation_date_time": "2022-02-04T13:36:01.578000+00:00",
"id": "533b45fe-0870-4b66-9b00-d2afcfe96f19",
"item_count": 0,
"key_schema": [
{
"attribute_name": "id",
"key_type": "HASH"
}
],
"name": "ansible-test-14482047-alinas-mbp",
"provisioned_throughput": {
"number_of_decreases_today": 0,
"read_capacity_units": 1,
"write_capacity_units": 1
},
"size": 0,
"status": "ACTIVE",
"table_arn": "arn:aws:dynamodb:us-east-1:721066863947:table/ansible-test-table",
"table_id": "533b45fe-0870-4b66-9b00-d2afcfe96f19",
"table_name": "ansible-test-table",
"table_size_bytes": 0,
"table_status": "ACTIVE",
"tags": {}
}
....
Build succeeded.
|
fcab0a5
to
13ce472
Compare
Build succeeded (third-party-check pipeline).
|
Build succeeded.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marknet15 Thank you. LGTM!
Build succeeded (gate pipeline).
|
Backport to stable-3: 💚 backport PR created✅ Backport PR branch: Backported as #930 🤖 @patchback |
Add dynamodb table class support SUMMARY Add support for defining a TableClass on DynamoDB tables. TableClass was introduced as part of botocore version 1.23.18 https://github.com/boto/botocore/blob/develop/CHANGELOG.rst#12318 Fixes: #829 ISSUE TYPE Feature Pull Request COMPONENT NAME dynamodb_table ADDITIONAL INFORMATION https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.create_table https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.update_table Reviewed-by: Alina Buzachis <None> Reviewed-by: Mark Woolley <[email protected]> Reviewed-by: Jill R <None> (cherry picked from commit 15d69c9)
[PR #880/15d69c91 backport][stable-3] Add dynamodb table class support This is a backport of PR #880 as merged into main (15d69c9). SUMMARY Add support for defining a TableClass on DynamoDB tables. TableClass was introduced as part of botocore version 1.23.18 https://github.com/boto/botocore/blob/develop/CHANGELOG.rst#12318 Fixes: #829 ISSUE TYPE Feature Pull Request COMPONENT NAME dynamodb_table ADDITIONAL INFORMATION https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.create_table https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.update_table
Minor tweaks to dev guidelines SUMMARY I was looking through the guidelines and noticed a few quirks. ISSUE TYPE Docs Pull Request COMPONENT NAME docs/docsite/rst/dev_guidelines.rst ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None>
SUMMARY
Add support for defining a
TableClass
on DynamoDB tables.TableClass
was introduced as part ofbotocore
version1.23.18
https://github.com/boto/botocore/blob/develop/CHANGELOG.rst#12318
Fixes: #829
ISSUE TYPE
COMPONENT NAME
dynamodb_table
ADDITIONAL INFORMATION
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.create_table
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.update_table