/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace KMS { namespace Model { /** */ class RevokeGrantRequest : public KMSRequest { public: AWS_KMS_API RevokeGrantRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "RevokeGrant"; } AWS_KMS_API Aws::String SerializePayload() const override; AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A unique identifier for the KMS key associated with the grant. To get the key * ID and key ARN for a KMS key, use ListKeys or DescribeKey.

*

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a * different Amazon Web Services account, you must use the key ARN.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline const Aws::String& GetKeyId() const{ return m_keyId; } /** *

A unique identifier for the KMS key associated with the grant. To get the key * ID and key ARN for a KMS key, use ListKeys or DescribeKey.

*

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a * different Amazon Web Services account, you must use the key ARN.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; } /** *

A unique identifier for the KMS key associated with the grant. To get the key * ID and key ARN for a KMS key, use ListKeys or DescribeKey.

*

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a * different Amazon Web Services account, you must use the key ARN.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; } /** *

A unique identifier for the KMS key associated with the grant. To get the key * ID and key ARN for a KMS key, use ListKeys or DescribeKey.

*

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a * different Amazon Web Services account, you must use the key ARN.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); } /** *

A unique identifier for the KMS key associated with the grant. To get the key * ID and key ARN for a KMS key, use ListKeys or DescribeKey.

*

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a * different Amazon Web Services account, you must use the key ARN.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); } /** *

A unique identifier for the KMS key associated with the grant. To get the key * ID and key ARN for a KMS key, use ListKeys or DescribeKey.

*

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a * different Amazon Web Services account, you must use the key ARN.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline RevokeGrantRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;} /** *

A unique identifier for the KMS key associated with the grant. To get the key * ID and key ARN for a KMS key, use ListKeys or DescribeKey.

*

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a * different Amazon Web Services account, you must use the key ARN.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline RevokeGrantRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;} /** *

A unique identifier for the KMS key associated with the grant. To get the key * ID and key ARN for a KMS key, use ListKeys or DescribeKey.

*

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a * different Amazon Web Services account, you must use the key ARN.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline RevokeGrantRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;} /** *

Identifies the grant to revoke. To get the grant ID, use CreateGrant, * ListGrants, or ListRetirableGrants.

*/ inline const Aws::String& GetGrantId() const{ return m_grantId; } /** *

Identifies the grant to revoke. To get the grant ID, use CreateGrant, * ListGrants, or ListRetirableGrants.

*/ inline bool GrantIdHasBeenSet() const { return m_grantIdHasBeenSet; } /** *

Identifies the grant to revoke. To get the grant ID, use CreateGrant, * ListGrants, or ListRetirableGrants.

*/ inline void SetGrantId(const Aws::String& value) { m_grantIdHasBeenSet = true; m_grantId = value; } /** *

Identifies the grant to revoke. To get the grant ID, use CreateGrant, * ListGrants, or ListRetirableGrants.

*/ inline void SetGrantId(Aws::String&& value) { m_grantIdHasBeenSet = true; m_grantId = std::move(value); } /** *

Identifies the grant to revoke. To get the grant ID, use CreateGrant, * ListGrants, or ListRetirableGrants.

*/ inline void SetGrantId(const char* value) { m_grantIdHasBeenSet = true; m_grantId.assign(value); } /** *

Identifies the grant to revoke. To get the grant ID, use CreateGrant, * ListGrants, or ListRetirableGrants.

*/ inline RevokeGrantRequest& WithGrantId(const Aws::String& value) { SetGrantId(value); return *this;} /** *

Identifies the grant to revoke. To get the grant ID, use CreateGrant, * ListGrants, or ListRetirableGrants.

*/ inline RevokeGrantRequest& WithGrantId(Aws::String&& value) { SetGrantId(std::move(value)); return *this;} /** *

Identifies the grant to revoke. To get the grant ID, use CreateGrant, * ListGrants, or ListRetirableGrants.

*/ inline RevokeGrantRequest& WithGrantId(const char* value) { SetGrantId(value); return *this;} /** *

Checks if your request will succeed. DryRun is an optional * parameter.

To learn more about how to use this parameter, see Testing * your KMS API calls in the Key Management Service Developer Guide.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks if your request will succeed. DryRun is an optional * parameter.

To learn more about how to use this parameter, see Testing * your KMS API calls in the Key Management Service Developer Guide.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks if your request will succeed. DryRun is an optional * parameter.

To learn more about how to use this parameter, see Testing * your KMS API calls in the Key Management Service Developer Guide.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks if your request will succeed. DryRun is an optional * parameter.

To learn more about how to use this parameter, see Testing * your KMS API calls in the Key Management Service Developer Guide.

*/ inline RevokeGrantRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::String m_keyId; bool m_keyIdHasBeenSet = false; Aws::String m_grantId; bool m_grantIdHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; }; } // namespace Model } // namespace KMS } // namespace Aws