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

Specifies whether you want to retrieve the associations that involve a * specified resource or principal.

  • PRINCIPAL – list * the principals whose associations you want to see.

  • * RESOURCE – list the resources whose associations you want to * see.

*/ inline const ResourceShareAssociationType& GetAssociationType() const{ return m_associationType; } /** *

Specifies whether you want to retrieve the associations that involve a * specified resource or principal.

  • PRINCIPAL – list * the principals whose associations you want to see.

  • * RESOURCE – list the resources whose associations you want to * see.

*/ inline bool AssociationTypeHasBeenSet() const { return m_associationTypeHasBeenSet; } /** *

Specifies whether you want to retrieve the associations that involve a * specified resource or principal.

  • PRINCIPAL – list * the principals whose associations you want to see.

  • * RESOURCE – list the resources whose associations you want to * see.

*/ inline void SetAssociationType(const ResourceShareAssociationType& value) { m_associationTypeHasBeenSet = true; m_associationType = value; } /** *

Specifies whether you want to retrieve the associations that involve a * specified resource or principal.

  • PRINCIPAL – list * the principals whose associations you want to see.

  • * RESOURCE – list the resources whose associations you want to * see.

*/ inline void SetAssociationType(ResourceShareAssociationType&& value) { m_associationTypeHasBeenSet = true; m_associationType = std::move(value); } /** *

Specifies whether you want to retrieve the associations that involve a * specified resource or principal.

  • PRINCIPAL – list * the principals whose associations you want to see.

  • * RESOURCE – list the resources whose associations you want to * see.

*/ inline GetResourceShareAssociationsRequest& WithAssociationType(const ResourceShareAssociationType& value) { SetAssociationType(value); return *this;} /** *

Specifies whether you want to retrieve the associations that involve a * specified resource or principal.

  • PRINCIPAL – list * the principals whose associations you want to see.

  • * RESOURCE – list the resources whose associations you want to * see.

*/ inline GetResourceShareAssociationsRequest& WithAssociationType(ResourceShareAssociationType&& value) { SetAssociationType(std::move(value)); return *this;} /** *

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies a list of Amazon * Resource Names (ARNs) of the resource share whose associations you want to * retrieve.

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

Specifies the Amazon * Resource Name (ARN) of a resource whose resource shares you want to * retrieve.

You cannot specify this parameter if the association type is * PRINCIPAL.

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

Specifies the Amazon * Resource Name (ARN) of a resource whose resource shares you want to * retrieve.

You cannot specify this parameter if the association type is * PRINCIPAL.

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

Specifies the Amazon * Resource Name (ARN) of a resource whose resource shares you want to * retrieve.

You cannot specify this parameter if the association type is * PRINCIPAL.

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

Specifies the Amazon * Resource Name (ARN) of a resource whose resource shares you want to * retrieve.

You cannot specify this parameter if the association type is * PRINCIPAL.

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

Specifies the Amazon * Resource Name (ARN) of a resource whose resource shares you want to * retrieve.

You cannot specify this parameter if the association type is * PRINCIPAL.

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

Specifies the Amazon * Resource Name (ARN) of a resource whose resource shares you want to * retrieve.

You cannot specify this parameter if the association type is * PRINCIPAL.

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

Specifies the Amazon * Resource Name (ARN) of a resource whose resource shares you want to * retrieve.

You cannot specify this parameter if the association type is * PRINCIPAL.

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

Specifies the Amazon * Resource Name (ARN) of a resource whose resource shares you want to * retrieve.

You cannot specify this parameter if the association type is * PRINCIPAL.

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

Specifies the ID of the principal whose resource shares you want to retrieve. * This can be an Amazon Web Services account ID, an organization ID, an * organizational unit ID, or the Amazon * Resource Name (ARN) of an individual IAM role or user.

You cannot * specify this parameter if the association type is RESOURCE.

*/ inline const Aws::String& GetPrincipal() const{ return m_principal; } /** *

Specifies the ID of the principal whose resource shares you want to retrieve. * This can be an Amazon Web Services account ID, an organization ID, an * organizational unit ID, or the Amazon * Resource Name (ARN) of an individual IAM role or user.

You cannot * specify this parameter if the association type is RESOURCE.

*/ inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; } /** *

Specifies the ID of the principal whose resource shares you want to retrieve. * This can be an Amazon Web Services account ID, an organization ID, an * organizational unit ID, or the Amazon * Resource Name (ARN) of an individual IAM role or user.

You cannot * specify this parameter if the association type is RESOURCE.

*/ inline void SetPrincipal(const Aws::String& value) { m_principalHasBeenSet = true; m_principal = value; } /** *

Specifies the ID of the principal whose resource shares you want to retrieve. * This can be an Amazon Web Services account ID, an organization ID, an * organizational unit ID, or the Amazon * Resource Name (ARN) of an individual IAM role or user.

You cannot * specify this parameter if the association type is RESOURCE.

*/ inline void SetPrincipal(Aws::String&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); } /** *

Specifies the ID of the principal whose resource shares you want to retrieve. * This can be an Amazon Web Services account ID, an organization ID, an * organizational unit ID, or the Amazon * Resource Name (ARN) of an individual IAM role or user.

You cannot * specify this parameter if the association type is RESOURCE.

*/ inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); } /** *

Specifies the ID of the principal whose resource shares you want to retrieve. * This can be an Amazon Web Services account ID, an organization ID, an * organizational unit ID, or the Amazon * Resource Name (ARN) of an individual IAM role or user.

You cannot * specify this parameter if the association type is RESOURCE.

*/ inline GetResourceShareAssociationsRequest& WithPrincipal(const Aws::String& value) { SetPrincipal(value); return *this;} /** *

Specifies the ID of the principal whose resource shares you want to retrieve. * This can be an Amazon Web Services account ID, an organization ID, an * organizational unit ID, or the Amazon * Resource Name (ARN) of an individual IAM role or user.

You cannot * specify this parameter if the association type is RESOURCE.

*/ inline GetResourceShareAssociationsRequest& WithPrincipal(Aws::String&& value) { SetPrincipal(std::move(value)); return *this;} /** *

Specifies the ID of the principal whose resource shares you want to retrieve. * This can be an Amazon Web Services account ID, an organization ID, an * organizational unit ID, or the Amazon * Resource Name (ARN) of an individual IAM role or user.

You cannot * specify this parameter if the association type is RESOURCE.

*/ inline GetResourceShareAssociationsRequest& WithPrincipal(const char* value) { SetPrincipal(value); return *this;} /** *

Specifies that you want to retrieve only associations that have this * status.

*/ inline const ResourceShareAssociationStatus& GetAssociationStatus() const{ return m_associationStatus; } /** *

Specifies that you want to retrieve only associations that have this * status.

*/ inline bool AssociationStatusHasBeenSet() const { return m_associationStatusHasBeenSet; } /** *

Specifies that you want to retrieve only associations that have this * status.

*/ inline void SetAssociationStatus(const ResourceShareAssociationStatus& value) { m_associationStatusHasBeenSet = true; m_associationStatus = value; } /** *

Specifies that you want to retrieve only associations that have this * status.

*/ inline void SetAssociationStatus(ResourceShareAssociationStatus&& value) { m_associationStatusHasBeenSet = true; m_associationStatus = std::move(value); } /** *

Specifies that you want to retrieve only associations that have this * status.

*/ inline GetResourceShareAssociationsRequest& WithAssociationStatus(const ResourceShareAssociationStatus& value) { SetAssociationStatus(value); return *this;} /** *

Specifies that you want to retrieve only associations that have this * status.

*/ inline GetResourceShareAssociationsRequest& WithAssociationStatus(ResourceShareAssociationStatus&& value) { SetAssociationStatus(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 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 GetResourceShareAssociationsRequest& 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 GetResourceShareAssociationsRequest& 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 GetResourceShareAssociationsRequest& 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 GetResourceShareAssociationsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} private: ResourceShareAssociationType m_associationType; bool m_associationTypeHasBeenSet = false; Aws::Vector m_resourceShareArns; bool m_resourceShareArnsHasBeenSet = false; Aws::String m_resourceArn; bool m_resourceArnHasBeenSet = false; Aws::String m_principal; bool m_principalHasBeenSet = false; ResourceShareAssociationStatus m_associationStatus; bool m_associationStatusHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; }; } // namespace Model } // namespace RAM } // namespace Aws