/** * 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 RAM { namespace Model { /** */ class AssociateResourceSharePermissionRequest : public RAMRequest { public: AWS_RAM_API AssociateResourceSharePermissionRequest(); // 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 "AssociateResourceSharePermission"; } AWS_RAM_API Aws::String SerializePayload() const override; /** *

Specifies the Amazon * Resource Name (ARN) of the resource share to which you want to add or * replace permissions.

*/ inline const Aws::String& GetResourceShareArn() const{ return m_resourceShareArn; } /** *

Specifies the Amazon * Resource Name (ARN) of the resource share to which you want to add or * replace permissions.

*/ inline bool ResourceShareArnHasBeenSet() const { return m_resourceShareArnHasBeenSet; } /** *

Specifies the Amazon * Resource Name (ARN) of the resource share to which you want to add or * replace permissions.

*/ inline void SetResourceShareArn(const Aws::String& value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn = value; } /** *

Specifies the Amazon * Resource Name (ARN) of the resource share to which you want to add or * replace permissions.

*/ inline void SetResourceShareArn(Aws::String&& value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn = std::move(value); } /** *

Specifies the Amazon * Resource Name (ARN) of the resource share to which you want to add or * replace permissions.

*/ inline void SetResourceShareArn(const char* value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn.assign(value); } /** *

Specifies the Amazon * Resource Name (ARN) of the resource share to which you want to add or * replace permissions.

*/ inline AssociateResourceSharePermissionRequest& WithResourceShareArn(const Aws::String& value) { SetResourceShareArn(value); return *this;} /** *

Specifies the Amazon * Resource Name (ARN) of the resource share to which you want to add or * replace permissions.

*/ inline AssociateResourceSharePermissionRequest& WithResourceShareArn(Aws::String&& value) { SetResourceShareArn(std::move(value)); return *this;} /** *

Specifies the Amazon * Resource Name (ARN) of the resource share to which you want to add or * replace permissions.

*/ inline AssociateResourceSharePermissionRequest& WithResourceShareArn(const char* value) { SetResourceShareArn(value); return *this;} /** *

Specifies the Amazon * Resource Name (ARN) of the RAM permission to associate with the resource * share. To find the ARN for a permission, use either the ListPermissions * operation or go to the Permissions * library page in the RAM console and then choose the name of the permission. * The ARN is displayed on the detail page.

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

Specifies the Amazon * Resource Name (ARN) of the RAM permission to associate with the resource * share. To find the ARN for a permission, use either the ListPermissions * operation or go to the Permissions * library page in the RAM console and then choose the name of the permission. * The ARN is displayed on the detail page.

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

Specifies the Amazon * Resource Name (ARN) of the RAM permission to associate with the resource * share. To find the ARN for a permission, use either the ListPermissions * operation or go to the Permissions * library page in the RAM console and then choose the name of the permission. * The ARN is displayed on the detail page.

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

Specifies the Amazon * Resource Name (ARN) of the RAM permission to associate with the resource * share. To find the ARN for a permission, use either the ListPermissions * operation or go to the Permissions * library page in the RAM console and then choose the name of the permission. * The ARN is displayed on the detail page.

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

Specifies the Amazon * Resource Name (ARN) of the RAM permission to associate with the resource * share. To find the ARN for a permission, use either the ListPermissions * operation or go to the Permissions * library page in the RAM console and then choose the name of the permission. * The ARN is displayed on the detail page.

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

Specifies the Amazon * Resource Name (ARN) of the RAM permission to associate with the resource * share. To find the ARN for a permission, use either the ListPermissions * operation or go to the Permissions * library page in the RAM console and then choose the name of the permission. * The ARN is displayed on the detail page.

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

Specifies the Amazon * Resource Name (ARN) of the RAM permission to associate with the resource * share. To find the ARN for a permission, use either the ListPermissions * operation or go to the Permissions * library page in the RAM console and then choose the name of the permission. * The ARN is displayed on the detail page.

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

Specifies the Amazon * Resource Name (ARN) of the RAM permission to associate with the resource * share. To find the ARN for a permission, use either the ListPermissions * operation or go to the Permissions * library page in the RAM console and then choose the name of the permission. * The ARN is displayed on the detail page.

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

Specifies whether the specified permission should replace the existing * permission associated with the resource share. Use true to replace * the current permissions. Use false to add the permission to a * resource share that currently doesn't have a permission. The default value is * false.

A resource share can have only one permission * per resource type. If a resource share already has a permission for the * specified resource type and you don't set replace to * true then the operation returns an error. This helps prevent * accidental overwriting of a permission.

*/ inline bool GetReplace() const{ return m_replace; } /** *

Specifies whether the specified permission should replace the existing * permission associated with the resource share. Use true to replace * the current permissions. Use false to add the permission to a * resource share that currently doesn't have a permission. The default value is * false.

A resource share can have only one permission * per resource type. If a resource share already has a permission for the * specified resource type and you don't set replace to * true then the operation returns an error. This helps prevent * accidental overwriting of a permission.

*/ inline bool ReplaceHasBeenSet() const { return m_replaceHasBeenSet; } /** *

Specifies whether the specified permission should replace the existing * permission associated with the resource share. Use true to replace * the current permissions. Use false to add the permission to a * resource share that currently doesn't have a permission. The default value is * false.

A resource share can have only one permission * per resource type. If a resource share already has a permission for the * specified resource type and you don't set replace to * true then the operation returns an error. This helps prevent * accidental overwriting of a permission.

*/ inline void SetReplace(bool value) { m_replaceHasBeenSet = true; m_replace = value; } /** *

Specifies whether the specified permission should replace the existing * permission associated with the resource share. Use true to replace * the current permissions. Use false to add the permission to a * resource share that currently doesn't have a permission. The default value is * false.

A resource share can have only one permission * per resource type. If a resource share already has a permission for the * specified resource type and you don't set replace to * true then the operation returns an error. This helps prevent * accidental overwriting of a permission.

*/ inline AssociateResourceSharePermissionRequest& WithReplace(bool value) { SetReplace(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 AssociateResourceSharePermissionRequest& 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 AssociateResourceSharePermissionRequest& 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 AssociateResourceSharePermissionRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

Specifies the version of the RAM permission to associate with the resource * share. You can specify only the version that is currently set as the * default version for the permission. If you also set the replace * pararameter to true, then this operation updates an outdated * version of the permission to the current default version.

You * don't need to specify this parameter because the default behavior is to use the * version that is currently set as the default version for the permission. This * parameter is supported for backwards compatibility.

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

Specifies the version of the RAM permission to associate with the resource * share. You can specify only the version that is currently set as the * default version for the permission. If you also set the replace * pararameter to true, then this operation updates an outdated * version of the permission to the current default version.

You * don't need to specify this parameter because the default behavior is to use the * version that is currently set as the default version for the permission. This * parameter is supported for backwards compatibility.

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

Specifies the version of the RAM permission to associate with the resource * share. You can specify only the version that is currently set as the * default version for the permission. If you also set the replace * pararameter to true, then this operation updates an outdated * version of the permission to the current default version.

You * don't need to specify this parameter because the default behavior is to use the * version that is currently set as the default version for the permission. This * parameter is supported for backwards compatibility.

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

Specifies the version of the RAM permission to associate with the resource * share. You can specify only the version that is currently set as the * default version for the permission. If you also set the replace * pararameter to true, then this operation updates an outdated * version of the permission to the current default version.

You * don't need to specify this parameter because the default behavior is to use the * version that is currently set as the default version for the permission. This * parameter is supported for backwards compatibility.

*/ inline AssociateResourceSharePermissionRequest& WithPermissionVersion(int value) { SetPermissionVersion(value); return *this;} private: Aws::String m_resourceShareArn; bool m_resourceShareArnHasBeenSet = false; Aws::String m_permissionArn; bool m_permissionArnHasBeenSet = false; bool m_replace; bool m_replaceHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; int m_permissionVersion; bool m_permissionVersionHasBeenSet = false; }; } // namespace Model } // namespace RAM } // namespace Aws