diff --git a/changelogs/fragments/2144-update-retrun-block-kms_key-kms_key_info.yml b/changelogs/fragments/2144-update-retrun-block-kms_key-kms_key_info.yml new file mode 100644 index 0000000000..1773996d18 --- /dev/null +++ b/changelogs/fragments/2144-update-retrun-block-kms_key-kms_key_info.yml @@ -0,0 +1,3 @@ +--- +trivial: + - Update return block in the module documentation for kms_key, kms_key_info (https://github.com/ansible-collections/amazon.aws/pull/2144). \ No newline at end of file diff --git a/plugins/modules/kms_key.py b/plugins/modules/kms_key.py index 47e52978d7..1be48988df 100644 --- a/plugins/modules/kms_key.py +++ b/plugins/modules/kms_key.py @@ -217,12 +217,12 @@ description: ID of key. type: str returned: always - sample: abcd1234-abcd-1234-5678-ef1234567890 + sample: "abcd1234-abcd-1234-5678-ef1234567890" key_arn: description: ARN of key. type: str returned: always - sample: arn:aws:kms:ap-southeast-2:123456789012:key/abcd1234-abcd-1234-5678-ef1234567890 + sample: "arn:aws:kms:ap-southeast-2:123456789012:key/abcd1234-abcd-1234-5678-ef1234567890" key_state: description: - The state of the key. @@ -230,24 +230,24 @@ C('PendingReplicaDeletion'), C('Unavailable'), or C('Updating'). type: str returned: always - sample: PendingDeletion + sample: "PendingDeletion" key_usage: description: The cryptographic operations for which you can use the key. type: str returned: always - sample: ENCRYPT_DECRYPT + sample: "ENCRYPT_DECRYPT" origin: description: The source of the key's key material. When this value is C(AWS_KMS), AWS KMS created the key material. When this value is C(EXTERNAL), the key material was imported or the CMK lacks key material. type: str returned: always - sample: AWS_KMS + sample: "AWS_KMS" aws_account_id: description: The AWS Account ID that the key belongs to. type: str returned: always - sample: 1234567890123 + sample: "1234567890123" creation_date: description: Date and time of creation of the key. type: str @@ -349,27 +349,27 @@ description: The unique ID for the grant. type: str returned: always - sample: abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234 + sample: "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234" grantee_principal: description: The principal that receives the grant's permissions. type: str returned: always - sample: arn:aws:sts::123456789012:assumed-role/lambda_xyz/xyz + sample: "arn:aws:sts::123456789012:assumed-role/lambda_xyz/xyz" issuing_account: description: The AWS account under which the grant was issued. type: str returned: always - sample: arn:aws:iam::123456789012:root + sample: "arn:aws:iam::123456789012:root" key_id: description: The key ARN to which the grant applies. type: str returned: always - sample: arn:aws:kms:ap-southeast-2:123456789012:key/abcd1234-abcd-1234-5678-ef1234567890 + sample: "arn:aws:kms:ap-southeast-2:123456789012:key/abcd1234-abcd-1234-5678-ef1234567890" name: description: The friendly name that identifies the grant. type: str returned: always - sample: xyz + sample: "xyz" operations: description: The list of operations permitted by the grant. type: list @@ -381,7 +381,7 @@ description: The principal that can retire the grant. type: str returned: always - sample: arn:aws:sts::123456789012:assumed-role/lambda_xyz/xyz + sample: "arn:aws:sts::123456789012:assumed-role/lambda_xyz/xyz" changes_needed: description: Grant types that would be changed/were changed. type: dict @@ -399,6 +399,27 @@ version_added: 5.5.0 returned: always sample: False +customer_master_key_spec: + description: Specifies the type of KMS key to create. + type: str + returned: always + sample: "SYMMETRIC_DEFAULT" +encryption_algorithms: + description: The encryption algorithms that the KMS key supports. + type: list + elements: str + returned: always + sample: ["SYMMETRIC_DEFAULT"] +key_manager: + description: The manager of the KMS key. + type: str + returned: always + sample: "AWS" +key_spec: + description: Specifies the type of KMS key to create. + type: str + returned: always + sample: "SYMMETRIC_DEFAULT" """ import json diff --git a/plugins/modules/kms_key_info.py b/plugins/modules/kms_key_info.py index 6f0eb2f4b5..577dc6b951 100644 --- a/plugins/modules/kms_key_info.py +++ b/plugins/modules/kms_key_info.py @@ -84,12 +84,22 @@ description: ID of key. type: str returned: always - sample: abcd1234-abcd-1234-5678-ef1234567890 + sample: "abcd1234-abcd-1234-5678-ef1234567890" key_arn: description: ARN of key. type: str returned: always - sample: arn:aws:kms:ap-southeast-2:123456789012:key/abcd1234-abcd-1234-5678-ef1234567890 + sample: "arn:aws:kms:ap-southeast-2:123456789012:key/abcd1234-abcd-1234-5678-ef1234567890" + key_manager: + description: The manager of the KMS key. + type: str + returned: always + sample: "AWS" + key_spec: + description: Specifies the type of KMS key to create. + type: str + returned: always + sample: "SYMMETRIC_DEFAULT" key_state: description: - The state of the key. @@ -97,24 +107,24 @@ C('PendingReplicaDeletion'), C('Unavailable'), or C('Updating'). type: str returned: always - sample: PendingDeletion + sample: "PendingDeletion" key_usage: description: The cryptographic operations for which you can use the key. type: str returned: always - sample: ENCRYPT_DECRYPT + sample: "ENCRYPT_DECRYPT" origin: description: The source of the key's key material. When this value is C(AWS_KMS), AWS KMS created the key material. When this value is C(EXTERNAL), the key material was imported or the CMK lacks key material. type: str returned: always - sample: AWS_KMS + sample: "AWS_KMS" aws_account_id: description: The AWS Account ID that the key belongs to. type: str returned: always - sample: 123456789012 + sample: "123456789012" creation_date: description: Date and time of creation of the key. type: str @@ -143,7 +153,7 @@ returned: always sample: false aliases: - description: list of aliases associated with the key. + description: List of aliases associated with the key. type: list returned: always sample: @@ -216,39 +226,57 @@ description: The unique ID for the grant. type: str returned: always - sample: abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234 + sample: "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234" grantee_principal: description: The principal that receives the grant's permissions. type: str returned: always - sample: arn:aws:sts::123456789012:assumed-role/lambda_xyz/xyz + sample: "arn:aws:sts::123456789012:assumed-role/lambda_xyz/xyz" issuing_account: description: The AWS account under which the grant was issued. type: str returned: always - sample: arn:aws:iam::123456789012:root + sample: "arn:aws:iam::123456789012:root" key_id: description: The key ARN to which the grant applies. type: str returned: always - sample: arn:aws:kms:ap-southeast-2:123456789012:key/abcd1234-abcd-1234-5678-ef1234567890 + sample: "arn:aws:kms:ap-southeast-2:123456789012:key/abcd1234-abcd-1234-5678-ef1234567890" name: description: The friendly name that identifies the grant. type: str returned: always - sample: xyz + sample: "xyz" operations: description: The list of operations permitted by the grant. type: list + elements: str returned: always - sample: - - Decrypt - - RetireGrant + sample: [ + "Decrypt", + "GenerateDataKey" + ] retiring_principal: description: The principal that can retire the grant. type: str returned: always - sample: arn:aws:sts::123456789012:assumed-role/lambda_xyz/xyz + sample: "arn:aws:sts::123456789012:assumed-role/lambda_xyz/xyz" + customer_master_key_spec: + description: Describes the type of key material in the KMS key. + type: str + returned: always + sample: "SYMMETRIC_DEFAULT" + encryption_algorithms: + description: The encryption algorithms that the KMS key supports. + type: list + elements: str + returned: always + sample: ["SYMMETRIC_DEFAULT"] + multi_region: + description: Indicates whether the KMS key is a multi-Region (True) or regional (False) key. + type: bool + returned: always + sample: false """ import json