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

Specifies that you want to list information for only resource shares that * match the following:

  • SELF – principals * that your account is sharing resources with

  • * OTHER-ACCOUNTS – principals that are sharing resources with * your account

*/ inline const ResourceOwner& GetResourceOwner() const{ return m_resourceOwner; } /** *

Specifies that you want to list information for only resource shares that * match the following:

  • SELF – principals * that your account is sharing resources with

  • * OTHER-ACCOUNTS – principals that are sharing resources with * your account

*/ inline bool ResourceOwnerHasBeenSet() const { return m_resourceOwnerHasBeenSet; } /** *

Specifies that you want to list information for only resource shares that * match the following:

  • SELF – principals * that your account is sharing resources with

  • * OTHER-ACCOUNTS – principals that are sharing resources with * your account

*/ inline void SetResourceOwner(const ResourceOwner& value) { m_resourceOwnerHasBeenSet = true; m_resourceOwner = value; } /** *

Specifies that you want to list information for only resource shares that * match the following:

  • SELF – principals * that your account is sharing resources with

  • * OTHER-ACCOUNTS – principals that are sharing resources with * your account

*/ inline void SetResourceOwner(ResourceOwner&& value) { m_resourceOwnerHasBeenSet = true; m_resourceOwner = std::move(value); } /** *

Specifies that you want to list information for only resource shares that * match the following:

  • SELF – principals * that your account is sharing resources with

  • * OTHER-ACCOUNTS – principals that are sharing resources with * your account

*/ inline ListPrincipalsRequest& WithResourceOwner(const ResourceOwner& value) { SetResourceOwner(value); return *this;} /** *

Specifies that you want to list information for only resource shares that * match the following:

  • SELF – principals * that your account is sharing resources with

  • * OTHER-ACCOUNTS – principals that are sharing resources with * your account

*/ inline ListPrincipalsRequest& WithResourceOwner(ResourceOwner&& value) { SetResourceOwner(std::move(value)); return *this;} /** *

Specifies that you want to list principal information for the resource share * with the specified Amazon * Resource Name (ARN).

*/ inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } /** *

Specifies that you want to list principal information for the resource share * with the specified Amazon * Resource Name (ARN).

*/ inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } /** *

Specifies that you want to list principal information for the resource share * with the specified Amazon * Resource Name (ARN).

*/ inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } /** *

Specifies that you want to list principal information for the resource share * with the specified Amazon * Resource Name (ARN).

*/ inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } /** *

Specifies that you want to list principal information for the resource share * with the specified Amazon * Resource Name (ARN).

*/ inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } /** *

Specifies that you want to list principal information for the resource share * with the specified Amazon * Resource Name (ARN).

*/ inline ListPrincipalsRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} /** *

Specifies that you want to list principal information for the resource share * with the specified Amazon * Resource Name (ARN).

*/ inline ListPrincipalsRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} /** *

Specifies that you want to list principal information for the resource share * with the specified Amazon * Resource Name (ARN).

*/ inline ListPrincipalsRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} /** *

Specifies that you want to list information for only the listed * principals.

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 that you want to list information for only the listed * principals.

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 that you want to list information for only the listed * principals.

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 that you want to list information for only the listed * principals.

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 that you want to list information for only the listed * principals.

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 ListPrincipalsRequest& WithPrincipals(const Aws::Vector& value) { SetPrincipals(value); return *this;} /** *

Specifies that you want to list information for only the listed * principals.

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 ListPrincipalsRequest& WithPrincipals(Aws::Vector&& value) { SetPrincipals(std::move(value)); return *this;} /** *

Specifies that you want to list information for only the listed * principals.

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 ListPrincipalsRequest& AddPrincipals(const Aws::String& value) { m_principalsHasBeenSet = true; m_principals.push_back(value); return *this; } /** *

Specifies that you want to list information for only the listed * principals.

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 ListPrincipalsRequest& AddPrincipals(Aws::String&& value) { m_principalsHasBeenSet = true; m_principals.push_back(std::move(value)); return *this; } /** *

Specifies that you want to list information for only the listed * principals.

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

Specifies that you want to list information for only principals associated * with resource shares that include the specified resource type.

For a list * of valid values, query the ListResourceTypes operation.

*/ inline const Aws::String& GetResourceType() const{ return m_resourceType; } /** *

Specifies that you want to list information for only principals associated * with resource shares that include the specified resource type.

For a list * of valid values, query the ListResourceTypes operation.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

Specifies that you want to list information for only principals associated * with resource shares that include the specified resource type.

For a list * of valid values, query the ListResourceTypes operation.

*/ inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

Specifies that you want to list information for only principals associated * with resource shares that include the specified resource type.

For a list * of valid values, query the ListResourceTypes operation.

*/ inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

Specifies that you want to list information for only principals associated * with resource shares that include the specified resource type.

For a list * of valid values, query the ListResourceTypes operation.

