Skip to content

Commit

Permalink
Update return block documentation for rds modules
Browse files Browse the repository at this point in the history
  • Loading branch information
GomathiselviS committed Jul 1, 2024
1 parent 4ffbda3 commit 6d76fb9
Show file tree
Hide file tree
Showing 9 changed files with 134 additions and 196 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/update_return_block_rds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- Update return block in the module documentation for rds modules.
45 changes: 25 additions & 20 deletions plugins/modules/rds_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@
description: The status of the database activity stream.
returned: always
type: str
sample: stopped
sample: "stopped"
allocated_storage:
description:
- The allocated storage size in gigabytes. Since aurora storage size is not fixed this is
Expand All @@ -546,6 +546,11 @@
returned: always
type: list
sample: []
auto_minor_version_upgrade:
description: Specifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window.
returned: always
type: bool
sample: true
availability_zones:
description: The list of availability zones that instances in the DB cluster can be created in.
returned: always
Expand All @@ -568,7 +573,7 @@
description: The time in UTC when the DB cluster was created.
returned: always
type: str
sample: '2018-06-29T14:08:58.491000+00:00'
sample: "2018-06-29T14:08:58.491000+00:00"
copy_tags_to_snapshot:
description:
- Specifies whether tags are copied from the DB cluster to snapshots of the DB cluster.
Expand All @@ -590,7 +595,7 @@
description: The lowercase user-supplied DB cluster identifier.
returned: always
type: str
sample: rds-cluster-demo
sample: "rds-cluster-demo"
db_cluster_members:
description:
- A list of dictionaries containing information about the instances in the cluster.
Expand All @@ -603,17 +608,17 @@
description: The parameter group associated with the DB cluster.
returned: always
type: str
sample: default.aurora5.6
sample: "default.aurora5.6"
db_cluster_resource_id:
description: The AWS Region-unique, immutable identifier for the DB cluster.
returned: always
type: str
sample: cluster-D2MEQDN3BQNXDF74K6DQJTHASU
sample: "cluster-D2MEQDN3BQNXDF74K6DQJTHASU"
db_subnet_group:
description: The name of the subnet group associated with the DB Cluster.
returned: always
type: str
sample: default
sample: "default"
deletion_protection:
description:
- Indicates if the DB cluster has deletion protection enabled.
Expand All @@ -631,32 +636,32 @@
description: The earliest time to which a database can be restored with point-in-time restore.
returned: always
type: str
sample: '2018-06-29T14:09:34.797000+00:00'
sample: "2018-06-29T14:09:34.797000+00:00"
endpoint:
description: The connection endpoint for the primary instance of the DB cluster.
returned: always
type: str
sample: rds-cluster-demo.cluster-cvlrtwiennww.us-east-1.rds.amazonaws.com
sample: "rds-cluster-demo.cluster-cvlrtwiennww.us-east-1.rds.amazonaws.com"
engine:
description: The database engine of the DB cluster.
returned: always
type: str
sample: aurora
sample: "aurora"
engine_mode:
description: The DB engine mode of the DB cluster.
returned: always
type: str
sample: provisioned
sample: "provisioned"
engine_version:
description: The database engine version.
returned: always
type: str
sample: 5.6.10a
sample: "5.6.10a"
hosted_zone_id:
description: The ID that Amazon Route 53 assigns when you create a hosted zone.
returned: always
type: str
sample: Z2R2ITUGPM61AM
sample: "Z2R2ITUGPM61AM"
http_endpoint_enabled:
description:
- A value that indicates whether the HTTP endpoint for an Aurora Serverless DB cluster is enabled.
Expand All @@ -672,12 +677,12 @@
description: The latest time to which a database can be restored with point-in-time restore.
returned: always
type: str
sample: '2018-06-29T14:09:34.797000+00:00'
sample: "2018-06-29T14:09:34.797000+00:00"
master_username:
description: The master username for the DB cluster.
returned: always
type: str
sample: username
sample: "username"
multi_az:
description: Whether the DB cluster has instances in multiple availability zones.
returned: always
Expand All @@ -692,12 +697,12 @@
description: The UTC weekly time range during which system maintenance can occur.
returned: always
type: str
sample: 10:18-10:48
sample: "10:18-10:48"
preferred_maintenance_window:
description: The UTC weekly time range during which system maintenance can occur.
returned: always
type: str
sample: tue:03:23-tue:03:53
sample: "tue:03:23-tue:03:53"
read_replica_identifiers:
description: A list of read replica ID strings associated with the DB cluster.
returned: always
Expand All @@ -707,7 +712,7 @@
description: The reader endpoint for the DB cluster.
returned: always
type: str
sample: rds-cluster-demo.cluster-ro-cvlrtwiennww.us-east-1.rds.amazonaws.com
sample: "rds-cluster-demo.cluster-ro-cvlrtwiennww.us-east-1.rds.amazonaws.com"
serverless_v2_scaling_configuration:
description: The scaling configuration for an Aurora Serverless v2 DB cluster.
returned: when configured
Expand All @@ -721,7 +726,7 @@
description: The status of the DB cluster.
returned: always
type: str
sample: available
sample: "available"
storage_encrypted:
description: Whether the DB cluster is storage encrypted.
returned: always
Expand Down Expand Up @@ -754,12 +759,12 @@
description: Status of the security group.
returned: always
type: str
sample: active
sample: "active"
vpc_security_group_id:
description: Security group of the cluster.
returned: always
type: str
sample: sg-12345678
sample: "sg-12345678"
"""

try:
Expand Down
47 changes: 26 additions & 21 deletions plugins/modules/rds_cluster_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
activity_stream_status:
description: The status of the database activity stream.
type: str
sample: stopped
sample: "stopped"
allocated_storage:
description:
- The allocated storage size in gigabytes. Since aurora storage size is not fixed this is
Expand All @@ -73,6 +73,11 @@
with the DB cluster. Each dictionary contains the role_arn and the status of the role.
type: list
sample: []
auto_minor_version_upgrade:
description: Specifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window.
returned: always
type: bool
sample: true
availability_zones:
description: The list of availability zones that instances in the DB cluster can be created in.
type: list
Expand All @@ -87,7 +92,7 @@
cluster_create_time:
description: The time in UTC when the DB cluster was created.
type: str
sample: '2018-06-29T14:08:58.491000+00:00'
sample: "2018-06-29T14:08:58.491000+00:00"
copy_tags_to_snapshot:
description:
- Specifies whether tags are copied from the DB cluster to snapshots of the DB cluster.
Expand All @@ -101,11 +106,11 @@
db_cluster_arn:
description: The Amazon Resource Name (ARN) for the DB cluster.
type: str
sample: arn:aws:rds:us-east-1:123456789012:cluster:rds-cluster-demo
sample: "arn:aws:rds:us-east-1:123456789012:cluster:rds-cluster-demo"
db_cluster_identifier:
description: The lowercase user-supplied DB cluster identifier.
type: str
sample: rds-cluster-demo
sample: "rds-cluster-demo"
db_cluster_members:
description:
- A list of dictionaries containing information about the instances in the cluster.
Expand All @@ -116,15 +121,15 @@
db_cluster_parameter_group:
description: The parameter group associated with the DB cluster.
type: str
sample: default.aurora5.6
sample: "default.aurora5.6"
db_cluster_resource_id:
description: The AWS Region-unique, immutable identifier for the DB cluster.
type: str
sample: cluster-D2MEQDN3BQNXDF74K6DQJTHASU
sample: "cluster-D2MEQDN3BQNXDF74K6DQJTHASU"
db_subnet_group:
description: The name of the subnet group associated with the DB Cluster.
type: str
sample: default
sample: "default"
deletion_protection:
description:
- Indicates if the DB cluster has deletion protection enabled.
Expand All @@ -139,27 +144,27 @@
earliest_restorable_time:
description: The earliest time to which a database can be restored with point-in-time restore.
type: str
sample: '2018-06-29T14:09:34.797000+00:00'
sample: "2018-06-29T14:09:34.797000+00:00"
endpoint:
description: The connection endpoint for the primary instance of the DB cluster.
type: str
sample: rds-cluster-demo.cluster-cvlrtwiennww.us-east-1.rds.amazonaws.com
sample: "rds-cluster-demo.cluster-cvlrtwiennww.us-east-1.rds.amazonaws.com"
engine:
description: The database engine of the DB cluster.
type: str
sample: aurora
sample: "aurora"
engine_mode:
description: The DB engine mode of the DB cluster.
type: str
sample: provisioned
sample: "provisioned"
engine_version:
description: The database engine version.
type: str
sample: 5.6.10a
sample: "5.6.10a"
hosted_zone_id:
description: The ID that Amazon Route 53 assigns when you create a hosted zone.
type: str
sample: Z2R2ITUGPM61AM
sample: "Z2R2ITUGPM61AM"
http_endpoint_enabled:
description:
- A value that indicates whether the HTTP endpoint for an Aurora Serverless DB cluster is enabled.
Expand All @@ -172,11 +177,11 @@
latest_restorable_time:
description: The latest time to which a database can be restored with point-in-time restore.
type: str
sample: '2018-06-29T14:09:34.797000+00:00'
sample: "2018-06-29T14:09:34.797000+00:00"
master_username:
description: The master username for the DB cluster.
type: str
sample: username
sample: "username"
multi_az:
description: Whether the DB cluster has instances in multiple availability zones.
type: bool
Expand All @@ -188,23 +193,23 @@
preferred_backup_window:
description: The UTC weekly time range during which system maintenance can occur.
type: str
sample: 10:18-10:48
sample: "10:18-10:48"
preferred_maintenance_window:
description: The UTC weekly time range during which system maintenance can occur.
type: str
sample: tue:03:23-tue:03:53
sample: "tue:03:23-tue:03:53"
read_replica_identifiers:
description: A list of read replica ID strings associated with the DB cluster.
type: list
sample: []
reader_endpoint:
description: The reader endpoint for the DB cluster.
type: str
sample: rds-cluster-demo.cluster-ro-cvlrtwiennww.us-east-1.rds.amazonaws.com
sample: "rds-cluster-demo.cluster-ro-cvlrtwiennww.us-east-1.rds.amazonaws.com"
status:
description: The status of the DB cluster.
type: str
sample: available
sample: "available"
storage_encrypted:
description: Whether the DB cluster is storage encrypted.
type: bool
Expand Down Expand Up @@ -232,11 +237,11 @@
status:
description: Status of the security group.
type: str
sample: active
sample: "active"
vpc_security_group_id:
description: Security group of the cluster.
type: str
sample: sg-12345678
sample: "sg-12345678"
"""


