aws_sdk_resourcegroups/client/
list_group_resources.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`ListGroupResources`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`group_name(impl Into<String>)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::group_name) / [`set_group_name(Option<String>)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::set_group_name):<br>required: **false**<br><important>  <p><i> <b>Deprecated - don't use this parameter. Use the <code>Group</code> request field instead.</b> </i></p> </important><br>
8    ///   - [`group(impl Into<String>)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::group) / [`set_group(Option<String>)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::set_group):<br>required: **false**<br><p>The name or the Amazon resource name (ARN) of the resource group.</p><br>
9    ///   - [`filters(ResourceFilter)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::filters) / [`set_filters(Option<Vec::<ResourceFilter>>)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::set_filters):<br>required: **false**<br><p>Filters, formatted as <code>ResourceFilter</code> objects, that you want to apply to a <code>ListGroupResources</code> operation. Filters the results to include only those of the specified resource types.</p> <ul>  <li>   <p><code>resource-type</code> - Filter resources by their type. Specify up to five resource types in the format <code>AWS::ServiceCode::ResourceType</code>. For example, <code>AWS::EC2::Instance</code>, or <code>AWS::S3::Bucket</code>.</p></li> </ul> <p>When you specify a <code>resource-type</code> filter for <code>ListGroupResources</code>, 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 <code>resource-type</code> filter includes EC2 instances, AWS Resource Groups does not filter for EC2 instances. In this case, a <code>ListGroupResources</code> request returns a <code>BadRequestException</code> error with a message similar to the following:</p> <p><code>The resource types specified as filters in the request are not valid.</code></p> <p>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 <code>AWS::AllSupported</code>, 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).</p><br>
10    ///   - [`max_results(i32)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::set_max_results):<br>required: **false**<br><p>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 <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> 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 <code>NextToken</code> after every operation to ensure that you receive all of the results.</p><br>
11    ///   - [`next_token(impl Into<String>)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::set_next_token):<br>required: **false**<br><p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value provided by a previous call's <code>NextToken</code> response to indicate where the output should continue from.</p><br>
12    /// - On success, responds with [`ListGroupResourcesOutput`](crate::operation::list_group_resources::ListGroupResourcesOutput) with field(s):
13    ///   - [`resources(Option<Vec::<ListGroupResourcesItem>>)`](crate::operation::list_group_resources::ListGroupResourcesOutput::resources): <p>An array of resources from which you can determine each resource's identity, type, and group membership status.</p>
14    ///   - [`resource_identifiers(Option<Vec::<ResourceIdentifier>>)`](crate::operation::list_group_resources::ListGroupResourcesOutput::resource_identifiers): <important>  <p><b> <i>Deprecated - don't use this parameter. Use the <code>Resources</code> response field instead.</i> </b></p> </important>
15    ///   - [`next_token(Option<String>)`](crate::operation::list_group_resources::ListGroupResourcesOutput::next_token): <p>If present, indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>.</p>
16    ///   - [`query_errors(Option<Vec::<QueryError>>)`](crate::operation::list_group_resources::ListGroupResourcesOutput::query_errors): <p>A list of <code>QueryError</code> objects. Each error contains an <code>ErrorCode</code> and <code>Message</code>. Possible values for ErrorCode are <code>CLOUDFORMATION_STACK_INACTIVE</code>, <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>, <code>CLOUDFORMATION_STACK_UNASSUMABLE_ROLE</code> and <code>RESOURCE_TYPE_NOT_SUPPORTED</code>.</p>
17    /// - On failure, responds with [`SdkError<ListGroupResourcesError>`](crate::operation::list_group_resources::ListGroupResourcesError)
18    pub fn list_group_resources(&self) -> crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder {
19        crate::operation::list_group_resources::builders::ListGroupResourcesFluentBuilder::new(self.handle.clone())
20    }
21}