@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface AmpAsyncClient extends SdkClient
builder() method.
Amazon Managed Service for Prometheus
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static AmpAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
AmpAsyncClient. |
static AmpAsyncClient |
create()
Create a
AmpAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<CreateWorkspaceResponse> |
createWorkspace(Consumer<CreateWorkspaceRequest.Builder> createWorkspaceRequest)
Creates a new AMP workspace.
|
default CompletableFuture<CreateWorkspaceResponse> |
createWorkspace(CreateWorkspaceRequest createWorkspaceRequest)
Creates a new AMP workspace.
|
default CompletableFuture<DeleteWorkspaceResponse> |
deleteWorkspace(Consumer<DeleteWorkspaceRequest.Builder> deleteWorkspaceRequest)
Deletes an AMP workspace.
|
default CompletableFuture<DeleteWorkspaceResponse> |
deleteWorkspace(DeleteWorkspaceRequest deleteWorkspaceRequest)
Deletes an AMP workspace.
|
default CompletableFuture<DescribeWorkspaceResponse> |
describeWorkspace(Consumer<DescribeWorkspaceRequest.Builder> describeWorkspaceRequest)
Describes an existing AMP workspace.
|
default CompletableFuture<DescribeWorkspaceResponse> |
describeWorkspace(DescribeWorkspaceRequest describeWorkspaceRequest)
Describes an existing AMP workspace.
|
default CompletableFuture<ListWorkspacesResponse> |
listWorkspaces(Consumer<ListWorkspacesRequest.Builder> listWorkspacesRequest)
Lists all AMP workspaces, including workspaces being created or deleted.
|
default CompletableFuture<ListWorkspacesResponse> |
listWorkspaces(ListWorkspacesRequest listWorkspacesRequest)
Lists all AMP workspaces, including workspaces being created or deleted.
|
default ListWorkspacesPublisher |
listWorkspacesPaginator(Consumer<ListWorkspacesRequest.Builder> listWorkspacesRequest)
Lists all AMP workspaces, including workspaces being created or deleted.
|
default ListWorkspacesPublisher |
listWorkspacesPaginator(ListWorkspacesRequest listWorkspacesRequest)
Lists all AMP workspaces, including workspaces being created or deleted.
|
default CompletableFuture<UpdateWorkspaceAliasResponse> |
updateWorkspaceAlias(Consumer<UpdateWorkspaceAliasRequest.Builder> updateWorkspaceAliasRequest)
Updates an AMP workspace alias.
|
default CompletableFuture<UpdateWorkspaceAliasResponse> |
updateWorkspaceAlias(UpdateWorkspaceAliasRequest updateWorkspaceAliasRequest)
Updates an AMP workspace alias.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static AmpAsyncClient create()
AmpAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static AmpAsyncClientBuilder builder()
AmpAsyncClient.default CompletableFuture<CreateWorkspaceResponse> createWorkspace(CreateWorkspaceRequest createWorkspaceRequest)
Creates a new AMP workspace.
createWorkspaceRequest - Represents the input of a CreateWorkspace operation.default CompletableFuture<CreateWorkspaceResponse> createWorkspace(Consumer<CreateWorkspaceRequest.Builder> createWorkspaceRequest)
Creates a new AMP workspace.
This is a convenience which creates an instance of the CreateWorkspaceRequest.Builder avoiding the need
to create one manually via CreateWorkspaceRequest.builder()
createWorkspaceRequest - A Consumer that will call methods on CreateWorkspaceRequest.Builder to create a request.
Represents the input of a CreateWorkspace operation.default CompletableFuture<DeleteWorkspaceResponse> deleteWorkspace(DeleteWorkspaceRequest deleteWorkspaceRequest)
Deletes an AMP workspace.
deleteWorkspaceRequest - Represents the input of a DeleteWorkspace operation.default CompletableFuture<DeleteWorkspaceResponse> deleteWorkspace(Consumer<DeleteWorkspaceRequest.Builder> deleteWorkspaceRequest)
Deletes an AMP workspace.
This is a convenience which creates an instance of the DeleteWorkspaceRequest.Builder avoiding the need
to create one manually via DeleteWorkspaceRequest.builder()
deleteWorkspaceRequest - A Consumer that will call methods on DeleteWorkspaceRequest.Builder to create a request.
Represents the input of a DeleteWorkspace operation.default CompletableFuture<DescribeWorkspaceResponse> describeWorkspace(DescribeWorkspaceRequest describeWorkspaceRequest)
Describes an existing AMP workspace.
describeWorkspaceRequest - Represents the input of a DescribeWorkspace operation.default CompletableFuture<DescribeWorkspaceResponse> describeWorkspace(Consumer<DescribeWorkspaceRequest.Builder> describeWorkspaceRequest)
Describes an existing AMP workspace.
This is a convenience which creates an instance of the DescribeWorkspaceRequest.Builder avoiding the need
to create one manually via DescribeWorkspaceRequest.builder()
describeWorkspaceRequest - A Consumer that will call methods on DescribeWorkspaceRequest.Builder to create a request.
Represents the input of a DescribeWorkspace operation.default CompletableFuture<ListWorkspacesResponse> listWorkspaces(ListWorkspacesRequest listWorkspacesRequest)
Lists all AMP workspaces, including workspaces being created or deleted.
listWorkspacesRequest - Represents the input of a ListWorkspaces operation.default CompletableFuture<ListWorkspacesResponse> listWorkspaces(Consumer<ListWorkspacesRequest.Builder> listWorkspacesRequest)
Lists all AMP workspaces, including workspaces being created or deleted.
This is a convenience which creates an instance of the ListWorkspacesRequest.Builder avoiding the need to
create one manually via ListWorkspacesRequest.builder()
listWorkspacesRequest - A Consumer that will call methods on ListWorkspacesRequest.Builder to create a request.
Represents the input of a ListWorkspaces operation.default ListWorkspacesPublisher listWorkspacesPaginator(ListWorkspacesRequest listWorkspacesRequest)
Lists all AMP workspaces, including workspaces being created or deleted.
This is a variant of listWorkspaces(software.amazon.awssdk.services.amp.model.ListWorkspacesRequest)
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.amp.paginators.ListWorkspacesPublisher publisher = client.listWorkspacesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.amp.paginators.ListWorkspacesPublisher publisher = client.listWorkspacesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.amp.model.ListWorkspacesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.amp.model.ListWorkspacesResponse 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
listWorkspaces(software.amazon.awssdk.services.amp.model.ListWorkspacesRequest) operation.
listWorkspacesRequest - Represents the input of a ListWorkspaces operation.default ListWorkspacesPublisher listWorkspacesPaginator(Consumer<ListWorkspacesRequest.Builder> listWorkspacesRequest)
Lists all AMP workspaces, including workspaces being created or deleted.
This is a variant of listWorkspaces(software.amazon.awssdk.services.amp.model.ListWorkspacesRequest)
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.amp.paginators.ListWorkspacesPublisher publisher = client.listWorkspacesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.amp.paginators.ListWorkspacesPublisher publisher = client.listWorkspacesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.amp.model.ListWorkspacesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.amp.model.ListWorkspacesResponse 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
listWorkspaces(software.amazon.awssdk.services.amp.model.ListWorkspacesRequest) operation.
This is a convenience which creates an instance of the ListWorkspacesRequest.Builder avoiding the need to
create one manually via ListWorkspacesRequest.builder()
listWorkspacesRequest - A Consumer that will call methods on ListWorkspacesRequest.Builder to create a request.
Represents the input of a ListWorkspaces operation.default CompletableFuture<UpdateWorkspaceAliasResponse> updateWorkspaceAlias(UpdateWorkspaceAliasRequest updateWorkspaceAliasRequest)
Updates an AMP workspace alias.
updateWorkspaceAliasRequest - Represents the input of an UpdateWorkspaceAlias operation.default CompletableFuture<UpdateWorkspaceAliasResponse> updateWorkspaceAlias(Consumer<UpdateWorkspaceAliasRequest.Builder> updateWorkspaceAliasRequest)
Updates an AMP workspace alias.
This is a convenience which creates an instance of the UpdateWorkspaceAliasRequest.Builder avoiding the
need to create one manually via UpdateWorkspaceAliasRequest.builder()
updateWorkspaceAliasRequest - A Consumer that will call methods on UpdateWorkspaceAliasRequest.Builder to create a
request. Represents the input of an UpdateWorkspaceAlias operation.Copyright © 2021. All rights reserved.