pub struct Client { /* private fields */ }
Expand description
Client for AmazonMQ
Client for invoking operations on AmazonMQ. Each operation on AmazonMQ is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_mq::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_mq::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateBroker
operation has
a Client::create_broker
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.create_broker()
.authentication_strategy("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn create_broker(&self) -> CreateBrokerFluentBuilder
pub fn create_broker(&self) -> CreateBrokerFluentBuilder
Constructs a fluent builder for the CreateBroker
operation.
- The fluent builder is configurable:
authentication_strategy(AuthenticationStrategy)
/set_authentication_strategy(Option<AuthenticationStrategy>)
:
required: falseOptional. The authentication strategy used to secure the broker. The default is SIMPLE.
auto_minor_version_upgrade(bool)
/set_auto_minor_version_upgrade(Option<bool>)
:
required: falseEnables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot. Set to true by default, if no value is specified.
Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.
broker_name(impl Into<String>)
/set_broker_name(Option<String>)
:
required: trueRequired. The broker’s name. This value must be unique in your Amazon Web Services account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain white spaces, brackets, wildcard characters, or special characters.
Do not add personally identifiable information (PII) or other confidential or sensitive information in broker names. Broker names are accessible to other Amazon Web Services services, including CloudWatch Logs. Broker names are not intended to be used for private or sensitive data.
configuration(ConfigurationId)
/set_configuration(Option<ConfigurationId>)
:
required: falseA list of information about the configuration.
creator_request_id(impl Into<String>)
/set_creator_request_id(Option<String>)
:
required: falseThe unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.
We recommend using a Universally Unique Identifier (UUID) for the creatorRequestId. You may omit the creatorRequestId if your application doesn’t require idempotency.
deployment_mode(DeploymentMode)
/set_deployment_mode(Option<DeploymentMode>)
:
required: trueRequired. The broker’s deployment mode.
encryption_options(EncryptionOptions)
/set_encryption_options(Option<EncryptionOptions>)
:
required: falseEncryption options for the broker.
engine_type(EngineType)
/set_engine_type(Option<EngineType>)
:
required: trueRequired. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.
engine_version(impl Into<String>)
/set_engine_version(Option<String>)
:
required: falseThe broker engine version. Defaults to the latest available version for the specified broker engine type. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
host_instance_type(impl Into<String>)
/set_host_instance_type(Option<String>)
:
required: trueRequired. The broker’s instance type.
ldap_server_metadata(LdapServerMetadataInput)
/set_ldap_server_metadata(Option<LdapServerMetadataInput>)
:
required: falseOptional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.
logs(Logs)
/set_logs(Option<Logs>)
:
required: falseEnables Amazon CloudWatch logging for brokers.
maintenance_window_start_time(WeeklyStartTime)
/set_maintenance_window_start_time(Option<WeeklyStartTime>)
:
required: falseThe parameters that determine the WeeklyStartTime.
publicly_accessible(bool)
/set_publicly_accessible(Option<bool>)
:
required: trueEnables connections from applications outside of the VPC that hosts the broker’s subnets. Set to false by default, if no value is provided.
security_groups(impl Into<String>)
/set_security_groups(Option<Vec::<String>>)
:
required: falseThe list of rules (1 minimum, 125 maximum) that authorize connections to brokers.
storage_type(BrokerStorageType)
/set_storage_type(Option<BrokerStorageType>)
:
required: falseThe broker’s storage type.
subnet_ids(impl Into<String>)
/set_subnet_ids(Option<Vec::<String>>)
:
required: falseThe list of groups that define which subnets and IP ranges the broker can use from different Availability Zones. If you specify more than one subnet, the subnets must be in different Availability Zones. Amazon MQ will not be able to create VPC endpoints for your broker with multiple subnets in the same Availability Zone. A SINGLE_INSTANCE deployment requires one subnet (for example, the default subnet). An ACTIVE_STANDBY_MULTI_AZ Amazon MQ for ActiveMQ deployment requires two subnets. A CLUSTER_MULTI_AZ Amazon MQ for RabbitMQ deployment has no subnet requirements when deployed with public accessibility. Deployment without public accessibility requires at least one subnet.
If you specify subnets in a shared VPC for a RabbitMQ broker, the associated VPC to which the specified subnets belong must be owned by your Amazon Web Services account. Amazon MQ will not be able to create VPC endpoints in VPCs that are not owned by your Amazon Web Services account.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseCreate tags when creating the broker.
users(User)
/set_users(Option<Vec::<User>>)
:
required: trueThe list of broker users (persons or applications) who can access queues and topics. For Amazon MQ for RabbitMQ brokers, one and only one administrative user is accepted and created when a broker is first provisioned. All subsequent broker users are created by making RabbitMQ API calls directly to brokers or via the RabbitMQ web console.
data_replication_mode(DataReplicationMode)
/set_data_replication_mode(Option<DataReplicationMode>)
:
required: falseDefines whether this broker is a part of a data replication pair.
data_replication_primary_broker_arn(impl Into<String>)
/set_data_replication_primary_broker_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the primary broker that is used to replicate data from in a data replication pair, and is applied to the replica broker. Must be set when dataReplicationMode is set to CRDR.
- On success, responds with
CreateBrokerOutput
with field(s):broker_arn(Option<String>)
:The broker’s Amazon Resource Name (ARN).
broker_id(Option<String>)
:The unique ID that Amazon MQ generates for the broker.
- On failure, responds with
SdkError<CreateBrokerError>
Source§impl Client
impl Client
Sourcepub fn create_configuration(&self) -> CreateConfigurationFluentBuilder
pub fn create_configuration(&self) -> CreateConfigurationFluentBuilder
Constructs a fluent builder for the CreateConfiguration
operation.
- The fluent builder is configurable:
authentication_strategy(AuthenticationStrategy)
/set_authentication_strategy(Option<AuthenticationStrategy>)
:
required: falseOptional. The authentication strategy associated with the configuration. The default is SIMPLE.
engine_type(EngineType)
/set_engine_type(Option<EngineType>)
:
required: trueRequired. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.
engine_version(impl Into<String>)
/set_engine_version(Option<String>)
:
required: falseThe broker engine version. Defaults to the latest available version for the specified broker engine type. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueRequired. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseCreate tags when creating the configuration.
- On success, responds with
CreateConfigurationOutput
with field(s):arn(Option<String>)
:Required. The Amazon Resource Name (ARN) of the configuration.
authentication_strategy(Option<AuthenticationStrategy>)
:Optional. The authentication strategy associated with the configuration. The default is SIMPLE.
created(Option<DateTime>)
:Required. The date and time of the configuration.
id(Option<String>)
:Required. The unique ID that Amazon MQ generates for the configuration.
latest_revision(Option<ConfigurationRevision>)
:The latest revision of the configuration.
name(Option<String>)
:Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.
- On failure, responds with
SdkError<CreateConfigurationError>
Source§impl Client
impl Client
Constructs a fluent builder for the CreateTags
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the resource tag.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe key-value pair for the resource tag.
- On success, responds with
CreateTagsOutput
- On failure, responds with
SdkError<CreateTagsError>
Source§impl Client
impl Client
Sourcepub fn create_user(&self) -> CreateUserFluentBuilder
pub fn create_user(&self) -> CreateUserFluentBuilder
Constructs a fluent builder for the CreateUser
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
console_access(bool)
/set_console_access(Option<bool>)
:
required: falseEnables access to the ActiveMQ Web Console for the ActiveMQ user.
groups(impl Into<String>)
/set_groups(Option<Vec::<String>>)
:
required: falseThe list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
password(impl Into<String>)
/set_password(Option<String>)
:
required: trueRequired. The password of the user. This value must be at least 12 characters long, must contain at least 4 unique characters, and must not contain commas, colons, or equal signs (,:=).
username(impl Into<String>)
/set_username(Option<String>)
:
required: trueThe username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
replication_user(bool)
/set_replication_user(Option<bool>)
:
required: falseDefines if this user is intended for CRDR replication purposes.
- On success, responds with
CreateUserOutput
- On failure, responds with
SdkError<CreateUserError>
Source§impl Client
impl Client
Sourcepub fn delete_broker(&self) -> DeleteBrokerFluentBuilder
pub fn delete_broker(&self) -> DeleteBrokerFluentBuilder
Constructs a fluent builder for the DeleteBroker
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
- On success, responds with
DeleteBrokerOutput
with field(s):broker_id(Option<String>)
:The unique ID that Amazon MQ generates for the broker.
- On failure, responds with
SdkError<DeleteBrokerError>
Source§impl Client
impl Client
Sourcepub fn delete_configuration(&self) -> DeleteConfigurationFluentBuilder
pub fn delete_configuration(&self) -> DeleteConfigurationFluentBuilder
Constructs a fluent builder for the DeleteConfiguration
operation.
- The fluent builder is configurable:
configuration_id(impl Into<String>)
/set_configuration_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the configuration.
- On success, responds with
DeleteConfigurationOutput
with field(s):configuration_id(Option<String>)
:The unique ID that Amazon MQ generates for the configuration.
- On failure, responds with
SdkError<DeleteConfigurationError>
Source§impl Client
impl Client
Constructs a fluent builder for the DeleteTags
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the resource tag.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueAn array of tag keys to delete
- On success, responds with
DeleteTagsOutput
- On failure, responds with
SdkError<DeleteTagsError>
Source§impl Client
impl Client
Sourcepub fn delete_user(&self) -> DeleteUserFluentBuilder
pub fn delete_user(&self) -> DeleteUserFluentBuilder
Constructs a fluent builder for the DeleteUser
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
username(impl Into<String>)
/set_username(Option<String>)
:
required: trueThe username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
- On success, responds with
DeleteUserOutput
- On failure, responds with
SdkError<DeleteUserError>
Source§impl Client
impl Client
Sourcepub fn describe_broker(&self) -> DescribeBrokerFluentBuilder
pub fn describe_broker(&self) -> DescribeBrokerFluentBuilder
Constructs a fluent builder for the DescribeBroker
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
- On success, responds with
DescribeBrokerOutput
with field(s):actions_required(Option<Vec::<ActionRequired>>)
:Actions required for a broker.
authentication_strategy(Option<AuthenticationStrategy>)
:The authentication strategy used to secure the broker. The default is SIMPLE.
auto_minor_version_upgrade(Option<bool>)
:Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.
broker_arn(Option<String>)
:The broker’s Amazon Resource Name (ARN).
broker_id(Option<String>)
:The unique ID that Amazon MQ generates for the broker.
broker_instances(Option<Vec::<BrokerInstance>>)
:A list of information about allocated brokers.
broker_name(Option<String>)
:The broker’s name. This value must be unique in your Amazon Web Services account account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain white spaces, brackets, wildcard characters, or special characters.
broker_state(Option<BrokerState>)
:The broker’s status.
configurations(Option<Configurations>)
:The list of all revisions for the specified configuration.
created(Option<DateTime>)
:The time when the broker was created.
deployment_mode(Option<DeploymentMode>)
:The broker’s deployment mode.
encryption_options(Option<EncryptionOptions>)
:Encryption options for the broker.
engine_type(Option<EngineType>)
:The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.
engine_version(Option<String>)
:The broker engine version. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
host_instance_type(Option<String>)
:The broker’s instance type.
ldap_server_metadata(Option<LdapServerMetadataOutput>)
:The metadata of the LDAP server used to authenticate and authorize connections to the broker.
logs(Option<LogsSummary>)
:The list of information about logs currently enabled and pending to be deployed for the specified broker.
maintenance_window_start_time(Option<WeeklyStartTime>)
:The parameters that determine the WeeklyStartTime.
pending_authentication_strategy(Option<AuthenticationStrategy>)
:The authentication strategy that will be applied when the broker is rebooted. The default is SIMPLE.
pending_engine_version(Option<String>)
:The broker engine version to upgrade to. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
pending_host_instance_type(Option<String>)
:The broker’s host instance type to upgrade to. For a list of supported instance types, see Broker instance types.
pending_ldap_server_metadata(Option<LdapServerMetadataOutput>)
:The metadata of the LDAP server that will be used to authenticate and authorize connections to the broker after it is rebooted.
pending_security_groups(Option<Vec::<String>>)
:The list of pending security groups to authorize connections to brokers.
publicly_accessible(Option<bool>)
:Enables connections from applications outside of the VPC that hosts the broker’s subnets.
security_groups(Option<Vec::<String>>)
:The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.
storage_type(Option<BrokerStorageType>)
:The broker’s storage type.
subnet_ids(Option<Vec::<String>>)
:The list of groups that define which subnets and IP ranges the broker can use from different Availability Zones.
tags(Option<HashMap::<String, String>>)
:The list of all tags associated with this broker.
users(Option<Vec::<UserSummary>>)
:The list of all broker usernames for the specified broker.
data_replication_metadata(Option<DataReplicationMetadataOutput>)
:The replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR.
data_replication_mode(Option<DataReplicationMode>)
:Describes whether this broker is a part of a data replication pair.
pending_data_replication_metadata(Option<DataReplicationMetadataOutput>)
:The pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR.
pending_data_replication_mode(Option<DataReplicationMode>)
:Describes whether this broker will be a part of a data replication pair after reboot.
- On failure, responds with
SdkError<DescribeBrokerError>
Source§impl Client
impl Client
Sourcepub fn describe_broker_engine_types(
&self,
) -> DescribeBrokerEngineTypesFluentBuilder
pub fn describe_broker_engine_types( &self, ) -> DescribeBrokerEngineTypesFluentBuilder
Constructs a fluent builder for the DescribeBrokerEngineTypes
operation.
- The fluent builder is configurable:
engine_type(impl Into<String>)
/set_engine_type(Option<String>)
:
required: falseFilter response by engine type.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On success, responds with
DescribeBrokerEngineTypesOutput
with field(s):broker_engine_types(Option<Vec::<BrokerEngineType>>)
:List of available engine types and versions.
max_results(Option<i32>)
:Required. The maximum number of engine types that can be returned per page (20 by default). This value must be an integer from 5 to 100.
next_token(Option<String>)
:The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On failure, responds with
SdkError<DescribeBrokerEngineTypesError>
Source§impl Client
impl Client
Sourcepub fn describe_broker_instance_options(
&self,
) -> DescribeBrokerInstanceOptionsFluentBuilder
pub fn describe_broker_instance_options( &self, ) -> DescribeBrokerInstanceOptionsFluentBuilder
Constructs a fluent builder for the DescribeBrokerInstanceOptions
operation.
- The fluent builder is configurable:
engine_type(impl Into<String>)
/set_engine_type(Option<String>)
:
required: falseFilter response by engine type.
host_instance_type(impl Into<String>)
/set_host_instance_type(Option<String>)
:
required: falseFilter response by host instance type.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
storage_type(impl Into<String>)
/set_storage_type(Option<String>)
:
required: falseFilter response by storage type.
- On success, responds with
DescribeBrokerInstanceOptionsOutput
with field(s):broker_instance_options(Option<Vec::<BrokerInstanceOption>>)
:List of available broker instance options.
max_results(Option<i32>)
:Required. The maximum number of instance options that can be returned per page (20 by default). This value must be an integer from 5 to 100.
next_token(Option<String>)
:The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On failure, responds with
SdkError<DescribeBrokerInstanceOptionsError>
Source§impl Client
impl Client
Sourcepub fn describe_configuration(&self) -> DescribeConfigurationFluentBuilder
pub fn describe_configuration(&self) -> DescribeConfigurationFluentBuilder
Constructs a fluent builder for the DescribeConfiguration
operation.
- The fluent builder is configurable:
configuration_id(impl Into<String>)
/set_configuration_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the configuration.
- On success, responds with
DescribeConfigurationOutput
with field(s):arn(Option<String>)
:Required. The ARN of the configuration.
authentication_strategy(Option<AuthenticationStrategy>)
:Optional. The authentication strategy associated with the configuration. The default is SIMPLE.
created(Option<DateTime>)
:Required. The date and time of the configuration revision.
description(Option<String>)
:Required. The description of the configuration.
engine_type(Option<EngineType>)
:Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.
engine_version(Option<String>)
:The broker engine version. Defaults to the latest available version for the specified broker engine type. For a list of supported engine versions, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
id(Option<String>)
:Required. The unique ID that Amazon MQ generates for the configuration.
latest_revision(Option<ConfigurationRevision>)
:Required. The latest revision of the configuration.
name(Option<String>)
:Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.
tags(Option<HashMap::<String, String>>)
:The list of all tags associated with this configuration.
- On failure, responds with
SdkError<DescribeConfigurationError>
Source§impl Client
impl Client
Sourcepub fn describe_configuration_revision(
&self,
) -> DescribeConfigurationRevisionFluentBuilder
pub fn describe_configuration_revision( &self, ) -> DescribeConfigurationRevisionFluentBuilder
Constructs a fluent builder for the DescribeConfigurationRevision
operation.
- The fluent builder is configurable:
configuration_id(impl Into<String>)
/set_configuration_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the configuration.
configuration_revision(impl Into<String>)
/set_configuration_revision(Option<String>)
:
required: trueThe revision of the configuration.
- On success, responds with
DescribeConfigurationRevisionOutput
with field(s):configuration_id(Option<String>)
:Required. The unique ID that Amazon MQ generates for the configuration.
created(Option<DateTime>)
:Required. The date and time of the configuration.
data(Option<String>)
:Amazon MQ for ActiveMQ: the base64-encoded XML configuration. Amazon MQ for RabbitMQ: base64-encoded Cuttlefish.
description(Option<String>)
:The description of the configuration.
- On failure, responds with
SdkError<DescribeConfigurationRevisionError>
Source§impl Client
impl Client
Sourcepub fn describe_user(&self) -> DescribeUserFluentBuilder
pub fn describe_user(&self) -> DescribeUserFluentBuilder
Constructs a fluent builder for the DescribeUser
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
username(impl Into<String>)
/set_username(Option<String>)
:
required: trueThe username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
- On success, responds with
DescribeUserOutput
with field(s):broker_id(Option<String>)
:Required. The unique ID that Amazon MQ generates for the broker.
console_access(Option<bool>)
:Enables access to the the ActiveMQ Web Console for the ActiveMQ user.
groups(Option<Vec::<String>>)
:The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
pending(Option<UserPendingChanges>)
:The status of the changes pending for the ActiveMQ user.
username(Option<String>)
:Required. The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
replication_user(Option<bool>)
:Describes whether the user is intended for data replication
- On failure, responds with
SdkError<DescribeUserError>
Source§impl Client
impl Client
Sourcepub fn list_brokers(&self) -> ListBrokersFluentBuilder
pub fn list_brokers(&self) -> ListBrokersFluentBuilder
Constructs a fluent builder for the ListBrokers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On success, responds with
ListBrokersOutput
with field(s):broker_summaries(Option<Vec::<BrokerSummary>>)
:A list of information about all brokers.
next_token(Option<String>)
:The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On failure, responds with
SdkError<ListBrokersError>
Source§impl Client
impl Client
Sourcepub fn list_configuration_revisions(
&self,
) -> ListConfigurationRevisionsFluentBuilder
pub fn list_configuration_revisions( &self, ) -> ListConfigurationRevisionsFluentBuilder
Constructs a fluent builder for the ListConfigurationRevisions
operation.
- The fluent builder is configurable:
configuration_id(impl Into<String>)
/set_configuration_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the configuration.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On success, responds with
ListConfigurationRevisionsOutput
with field(s):configuration_id(Option<String>)
:The unique ID that Amazon MQ generates for the configuration.
max_results(Option<i32>)
:The maximum number of configuration revisions that can be returned per page (20 by default). This value must be an integer from 5 to 100.
next_token(Option<String>)
:The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
revisions(Option<Vec::<ConfigurationRevision>>)
:The list of all revisions for the specified configuration.
- On failure, responds with
SdkError<ListConfigurationRevisionsError>
Source§impl Client
impl Client
Sourcepub fn list_configurations(&self) -> ListConfigurationsFluentBuilder
pub fn list_configurations(&self) -> ListConfigurationsFluentBuilder
Constructs a fluent builder for the ListConfigurations
operation.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On success, responds with
ListConfigurationsOutput
with field(s):configurations(Option<Vec::<Configuration>>)
:The list of all revisions for the specified configuration.
max_results(Option<i32>)
:The maximum number of configurations that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.
next_token(Option<String>)
:The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On failure, responds with
SdkError<ListConfigurationsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTags
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the resource tag.
- On success, responds with
ListTagsOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The key-value pair for the resource tag.
- On failure, responds with
SdkError<ListTagsError>
Source§impl Client
impl Client
Sourcepub fn list_users(&self) -> ListUsersFluentBuilder
pub fn list_users(&self) -> ListUsersFluentBuilder
Constructs a fluent builder for the ListUsers
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
- On success, responds with
ListUsersOutput
with field(s):broker_id(Option<String>)
:Required. The unique ID that Amazon MQ generates for the broker.
max_results(Option<i32>)
:Required. The maximum number of ActiveMQ users that can be returned per page (20 by default). This value must be an integer from 5 to 100.
next_token(Option<String>)
:The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.
users(Option<Vec::<UserSummary>>)
:Required. The list of all ActiveMQ usernames for the specified broker. Does not apply to RabbitMQ brokers.
- On failure, responds with
SdkError<ListUsersError>
Source§impl Client
impl Client
Sourcepub fn promote(&self) -> PromoteFluentBuilder
pub fn promote(&self) -> PromoteFluentBuilder
Constructs a fluent builder for the Promote
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
mode(PromoteMode)
/set_mode(Option<PromoteMode>)
:
required: trueThe Promote mode requested. Note: Valid values for the parameter are SWITCHOVER, FAILOVER.
- On success, responds with
PromoteOutput
with field(s):broker_id(Option<String>)
:The unique ID that Amazon MQ generates for the broker.
- On failure, responds with
SdkError<PromoteError>
Source§impl Client
impl Client
Sourcepub fn reboot_broker(&self) -> RebootBrokerFluentBuilder
pub fn reboot_broker(&self) -> RebootBrokerFluentBuilder
Constructs a fluent builder for the RebootBroker
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
- On success, responds with
RebootBrokerOutput
- On failure, responds with
SdkError<RebootBrokerError>
Source§impl Client
impl Client
Sourcepub fn update_broker(&self) -> UpdateBrokerFluentBuilder
pub fn update_broker(&self) -> UpdateBrokerFluentBuilder
Constructs a fluent builder for the UpdateBroker
operation.
- The fluent builder is configurable:
authentication_strategy(AuthenticationStrategy)
/set_authentication_strategy(Option<AuthenticationStrategy>)
:
required: falseOptional. The authentication strategy used to secure the broker. The default is SIMPLE.
auto_minor_version_upgrade(bool)
/set_auto_minor_version_upgrade(Option<bool>)
:
required: falseEnables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.
Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
configuration(ConfigurationId)
/set_configuration(Option<ConfigurationId>)
:
required: falseA list of information about the configuration.
engine_version(impl Into<String>)
/set_engine_version(Option<String>)
:
required: falseThe broker engine version. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have autoMinorVersionUpgrade set to true for the broker.
host_instance_type(impl Into<String>)
/set_host_instance_type(Option<String>)
:
required: falseThe broker’s host instance type to upgrade to. For a list of supported instance types, see Broker instance types.
ldap_server_metadata(LdapServerMetadataInput)
/set_ldap_server_metadata(Option<LdapServerMetadataInput>)
:
required: falseOptional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.
logs(Logs)
/set_logs(Option<Logs>)
:
required: falseEnables Amazon CloudWatch logging for brokers.
maintenance_window_start_time(WeeklyStartTime)
/set_maintenance_window_start_time(Option<WeeklyStartTime>)
:
required: falseThe parameters that determine the WeeklyStartTime.
security_groups(impl Into<String>)
/set_security_groups(Option<Vec::<String>>)
:
required: falseThe list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.
data_replication_mode(DataReplicationMode)
/set_data_replication_mode(Option<DataReplicationMode>)
:
required: falseDefines whether this broker is a part of a data replication pair.
- On success, responds with
UpdateBrokerOutput
with field(s):authentication_strategy(Option<AuthenticationStrategy>)
:Optional. The authentication strategy used to secure the broker. The default is SIMPLE.
auto_minor_version_upgrade(Option<bool>)
:Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.
broker_id(Option<String>)
:Required. The unique ID that Amazon MQ generates for the broker.
configuration(Option<ConfigurationId>)
:The ID of the updated configuration.
engine_version(Option<String>)
:The broker engine version to upgrade to. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
host_instance_type(Option<String>)
:The broker’s host instance type to upgrade to. For a list of supported instance types, see Broker instance types.
ldap_server_metadata(Option<LdapServerMetadataOutput>)
:Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.
logs(Option<Logs>)
:The list of information about logs to be enabled for the specified broker.
maintenance_window_start_time(Option<WeeklyStartTime>)
:The parameters that determine the WeeklyStartTime.
security_groups(Option<Vec::<String>>)
:The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.
data_replication_metadata(Option<DataReplicationMetadataOutput>)
:The replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR.
data_replication_mode(Option<DataReplicationMode>)
:Describes whether this broker is a part of a data replication pair.
pending_data_replication_metadata(Option<DataReplicationMetadataOutput>)
:The pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR.
pending_data_replication_mode(Option<DataReplicationMode>)
:Describes whether this broker will be a part of a data replication pair after reboot.
- On failure, responds with
SdkError<UpdateBrokerError>
Source§impl Client
impl Client
Sourcepub fn update_configuration(&self) -> UpdateConfigurationFluentBuilder
pub fn update_configuration(&self) -> UpdateConfigurationFluentBuilder
Constructs a fluent builder for the UpdateConfiguration
operation.
- The fluent builder is configurable:
configuration_id(impl Into<String>)
/set_configuration_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the configuration.
data(impl Into<String>)
/set_data(Option<String>)
:
required: trueAmazon MQ for Active MQ: The base64-encoded XML configuration. Amazon MQ for RabbitMQ: the base64-encoded Cuttlefish configuration.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe description of the configuration.
- On success, responds with
UpdateConfigurationOutput
with field(s):arn(Option<String>)
:The Amazon Resource Name (ARN) of the configuration.
created(Option<DateTime>)
:Required. The date and time of the configuration.
id(Option<String>)
:The unique ID that Amazon MQ generates for the configuration.
latest_revision(Option<ConfigurationRevision>)
:The latest revision of the configuration.
name(Option<String>)
:The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.
warnings(Option<Vec::<SanitizationWarning>>)
:The list of the first 20 warnings about the configuration elements or attributes that were sanitized.
- On failure, responds with
SdkError<UpdateConfigurationError>
Source§impl Client
impl Client
Sourcepub fn update_user(&self) -> UpdateUserFluentBuilder
pub fn update_user(&self) -> UpdateUserFluentBuilder
Constructs a fluent builder for the UpdateUser
operation.
- The fluent builder is configurable:
broker_id(impl Into<String>)
/set_broker_id(Option<String>)
:
required: trueThe unique ID that Amazon MQ generates for the broker.
console_access(bool)
/set_console_access(Option<bool>)
:
required: falseEnables access to the the ActiveMQ Web Console for the ActiveMQ user.
groups(impl Into<String>)
/set_groups(Option<Vec::<String>>)
:
required: falseThe list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
password(impl Into<String>)
/set_password(Option<String>)
:
required: falseThe password of the user. This value must be at least 12 characters long, must contain at least 4 unique characters, and must not contain commas, colons, or equal signs (,:=).
username(impl Into<String>)
/set_username(Option<String>)
:
required: trueThe username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
replication_user(bool)
/set_replication_user(Option<bool>)
:
required: falseDefines whether the user is intended for data replication.
- On success, responds with
UpdateUserOutput
- On failure, responds with
SdkError<UpdateUserError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);