@Generated(value="software.amazon.awssdk:codegen") public interface ResourceGroupsAsyncClient extends SdkClient
builder()
method.
AWS Resource Groups lets you organize AWS resources such as Amazon EC2 instances, Amazon Relational Database Service databases, and Amazon S3 buckets into groups using criteria that you define as tags. A resource group is a collection of resources that match the resource types specified in a query, and share one or more tags or portions of tags. You can create a group of resources based on their roles in your cloud infrastructure, lifecycle stages, regions, application layers, or virtually any criteria. Resource Groups enable you to automate management tasks, such as those in AWS Systems Manager Automation documents, on tag-related resources in AWS Systems Manager. Groups of tagged resources also let you quickly view a custom console in AWS Systems Manager that shows AWS Config compliance and other monitoring data about member resources.
To create a resource group, build a resource query, and specify tags that identify the criteria that members of the group have in common. Tags are key-value pairs.
For more information about Resource Groups, see the AWS Resource Groups User Guide.
AWS Resource Groups uses a REST-compliant API that you can use to perform the following types of operations.
Create, Read, Update, and Delete (CRUD) operations on resource groups and resource query entities
Applying, editing, and removing tags from resource groups
Resolving resource group member ARNs so they can be returned as search results
Getting data about resources that are members of a group
Searching AWS resources based on a resource query
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
static ResourceGroupsAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
ResourceGroupsAsyncClient . |
static ResourceGroupsAsyncClient |
create()
Create a
ResourceGroupsAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default CompletableFuture<CreateGroupResponse> |
createGroup(Consumer<CreateGroupRequest.Builder> createGroupRequest)
Creates a resource group with the specified name and description.
|
default CompletableFuture<CreateGroupResponse> |
createGroup(CreateGroupRequest createGroupRequest)
Creates a resource group with the specified name and description.
|
default CompletableFuture<DeleteGroupResponse> |
deleteGroup(Consumer<DeleteGroupRequest.Builder> deleteGroupRequest)
Deletes the specified resource group.
|
default CompletableFuture<DeleteGroupResponse> |
deleteGroup(DeleteGroupRequest deleteGroupRequest)
Deletes the specified resource group.
|
default CompletableFuture<GetGroupResponse> |
getGroup(Consumer<GetGroupRequest.Builder> getGroupRequest)
Returns information about a specified resource group.
|
default CompletableFuture<GetGroupResponse> |
getGroup(GetGroupRequest getGroupRequest)
Returns information about a specified resource group.
|
default CompletableFuture<GetGroupConfigurationResponse> |
getGroupConfiguration(Consumer<GetGroupConfigurationRequest.Builder> getGroupConfigurationRequest)
Returns the service configuration associated with the specified resource group.
|
default CompletableFuture<GetGroupConfigurationResponse> |
getGroupConfiguration(GetGroupConfigurationRequest getGroupConfigurationRequest)
Returns the service configuration associated with the specified resource group.
|
default CompletableFuture<GetGroupQueryResponse> |
getGroupQuery(Consumer<GetGroupQueryRequest.Builder> getGroupQueryRequest)
Retrieves the resource query associated with the specified resource group.
|
default CompletableFuture<GetGroupQueryResponse> |
getGroupQuery(GetGroupQueryRequest getGroupQueryRequest)
Retrieves the resource query associated with the specified resource group.
|
default CompletableFuture<GetTagsResponse> |
getTags(Consumer<GetTagsRequest.Builder> getTagsRequest)
Returns a list of tags that are associated with a resource group, specified by an ARN.
|
default CompletableFuture<GetTagsResponse> |
getTags(GetTagsRequest getTagsRequest)
Returns a list of tags that are associated with a resource group, specified by an ARN.
|
default CompletableFuture<GroupResourcesResponse> |
groupResources(Consumer<GroupResourcesRequest.Builder> groupResourcesRequest)
Adds the specified resources to the specified group.
|
default CompletableFuture<GroupResourcesResponse> |
groupResources(GroupResourcesRequest groupResourcesRequest)
Adds the specified resources to the specified group.
|
default CompletableFuture<ListGroupResourcesResponse> |
listGroupResources(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
|
default CompletableFuture<ListGroupResourcesResponse> |
listGroupResources(ListGroupResourcesRequest listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
|
default ListGroupResourcesPublisher |
listGroupResourcesPaginator(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
|
default ListGroupResourcesPublisher |
listGroupResourcesPaginator(ListGroupResourcesRequest listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
|
default CompletableFuture<ListGroupsResponse> |
listGroups()
Returns a list of existing resource groups in your account.
|
default CompletableFuture<ListGroupsResponse> |
listGroups(Consumer<ListGroupsRequest.Builder> listGroupsRequest)
Returns a list of existing resource groups in your account.
|
default CompletableFuture<ListGroupsResponse> |
listGroups(ListGroupsRequest listGroupsRequest)
Returns a list of existing resource groups in your account.
|
default ListGroupsPublisher |
listGroupsPaginator()
Returns a list of existing resource groups in your account.
|
default ListGroupsPublisher |
listGroupsPaginator(Consumer<ListGroupsRequest.Builder> listGroupsRequest)
Returns a list of existing resource groups in your account.
|
default ListGroupsPublisher |
listGroupsPaginator(ListGroupsRequest listGroupsRequest)
Returns a list of existing resource groups in your account.
|
default CompletableFuture<PutGroupConfigurationResponse> |
putGroupConfiguration(Consumer<PutGroupConfigurationRequest.Builder> putGroupConfigurationRequest)
Attaches a service configuration to the specified group.
|
default CompletableFuture<PutGroupConfigurationResponse> |
putGroupConfiguration(PutGroupConfigurationRequest putGroupConfigurationRequest)
Attaches a service configuration to the specified group.
|
default CompletableFuture<SearchResourcesResponse> |
searchResources(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest)
Returns a list of AWS resource identifiers that matches the specified query.
|
default CompletableFuture<SearchResourcesResponse> |
searchResources(SearchResourcesRequest searchResourcesRequest)
Returns a list of AWS resource identifiers that matches the specified query.
|
default SearchResourcesPublisher |
searchResourcesPaginator(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest)
Returns a list of AWS resource identifiers that matches the specified query.
|
default SearchResourcesPublisher |
searchResourcesPaginator(SearchResourcesRequest searchResourcesRequest)
Returns a list of AWS resource identifiers that matches the specified query.
|
default CompletableFuture<TagResponse> |
tag(Consumer<TagRequest.Builder> tagRequest)
Adds tags to a resource group with the specified ARN.
|
default CompletableFuture<TagResponse> |
tag(TagRequest tagRequest)
Adds tags to a resource group with the specified ARN.
|
default CompletableFuture<UngroupResourcesResponse> |
ungroupResources(Consumer<UngroupResourcesRequest.Builder> ungroupResourcesRequest)
Removes the specified resources from the specified group.
|
default CompletableFuture<UngroupResourcesResponse> |
ungroupResources(UngroupResourcesRequest ungroupResourcesRequest)
Removes the specified resources from the specified group.
|
default CompletableFuture<UntagResponse> |
untag(Consumer<UntagRequest.Builder> untagRequest)
Deletes tags from a specified resource group.
|
default CompletableFuture<UntagResponse> |
untag(UntagRequest untagRequest)
Deletes tags from a specified resource group.
|
default CompletableFuture<UpdateGroupResponse> |
updateGroup(Consumer<UpdateGroupRequest.Builder> updateGroupRequest)
Updates the description for an existing group.
|
default CompletableFuture<UpdateGroupResponse> |
updateGroup(UpdateGroupRequest updateGroupRequest)
Updates the description for an existing group.
|
default CompletableFuture<UpdateGroupQueryResponse> |
updateGroupQuery(Consumer<UpdateGroupQueryRequest.Builder> updateGroupQueryRequest)
Updates the resource query of a group.
|
default CompletableFuture<UpdateGroupQueryResponse> |
updateGroupQuery(UpdateGroupQueryRequest updateGroupQueryRequest)
Updates the resource query of a group.
|
serviceName
close
static final String SERVICE_NAME
static ResourceGroupsAsyncClient create()
ResourceGroupsAsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static ResourceGroupsAsyncClientBuilder builder()
ResourceGroupsAsyncClient
.default CompletableFuture<CreateGroupResponse> createGroup(CreateGroupRequest createGroupRequest)
Creates a resource group with the specified name and description. You can optionally include a resource query, or a service configuration. For more information about constructing a resource query, see Create a tag-based group in Resource Groups. For more information about service configurations, see Service configurations for resource groups.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:CreateGroup
createGroupRequest
- default CompletableFuture<CreateGroupResponse> createGroup(Consumer<CreateGroupRequest.Builder> createGroupRequest)
Creates a resource group with the specified name and description. You can optionally include a resource query, or a service configuration. For more information about constructing a resource query, see Create a tag-based group in Resource Groups. For more information about service configurations, see Service configurations for resource groups.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:CreateGroup
This is a convenience which creates an instance of the CreateGroupRequest.Builder
avoiding the need to
create one manually via CreateGroupRequest.builder()
createGroupRequest
- A Consumer
that will call methods on CreateGroupInput.Builder
to create a request.default CompletableFuture<DeleteGroupResponse> deleteGroup(DeleteGroupRequest deleteGroupRequest)
Deletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:DeleteGroup
deleteGroupRequest
- default CompletableFuture<DeleteGroupResponse> deleteGroup(Consumer<DeleteGroupRequest.Builder> deleteGroupRequest)
Deletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:DeleteGroup
This is a convenience which creates an instance of the DeleteGroupRequest.Builder
avoiding the need to
create one manually via DeleteGroupRequest.builder()
deleteGroupRequest
- A Consumer
that will call methods on DeleteGroupInput.Builder
to create a request.default CompletableFuture<GetGroupResponse> getGroup(GetGroupRequest getGroupRequest)
Returns information about a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetGroup
getGroupRequest
- default CompletableFuture<GetGroupResponse> getGroup(Consumer<GetGroupRequest.Builder> getGroupRequest)
Returns information about a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetGroup
This is a convenience which creates an instance of the GetGroupRequest.Builder
avoiding the need to
create one manually via GetGroupRequest.builder()
getGroupRequest
- A Consumer
that will call methods on GetGroupInput.Builder
to create a request.default CompletableFuture<GetGroupConfigurationResponse> getGroupConfiguration(GetGroupConfigurationRequest getGroupConfigurationRequest)
Returns the service configuration associated with the specified resource group. For details about the service configuration syntax, see Service configurations for resource groups.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetGroupConfiguration
getGroupConfigurationRequest
- default CompletableFuture<GetGroupConfigurationResponse> getGroupConfiguration(Consumer<GetGroupConfigurationRequest.Builder> getGroupConfigurationRequest)
Returns the service configuration associated with the specified resource group. For details about the service configuration syntax, see Service configurations for resource groups.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetGroupConfiguration
This is a convenience which creates an instance of the GetGroupConfigurationRequest.Builder
avoiding the
need to create one manually via GetGroupConfigurationRequest.builder()
getGroupConfigurationRequest
- A Consumer
that will call methods on GetGroupConfigurationInput.Builder
to create a
request.default CompletableFuture<GetGroupQueryResponse> getGroupQuery(GetGroupQueryRequest getGroupQueryRequest)
Retrieves the resource query associated with the specified resource group. For more information about resource queries, see Create a tag-based group in Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetGroupQuery
getGroupQueryRequest
- default CompletableFuture<GetGroupQueryResponse> getGroupQuery(Consumer<GetGroupQueryRequest.Builder> getGroupQueryRequest)
Retrieves the resource query associated with the specified resource group. For more information about resource queries, see Create a tag-based group in Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetGroupQuery
This is a convenience which creates an instance of the GetGroupQueryRequest.Builder
avoiding the need to
create one manually via GetGroupQueryRequest.builder()
getGroupQueryRequest
- A Consumer
that will call methods on GetGroupQueryInput.Builder
to create a request.default CompletableFuture<GetTagsResponse> getTags(GetTagsRequest getTagsRequest)
Returns a list of tags that are associated with a resource group, specified by an ARN.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetTags
getTagsRequest
- default CompletableFuture<GetTagsResponse> getTags(Consumer<GetTagsRequest.Builder> getTagsRequest)
Returns a list of tags that are associated with a resource group, specified by an ARN.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetTags
This is a convenience which creates an instance of the GetTagsRequest.Builder
avoiding the need to create
one manually via GetTagsRequest.builder()
getTagsRequest
- A Consumer
that will call methods on GetTagsInput.Builder
to create a request.default CompletableFuture<GroupResourcesResponse> groupResources(GroupResourcesRequest groupResourcesRequest)
Adds the specified resources to the specified group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GroupResources
groupResourcesRequest
- default CompletableFuture<GroupResourcesResponse> groupResources(Consumer<GroupResourcesRequest.Builder> groupResourcesRequest)
Adds the specified resources to the specified group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GroupResources
This is a convenience which creates an instance of the GroupResourcesRequest.Builder
avoiding the need to
create one manually via GroupResourcesRequest.builder()
groupResourcesRequest
- A Consumer
that will call methods on GroupResourcesInput.Builder
to create a request.default CompletableFuture<ListGroupResourcesResponse> listGroupResources(ListGroupResourcesRequest listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroupResources
listGroupResourcesRequest
- default CompletableFuture<ListGroupResourcesResponse> listGroupResources(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroupResources
This is a convenience which creates an instance of the ListGroupResourcesRequest.Builder
avoiding the
need to create one manually via ListGroupResourcesRequest.builder()
listGroupResourcesRequest
- A Consumer
that will call methods on ListGroupResourcesInput.Builder
to create a request.default ListGroupResourcesPublisher listGroupResourcesPaginator(ListGroupResourcesRequest listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroupResources
This is a variant of
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher publisher = client.listGroupResourcesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher publisher = client.listGroupResourcesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)
operation.
listGroupResourcesRequest
- default ListGroupResourcesPublisher listGroupResourcesPaginator(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroupResources
This is a variant of
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher publisher = client.listGroupResourcesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher publisher = client.listGroupResourcesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)
operation.
This is a convenience which creates an instance of the ListGroupResourcesRequest.Builder
avoiding the
need to create one manually via ListGroupResourcesRequest.builder()
listGroupResourcesRequest
- A Consumer
that will call methods on ListGroupResourcesInput.Builder
to create a request.default CompletableFuture<ListGroupsResponse> listGroups(ListGroupsRequest listGroupsRequest)
Returns a list of existing resource groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroups
listGroupsRequest
- default CompletableFuture<ListGroupsResponse> listGroups(Consumer<ListGroupsRequest.Builder> listGroupsRequest)
Returns a list of existing resource groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroups
This is a convenience which creates an instance of the ListGroupsRequest.Builder
avoiding the need to
create one manually via ListGroupsRequest.builder()
listGroupsRequest
- A Consumer
that will call methods on ListGroupsInput.Builder
to create a request.default CompletableFuture<ListGroupsResponse> listGroups()
Returns a list of existing resource groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroups
default ListGroupsPublisher listGroupsPaginator()
Returns a list of existing resource groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroups
This is a variant of listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation.
default ListGroupsPublisher listGroupsPaginator(ListGroupsRequest listGroupsRequest)
Returns a list of existing resource groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroups
This is a variant of listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation.
listGroupsRequest
- default ListGroupsPublisher listGroupsPaginator(Consumer<ListGroupsRequest.Builder> listGroupsRequest)
Returns a list of existing resource groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroups
This is a variant of listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation.
This is a convenience which creates an instance of the ListGroupsRequest.Builder
avoiding the need to
create one manually via ListGroupsRequest.builder()
listGroupsRequest
- A Consumer
that will call methods on ListGroupsInput.Builder
to create a request.default CompletableFuture<PutGroupConfigurationResponse> putGroupConfiguration(PutGroupConfigurationRequest putGroupConfigurationRequest)
Attaches a service configuration to the specified group. This occurs asynchronously, and can take time to complete. You can use GetGroupConfiguration to check the status of the update.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:PutGroupConfiguration
putGroupConfigurationRequest
- default CompletableFuture<PutGroupConfigurationResponse> putGroupConfiguration(Consumer<PutGroupConfigurationRequest.Builder> putGroupConfigurationRequest)
Attaches a service configuration to the specified group. This occurs asynchronously, and can take time to complete. You can use GetGroupConfiguration to check the status of the update.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:PutGroupConfiguration
This is a convenience which creates an instance of the PutGroupConfigurationRequest.Builder
avoiding the
need to create one manually via PutGroupConfigurationRequest.builder()
putGroupConfigurationRequest
- A Consumer
that will call methods on PutGroupConfigurationInput.Builder
to create a
request.default CompletableFuture<SearchResourcesResponse> searchResources(SearchResourcesRequest searchResourcesRequest)
Returns a list of AWS resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:SearchResources
searchResourcesRequest
- default CompletableFuture<SearchResourcesResponse> searchResources(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest)
Returns a list of AWS resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:SearchResources
This is a convenience which creates an instance of the SearchResourcesRequest.Builder
avoiding the need
to create one manually via SearchResourcesRequest.builder()
searchResourcesRequest
- A Consumer
that will call methods on SearchResourcesInput.Builder
to create a request.default SearchResourcesPublisher searchResourcesPaginator(SearchResourcesRequest searchResourcesRequest)
Returns a list of AWS resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:SearchResources
This is a variant of
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)
operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher publisher = client.searchResourcesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher publisher = client.searchResourcesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)
operation.
searchResourcesRequest
- default SearchResourcesPublisher searchResourcesPaginator(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest)
Returns a list of AWS resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:SearchResources
This is a variant of
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)
operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher publisher = client.searchResourcesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher publisher = client.searchResourcesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)
operation.
This is a convenience which creates an instance of the SearchResourcesRequest.Builder
avoiding the need
to create one manually via SearchResourcesRequest.builder()
searchResourcesRequest
- A Consumer
that will call methods on SearchResourcesInput.Builder
to create a request.default CompletableFuture<TagResponse> tag(TagRequest tagRequest)
Adds tags to a resource group with the specified ARN. Existing tags on a resource group are not changed if they are not specified in the request parameters.
Do not store personally identifiable information (PII) or other confidential or sensitive information in tags. We use tags to provide you with billing and administration services. Tags are not intended to be used for private or sensitive data.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:Tag
tagRequest
- default CompletableFuture<TagResponse> tag(Consumer<TagRequest.Builder> tagRequest)
Adds tags to a resource group with the specified ARN. Existing tags on a resource group are not changed if they are not specified in the request parameters.
Do not store personally identifiable information (PII) or other confidential or sensitive information in tags. We use tags to provide you with billing and administration services. Tags are not intended to be used for private or sensitive data.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:Tag
This is a convenience which creates an instance of the TagRequest.Builder
avoiding the need to create one
manually via TagRequest.builder()
tagRequest
- A Consumer
that will call methods on TagInput.Builder
to create a request.default CompletableFuture<UngroupResourcesResponse> ungroupResources(UngroupResourcesRequest ungroupResourcesRequest)
Removes the specified resources from the specified group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:UngroupResources
ungroupResourcesRequest
- default CompletableFuture<UngroupResourcesResponse> ungroupResources(Consumer<UngroupResourcesRequest.Builder> ungroupResourcesRequest)
Removes the specified resources from the specified group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:UngroupResources
This is a convenience which creates an instance of the UngroupResourcesRequest.Builder
avoiding the need
to create one manually via UngroupResourcesRequest.builder()
ungroupResourcesRequest
- A Consumer
that will call methods on UngroupResourcesInput.Builder
to create a request.default CompletableFuture<UntagResponse> untag(UntagRequest untagRequest)
Deletes tags from a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:Untag
untagRequest
- default CompletableFuture<UntagResponse> untag(Consumer<UntagRequest.Builder> untagRequest)
Deletes tags from a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:Untag
This is a convenience which creates an instance of the UntagRequest.Builder
avoiding the need to create
one manually via UntagRequest.builder()
untagRequest
- A Consumer
that will call methods on UntagInput.Builder
to create a request.default CompletableFuture<UpdateGroupResponse> updateGroup(UpdateGroupRequest updateGroupRequest)
Updates the description for an existing group. You cannot update the name of a resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:UpdateGroup
updateGroupRequest
- default CompletableFuture<UpdateGroupResponse> updateGroup(Consumer<UpdateGroupRequest.Builder> updateGroupRequest)
Updates the description for an existing group. You cannot update the name of a resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:UpdateGroup
This is a convenience which creates an instance of the UpdateGroupRequest.Builder
avoiding the need to
create one manually via UpdateGroupRequest.builder()
updateGroupRequest
- A Consumer
that will call methods on UpdateGroupInput.Builder
to create a request.default CompletableFuture<UpdateGroupQueryResponse> updateGroupQuery(UpdateGroupQueryRequest updateGroupQueryRequest)
Updates the resource query of a group. For more information about resource queries, see Create a tag-based group in Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:UpdateGroupQuery
updateGroupQueryRequest
- default CompletableFuture<UpdateGroupQueryResponse> updateGroupQuery(Consumer<UpdateGroupQueryRequest.Builder> updateGroupQueryRequest)
Updates the resource query of a group. For more information about resource queries, see Create a tag-based group in Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:UpdateGroupQuery
This is a convenience which creates an instance of the UpdateGroupQueryRequest.Builder
avoiding the need
to create one manually via UpdateGroupQueryRequest.builder()
updateGroupQueryRequest
- A Consumer
that will call methods on UpdateGroupQueryInput.Builder
to create a request.Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.