/** * 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 ResourceGroups { namespace Model { /** */ class ListGroupResourcesRequest : public ResourceGroupsRequest { public: AWS_RESOURCEGROUPS_API ListGroupResourcesRequest(); // 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 "ListGroupResources"; } AWS_RESOURCEGROUPS_API Aws::String SerializePayload() const override; /** *

The name or the ARN of the resource group

*/ inline const Aws::String& GetGroup() const{ return m_group; } /** *

The name or the ARN of the resource group

*/ inline bool GroupHasBeenSet() const { return m_groupHasBeenSet; } /** *

The name or the ARN of the resource group

*/ inline void SetGroup(const Aws::String& value) { m_groupHasBeenSet = true; m_group = value; } /** *

The name or the ARN of the resource group

*/ inline void SetGroup(Aws::String&& value) { m_groupHasBeenSet = true; m_group = std::move(value); } /** *

The name or the ARN of the resource group

*/ inline void SetGroup(const char* value) { m_groupHasBeenSet = true; m_group.assign(value); } /** *

The name or the ARN of the resource group

*/ inline ListGroupResourcesRequest& WithGroup(const Aws::String& value) { SetGroup(value); return *this;} /** *

The name or the ARN of the resource group

*/ inline ListGroupResourcesRequest& WithGroup(Aws::String&& value) { SetGroup(std::move(value)); return *this;} /** *

The name or the ARN of the resource group

*/ inline ListGroupResourcesRequest& WithGroup(const char* value) { SetGroup(value); return *this;} /** *

Filters, formatted as ResourceFilter objects, that you want to apply * to a ListGroupResources operation. Filters the results to include * only those of the specified resource types.

  • * resource-type - Filter resources by their type. Specify up to five * resource types in the format AWS::ServiceCode::ResourceType. For * example, AWS::EC2::Instance, or AWS::S3::Bucket.

    *

When you specify a resource-type filter for * ListGroupResources, Resource Groups validates your filter resource * types against the types that are defined in the query associated with the group. * For example, if a group contains only S3 buckets because its query specifies * only that resource type, but your resource-type filter includes EC2 * instances, AWS Resource Groups does not filter for EC2 instances. In this case, * a ListGroupResources request returns a * BadRequestException error with a message similar to the * following:

The resource types specified as filters in the request * are not valid.

The error includes a list of resource types that * failed the validation because they are not part of the query associated with the * group. This validation doesn't occur when the group query specifies * AWS::AllSupported, because a group based on such a query can * contain any of the allowed resource types for the query type (tag-based or * Amazon CloudFront stack-based queries).

*/ inline const Aws::Vector& GetFilters() const{ return m_filters; } /** *

Filters, formatted as ResourceFilter objects, that you want to apply * to a ListGroupResources operation. Filters the results to include * only those of the specified resource types.

  • * resource-type - Filter resources by their type. Specify up to five * resource types in the format AWS::ServiceCode::ResourceType. For * example, AWS::EC2::Instance, or AWS::S3::Bucket.

    *

When you specify a resource-type filter for * ListGroupResources, Resource Groups validates your filter resource * types against the types that are defined in the query associated with the group. * For example, if a group contains only S3 buckets because its query specifies * only that resource type, but your resource-type filter includes EC2 * instances, AWS Resource Groups does not filter for EC2 instances. In this case, * a ListGroupResources request returns a * BadRequestException error with a message similar to the * following:

The resource types specified as filters in the request * are not valid.

The error includes a list of resource types that * failed the validation because they are not part of the query associated with the * group. This validation doesn't occur when the group query specifies * AWS::AllSupported, because a group based on such a query can * contain any of the allowed resource types for the query type (tag-based or * Amazon CloudFront stack-based queries).

*/ inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; } /** *

Filters, formatted as ResourceFilter objects, that you want to apply * to a ListGroupResources operation. Filters the results to include * only those of the specified resource types.

  • * resource-type - Filter resources by their type. Specify up to five * resource types in the format AWS::ServiceCode::ResourceType. For * example, AWS::EC2::Instance, or AWS::S3::Bucket.

    *

When you specify a resource-type filter for * ListGroupResources, Resource Groups validates your filter resource * types against the types that are defined in the query associated with the group. * For example, if a group contains only S3 buckets because its query specifies * only that resource type, but your resource-type filter includes EC2 * instances, AWS Resource Groups does not filter for EC2 instances. In this case, * a ListGroupResources request returns a * BadRequestException error with a message similar to the * following:

The resource types specified as filters in the request * are not valid.

The error includes a list of resource types that * failed the validation because they are not part of the query associated with the * group. This validation doesn't occur when the group query specifies * AWS::AllSupported, because a group based on such a query can * contain any of the allowed resource types for the query type (tag-based or * Amazon CloudFront stack-based queries).

*/ inline void SetFilters(const Aws::Vector& value) { m_filtersHasBeenSet = true; m_filters = value; } /** *

Filters, formatted as ResourceFilter objects, that you want to apply * to a ListGroupResources operation. Filters the results to include * only those of the specified resource types.

  • * resource-type - Filter resources by their type. Specify up to five * resource types in the format AWS::ServiceCode::ResourceType. For * example, AWS::EC2::Instance, or AWS::S3::Bucket.

    *

When you specify a resource-type filter for * ListGroupResources, Resource Groups validates your filter resource * types against the types that are defined in the query associated with the group. * For example, if a group contains only S3 buckets because its query specifies * only that resource type, but your resource-type filter includes EC2 * instances, AWS Resource Groups does not filter for EC2 instances. In this case, * a ListGroupResources request returns a * BadRequestException error with a message similar to the * following:

The resource types specified as filters in the request * are not valid.

The error includes a list of resource types that * failed the validation because they are not part of the query associated with the * group. This validation doesn't occur when the group query specifies * AWS::AllSupported, because a group based on such a query can * contain any of the allowed resource types for the query type (tag-based or * Amazon CloudFront stack-based queries).

*/ inline void SetFilters(Aws::Vector&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); } /** *

Filters, formatted as ResourceFilter objects, that you want to apply * to a ListGroupResources operation. Filters the results to include * only those of the specified resource types.

  • * resource-type - Filter resources by their type. Specify up to five * resource types in the format AWS::ServiceCode::ResourceType. For * example, AWS::EC2::Instance, or AWS::S3::Bucket.

    *

When you specify a resource-type filter for * ListGroupResources, Resource Groups validates your filter resource * types against the types that are defined in the query associated with the group. * For example, if a group contains only S3 buckets because its query specifies * only that resource type, but your resource-type filter includes EC2 * instances, AWS Resource Groups does not filter for EC2 instances. In this case, * a ListGroupResources request returns a * BadRequestException error with a message similar to the * following:

The resource types specified as filters in the request * are not valid.

The error includes a list of resource types that * failed the validation because they are not part of the query associated with the * group. This validation doesn't occur when the group query specifies * AWS::AllSupported, because a group based on such a query can * contain any of the allowed resource types for the query type (tag-based or * Amazon CloudFront stack-based queries).

*/ inline ListGroupResourcesRequest& WithFilters(const Aws::Vector& value) { SetFilters(value); return *this;} /** *

Filters, formatted as ResourceFilter objects, that you want to apply * to a ListGroupResources operation. Filters the results to include * only those of the specified resource types.

  • * resource-type - Filter resources by their type. Specify up to five * resource types in the format AWS::ServiceCode::ResourceType. For * example, AWS::EC2::Instance, or AWS::S3::Bucket.

    *

When you specify a resource-type filter for * ListGroupResources, Resource Groups validates your filter resource * types against the types that are defined in the query associated with the group. * For example, if a group contains only S3 buckets because its query specifies * only that resource type, but your resource-type filter includes EC2 * instances, AWS Resource Groups does not filter for EC2 instances. In this case, * a ListGroupResources request returns a * BadRequestException error with a message similar to the * following:

The resource types specified as filters in the request * are not valid.

The error includes a list of resource types that * failed the validation because they are not part of the query associated with the * group. This validation doesn't occur when the group query specifies * AWS::AllSupported, because a group based on such a query can * contain any of the allowed resource types for the query type (tag-based or * Amazon CloudFront stack-based queries).

*/ inline ListGroupResourcesRequest& WithFilters(Aws::Vector&& value) { SetFilters(std::move(value)); return *this;} /** *

Filters, formatted as ResourceFilter objects, that you want to apply * to a ListGroupResources operation. Filters the results to include * only those of the specified resource types.

  • * resource-type - Filter resources by their type. Specify up to five * resource types in the format AWS::ServiceCode::ResourceType. For * example, AWS::EC2::Instance, or AWS::S3::Bucket.

    *

When you specify a resource-type filter for * ListGroupResources, Resource Groups validates your filter resource * types against the types that are defined in the query associated with the group. * For example, if a group contains only S3 buckets because its query specifies * only that resource type, but your resource-type filter includes EC2 * instances, AWS Resource Groups does not filter for EC2 instances. In this case, * a ListGroupResources request returns a * BadRequestException error with a message similar to the * following:

The resource types specified as filters in the request * are not valid.

The error includes a list of resource types that * failed the validation because they are not part of the query associated with the * group. This validation doesn't occur when the group query specifies * AWS::AllSupported, because a group based on such a query can * contain any of the allowed resource types for the query type (tag-based or * Amazon CloudFront stack-based queries).

*/ inline ListGroupResourcesRequest& AddFilters(const ResourceFilter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; } /** *

Filters, formatted as ResourceFilter objects, that you want to apply * to a ListGroupResources operation. Filters the results to include * only those of the specified resource types.

  • * resource-type - Filter resources by their type. Specify up to five * resource types in the format AWS::ServiceCode::ResourceType. For * example, AWS::EC2::Instance, or AWS::S3::Bucket.

    *

When you specify a resource-type filter for * ListGroupResources, Resource Groups validates your filter resource * types against the types that are defined in the query associated with the group. * For example, if a group contains only S3 buckets because its query specifies * only that resource type, but your resource-type filter includes EC2 * instances, AWS Resource Groups does not filter for EC2 instances. In this case, * a ListGroupResources request returns a * BadRequestException error with a message similar to the * following:

The resource types specified as filters in the request * are not valid.

The error includes a list of resource types that * failed the validation because they are not part of the query associated with the * group. This validation doesn't occur when the group query specifies * AWS::AllSupported, because a group based on such a query can * contain any of the allowed resource types for the query type (tag-based or * Amazon CloudFront stack-based queries).

*/ inline ListGroupResourcesRequest& AddFilters(ResourceFilter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; } /** *

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 maximum you * specify, the NextToken response element is present and has a value * (is not null). Include that 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; } /** *

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 maximum you * specify, the NextToken response element is present and has a value * (is not null). Include that 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; } /** *

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 maximum you * specify, the NextToken response element is present and has a value * (is not null). Include that 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; } /** *

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 maximum you * specify, the NextToken response element is present and has a value * (is not null). Include that 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 ListGroupResourcesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

The parameter for receiving additional results if you receive a * NextToken response in a previous request. A NextToken * response indicates that more output is available. Set this parameter to the * value provided by a previous call's NextToken response to indicate * where the output should continue from.

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

The parameter for receiving additional results if you receive a * NextToken response in a previous request. A NextToken * response indicates that more output is available. Set this parameter to the * value provided by a previous call's NextToken response to indicate * where the output should continue from.

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

The parameter for receiving additional results if you receive a * NextToken response in a previous request. A NextToken * response indicates that more output is available. Set this parameter to the * value provided by a previous call's NextToken response to indicate * where the output should continue from.

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

The parameter for receiving additional results if you receive a * NextToken response in a previous request. A NextToken * response indicates that more output is available. Set this parameter to the * value provided by a previous call's NextToken response to indicate * where the output should continue from.

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

The parameter for receiving additional results if you receive a * NextToken response in a previous request. A NextToken * response indicates that more output is available. Set this parameter to the * value provided by a previous call's NextToken response to indicate * where the output should continue from.

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

The parameter for receiving additional results if you receive a * NextToken response in a previous request. A NextToken * response indicates that more output is available. Set this parameter to the * value provided by a previous call's NextToken response to indicate * where the output should continue from.

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

The parameter for receiving additional results if you receive a * NextToken response in a previous request. A NextToken * response indicates that more output is available. Set this parameter to the * value provided by a previous call's NextToken response to indicate * where the output should continue from.

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

The parameter for receiving additional results if you receive a * NextToken response in a previous request. A NextToken * response indicates that more output is available. Set this parameter to the * value provided by a previous call's NextToken response to indicate * where the output should continue from.

*/ inline ListGroupResourcesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} private: Aws::String m_group; bool m_groupHasBeenSet = false; Aws::Vector m_filters; bool m_filtersHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; }; } // namespace Model } // namespace ResourceGroups } // namespace Aws