diff --git a/changelogs/fragments/update_return_block_rds.yml b/changelogs/fragments/update_return_block_rds.yml new file mode 100644 index 00000000000..0819d164ab4 --- /dev/null +++ b/changelogs/fragments/update_return_block_rds.yml @@ -0,0 +1,3 @@ +--- +trivial: + - Update return block in the module documentation for rds modules. diff --git a/plugins/modules/rds_cluster.py b/plugins/modules/rds_cluster.py index 87686475066..0b1091f71cc 100644 --- a/plugins/modules/rds_cluster.py +++ b/plugins/modules/rds_cluster.py @@ -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 @@ -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 @@ -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. @@ -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. @@ -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. @@ -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. @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: diff --git a/plugins/modules/rds_cluster_info.py b/plugins/modules/rds_cluster_info.py index 08789af4c6f..a8696757f86 100644 --- a/plugins/modules/rds_cluster_info.py +++ b/plugins/modules/rds_cluster_info.py @@ -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 @@ -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 @@ -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. @@ -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. @@ -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. @@ -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. @@ -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 @@ -188,11 +193,11 @@ 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 @@ -200,11 +205,11 @@ 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 @@ -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" """ diff --git a/plugins/modules/rds_cluster_param_group.py b/plugins/modules/rds_cluster_param_group.py index dc94bca1aa5..8d2b350db33 100644 --- a/plugins/modules/rds_cluster_param_group.py +++ b/plugins/modules/rds_cluster_param_group.py @@ -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 diff --git a/plugins/modules/rds_cluster_snapshot.py b/plugins/modules/rds_cluster_snapshot.py index 2f0ce49ec6d..03e91d9c655 100644 --- a/plugins/modules/rds_cluster_snapshot.py +++ b/plugins/modules/rds_cluster_snapshot.py @@ -102,22 +102,32 @@ description: Availability zone of the database from which the snapshot was created. returned: always type: str - sample: us-west-2a + sample: "us-west-2a" +allocated_storage: + description: The allocated storage size of the DB cluster snapshot in gibibytes (GiB). + returned: always + type: int + sample: 0 +cluster_create_time: + description: The time when the DB cluster was created, in Universal Coordinated Time (UTC). + returned: always + type: str + sample: "2024-07-01T05:27:53.478000+00:00" db_cluster_snapshot_identifier: description: Specifies the identifier for the DB cluster snapshot. returned: always type: str - sample: ansible-test-16638696-test-snapshot + sample: "ansible-test-16638696-test-snapshot" db_cluster_identifier: description: Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from. returned: always type: str - sample: ansible-test-16638696 + sample: "ansible-test-16638696" snapshot_create_time: description: Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC). returned: always type: str - sample: '2019-06-15T10:46:23.776000+00:00' + sample: "2019-06-15T10:46:23.776000+00:00" engine: description: Specifies the name of the database engine for this DB cluster snapshot. returned: always @@ -128,11 +138,6 @@ returned: always type: str sample: "5.6.mysql_aurora.1.22.5" -allocated_storage: - description: Specifies the allocated storage size in gibibytes (GiB). - returned: always - type: int - sample: 20 status: description: Specifies the status of this DB cluster snapshot. returned: always @@ -152,12 +157,12 @@ description: Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC). returned: always type: str - sample: '2019-06-15T10:15:56.221000+00:00' + sample: "2019-06-15T10:15:56.221000+00:00" master_username: description: Provides the master username for this DB cluster snapshot. returned: always type: str - sample: test + sample: "test" engine_version: description: Version of the cluster from which the snapshot was created. returned: always @@ -167,12 +172,12 @@ description: Provides the license model information for this DB cluster snapshot. returned: always type: str - sample: general-public-license + sample: "general-public-license" snapshot_type: description: How the snapshot was created (always manual for this module!). returned: always type: str - sample: manual + sample: "manual" percent_progress: description: Specifies the percentage of the estimated data that has been transferred. returned: always @@ -191,7 +196,7 @@ description: Amazon Resource Name for the snapshot. returned: always type: str - sample: arn:aws:rds:us-west-2:123456789012:snapshot:ansible-test-16638696-test-snapshot + sample: "arn:aws:rds:us-west-2:123456789012:snapshot:ansible-test-16638696-test-snapshot" source_db_cluster_snapshot_arn: description: If the DB cluster snapshot was copied from a source DB cluster snapshot, the ARN for the source DB cluster snapshot, otherwise, null. returned: always @@ -206,12 +211,18 @@ description: A list of tags. returned: always type: list - sample: [] + sample: [ + { + "key": "tag_one", + "value": "ansible-test-123456789012-rds-cluster-snapshot-b One" + }] tags: description: Tags applied to the snapshot. returned: always type: complex - contains: {} + contains: { + "Tag Two": "two ansible-test-123456789012-rds-cluster-snapshot-b" + } """ try: diff --git a/plugins/modules/rds_global_cluster_info.py b/plugins/modules/rds_global_cluster_info.py index 20200155d93..d1eb8fec422 100644 --- a/plugins/modules/rds_global_cluster_info.py +++ b/plugins/modules/rds_global_cluster_info.py @@ -57,33 +57,40 @@ description: - The Amazon Web Services Region-unique, immutable identifier for the global database cluster. type: str - sample: cluster-xxx + returned: always + sample: "cluster-123456789012" global_cluster_arn: description: - The Amazon Resource Name (ARN) for the global database cluster. type: str - sample: "arn:aws:rds::xxx:global-cluster:ansible-test-global-cluster" + returned: always + sample: "arn:aws:rds::123456789012:global-cluster:ansible-test-global-cluster" status: description: The status of the DB cluster. type: str - sample: available + returned: always + sample: "available" engine: description: The database engine of the DB cluster. type: str - sample: aurora-postgresql + returned: always + sample: "aurora-postgresql" engine_version: description: The database engine version. type: str - sample: 14.8 + returned: always + sample: "14.8" storage_encrypted: description: Whether the DB cluster is storage encrypted. type: bool + returned: always sample: false deletion_protection: description: - Indicates if the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. type: bool + returned: always sample: false gloabl_cluster_members: description: @@ -95,20 +102,24 @@ db_cluster_arn: description: The Amazon Resource Name (ARN) for each Aurora DB cluster in the global cluster. type: str - sample: arn:aws:rds:us-east-1:123456789012:cluster:ansible-test-primary + returned: always + sample: "arn:aws:rds:us-east-1:123456789012:cluster:ansible-test-primary" readers: description: The Amazon Resource Name (ARN) for each read-only secondary cluster associated with the global cluster. type: list elements: str - sample: arn:aws:rds:us-east-2:123456789012:cluster:ansible-test-secondary + returned: always + sample: "arn:aws:rds:us-east-2:123456789012:cluster:ansible-test-secondary" is_writer: description: - Indicates whether the Aurora DB cluster is the primary cluster for the global cluster with which it is associated. + returned: always type: bool sample: false global_write_forwarding_status: description: The status of write forwarding for a secondary cluster in the global cluster. type: str + returned: always sample: disabled failover_state: description: @@ -121,20 +132,24 @@ description: - The current status of the global cluster. type: str + returned: always sample: "pending" from_db_cluster_arn: description: The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being demoted, and which is associated with this state. type: str - sample: arn:aws:rds:us-east-1:123456789012:cluster:ansible-test-primary + returned: always + sample: "arn:aws:rds:us-east-1:123456789012:cluster:ansible-test-primary" to_db_cluster_arn: description: The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being promoted, and which is associated with this state. type: str - sample: arn:aws:rds:us-east-2:123456789012:cluster:ansible-test-secondary + returned: always + sample: "arn:aws:rds:us-east-2:123456789012:cluster:ansible-test-secondary" is_data_loss_allowed: description: - Indicates whether the operation is a global switchover or a global failover. - If data loss is allowed, then the operation is a global failover. Otherwise, it is a switchover. type: bool + returned: always sample: false """ diff --git a/plugins/modules/rds_option_group_info.py b/plugins/modules/rds_option_group_info.py index ef836ce5666..628cbdde00a 100644 --- a/plugins/modules/rds_option_group_info.py +++ b/plugins/modules/rds_option_group_info.py @@ -72,7 +72,7 @@ type: bool returned: always sample: false -option_groups_list: +result: description: The available RDS option groups. returned: always type: complex diff --git a/plugins/modules/rds_snapshot_info.py b/plugins/modules/rds_snapshot_info.py index 9617c5ad8fc..f747c471fcc 100644 --- a/plugins/modules/rds_snapshot_info.py +++ b/plugins/modules/rds_snapshot_info.py @@ -69,116 +69,6 @@ """ RETURN = r""" -snapshots: - description: List of non-clustered snapshots - returned: When cluster parameters are not passed - type: complex - contains: - allocated_storage: - description: How many gigabytes of storage are allocated - returned: always - type: int - sample: 10 - availability_zone: - description: The availability zone of the database from which the snapshot was taken - returned: always - type: str - sample: us-west-2b - db_instance_identifier: - description: Database instance identifier - returned: always - type: str - sample: hello-world-rds - db_snapshot_arn: - description: Snapshot ARN - returned: always - type: str - sample: arn:aws:rds:us-west-2:123456789012:snapshot:rds:hello-world-rds-us1-2018-05-16-04-03 - db_snapshot_identifier: - description: Snapshot name - returned: always - type: str - sample: rds:hello-world-rds-us1-2018-05-16-04-03 - encrypted: - description: Whether the snapshot was encrypted - returned: always - type: bool - sample: true - engine: - description: Database engine - returned: always - type: str - sample: postgres - engine_version: - description: Database engine version - returned: always - type: str - sample: 9.5.10 - iam_database_authentication_enabled: - description: Whether database authentication through IAM is enabled - returned: always - type: bool - sample: false - instance_create_time: - description: Time the Instance was created - returned: always - type: str - sample: '2017-10-10T04:00:07.434000+00:00' - kms_key_id: - description: ID of the KMS Key encrypting the snapshot - returned: always - type: str - sample: arn:aws:kms:us-west-2:123456789012:key/abcd1234-1234-aaaa-0000-1234567890ab - license_model: - description: License model - returned: always - type: str - sample: postgresql-license - master_username: - description: Database master username - returned: always - type: str - sample: dbadmin - option_group_name: - description: Database option group name - returned: always - type: str - sample: default:postgres-9-5 - percent_progress: - description: Percent progress of snapshot - returned: always - type: int - sample: 100 - snapshot_create_time: - description: Time snapshot was created - returned: always - type: str - sample: '2018-05-16T04:03:33.871000+00:00' - snapshot_type: - description: Type of snapshot - returned: always - type: str - sample: automated - status: - description: Status of snapshot - returned: always - type: str - sample: available - storage_type: - description: Storage type of underlying DB - returned: always - type: str - sample: gp2 - tags: - description: Snapshot tags - returned: when snapshot is not shared - type: complex - contains: {} - vpc_id: - description: ID of VPC containing the DB - returned: always - type: str - sample: vpc-abcd1234 cluster_snapshots: description: List of cluster snapshots returned: always @@ -200,32 +90,32 @@ description: Date and time the cluster was created returned: always type: str - sample: '2018-05-17T00:13:40.223000+00:00' + sample: "2018-05-17T00:13:40.223000+00:00" db_cluster_identifier: description: Database cluster identifier returned: always type: str - sample: test-aurora-cluster + sample: "test-aurora-cluster" db_cluster_snapshot_arn: description: ARN of the database snapshot returned: always type: str - sample: arn:aws:rds:ca-central-1:123456789012:cluster-snapshot:test-aurora-snapshot + sample: "arn:aws:rds:ca-central-1:123456789012:cluster-snapshot:test-aurora-snapshot" db_cluster_snapshot_identifier: description: Snapshot identifier returned: always type: str - sample: test-aurora-snapshot + sample: "test-aurora-snapshot" engine: description: Database engine returned: always type: str - sample: aurora + sample: "aurora" engine_version: description: Database engine version returned: always type: str - sample: 5.6.10a + sample: "5.6.10a" iam_database_authentication_enabled: description: Whether database authentication through IAM is enabled returned: always @@ -235,17 +125,17 @@ description: ID of the KMS Key encrypting the snapshot returned: always type: str - sample: arn:aws:kms:ca-central-1:123456789012:key/abcd1234-abcd-1111-aaaa-0123456789ab + sample: "arn:aws:kms:ca-central-1:123456789012:key/abcd1234-abcd-1111-aaaa-0123456789ab" license_model: description: License model returned: always type: str - sample: aurora + sample: "aurora" master_username: description: Database master username returned: always type: str - sample: shertel + sample: "shertel" percent_progress: description: Percent progress of snapshot returned: always @@ -260,17 +150,17 @@ description: Date and time when the snapshot was created returned: always type: str - sample: '2018-05-17T00:23:23.731000+00:00' + sample: "2018-05-17T00:23:23.731000+00:00" snapshot_type: description: Type of snapshot returned: always type: str - sample: manual + sample: "manual" status: description: Status of snapshot returned: always type: str - sample: creating + sample: "creating" storage_encrypted: description: Whether the snapshot is encrypted returned: always @@ -285,7 +175,7 @@ description: VPC of the database returned: always type: str - sample: vpc-abcd1234 + sample: "vpc-abcd1234" """ from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict diff --git a/plugins/modules/rds_subnet_group.py b/plugins/modules/rds_subnet_group.py index 17fbdb00173..7f1f3004827 100644 --- a/plugins/modules/rds_subnet_group.py +++ b/plugins/modules/rds_subnet_group.py @@ -80,7 +80,7 @@ description: True if listing the RDS subnet group succeeds. type: bool returned: always - sample: "false" + sample: false subnet_group: description: Dictionary of DB subnet group values returned: I(state=present)