Expand Down
19 changes: 14 additions & 5 deletions plugins/modules/rds_cluster_param_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,32 @@
db_cluster_parameter_group_arn:
description: The Amazon Resource Name (ARN) for the RDS cluster parameter group.
type: str
returned: when state is present
returned: when O(state=present)
sample: "arn:aws:rds:us-west-2:123456789012:cluster-pg:ansible-test-123456789012-redhat-cluster-param-group"
db_cluster_parameter_group_name:
description: The name of the RDS cluster parameter group.
type: str
returned: when state is present
returned: when O(state=present)
sample: "ansible-test-123456789012-redhat-cluster-param-group"
db_parameter_group_family:
description: The name of the RDS parameter group family that this RDS cluster parameter group is compatible with.
type: str
returned: when state is present
returned: when O(state=present)
sample: "postgres16"
description:
description: Provides the customer-specified description for this RDS cluster parameter group.
type: str
returned: when state is present
returned: when O(state=present)
sample: "RDS cluster param group"
tags:
description: dictionary of tags
type: dict
returned: when state is present
returned: when O(state=present)
sample: tags: {
"another": "tag",
"resource_prefix": "ansible-test-53268383-redhat",
"some": "tag"
}
"""

from itertools import zip_longest
Expand Down
Loading

0 comments on commit 6d76fb9

Please sign in to comment.