/** * 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 Http { class URI; } //namespace Http namespace RAM { namespace Model { /** */ class DeletePermissionVersionRequest : public RAMRequest { public: AWS_RAM_API DeletePermissionVersionRequest(); // 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 "DeletePermissionVersion"; } AWS_RAM_API Aws::String SerializePayload() const override; AWS_RAM_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

Specifies the Amazon * Resource Name (ARN) of the permission with the version you want to * delete.

*/ inline const Aws::String& GetPermissionArn() const{ return m_permissionArn; } /** *

Specifies the Amazon * Resource Name (ARN) of the permission with the version you want to * delete.

*/ inline bool PermissionArnHasBeenSet() const { return m_permissionArnHasBeenSet; } /** *

Specifies the Amazon * Resource Name (ARN) of the permission with the version you want to * delete.

*/ inline void SetPermissionArn(const Aws::String& value) { m_permissionArnHasBeenSet = true; m_permissionArn = value; } /** *

Specifies the Amazon * Resource Name (ARN) of the permission with the version you want to * delete.

*/ inline void SetPermissionArn(Aws::String&& value) { m_permissionArnHasBeenSet = true; m_permissionArn = std::move(value); } /** *

Specifies the Amazon * Resource Name (ARN) of the permission with the version you want to * delete.

*/ inline void SetPermissionArn(const char* value) { m_permissionArnHasBeenSet = true; m_permissionArn.assign(value); } /** *

Specifies the Amazon * Resource Name (ARN) of the permission with the version you want to * delete.

*/ inline DeletePermissionVersionRequest& WithPermissionArn(const Aws::String& value) { SetPermissionArn(value); return *this;} /** *

Specifies the Amazon * Resource Name (ARN) of the permission with the version you want to * delete.

*/ inline DeletePermissionVersionRequest& WithPermissionArn(Aws::String&& value) { SetPermissionArn(std::move(value)); return *this;} /** *

Specifies the Amazon * Resource Name (ARN) of the permission with the version you want to * delete.

*/ inline DeletePermissionVersionRequest& WithPermissionArn(const char* value) { SetPermissionArn(value); return *this;} /** *

Specifies the version number to delete.

You can't delete the default * version for a customer managed permission.

You can't delete a version if * it's the only version of the permission. You must either first create another * version, or delete the permission completely.

You can't delete a version * if it is attached to any resource shares. If the version is the default, you * must first use SetDefaultPermissionVersion to set a different version as * the default for the customer managed permission, and then use * AssociateResourceSharePermission to update your resource shares to use * the new default version.

*/ inline int GetPermissionVersion() const{ return m_permissionVersion; } /** *

Specifies the version number to delete.

You can't delete the default * version for a customer managed permission.

You can't delete a version if * it's the only version of the permission. You must either first create another * version, or delete the permission completely.

You can't delete a version * if it is attached to any resource shares. If the version is the default, you * must first use SetDefaultPermissionVersion to set a different version as * the default for the customer managed permission, and then use * AssociateResourceSharePermission to update your resource shares to use * the new default version.

*/ inline bool PermissionVersionHasBeenSet() const { return m_permissionVersionHasBeenSet; } /** *

Specifies the version number to delete.

You can't delete the default * version for a customer managed permission.

You can't delete a version if * it's the only version of the permission. You must either first create another * version, or delete the permission completely.

You can't delete a version * if it is attached to any resource shares. If the version is the default, you * must first use SetDefaultPermissionVersion to set a different version as * the default for the customer managed permission, and then use * AssociateResourceSharePermission to update your resource shares to use * the new default version.

*/ inline void SetPermissionVersion(int value) { m_permissionVersionHasBeenSet = true; m_permissionVersion = value; } /** *

Specifies the version number to delete.

You can't delete the default * version for a customer managed permission.

You can't delete a version if * it's the only version of the permission. You must either first create another * version, or delete the permission completely.

You can't delete a version * if it is attached to any resource shares. If the version is the default, you * must first use SetDefaultPermissionVersion to set a different version as * the default for the customer managed permission, and then use * AssociateResourceSharePermission to update your resource shares to use * the new default version.

*/ inline DeletePermissionVersionRequest& WithPermissionVersion(int value) { SetPermissionVersion(value); return *this;} /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline DeletePermissionVersionRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline DeletePermissionVersionRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline DeletePermissionVersionRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} private: Aws::String m_permissionArn; bool m_permissionArnHasBeenSet = false; int m_permissionVersion; bool m_permissionVersionHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; }; } // namespace Model } // namespace RAM } // namespace Aws