/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace MQ { /** *

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.

*/ class AWS_MQ_API MQClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods { public: typedef Aws::Client::AWSJsonClient BASECLASS; static const char* SERVICE_NAME; static const char* ALLOCATION_TAG; typedef MQClientConfiguration ClientConfigurationType; typedef MQEndpointProvider EndpointProviderType; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ MQClient(const Aws::MQ::MQClientConfiguration& clientConfiguration = Aws::MQ::MQClientConfiguration(), std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG)); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ MQClient(const Aws::Auth::AWSCredentials& credentials, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::MQ::MQClientConfiguration& clientConfiguration = Aws::MQ::MQClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ MQClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::MQ::MQClientConfiguration& clientConfiguration = Aws::MQ::MQClientConfiguration()); /* Legacy constructors due deprecation */ /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ MQClient(const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ MQClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ MQClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration); /* End of legacy constructors due deprecation */ virtual ~MQClient(); /** *

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 Amazon Web Services Credentials and Never * Modify or Delete the Amazon MQ Elastic Network Interface in the Amazon MQ * Developer Guide.

See Also:

AWS API * Reference

*/ virtual Model::CreateBrokerOutcome CreateBroker(const Model::CreateBrokerRequest& request) const; /** * A Callable wrapper for CreateBroker that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateBrokerOutcomeCallable CreateBrokerCallable(const CreateBrokerRequestT& request) const { return SubmitCallable(&MQClient::CreateBroker, request); } /** * An Async wrapper for CreateBroker that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateBrokerAsync(const CreateBrokerRequestT& request, const CreateBrokerResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::CreateBroker, request, handler, context); } /** *

Creates a new configuration for the specified configuration name. Amazon MQ * uses the default configuration (the engine type and version).

See * Also:

AWS * API Reference

*/ virtual Model::CreateConfigurationOutcome CreateConfiguration(const Model::CreateConfigurationRequest& request) const; /** * A Callable wrapper for CreateConfiguration that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateConfigurationOutcomeCallable CreateConfigurationCallable(const CreateConfigurationRequestT& request) const { return SubmitCallable(&MQClient::CreateConfiguration, request); } /** * An Async wrapper for CreateConfiguration that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateConfigurationAsync(const CreateConfigurationRequestT& request, const CreateConfigurationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::CreateConfiguration, request, handler, context); } /** *

Add a tag to a resource.

See Also:

AWS API * Reference

*/ virtual Model::CreateTagsOutcome CreateTags(const Model::CreateTagsRequest& request) const; /** * A Callable wrapper for CreateTags that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateTagsOutcomeCallable CreateTagsCallable(const CreateTagsRequestT& request) const { return SubmitCallable(&MQClient::CreateTags, request); } /** * An Async wrapper for CreateTags that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateTagsAsync(const CreateTagsRequestT& request, const CreateTagsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::CreateTags, request, handler, context); } /** *

Creates an ActiveMQ user.

Do not add personally * identifiable information (PII) or other confidential or sensitive information in * broker usernames. Broker usernames are accessible to other Amazon Web Services * services, including CloudWatch Logs. Broker usernames are not intended to be * used for private or sensitive data.

See Also:

AWS API * Reference

*/ virtual Model::CreateUserOutcome CreateUser(const Model::CreateUserRequest& request) const; /** * A Callable wrapper for CreateUser that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateUserOutcomeCallable CreateUserCallable(const CreateUserRequestT& request) const { return SubmitCallable(&MQClient::CreateUser, request); } /** * An Async wrapper for CreateUser that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateUserAsync(const CreateUserRequestT& request, const CreateUserResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::CreateUser, request, handler, context); } /** *

Deletes a broker. Note: This API is asynchronous.

See Also:

* AWS * API Reference

*/ virtual Model::DeleteBrokerOutcome DeleteBroker(const Model::DeleteBrokerRequest& request) const; /** * A Callable wrapper for DeleteBroker that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DeleteBrokerOutcomeCallable DeleteBrokerCallable(const DeleteBrokerRequestT& request) const { return SubmitCallable(&MQClient::DeleteBroker, request); } /** * An Async wrapper for DeleteBroker that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DeleteBrokerAsync(const DeleteBrokerRequestT& request, const DeleteBrokerResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DeleteBroker, request, handler, context); } /** *

Removes a tag from a resource.

See Also:

AWS API * Reference

*/ virtual Model::DeleteTagsOutcome DeleteTags(const Model::DeleteTagsRequest& request) const; /** * A Callable wrapper for DeleteTags that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DeleteTagsOutcomeCallable DeleteTagsCallable(const DeleteTagsRequestT& request) const { return SubmitCallable(&MQClient::DeleteTags, request); } /** * An Async wrapper for DeleteTags that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DeleteTagsAsync(const DeleteTagsRequestT& request, const DeleteTagsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DeleteTags, request, handler, context); } /** *

Deletes an ActiveMQ user.

See Also:

AWS API * Reference

*/ virtual Model::DeleteUserOutcome DeleteUser(const Model::DeleteUserRequest& request) const; /** * A Callable wrapper for DeleteUser that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DeleteUserOutcomeCallable DeleteUserCallable(const DeleteUserRequestT& request) const { return SubmitCallable(&MQClient::DeleteUser, request); } /** * An Async wrapper for DeleteUser that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DeleteUserAsync(const DeleteUserRequestT& request, const DeleteUserResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DeleteUser, request, handler, context); } /** *

Returns information about the specified broker.

See Also:

AWS * API Reference

*/ virtual Model::DescribeBrokerOutcome DescribeBroker(const Model::DescribeBrokerRequest& request) const; /** * A Callable wrapper for DescribeBroker that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeBrokerOutcomeCallable DescribeBrokerCallable(const DescribeBrokerRequestT& request) const { return SubmitCallable(&MQClient::DescribeBroker, request); } /** * An Async wrapper for DescribeBroker that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeBrokerAsync(const DescribeBrokerRequestT& request, const DescribeBrokerResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DescribeBroker, request, handler, context); } /** *

Describe available engine types and versions.

See Also:

AWS * API Reference

*/ virtual Model::DescribeBrokerEngineTypesOutcome DescribeBrokerEngineTypes(const Model::DescribeBrokerEngineTypesRequest& request) const; /** * A Callable wrapper for DescribeBrokerEngineTypes that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeBrokerEngineTypesOutcomeCallable DescribeBrokerEngineTypesCallable(const DescribeBrokerEngineTypesRequestT& request) const { return SubmitCallable(&MQClient::DescribeBrokerEngineTypes, request); } /** * An Async wrapper for DescribeBrokerEngineTypes that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeBrokerEngineTypesAsync(const DescribeBrokerEngineTypesRequestT& request, const DescribeBrokerEngineTypesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DescribeBrokerEngineTypes, request, handler, context); } /** *

Describe available broker instance options.

See Also:

AWS * API Reference

*/ virtual Model::DescribeBrokerInstanceOptionsOutcome DescribeBrokerInstanceOptions(const Model::DescribeBrokerInstanceOptionsRequest& request) const; /** * A Callable wrapper for DescribeBrokerInstanceOptions that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeBrokerInstanceOptionsOutcomeCallable DescribeBrokerInstanceOptionsCallable(const DescribeBrokerInstanceOptionsRequestT& request) const { return SubmitCallable(&MQClient::DescribeBrokerInstanceOptions, request); } /** * An Async wrapper for DescribeBrokerInstanceOptions that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeBrokerInstanceOptionsAsync(const DescribeBrokerInstanceOptionsRequestT& request, const DescribeBrokerInstanceOptionsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DescribeBrokerInstanceOptions, request, handler, context); } /** *

Returns information about the specified configuration.

See * Also:

AWS * API Reference

*/ virtual Model::DescribeConfigurationOutcome DescribeConfiguration(const Model::DescribeConfigurationRequest& request) const; /** * A Callable wrapper for DescribeConfiguration that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeConfigurationOutcomeCallable DescribeConfigurationCallable(const DescribeConfigurationRequestT& request) const { return SubmitCallable(&MQClient::DescribeConfiguration, request); } /** * An Async wrapper for DescribeConfiguration that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeConfigurationAsync(const DescribeConfigurationRequestT& request, const DescribeConfigurationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DescribeConfiguration, request, handler, context); } /** *

Returns the specified configuration revision for the specified * configuration.

See Also:

AWS * API Reference

*/ virtual Model::DescribeConfigurationRevisionOutcome DescribeConfigurationRevision(const Model::DescribeConfigurationRevisionRequest& request) const; /** * A Callable wrapper for DescribeConfigurationRevision that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeConfigurationRevisionOutcomeCallable DescribeConfigurationRevisionCallable(const DescribeConfigurationRevisionRequestT& request) const { return SubmitCallable(&MQClient::DescribeConfigurationRevision, request); } /** * An Async wrapper for DescribeConfigurationRevision that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeConfigurationRevisionAsync(const DescribeConfigurationRevisionRequestT& request, const DescribeConfigurationRevisionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DescribeConfigurationRevision, request, handler, context); } /** *

Returns information about an ActiveMQ user.

See Also:

AWS API * Reference

*/ virtual Model::DescribeUserOutcome DescribeUser(const Model::DescribeUserRequest& request) const; /** * A Callable wrapper for DescribeUser that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeUserOutcomeCallable DescribeUserCallable(const DescribeUserRequestT& request) const { return SubmitCallable(&MQClient::DescribeUser, request); } /** * An Async wrapper for DescribeUser that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeUserAsync(const DescribeUserRequestT& request, const DescribeUserResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::DescribeUser, request, handler, context); } /** *

Returns a list of all brokers.

See Also:

AWS API * Reference

*/ virtual Model::ListBrokersOutcome ListBrokers(const Model::ListBrokersRequest& request) const; /** * A Callable wrapper for ListBrokers that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListBrokersOutcomeCallable ListBrokersCallable(const ListBrokersRequestT& request) const { return SubmitCallable(&MQClient::ListBrokers, request); } /** * An Async wrapper for ListBrokers that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListBrokersAsync(const ListBrokersRequestT& request, const ListBrokersResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::ListBrokers, request, handler, context); } /** *

Returns a list of all revisions for the specified * configuration.

See Also:

AWS * API Reference

*/ virtual Model::ListConfigurationRevisionsOutcome ListConfigurationRevisions(const Model::ListConfigurationRevisionsRequest& request) const; /** * A Callable wrapper for ListConfigurationRevisions that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListConfigurationRevisionsOutcomeCallable ListConfigurationRevisionsCallable(const ListConfigurationRevisionsRequestT& request) const { return SubmitCallable(&MQClient::ListConfigurationRevisions, request); } /** * An Async wrapper for ListConfigurationRevisions that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListConfigurationRevisionsAsync(const ListConfigurationRevisionsRequestT& request, const ListConfigurationRevisionsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::ListConfigurationRevisions, request, handler, context); } /** *

Returns a list of all configurations.

See Also:

AWS * API Reference

*/ virtual Model::ListConfigurationsOutcome ListConfigurations(const Model::ListConfigurationsRequest& request) const; /** * A Callable wrapper for ListConfigurations that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListConfigurationsOutcomeCallable ListConfigurationsCallable(const ListConfigurationsRequestT& request) const { return SubmitCallable(&MQClient::ListConfigurations, request); } /** * An Async wrapper for ListConfigurations that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListConfigurationsAsync(const ListConfigurationsRequestT& request, const ListConfigurationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::ListConfigurations, request, handler, context); } /** *

Lists tags for a resource.

See Also:

AWS API * Reference

*/ virtual Model::ListTagsOutcome ListTags(const Model::ListTagsRequest& request) const; /** * A Callable wrapper for ListTags that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListTagsOutcomeCallable ListTagsCallable(const ListTagsRequestT& request) const { return SubmitCallable(&MQClient::ListTags, request); } /** * An Async wrapper for ListTags that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListTagsAsync(const ListTagsRequestT& request, const ListTagsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::ListTags, request, handler, context); } /** *

Returns a list of all ActiveMQ users.

See Also:

AWS API * Reference

*/ virtual Model::ListUsersOutcome ListUsers(const Model::ListUsersRequest& request) const; /** * A Callable wrapper for ListUsers that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListUsersOutcomeCallable ListUsersCallable(const ListUsersRequestT& request) const { return SubmitCallable(&MQClient::ListUsers, request); } /** * An Async wrapper for ListUsers that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListUsersAsync(const ListUsersRequestT& request, const ListUsersResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::ListUsers, request, handler, context); } /** *

Promotes a data replication replica broker to the primary broker * role.

See Also:

AWS API * Reference

*/ virtual Model::PromoteOutcome Promote(const Model::PromoteRequest& request) const; /** * A Callable wrapper for Promote that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::PromoteOutcomeCallable PromoteCallable(const PromoteRequestT& request) const { return SubmitCallable(&MQClient::Promote, request); } /** * An Async wrapper for Promote that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void PromoteAsync(const PromoteRequestT& request, const PromoteResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::Promote, request, handler, context); } /** *

Reboots a broker. Note: This API is asynchronous.

See Also:

* AWS * API Reference

*/ virtual Model::RebootBrokerOutcome RebootBroker(const Model::RebootBrokerRequest& request) const; /** * A Callable wrapper for RebootBroker that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::RebootBrokerOutcomeCallable RebootBrokerCallable(const RebootBrokerRequestT& request) const { return SubmitCallable(&MQClient::RebootBroker, request); } /** * An Async wrapper for RebootBroker that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void RebootBrokerAsync(const RebootBrokerRequestT& request, const RebootBrokerResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::RebootBroker, request, handler, context); } /** *

Adds a pending configuration change to a broker.

See Also:

* AWS * API Reference

*/ virtual Model::UpdateBrokerOutcome UpdateBroker(const Model::UpdateBrokerRequest& request) const; /** * A Callable wrapper for UpdateBroker that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UpdateBrokerOutcomeCallable UpdateBrokerCallable(const UpdateBrokerRequestT& request) const { return SubmitCallable(&MQClient::UpdateBroker, request); } /** * An Async wrapper for UpdateBroker that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UpdateBrokerAsync(const UpdateBrokerRequestT& request, const UpdateBrokerResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::UpdateBroker, request, handler, context); } /** *

Updates the specified configuration.

See Also:

AWS * API Reference

*/ virtual Model::UpdateConfigurationOutcome UpdateConfiguration(const Model::UpdateConfigurationRequest& request) const; /** * A Callable wrapper for UpdateConfiguration that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UpdateConfigurationOutcomeCallable UpdateConfigurationCallable(const UpdateConfigurationRequestT& request) const { return SubmitCallable(&MQClient::UpdateConfiguration, request); } /** * An Async wrapper for UpdateConfiguration that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UpdateConfigurationAsync(const UpdateConfigurationRequestT& request, const UpdateConfigurationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::UpdateConfiguration, request, handler, context); } /** *

Updates the information for an ActiveMQ user.

See Also:

AWS API * Reference

*/ virtual Model::UpdateUserOutcome UpdateUser(const Model::UpdateUserRequest& request) const; /** * A Callable wrapper for UpdateUser that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UpdateUserOutcomeCallable UpdateUserCallable(const UpdateUserRequestT& request) const { return SubmitCallable(&MQClient::UpdateUser, request); } /** * An Async wrapper for UpdateUser that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UpdateUserAsync(const UpdateUserRequestT& request, const UpdateUserResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&MQClient::UpdateUser, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const MQClientConfiguration& clientConfiguration); MQClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace MQ } // namespace Aws