@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface MqAsyncClient extends SdkClient
builder() method.
Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ that makes it easy to set up and operate message brokers in the cloud. A message broker allows software applications and components to communicate using various programming languages, operating systems, and formal messaging protocols.
| 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 |
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static MqAsyncClient create()
MqAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static MqAsyncClientBuilder builder()
MqAsyncClient.default CompletableFuture<CreateBrokerResponse> createBroker(CreateBrokerRequest createBrokerRequest)
Creates a broker. Note: This API is asynchronous.
To create a broker, you must either use the AmazonMQFullAccess IAM policy or include the following EC2 permissions in your IAM policy.
ec2:CreateNetworkInterface
This permission is required to allow Amazon MQ to create an elastic network interface (ENI) on behalf of your account.
ec2:CreateNetworkInterfacePermission
This permission is required to attach the ENI to the broker instance.
ec2:DeleteNetworkInterface
ec2:DeleteNetworkInterfacePermission
ec2:DetachNetworkInterface
ec2:DescribeInternetGateways
ec2:DescribeNetworkInterfaces
ec2:DescribeNetworkInterfacePermissions
ec2:DescribeRouteTables
ec2:DescribeSecurityGroups
ec2:DescribeSubnets
ec2:DescribeVpcs
For more information, see Create an IAM User and Get Your AWS Credentials and Never Modify or Delete the Amazon MQ Elastic Network Interface in the Amazon MQ Developer Guide.
createBrokerRequest - Creates a broker using the specified properties.default CompletableFuture<CreateBrokerResponse> createBroker(Consumer<CreateBrokerRequest.Builder> createBrokerRequest)
Creates a broker. Note: This API is asynchronous.
To create a broker, you must either use the AmazonMQFullAccess IAM policy or include the following EC2 permissions in your IAM policy.
ec2:CreateNetworkInterface
This permission is required to allow Amazon MQ to create an elastic network interface (ENI) on behalf of your account.
ec2:CreateNetworkInterfacePermission
This permission is required to attach the ENI to the broker instance.
ec2:DeleteNetworkInterface
ec2:DeleteNetworkInterfacePermission
ec2:DetachNetworkInterface
ec2:DescribeInternetGateways
ec2:DescribeNetworkInterfaces
ec2:DescribeNetworkInterfacePermissions
ec2:DescribeRouteTables
ec2:DescribeSecurityGroups
ec2:DescribeSubnets
ec2:DescribeVpcs
For more information, see Create an IAM User and Get Your AWS Credentials and Never Modify or Delete the Amazon MQ Elastic Network Interface in the Amazon MQ Developer Guide.
This is a convenience which creates an instance of the CreateBrokerRequest.Builder avoiding the need to
create one manually via CreateBrokerRequest.builder()
createBrokerRequest - A Consumer that will call methods on CreateBrokerRequest.Builder to create a request.
Creates a broker using the specified properties.default CompletableFuture<CreateConfigurationResponse> createConfiguration(CreateConfigurationRequest createConfigurationRequest)
Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).
createConfigurationRequest - Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration
(the engine type and version).default CompletableFuture<CreateConfigurationResponse> createConfiguration(Consumer<CreateConfigurationRequest.Builder> createConfigurationRequest)
Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).
This is a convenience which creates an instance of the CreateConfigurationRequest.Builder avoiding the
need to create one manually via CreateConfigurationRequest.builder()
createConfigurationRequest - A Consumer that will call methods on CreateConfigurationRequest.Builder to create a
request. Creates a new configuration for the specified configuration name. Amazon MQ uses the default
configuration (the engine type and version).default CompletableFuture<CreateTagsResponse> createTags(CreateTagsRequest createTagsRequest)
Add a tag to a resource.
createTagsRequest - A map of the key-value pairs for the resource tag.default CompletableFuture<CreateTagsResponse> createTags(Consumer<CreateTagsRequest.Builder> createTagsRequest)
Add a tag to a resource.
This is a convenience which creates an instance of the CreateTagsRequest.Builder avoiding the need to
create one manually via CreateTagsRequest.builder()
createTagsRequest - A Consumer that will call methods on CreateTagsRequest.Builder to create a request. A map
of the key-value pairs for the resource tag.default CompletableFuture<CreateUserResponse> createUser(CreateUserRequest createUserRequest)
Creates an ActiveMQ user.
createUserRequest - Creates a new ActiveMQ user.default CompletableFuture<CreateUserResponse> createUser(Consumer<CreateUserRequest.Builder> createUserRequest)
Creates an ActiveMQ user.
This is a convenience which creates an instance of the CreateUserRequest.Builder avoiding the need to
create one manually via CreateUserRequest.builder()
createUserRequest - A Consumer that will call methods on CreateUserRequest.Builder to create a request.
Creates a new ActiveMQ user.default CompletableFuture<DeleteBrokerResponse> deleteBroker(DeleteBrokerRequest deleteBrokerRequest)
Deletes a broker. Note: This API is asynchronous.
deleteBrokerRequest - default CompletableFuture<DeleteBrokerResponse> deleteBroker(Consumer<DeleteBrokerRequest.Builder> deleteBrokerRequest)
Deletes a broker. Note: This API is asynchronous.
This is a convenience which creates an instance of the DeleteBrokerRequest.Builder avoiding the need to
create one manually via DeleteBrokerRequest.builder()
deleteBrokerRequest - A Consumer that will call methods on DeleteBrokerRequest.Builder to create a request.default CompletableFuture<DeleteTagsResponse> deleteTags(DeleteTagsRequest deleteTagsRequest)
Removes a tag from a resource.
deleteTagsRequest - default CompletableFuture<DeleteTagsResponse> deleteTags(Consumer<DeleteTagsRequest.Builder> deleteTagsRequest)
Removes a tag from a resource.
This is a convenience which creates an instance of the DeleteTagsRequest.Builder avoiding the need to
create one manually via DeleteTagsRequest.builder()
deleteTagsRequest - A Consumer that will call methods on DeleteTagsRequest.Builder to create a request.default CompletableFuture<DeleteUserResponse> deleteUser(DeleteUserRequest deleteUserRequest)
Deletes an ActiveMQ user.
deleteUserRequest - default CompletableFuture<DeleteUserResponse> deleteUser(Consumer<DeleteUserRequest.Builder> deleteUserRequest)
Deletes an ActiveMQ user.
This is a convenience which creates an instance of the DeleteUserRequest.Builder avoiding the need to
create one manually via DeleteUserRequest.builder()
deleteUserRequest - A Consumer that will call methods on DeleteUserRequest.Builder to create a request.default CompletableFuture<DescribeBrokerResponse> describeBroker(DescribeBrokerRequest describeBrokerRequest)
Returns information about the specified broker.
describeBrokerRequest - default CompletableFuture<DescribeBrokerResponse> describeBroker(Consumer<DescribeBrokerRequest.Builder> describeBrokerRequest)
Returns information about the specified broker.
This is a convenience which creates an instance of the DescribeBrokerRequest.Builder avoiding the need to
create one manually via DescribeBrokerRequest.builder()
describeBrokerRequest - A Consumer that will call methods on DescribeBrokerRequest.Builder to create a request.default CompletableFuture<DescribeBrokerEngineTypesResponse> describeBrokerEngineTypes(DescribeBrokerEngineTypesRequest describeBrokerEngineTypesRequest)
Describe available engine types and versions.
describeBrokerEngineTypesRequest - default CompletableFuture<DescribeBrokerEngineTypesResponse> describeBrokerEngineTypes(Consumer<DescribeBrokerEngineTypesRequest.Builder> describeBrokerEngineTypesRequest)
Describe available engine types and versions.
This is a convenience which creates an instance of the DescribeBrokerEngineTypesRequest.Builder avoiding
the need to create one manually via DescribeBrokerEngineTypesRequest.builder()
describeBrokerEngineTypesRequest - A Consumer that will call methods on DescribeBrokerEngineTypesRequest.Builder to create a
request.default CompletableFuture<DescribeBrokerInstanceOptionsResponse> describeBrokerInstanceOptions(DescribeBrokerInstanceOptionsRequest describeBrokerInstanceOptionsRequest)
Describe available broker instance options.
describeBrokerInstanceOptionsRequest - default CompletableFuture<DescribeBrokerInstanceOptionsResponse> describeBrokerInstanceOptions(Consumer<DescribeBrokerInstanceOptionsRequest.Builder> describeBrokerInstanceOptionsRequest)
Describe available broker instance options.
This is a convenience which creates an instance of the DescribeBrokerInstanceOptionsRequest.Builder
avoiding the need to create one manually via DescribeBrokerInstanceOptionsRequest.builder()
describeBrokerInstanceOptionsRequest - A Consumer that will call methods on DescribeBrokerInstanceOptionsRequest.Builder to
create a request.default CompletableFuture<DescribeConfigurationResponse> describeConfiguration(DescribeConfigurationRequest describeConfigurationRequest)
Returns information about the specified configuration.
describeConfigurationRequest - default CompletableFuture<DescribeConfigurationResponse> describeConfiguration(Consumer<DescribeConfigurationRequest.Builder> describeConfigurationRequest)
Returns information about the specified configuration.
This is a convenience which creates an instance of the DescribeConfigurationRequest.Builder avoiding the
need to create one manually via DescribeConfigurationRequest.builder()
describeConfigurationRequest - A Consumer that will call methods on DescribeConfigurationRequest.Builder to create a
request.default CompletableFuture<DescribeConfigurationRevisionResponse> describeConfigurationRevision(DescribeConfigurationRevisionRequest describeConfigurationRevisionRequest)
Returns the specified configuration revision for the specified configuration.
describeConfigurationRevisionRequest - default CompletableFuture<DescribeConfigurationRevisionResponse> describeConfigurationRevision(Consumer<DescribeConfigurationRevisionRequest.Builder> describeConfigurationRevisionRequest)
Returns the specified configuration revision for the specified configuration.
This is a convenience which creates an instance of the DescribeConfigurationRevisionRequest.Builder
avoiding the need to create one manually via DescribeConfigurationRevisionRequest.builder()
describeConfigurationRevisionRequest - A Consumer that will call methods on DescribeConfigurationRevisionRequest.Builder to
create a request.default CompletableFuture<DescribeUserResponse> describeUser(DescribeUserRequest describeUserRequest)
Returns information about an ActiveMQ user.
describeUserRequest - default CompletableFuture<DescribeUserResponse> describeUser(Consumer<DescribeUserRequest.Builder> describeUserRequest)
Returns information about an ActiveMQ user.
This is a convenience which creates an instance of the DescribeUserRequest.Builder avoiding the need to
create one manually via DescribeUserRequest.builder()
describeUserRequest - A Consumer that will call methods on DescribeUserRequest.Builder to create a request.default CompletableFuture<ListBrokersResponse> listBrokers(ListBrokersRequest listBrokersRequest)
Returns a list of all brokers.
listBrokersRequest - default CompletableFuture<ListBrokersResponse> listBrokers(Consumer<ListBrokersRequest.Builder> listBrokersRequest)
Returns a list of all brokers.
This is a convenience which creates an instance of the ListBrokersRequest.Builder avoiding the need to
create one manually via ListBrokersRequest.builder()
listBrokersRequest - A Consumer that will call methods on ListBrokersRequest.Builder to create a request.default CompletableFuture<ListBrokersResponse> listBrokers()
Returns a list of all brokers.
default ListBrokersPublisher listBrokersPaginator()
Returns a list of all brokers.
This is a variant of listBrokers(software.amazon.awssdk.services.mq.model.ListBrokersRequest) 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.mq.paginators.ListBrokersPublisher publisher = client.listBrokersPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.mq.paginators.ListBrokersPublisher publisher = client.listBrokersPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.mq.model.ListBrokersResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.mq.model.ListBrokersResponse 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
listBrokers(software.amazon.awssdk.services.mq.model.ListBrokersRequest) operation.
default ListBrokersPublisher listBrokersPaginator(ListBrokersRequest listBrokersRequest)
Returns a list of all brokers.
This is a variant of listBrokers(software.amazon.awssdk.services.mq.model.ListBrokersRequest) 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.mq.paginators.ListBrokersPublisher publisher = client.listBrokersPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.mq.paginators.ListBrokersPublisher publisher = client.listBrokersPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.mq.model.ListBrokersResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.mq.model.ListBrokersResponse 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
listBrokers(software.amazon.awssdk.services.mq.model.ListBrokersRequest) operation.
listBrokersRequest - default ListBrokersPublisher listBrokersPaginator(Consumer<ListBrokersRequest.Builder> listBrokersRequest)
Returns a list of all brokers.
This is a variant of listBrokers(software.amazon.awssdk.services.mq.model.ListBrokersRequest) 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.mq.paginators.ListBrokersPublisher publisher = client.listBrokersPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.mq.paginators.ListBrokersPublisher publisher = client.listBrokersPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.mq.model.ListBrokersResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.mq.model.ListBrokersResponse 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
listBrokers(software.amazon.awssdk.services.mq.model.ListBrokersRequest) operation.
This is a convenience which creates an instance of the ListBrokersRequest.Builder avoiding the need to
create one manually via ListBrokersRequest.builder()
listBrokersRequest - A Consumer that will call methods on ListBrokersRequest.Builder to create a request.default CompletableFuture<ListConfigurationRevisionsResponse> listConfigurationRevisions(ListConfigurationRevisionsRequest listConfigurationRevisionsRequest)
Returns a list of all revisions for the specified configuration.
listConfigurationRevisionsRequest - default CompletableFuture<ListConfigurationRevisionsResponse> listConfigurationRevisions(Consumer<ListConfigurationRevisionsRequest.Builder> listConfigurationRevisionsRequest)
Returns a list of all revisions for the specified configuration.
This is a convenience which creates an instance of the ListConfigurationRevisionsRequest.Builder avoiding
the need to create one manually via ListConfigurationRevisionsRequest.builder()
listConfigurationRevisionsRequest - A Consumer that will call methods on ListConfigurationRevisionsRequest.Builder to create a
request.default CompletableFuture<ListConfigurationsResponse> listConfigurations(ListConfigurationsRequest listConfigurationsRequest)
Returns a list of all configurations.
listConfigurationsRequest - default CompletableFuture<ListConfigurationsResponse> listConfigurations(Consumer<ListConfigurationsRequest.Builder> listConfigurationsRequest)
Returns a list of all configurations.
This is a convenience which creates an instance of the ListConfigurationsRequest.Builder avoiding the
need to create one manually via ListConfigurationsRequest.builder()
listConfigurationsRequest - A Consumer that will call methods on ListConfigurationsRequest.Builder to create a
request.default CompletableFuture<ListConfigurationsResponse> listConfigurations()
Returns a list of all configurations.
default CompletableFuture<ListTagsResponse> listTags(ListTagsRequest listTagsRequest)
Lists tags for a resource.
listTagsRequest - default CompletableFuture<ListTagsResponse> listTags(Consumer<ListTagsRequest.Builder> listTagsRequest)
Lists tags for a resource.
This is a convenience which creates an instance of the ListTagsRequest.Builder avoiding the need to
create one manually via ListTagsRequest.builder()
listTagsRequest - A Consumer that will call methods on ListTagsRequest.Builder to create a request.default CompletableFuture<ListUsersResponse> listUsers(ListUsersRequest listUsersRequest)
Returns a list of all ActiveMQ users.
listUsersRequest - default CompletableFuture<ListUsersResponse> listUsers(Consumer<ListUsersRequest.Builder> listUsersRequest)
Returns a list of all ActiveMQ users.
This is a convenience which creates an instance of the ListUsersRequest.Builder avoiding the need to
create one manually via ListUsersRequest.builder()
listUsersRequest - A Consumer that will call methods on ListUsersRequest.Builder to create a request.default CompletableFuture<RebootBrokerResponse> rebootBroker(RebootBrokerRequest rebootBrokerRequest)
Reboots a broker. Note: This API is asynchronous.
rebootBrokerRequest - default CompletableFuture<RebootBrokerResponse> rebootBroker(Consumer<RebootBrokerRequest.Builder> rebootBrokerRequest)
Reboots a broker. Note: This API is asynchronous.
This is a convenience which creates an instance of the RebootBrokerRequest.Builder avoiding the need to
create one manually via RebootBrokerRequest.builder()
rebootBrokerRequest - A Consumer that will call methods on RebootBrokerRequest.Builder to create a request.default CompletableFuture<UpdateBrokerResponse> updateBroker(UpdateBrokerRequest updateBrokerRequest)
Adds a pending configuration change to a broker.
updateBrokerRequest - Updates the broker using the specified properties.default CompletableFuture<UpdateBrokerResponse> updateBroker(Consumer<UpdateBrokerRequest.Builder> updateBrokerRequest)
Adds a pending configuration change to a broker.
This is a convenience which creates an instance of the UpdateBrokerRequest.Builder avoiding the need to
create one manually via UpdateBrokerRequest.builder()
updateBrokerRequest - A Consumer that will call methods on UpdateBrokerRequest.Builder to create a request.
Updates the broker using the specified properties.default CompletableFuture<UpdateConfigurationResponse> updateConfiguration(UpdateConfigurationRequest updateConfigurationRequest)
Updates the specified configuration.
updateConfigurationRequest - Updates the specified configuration.default CompletableFuture<UpdateConfigurationResponse> updateConfiguration(Consumer<UpdateConfigurationRequest.Builder> updateConfigurationRequest)
Updates the specified configuration.
This is a convenience which creates an instance of the UpdateConfigurationRequest.Builder avoiding the
need to create one manually via UpdateConfigurationRequest.builder()
updateConfigurationRequest - A Consumer that will call methods on UpdateConfigurationRequest.Builder to create a
request. Updates the specified configuration.default CompletableFuture<UpdateUserResponse> updateUser(UpdateUserRequest updateUserRequest)
Updates the information for an ActiveMQ user.
updateUserRequest - Updates the information for an ActiveMQ user.default CompletableFuture<UpdateUserResponse> updateUser(Consumer<UpdateUserRequest.Builder> updateUserRequest)
Updates the information for an ActiveMQ user.
This is a convenience which creates an instance of the UpdateUserRequest.Builder avoiding the need to
create one manually via UpdateUserRequest.builder()
updateUserRequest - A Consumer that will call methods on UpdateUserRequest.Builder to create a request.
Updates the information for an ActiveMQ user.Copyright © 2023. All rights reserved.