/** * 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 RetireGrantRequest : public KMSRequest { public: AWS_KMS_API RetireGrantRequest(); // 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 "RetireGrant"; } AWS_KMS_API Aws::String SerializePayload() const override; AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Identifies the grant to be retired. You can use a grant token to identify a * new grant even before it has achieved eventual consistency.

Only the * CreateGrant operation returns a grant token. For details, see Grant * token and Eventual * consistency in the Key Management Service Developer Guide.

*/ inline const Aws::String& GetGrantToken() const{ return m_grantToken; } /** *

Identifies the grant to be retired. You can use a grant token to identify a * new grant even before it has achieved eventual consistency.

Only the * CreateGrant operation returns a grant token. For details, see Grant * token and Eventual * consistency in the Key Management Service Developer Guide.

*/ inline bool GrantTokenHasBeenSet() const { return m_grantTokenHasBeenSet; } /** *

Identifies the grant to be retired. You can use a grant token to identify a * new grant even before it has achieved eventual consistency.

Only the * CreateGrant operation returns a grant token. For details, see Grant * token and Eventual * consistency in the Key Management Service Developer Guide.

*/ inline void SetGrantToken(const Aws::String& value) { m_grantTokenHasBeenSet = true; m_grantToken = value; } /** *

Identifies the grant to be retired. You can use a grant token to identify a * new grant even before it has achieved eventual consistency.

Only the * CreateGrant operation returns a grant token. For details, see Grant * token and Eventual * consistency in the Key Management Service Developer Guide.

*/ inline void SetGrantToken(Aws::String&& value) { m_grantTokenHasBeenSet = true; m_grantToken = std::move(value); } /** *

Identifies the grant to be retired. You can use a grant token to identify a * new grant even before it has achieved eventual consistency.

Only the * CreateGrant operation returns a grant token. For details, see Grant * token and Eventual * consistency in the Key Management Service Developer Guide.

*/ inline void SetGrantToken(const char* value) { m_grantTokenHasBeenSet = true; m_grantToken.assign(value); } /** *

Identifies the grant to be retired. You can use a grant token to identify a * new grant even before it has achieved eventual consistency.

Only the * CreateGrant operation returns a grant token. For details, see Grant * token and Eventual * consistency in the Key Management Service Developer Guide.

*/ inline RetireGrantRequest& WithGrantToken(const Aws::String& value) { SetGrantToken(value); return *this;} /** *

Identifies the grant to be retired. You can use a grant token to identify a * new grant even before it has achieved eventual consistency.

Only the * CreateGrant operation returns a grant token. For details, see Grant * token and Eventual * consistency in the Key Management Service Developer Guide.

*/ inline RetireGrantRequest& WithGrantToken(Aws::String&& value) { SetGrantToken(std::move(value)); return *this;} /** *

Identifies the grant to be retired. You can use a grant token to identify a * new grant even before it has achieved eventual consistency.

Only the * CreateGrant operation returns a grant token. For details, see Grant * token and Eventual * consistency in the Key Management Service Developer Guide.

*/ inline RetireGrantRequest& WithGrantToken(const char* value) { SetGrantToken(value); return *this;} /** *

The key ARN KMS key associated with the grant. To find the key ARN, use the * ListKeys operation.

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

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

The key ARN KMS key associated with the grant. To find the key ARN, use the * ListKeys operation.

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

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

The key ARN KMS key associated with the grant. To find the key ARN, use the * ListKeys operation.

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

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

The key ARN KMS key associated with the grant. To find the key ARN, use the * ListKeys operation.

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

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

The key ARN KMS key associated with the grant. To find the key ARN, use the * ListKeys operation.

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

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

The key ARN KMS key associated with the grant. To find the key ARN, use the * ListKeys operation.

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

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

The key ARN KMS key associated with the grant. To find the key ARN, use the * ListKeys operation.

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

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

The key ARN KMS key associated with the grant. To find the key ARN, use the * ListKeys operation.

For example: * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab *

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

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

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

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

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

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

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

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

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

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

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

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

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

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

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

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

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

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

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

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

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

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

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

  • Grant ID * Example - 0123456789012345678901234567890123456789012345678901234567890123

    *
*/ inline RetireGrantRequest& 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 RetireGrantRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::String m_grantToken; bool m_grantTokenHasBeenSet = false; 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