Skip to content

Commit

Permalink
Rename s3 modules (ansible-collections#1271)
Browse files Browse the repository at this point in the history
Rename s3 modules

SUMMARY
In line with the naming guidelines, removes the aws_ prefix from aws_s3_bucket_info and aws_s3_cors
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/aws_s3_bucket_info.py
plugins/modules/aws_s3_cors.py
plugins/modules/s3_bucket_info.py
plugins/modules/s3_cors.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
  • Loading branch information
tremble authored Jun 28, 2022
1 parent f4aa520 commit c3482b6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
23 changes: 13 additions & 10 deletions aws_s3_bucket_info.py → s3_bucket_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@

DOCUMENTATION = '''
---
module: aws_s3_bucket_info
module: s3_bucket_info
version_added: 1.0.0
author: "Gerben Geijteman (@hyperized)"
short_description: lists S3 buckets in AWS
author:
- "Gerben Geijteman (@hyperized)"
short_description: Lists S3 buckets in AWS
description:
- Lists S3 buckets and details about those buckets.
- Lists S3 buckets and details about those buckets.
- Prior to release 5.0.0 this module was called C(community.aws.aws_s3_bucket_info).
The usage did not change.
options:
name:
description:
Expand All @@ -31,7 +34,7 @@
version_added: 1.4.0
bucket_facts:
description:
- Retrieve requested S3 bucket detailed information
- Retrieve requested S3 bucket detailed information.
- Each bucket_X option executes one API call, hence many options being set to C(true) will cause slower module execution.
- You can limit buckets by using the I(name) or I(name_filter) option.
suboptions:
Expand Down Expand Up @@ -111,21 +114,21 @@
default: False
version_added: 1.4.0
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.aws
- amazon.aws.ec2
'''

EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details.
# Note: Only AWS S3 is currently supported
# Lists all s3 buckets
- community.aws.aws_s3_bucket_info:
# Lists all S3 buckets
- community.aws.s3_bucket_info:
register: result
# Retrieve detailed bucket information
- community.aws.aws_s3_bucket_info:
- community.aws.s3_bucket_info:
# Show only buckets with name matching
name_filter: your.testing
# Choose facts to retrieve
Expand Down
24 changes: 13 additions & 11 deletions aws_s3_cors.py → s3_cors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,42 @@

DOCUMENTATION = r'''
---
module: aws_s3_cors
module: s3_cors
version_added: 1.0.0
short_description: Manage CORS for S3 buckets in AWS
description:
- Manage CORS for S3 buckets in AWS
author: "Oyvind Saltvik (@fivethreeo)"
- Manage CORS for S3 buckets in AWS.
- Prior to release 5.0.0 this module was called C(community.aws.aws_s3_cors).
The usage did not change.
author:
- "Oyvind Saltvik (@fivethreeo)"
options:
name:
description:
- Name of the s3 bucket
- Name of the S3 bucket.
required: true
type: str
rules:
description:
- Cors rules to put on the s3 bucket
- Cors rules to put on the S3 bucket.
type: list
elements: dict
state:
description:
- Create or remove cors on the s3 bucket
- Create or remove cors on the S3 bucket.
required: true
choices: [ 'present', 'absent' ]
type: str
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.aws
- amazon.aws.ec2
'''

EXAMPLES = r'''
# Note: These examples do not set authentication details, see the AWS Guide for details.
# Create a simple cors for s3 bucket
- community.aws.aws_s3_cors:
- community.aws.s3_cors:
name: mys3bucket
state: present
rules:
Expand All @@ -59,7 +61,7 @@
max_age_seconds: 30000
# Remove cors for s3 bucket
- community.aws.aws_s3_cors:
- community.aws.s3_cors:
name: mys3bucket
state: absent
'''
Expand Down

0 comments on commit c3482b6

Please sign in to comment.