/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace RAM { namespace Model { /** */ class AssociateResourceShareRequest : public RAMRequest { public: AWS_RAM_API AssociateResourceShareRequest(); // 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 "AssociateResourceShare"; } AWS_RAM_API Aws::String SerializePayload() const override; /** *

Specifies the Amazon * Resource Name (ARN) of the resource share that you want to add principals or * resources to.

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

Specifies the Amazon * Resource Name (ARN) of the resource share that you want to add principals or * resources to.

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

Specifies the Amazon * Resource Name (ARN) of the resource share that you want to add principals or * resources to.

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

Specifies the Amazon * Resource Name (ARN) of the resource share that you want to add principals or * resources to.

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

Specifies the Amazon * Resource Name (ARN) of the resource share that you want to add principals or * resources to.

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

Specifies the Amazon * Resource Name (ARN) of the resource share that you want to add principals or * resources to.

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

Specifies the Amazon * Resource Name (ARN) of the resource share that you want to add principals or * resources to.

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

Specifies the Amazon * Resource Name (ARN) of the resource share that you want to add principals or * resources to.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline const Aws::Vector& GetResourceArns() const{ return m_resourceArns; } /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline bool ResourceArnsHasBeenSet() const { return m_resourceArnsHasBeenSet; } /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline void SetResourceArns(const Aws::Vector& value) { m_resourceArnsHasBeenSet = true; m_resourceArns = value; } /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline void SetResourceArns(Aws::Vector&& value) { m_resourceArnsHasBeenSet = true; m_resourceArns = std::move(value); } /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline AssociateResourceShareRequest& WithResourceArns(const Aws::Vector& value) { SetResourceArns(value); return *this;} /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline AssociateResourceShareRequest& WithResourceArns(Aws::Vector&& value) { SetResourceArns(std::move(value)); return *this;} /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline AssociateResourceShareRequest& AddResourceArns(const Aws::String& value) { m_resourceArnsHasBeenSet = true; m_resourceArns.push_back(value); return *this; } /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline AssociateResourceShareRequest& AddResourceArns(Aws::String&& value) { m_resourceArnsHasBeenSet = true; m_resourceArns.push_back(std::move(value)); return *this; } /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resources that you want to share. This can be * null if you want to add only principals.

*/ inline AssociateResourceShareRequest& AddResourceArns(const char* value) { m_resourceArnsHasBeenSet = true; m_resourceArns.push_back(value); return *this; } /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline const Aws::Vector& GetPrincipals() const{ return m_principals; } /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; } /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline void SetPrincipals(const Aws::Vector& value) { m_principalsHasBeenSet = true; m_principals = value; } /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline void SetPrincipals(Aws::Vector&& value) { m_principalsHasBeenSet = true; m_principals = std::move(value); } /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline AssociateResourceShareRequest& WithPrincipals(const Aws::Vector& value) { SetPrincipals(value); return *this;} /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline AssociateResourceShareRequest& WithPrincipals(Aws::Vector&& value) { SetPrincipals(std::move(value)); return *this;} /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline AssociateResourceShareRequest& AddPrincipals(const Aws::String& value) { m_principalsHasBeenSet = true; m_principals.push_back(value); return *this; } /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline AssociateResourceShareRequest& AddPrincipals(Aws::String&& value) { m_principalsHasBeenSet = true; m_principals.push_back(std::move(value)); return *this; } /** *

Specifies a list of principals to whom you want to the resource share. This * can be null if you want to add only resources.

What the * principals can do with the resources in the share is determined by the RAM * permissions that you associate with the resource share. See * AssociateResourceSharePermission.

You can include the following * values:

  • An Amazon Web Services account ID, for example: * 123456789012

  • An Amazon * Resource Name (ARN) of an organization in Organizations, for example: * organizations::123456789012:organization/o-exampleorgid

  • *
  • An ARN of an organizational unit (OU) in Organizations, for example: * organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 *

  • An ARN of an IAM role, for example: * iam::123456789012:role/rolename

  • An ARN of an IAM * user, for example: iam::123456789012user/username

*

Not all resource types can be shared with IAM roles and users. For * more information, see Sharing * with IAM roles and users in the Resource Access Manager User * Guide.

*/ inline AssociateResourceShareRequest& AddPrincipals(const char* value) { m_principalsHasBeenSet = true; m_principals.push_back(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 AssociateResourceShareRequest& 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 AssociateResourceShareRequest& 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 AssociateResourceShareRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline const Aws::Vector& GetSources() const{ return m_sources; } /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; } /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline void SetSources(const Aws::Vector& value) { m_sourcesHasBeenSet = true; m_sources = value; } /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline void SetSources(Aws::Vector&& value) { m_sourcesHasBeenSet = true; m_sources = std::move(value); } /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline AssociateResourceShareRequest& WithSources(const Aws::Vector& value) { SetSources(value); return *this;} /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline AssociateResourceShareRequest& WithSources(Aws::Vector&& value) { SetSources(std::move(value)); return *this;} /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline AssociateResourceShareRequest& AddSources(const Aws::String& value) { m_sourcesHasBeenSet = true; m_sources.push_back(value); return *this; } /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline AssociateResourceShareRequest& AddSources(Aws::String&& value) { m_sourcesHasBeenSet = true; m_sources.push_back(std::move(value)); return *this; } /** *

Specifies from which source accounts the service principal has access to the * resources in this resource share.

*/ inline AssociateResourceShareRequest& AddSources(const char* value) { m_sourcesHasBeenSet = true; m_sources.push_back(value); return *this; } private: Aws::String m_resourceShareArn; bool m_resourceShareArnHasBeenSet = false; Aws::Vector m_resourceArns; bool m_resourceArnsHasBeenSet = false; Aws::Vector m_principals; bool m_principalsHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::Vector m_sources; bool m_sourcesHasBeenSet = false; }; } // namespace Model } // namespace RAM } // namespace Aws