*/ inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); } /** *

Specifies that you want to list information for only principals associated * with resource shares that include the specified resource type.

For a list * of valid values, query the ListResourceTypes operation.

*/ inline ListPrincipalsRequest& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;} /** *

Specifies that you want to list information for only principals associated * with resource shares that include the specified resource type.

For a list * of valid values, query the ListResourceTypes operation.

*/ inline ListPrincipalsRequest& WithResourceType(Aws::String&& value) { SetResourceType(std::move(value)); return *this;} /** *

Specifies that you want to list information for only principals associated * with resource shares that include the specified resource type.

For a list * of valid values, query the ListResourceTypes operation.

*/ inline ListPrincipalsRequest& WithResourceType(const char* value) { SetResourceType(value); return *this;} /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline const Aws::Vector& GetResourceShareArns() const{ return m_resourceShareArns; } /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline bool ResourceShareArnsHasBeenSet() const { return m_resourceShareArnsHasBeenSet; } /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline void SetResourceShareArns(const Aws::Vector& value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns = value; } /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline void SetResourceShareArns(Aws::Vector&& value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns = std::move(value); } /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline ListPrincipalsRequest& WithResourceShareArns(const Aws::Vector& value) { SetResourceShareArns(value); return *this;} /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline ListPrincipalsRequest& WithResourceShareArns(Aws::Vector&& value) { SetResourceShareArns(std::move(value)); return *this;} /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline ListPrincipalsRequest& AddResourceShareArns(const Aws::String& value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns.push_back(value); return *this; } /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline ListPrincipalsRequest& AddResourceShareArns(Aws::String&& value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns.push_back(std::move(value)); return *this; } /** *

Specifies that you want to list information for only principals associated * with the resource shares specified by a list the Amazon * Resource Names (ARNs).

*/ inline ListPrincipalsRequest& AddResourceShareArns(const char* value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns.push_back(value); return *this; } /** *

Specifies that you want to receive the next page of results. Valid only if * you received a NextToken response in the previous request. If you * did, it indicates that more output is available. Set this parameter to the value * provided by the previous call's NextToken response to request the * next page of results.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

Specifies that you want to receive the next page of results. Valid only if * you received a NextToken response in the previous request. If you * did, it indicates that more output is available. Set this parameter to the value * provided by the previous call's NextToken response to request the * next page of results.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

Specifies that you want to receive the next page of results. Valid only if * you received a NextToken response in the previous request. If you * did, it indicates that more output is available. Set this parameter to the value * provided by the previous call's NextToken response to request the * next page of results.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

Specifies that you want to receive the next page of results. Valid only if * you received a NextToken response in the previous request. If you * did, it indicates that more output is available. Set this parameter to the value * provided by the previous call's NextToken response to request the * next page of results.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

Specifies that you want to receive the next page of results. Valid only if * you received a NextToken response in the previous request. If you * did, it indicates that more output is available. Set this parameter to the value * provided by the previous call's NextToken response to request the * next page of results.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

Specifies that you want to receive the next page of results. Valid only if * you received a NextToken response in the previous request. If you * did, it indicates that more output is available. Set this parameter to the value * provided by the previous call's NextToken response to request the * next page of results.

*/ inline ListPrincipalsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

Specifies that you want to receive the next page of results. Valid only if * you received a NextToken response in the previous request. If you * did, it indicates that more output is available. Set this parameter to the value * provided by the previous call's NextToken response to request the * next page of results.

*/ inline ListPrincipalsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

Specifies that you want to receive the next page of results. Valid only if * you received a NextToken response in the previous request. If you * did, it indicates that more output is available. Set this parameter to the value * provided by the previous call's NextToken response to request the * next page of results.

*/ inline ListPrincipalsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

Specifies the total number of results that you want included on each page of * the response. If you do not include this parameter, it defaults to a value that * is specific to the operation. If additional items exist beyond the number you * specify, the NextToken response element is returned with a value * (not null). Include the specified value as the NextToken request * parameter in the next call to the operation to get the next part of the results. * Note that the service might return fewer results than the maximum even when * there are more results available. You should check NextToken after * every operation to ensure that you receive all of the results.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

Specifies the total number of results that you want included on each page of * the response. If you do not include this parameter, it defaults to a value that * is specific to the operation. If additional items exist beyond the number you * specify, the NextToken response element is returned with a value * (not null). Include the specified value as the NextToken request * parameter in the next call to the operation to get the next part of the results. * Note that the service might return fewer results than the maximum even when * there are more results available. You should check NextToken after * every operation to ensure that you receive all of the results.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

Specifies the total number of results that you want included on each page of * the response. If you do not include this parameter, it defaults to a value that * is specific to the operation. If additional items exist beyond the number you * specify, the NextToken response element is returned with a value * (not null). Include the specified value as the NextToken request * parameter in the next call to the operation to get the next part of the results. * Note that the service might return fewer results than the maximum even when * there are more results available. You should check NextToken after * every operation to ensure that you receive all of the results.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

Specifies the total number of results that you want included on each page of * the response. If you do not include this parameter, it defaults to a value that * is specific to the operation. If additional items exist beyond the number you * specify, the NextToken response element is returned with a value * (not null). Include the specified value as the NextToken request * parameter in the next call to the operation to get the next part of the results. * Note that the service might return fewer results than the maximum even when * there are more results available. You should check NextToken after * every operation to ensure that you receive all of the results.

*/ inline ListPrincipalsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} private: ResourceOwner m_resourceOwner; bool m_resourceOwnerHasBeenSet = false; Aws::String m_resourceArn; bool m_resourceArnHasBeenSet = false; Aws::Vector m_principals; bool m_principalsHasBeenSet = false; Aws::String m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::Vector m_resourceShareArns; bool m_resourceShareArnsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; }; } // namespace Model } // namespace RAM } // namespace Aws