
software.amazon.awssdk.services.resourcegroups.ResourceGroupsAsyncClient Maven / Gradle / Ivy
/*
* Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.resourcegroups;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.services.resourcegroups.model.CreateGroupRequest;
import software.amazon.awssdk.services.resourcegroups.model.CreateGroupResponse;
import software.amazon.awssdk.services.resourcegroups.model.DeleteGroupRequest;
import software.amazon.awssdk.services.resourcegroups.model.DeleteGroupResponse;
import software.amazon.awssdk.services.resourcegroups.model.GetGroupQueryRequest;
import software.amazon.awssdk.services.resourcegroups.model.GetGroupQueryResponse;
import software.amazon.awssdk.services.resourcegroups.model.GetGroupRequest;
import software.amazon.awssdk.services.resourcegroups.model.GetGroupResponse;
import software.amazon.awssdk.services.resourcegroups.model.GetTagsRequest;
import software.amazon.awssdk.services.resourcegroups.model.GetTagsResponse;
import software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest;
import software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse;
import software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest;
import software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse;
import software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest;
import software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse;
import software.amazon.awssdk.services.resourcegroups.model.TagRequest;
import software.amazon.awssdk.services.resourcegroups.model.TagResponse;
import software.amazon.awssdk.services.resourcegroups.model.UntagRequest;
import software.amazon.awssdk.services.resourcegroups.model.UntagResponse;
import software.amazon.awssdk.services.resourcegroups.model.UpdateGroupQueryRequest;
import software.amazon.awssdk.services.resourcegroups.model.UpdateGroupQueryResponse;
import software.amazon.awssdk.services.resourcegroups.model.UpdateGroupRequest;
import software.amazon.awssdk.services.resourcegroups.model.UpdateGroupResponse;
import software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher;
import software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher;
import software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher;
/**
* Service client for accessing Resource Groups asynchronously. This can be created using the static {@link #builder()}
* method.
*
* AWS Resource Groups
*
* 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
*
*
*
*/
@Generated("software.amazon.awssdk:codegen")
public interface ResourceGroupsAsyncClient extends SdkClient {
String SERVICE_NAME = "resource-groups";
/**
* Create a {@link ResourceGroupsAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static ResourceGroupsAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link ResourceGroupsAsyncClient}.
*/
static ResourceGroupsAsyncClientBuilder builder() {
return new DefaultResourceGroupsAsyncClientBuilder();
}
/**
*
* Creates a group with a specified name, description, and resource query.
*
*
* @param createGroupRequest
* @return A Java Future containing the result of the CreateGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.CreateGroup
* @see AWS
* API Documentation
*/
default CompletableFuture createGroup(CreateGroupRequest createGroupRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Creates a group with a specified name, description, and resource query.
*
*
*
* This is a convenience which creates an instance of the {@link CreateGroupRequest.Builder} avoiding the need to
* create one manually via {@link CreateGroupRequest#builder()}
*
*
* @param createGroupRequest
* A {@link Consumer} that will call methods on {@link CreateGroupInput.Builder} to create a request.
* @return A Java Future containing the result of the CreateGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.CreateGroup
* @see AWS
* API Documentation
*/
default CompletableFuture createGroup(Consumer createGroupRequest) {
return createGroup(CreateGroupRequest.builder().applyMutation(createGroupRequest).build());
}
/**
*
* Deletes a specified resource group. Deleting a resource group does not delete resources that are members of the
* group; it only deletes the group structure.
*
*
* @param deleteGroupRequest
* @return A Java Future containing the result of the DeleteGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.DeleteGroup
* @see AWS
* API Documentation
*/
default CompletableFuture deleteGroup(DeleteGroupRequest deleteGroupRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Deletes a specified resource group. Deleting a resource group does not delete resources that are members of the
* group; it only deletes the group structure.
*
*
*
* This is a convenience which creates an instance of the {@link DeleteGroupRequest.Builder} avoiding the need to
* create one manually via {@link DeleteGroupRequest#builder()}
*
*
* @param deleteGroupRequest
* A {@link Consumer} that will call methods on {@link DeleteGroupInput.Builder} to create a request.
* @return A Java Future containing the result of the DeleteGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.DeleteGroup
* @see AWS
* API Documentation
*/
default CompletableFuture deleteGroup(Consumer deleteGroupRequest) {
return deleteGroup(DeleteGroupRequest.builder().applyMutation(deleteGroupRequest).build());
}
/**
*
* Returns information about a specified resource group.
*
*
* @param getGroupRequest
* @return A Java Future containing the result of the GetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.GetGroup
* @see AWS API
* Documentation
*/
default CompletableFuture getGroup(GetGroupRequest getGroupRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns information about a specified resource group.
*
*
*
* This is a convenience which creates an instance of the {@link GetGroupRequest.Builder} avoiding the need to
* create one manually via {@link GetGroupRequest#builder()}
*
*
* @param getGroupRequest
* A {@link Consumer} that will call methods on {@link GetGroupInput.Builder} to create a request.
* @return A Java Future containing the result of the GetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.GetGroup
* @see AWS API
* Documentation
*/
default CompletableFuture getGroup(Consumer getGroupRequest) {
return getGroup(GetGroupRequest.builder().applyMutation(getGroupRequest).build());
}
/**
*
* Returns the resource query associated with the specified resource group.
*
*
* @param getGroupQueryRequest
* @return A Java Future containing the result of the GetGroupQuery operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.GetGroupQuery
* @see AWS
* API Documentation
*/
default CompletableFuture getGroupQuery(GetGroupQueryRequest getGroupQueryRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns the resource query associated with the specified resource group.
*
*
*
* This is a convenience which creates an instance of the {@link GetGroupQueryRequest.Builder} avoiding the need to
* create one manually via {@link GetGroupQueryRequest#builder()}
*
*
* @param getGroupQueryRequest
* A {@link Consumer} that will call methods on {@link GetGroupQueryInput.Builder} to create a request.
* @return A Java Future containing the result of the GetGroupQuery operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.GetGroupQuery
* @see AWS
* API Documentation
*/
default CompletableFuture getGroupQuery(Consumer getGroupQueryRequest) {
return getGroupQuery(GetGroupQueryRequest.builder().applyMutation(getGroupQueryRequest).build());
}
/**
*
* Returns a list of tags that are associated with a resource, specified by an ARN.
*
*
* @param getTagsRequest
* @return A Java Future containing the result of the GetTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.GetTags
* @see AWS API
* Documentation
*/
default CompletableFuture getTags(GetTagsRequest getTagsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of tags that are associated with a resource, specified by an ARN.
*
*
*
* This is a convenience which creates an instance of the {@link GetTagsRequest.Builder} avoiding the need to create
* one manually via {@link GetTagsRequest#builder()}
*
*
* @param getTagsRequest
* A {@link Consumer} that will call methods on {@link GetTagsInput.Builder} to create a request.
* @return A Java Future containing the result of the GetTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.GetTags
* @see AWS API
* Documentation
*/
default CompletableFuture getTags(Consumer getTagsRequest) {
return getTags(GetTagsRequest.builder().applyMutation(getTagsRequest).build());
}
/**
*
* Returns a list of ARNs of resources that are members of a specified resource group.
*
*
* @param listGroupResourcesRequest
* @return A Java Future containing the result of the ListGroupResources operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - UnauthorizedException The request has not been applied because it lacks valid authentication
* credentials for the target resource.
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroupResources
* @see AWS API Documentation
*/
default CompletableFuture listGroupResources(ListGroupResourcesRequest listGroupResourcesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of ARNs of resources that are members of a specified resource group.
*
*
*
* This is a convenience which creates an instance of the {@link ListGroupResourcesRequest.Builder} avoiding the
* need to create one manually via {@link ListGroupResourcesRequest#builder()}
*
*
* @param listGroupResourcesRequest
* A {@link Consumer} that will call methods on {@link ListGroupResourcesInput.Builder} to create a request.
* @return A Java Future containing the result of the ListGroupResources operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - UnauthorizedException The request has not been applied because it lacks valid authentication
* credentials for the target resource.
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroupResources
* @see AWS API Documentation
*/
default CompletableFuture listGroupResources(
Consumer listGroupResourcesRequest) {
return listGroupResources(ListGroupResourcesRequest.builder().applyMutation(listGroupResourcesRequest).build());
}
/**
*
* Returns a list of ARNs of resources that are members of a specified resource group.
*
*
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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 forEach helper method
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher publisher = client.listGroupResourcesPaginator(request);
* CompletableFuture future = publisher.forEach(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher publisher = client.listGroupResourcesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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.
*
* Note: If you prefer to have control on service calls, use the
* {@link #listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)}
* operation.
*
*
* @param listGroupResourcesRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - UnauthorizedException The request has not been applied because it lacks valid authentication
* credentials for the target resource.
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroupResources
* @see AWS API Documentation
*/
default ListGroupResourcesPublisher listGroupResourcesPaginator(ListGroupResourcesRequest listGroupResourcesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of ARNs of resources that are members of a specified resource group.
*
*
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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 forEach helper method
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher publisher = client.listGroupResourcesPaginator(request);
* CompletableFuture future = publisher.forEach(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesPublisher publisher = client.listGroupResourcesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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.
*
* Note: If you prefer to have control on service calls, use the
* {@link #listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)}
* operation.
*
*
* This is a convenience which creates an instance of the {@link ListGroupResourcesRequest.Builder} avoiding the
* need to create one manually via {@link ListGroupResourcesRequest#builder()}
*
*
* @param listGroupResourcesRequest
* A {@link Consumer} that will call methods on {@link ListGroupResourcesInput.Builder} to create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - UnauthorizedException The request has not been applied because it lacks valid authentication
* credentials for the target resource.
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroupResources
* @see AWS API Documentation
*/
default ListGroupResourcesPublisher listGroupResourcesPaginator(
Consumer listGroupResourcesRequest) {
return listGroupResourcesPaginator(ListGroupResourcesRequest.builder().applyMutation(listGroupResourcesRequest).build());
}
/**
*
* Returns a list of existing resource groups in your account.
*
*
* @param listGroupsRequest
* @return A Java Future containing the result of the ListGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroups
* @see AWS API
* Documentation
*/
default CompletableFuture listGroups(ListGroupsRequest listGroupsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of existing resource groups in your account.
*
*
*
* This is a convenience which creates an instance of the {@link ListGroupsRequest.Builder} avoiding the need to
* create one manually via {@link ListGroupsRequest#builder()}
*
*
* @param listGroupsRequest
* A {@link Consumer} that will call methods on {@link ListGroupsInput.Builder} to create a request.
* @return A Java Future containing the result of the ListGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroups
* @see AWS API
* Documentation
*/
default CompletableFuture listGroups(Consumer listGroupsRequest) {
return listGroups(ListGroupsRequest.builder().applyMutation(listGroupsRequest).build());
}
/**
*
* Returns a list of existing resource groups in your account.
*
*
* @return A Java Future containing the result of the ListGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroups
* @see AWS API
* Documentation
*/
default CompletableFuture listGroups() {
return listGroups(ListGroupsRequest.builder().build());
}
/**
*
* Returns a list of existing resource groups in your account.
*
*
*
* This is a variant of {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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 forEach helper method
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
* CompletableFuture future = publisher.forEach(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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.
*
* Note: If you prefer to have control on service calls, use the
* {@link #listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)} operation.
*
*
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroups
* @see AWS API
* Documentation
*/
default ListGroupsPublisher listGroupsPaginator() {
return listGroupsPaginator(ListGroupsRequest.builder().build());
}
/**
*
* Returns a list of existing resource groups in your account.
*
*
*
* This is a variant of {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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 forEach helper method
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
* CompletableFuture future = publisher.forEach(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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.
*
* Note: If you prefer to have control on service calls, use the
* {@link #listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)} operation.
*
*
* @param listGroupsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroups
* @see AWS API
* Documentation
*/
default ListGroupsPublisher listGroupsPaginator(ListGroupsRequest listGroupsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of existing resource groups in your account.
*
*
*
* This is a variant of {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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 forEach helper method
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
* CompletableFuture future = publisher.forEach(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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.
*
* Note: If you prefer to have control on service calls, use the
* {@link #listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)} operation.
*
*
* This is a convenience which creates an instance of the {@link ListGroupsRequest.Builder} avoiding the need to
* create one manually via {@link ListGroupsRequest#builder()}
*
*
* @param listGroupsRequest
* A {@link Consumer} that will call methods on {@link ListGroupsInput.Builder} to create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.ListGroups
* @see AWS API
* Documentation
*/
default ListGroupsPublisher listGroupsPaginator(Consumer listGroupsRequest) {
return listGroupsPaginator(ListGroupsRequest.builder().applyMutation(listGroupsRequest).build());
}
/**
*
* Returns a list of AWS resource identifiers that matches a specified query. The query uses the same format as a
* resource query in a CreateGroup or UpdateGroupQuery operation.
*
*
* @param searchResourcesRequest
* @return A Java Future containing the result of the SearchResources operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - UnauthorizedException The request has not been applied because it lacks valid authentication
* credentials for the target resource.
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.SearchResources
* @see AWS API Documentation
*/
default CompletableFuture searchResources(SearchResourcesRequest searchResourcesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of AWS resource identifiers that matches a specified query. The query uses the same format as a
* resource query in a CreateGroup or UpdateGroupQuery operation.
*
*
*
* This is a convenience which creates an instance of the {@link SearchResourcesRequest.Builder} avoiding the need
* to create one manually via {@link SearchResourcesRequest#builder()}
*
*
* @param searchResourcesRequest
* A {@link Consumer} that will call methods on {@link SearchResourcesInput.Builder} to create a request.
* @return A Java Future containing the result of the SearchResources operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - UnauthorizedException The request has not been applied because it lacks valid authentication
* credentials for the target resource.
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.SearchResources
* @see AWS API Documentation
*/
default CompletableFuture searchResources(
Consumer searchResourcesRequest) {
return searchResources(SearchResourcesRequest.builder().applyMutation(searchResourcesRequest).build());
}
/**
*
* Returns a list of AWS resource identifiers that matches a specified query. The query uses the same format as a
* resource query in a CreateGroup or UpdateGroupQuery operation.
*
*
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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 forEach helper method
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher publisher = client.searchResourcesPaginator(request);
* CompletableFuture future = publisher.forEach(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher publisher = client.searchResourcesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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.
*
* Note: If you prefer to have control on service calls, use the
* {@link #searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)}
* operation.
*
*
* @param searchResourcesRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - UnauthorizedException The request has not been applied because it lacks valid authentication
* credentials for the target resource.
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.SearchResources
* @see AWS API Documentation
*/
default SearchResourcesPublisher searchResourcesPaginator(SearchResourcesRequest searchResourcesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of AWS resource identifiers that matches a specified query. The query uses the same format as a
* resource query in a CreateGroup or UpdateGroupQuery operation.
*
*
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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 forEach helper method
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher publisher = client.searchResourcesPaginator(request);
* CompletableFuture future = publisher.forEach(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesPublisher publisher = client.searchResourcesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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.
*
* Note: If you prefer to have control on service calls, use the
* {@link #searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)}
* operation.
*
*
* This is a convenience which creates an instance of the {@link SearchResourcesRequest.Builder} avoiding the need
* to create one manually via {@link SearchResourcesRequest#builder()}
*
*
* @param searchResourcesRequest
* A {@link Consumer} that will call methods on {@link SearchResourcesInput.Builder} to create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - UnauthorizedException The request has not been applied because it lacks valid authentication
* credentials for the target resource.
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.SearchResources
* @see AWS API Documentation
*/
default SearchResourcesPublisher searchResourcesPaginator(Consumer searchResourcesRequest) {
return searchResourcesPaginator(SearchResourcesRequest.builder().applyMutation(searchResourcesRequest).build());
}
/**
*
* Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are
* not specified in the request parameters.
*
*
* @param tagRequest
* @return A Java Future containing the result of the Tag operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.Tag
* @see AWS API
* Documentation
*/
default CompletableFuture tag(TagRequest tagRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are
* not specified in the request parameters.
*
*
*
* This is a convenience which creates an instance of the {@link TagRequest.Builder} avoiding the need to create one
* manually via {@link TagRequest#builder()}
*
*
* @param tagRequest
* A {@link Consumer} that will call methods on {@link TagInput.Builder} to create a request.
* @return A Java Future containing the result of the Tag operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.Tag
* @see AWS API
* Documentation
*/
default CompletableFuture tag(Consumer tagRequest) {
return tag(TagRequest.builder().applyMutation(tagRequest).build());
}
/**
*
* Deletes specified tags from a specified resource.
*
*
* @param untagRequest
* @return A Java Future containing the result of the Untag operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.Untag
* @see AWS API
* Documentation
*/
default CompletableFuture untag(UntagRequest untagRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Deletes specified tags from a specified resource.
*
*
*
* This is a convenience which creates an instance of the {@link UntagRequest.Builder} avoiding the need to create
* one manually via {@link UntagRequest#builder()}
*
*
* @param untagRequest
* A {@link Consumer} that will call methods on {@link UntagInput.Builder} to create a request.
* @return A Java Future containing the result of the Untag operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.Untag
* @see AWS API
* Documentation
*/
default CompletableFuture untag(Consumer untagRequest) {
return untag(UntagRequest.builder().applyMutation(untagRequest).build());
}
/**
*
* Updates an existing group with a new or changed description. You cannot update the name of a resource group.
*
*
* @param updateGroupRequest
* @return A Java Future containing the result of the UpdateGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.UpdateGroup
* @see AWS
* API Documentation
*/
default CompletableFuture updateGroup(UpdateGroupRequest updateGroupRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Updates an existing group with a new or changed description. You cannot update the name of a resource group.
*
*
*
* This is a convenience which creates an instance of the {@link UpdateGroupRequest.Builder} avoiding the need to
* create one manually via {@link UpdateGroupRequest#builder()}
*
*
* @param updateGroupRequest
* A {@link Consumer} that will call methods on {@link UpdateGroupInput.Builder} to create a request.
* @return A Java Future containing the result of the UpdateGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.UpdateGroup
* @see AWS
* API Documentation
*/
default CompletableFuture updateGroup(Consumer updateGroupRequest) {
return updateGroup(UpdateGroupRequest.builder().applyMutation(updateGroupRequest).build());
}
/**
*
* Updates the resource query of a group.
*
*
* @param updateGroupQueryRequest
* @return A Java Future containing the result of the UpdateGroupQuery operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.UpdateGroupQuery
* @see AWS API Documentation
*/
default CompletableFuture updateGroupQuery(UpdateGroupQueryRequest updateGroupQueryRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Updates the resource query of a group.
*
*
*
* This is a convenience which creates an instance of the {@link UpdateGroupQueryRequest.Builder} avoiding the need
* to create one manually via {@link UpdateGroupQueryRequest#builder()}
*
*
* @param updateGroupQueryRequest
* A {@link Consumer} that will call methods on {@link UpdateGroupQueryInput.Builder} to create a request.
* @return A Java Future containing the result of the UpdateGroupQuery operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - BadRequestException The request does not comply with validation rules that are defined for the
* request parameters.
* - ForbiddenException The caller is not authorized to make the request.
* - NotFoundException One or more resources specified in the request do not exist.
* - MethodNotAllowedException The request uses an HTTP method which is not allowed for the specified
* resource.
* - TooManyRequestsException The caller has exceeded throttling limits.
* - InternalServerErrorException An internal error occurred while processing the request.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ResourceGroupsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ResourceGroupsAsyncClient.UpdateGroupQuery
* @see AWS API Documentation
*/
default CompletableFuture updateGroupQuery(
Consumer updateGroupQueryRequest) {
return updateGroupQuery(UpdateGroupQueryRequest.builder().applyMutation(updateGroupQueryRequest).build());
}
}