pub struct Client { /* private fields */ }Expand description
Client for Amazon DocumentDB Elastic Clusters
Client for invoking operations on Amazon DocumentDB Elastic Clusters. Each operation on Amazon DocumentDB Elastic Clusters 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_docdbelastic::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_docdbelastic::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 ApplyPendingMaintenanceAction operation has
a Client::apply_pending_maintenance_action, 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.apply_pending_maintenance_action()
.resource_arn("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 apply_pending_maintenance_action(
&self,
) -> ApplyPendingMaintenanceActionFluentBuilder
pub fn apply_pending_maintenance_action( &self, ) -> ApplyPendingMaintenanceActionFluentBuilder
Constructs a fluent builder for the ApplyPendingMaintenanceAction operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon DocumentDB Amazon Resource Name (ARN) of the resource to which the pending maintenance action applies.
apply_action(impl Into<String>)/set_apply_action(Option<String>):
required: trueThe pending maintenance action to apply to the resource.
Valid actions are:
-
ENGINE_UPDATE -
ENGINE_UPGRADE -
SECURITY_UPDATE -
OS_UPDATE -
MASTER_USER_PASSWORD_UPDATE
-
opt_in_type(OptInType)/set_opt_in_type(Option<OptInType>):
required: trueA value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type
IMMEDIATEcan’t be undone.apply_on(impl Into<String>)/set_apply_on(Option<String>):
required: falseA specific date to apply the pending maintenance action. Required if opt-in-type is
APPLY_ON. Format:yyyy/MM/dd HH:mm-yyyy/MM/dd HH:mm
- On success, responds with
ApplyPendingMaintenanceActionOutputwith field(s):resource_pending_maintenance_action(Option<ResourcePendingMaintenanceAction>):The output of the pending maintenance action being applied.
- On failure, responds with
SdkError<ApplyPendingMaintenanceActionError>
Source§impl Client
impl Client
Sourcepub fn copy_cluster_snapshot(&self) -> CopyClusterSnapshotFluentBuilder
pub fn copy_cluster_snapshot(&self) -> CopyClusterSnapshotFluentBuilder
Constructs a fluent builder for the CopyClusterSnapshot operation.
- The fluent builder is configurable:
snapshot_arn(impl Into<String>)/set_snapshot_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) identifier of the elastic cluster snapshot.
target_snapshot_name(impl Into<String>)/set_target_snapshot_name(Option<String>):
required: trueThe identifier of the new elastic cluster snapshot to create from the source cluster snapshot. This parameter is not case sensitive.
Constraints:
-
Must contain from 1 to 63 letters, numbers, or hyphens.
-
The first character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
Example:
elastic-cluster-snapshot-5-
kms_key_id(impl Into<String>)/set_kms_key_id(Option<String>):
required: falseThe Amazon Web Services KMS key ID for an encrypted elastic cluster snapshot. The Amazon Web Services KMS key ID is the Amazon Resource Name (ARN), Amazon Web Services KMS key identifier, or the Amazon Web Services KMS key alias for the Amazon Web Services KMS encryption key.
If you copy an encrypted elastic cluster snapshot from your Amazon Web Services account, you can specify a value for
KmsKeyIdto encrypt the copy with a new Amazon Web ServicesS KMS encryption key. If you don’t specify a value forKmsKeyId, then the copy of the elastic cluster snapshot is encrypted with the sameAWSKMS key as the source elastic cluster snapshot.To copy an encrypted elastic cluster snapshot to another Amazon Web Services region, set
KmsKeyIdto the Amazon Web Services KMS key ID that you want to use to encrypt the copy of the elastic cluster snapshot in the destination region. Amazon Web Services KMS encryption keys are specific to the Amazon Web Services region that they are created in, and you can’t use encryption keys from one Amazon Web Services region in another Amazon Web Services region.If you copy an unencrypted elastic cluster snapshot and specify a value for the
KmsKeyIdparameter, an error is returned.copy_tags(bool)/set_copy_tags(Option<bool>):
required: falseSet to
trueto copy all tags from the source cluster snapshot to the target elastic cluster snapshot. The default isfalse.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to be assigned to the elastic cluster snapshot.
- On success, responds with
CopyClusterSnapshotOutputwith field(s):snapshot(Option<ClusterSnapshot>):Returns information about a specific elastic cluster snapshot.
- On failure, responds with
SdkError<CopyClusterSnapshotError>
Source§impl Client
impl Client
Sourcepub fn create_cluster(&self) -> CreateClusterFluentBuilder
pub fn create_cluster(&self) -> CreateClusterFluentBuilder
Constructs a fluent builder for the CreateCluster operation.
- The fluent builder is configurable:
cluster_name(impl Into<String>)/set_cluster_name(Option<String>):
required: trueThe name of the new elastic cluster. This parameter is stored as a lowercase string.
Constraints:
-
Must contain from 1 to 63 letters, numbers, or hyphens.
-
The first character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
Example:
my-cluster-
auth_type(Auth)/set_auth_type(Option<Auth>):
required: trueThe authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are
PLAIN_TEXTorSECRET_ARN.admin_user_name(impl Into<String>)/set_admin_user_name(Option<String>):
required: trueThe name of the Amazon DocumentDB elastic clusters administrator.
Constraints:
-
Must be from 1 to 63 letters or numbers.
-
The first character must be a letter.
-
Cannot be a reserved word.
-
admin_user_password(impl Into<String>)/set_admin_user_password(Option<String>):
required: trueThe password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable ASCII characters.
Constraints:
-
Must contain from 8 to 100 characters.
-
Cannot contain a forward slash (/), double quote (“), or the “at” symbol (@).
-
shard_capacity(i32)/set_shard_capacity(Option<i32>):
required: trueThe number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.
shard_count(i32)/set_shard_count(Option<i32>):
required: trueThe number of shards assigned to the elastic cluster. Maximum is 32.
vpc_security_group_ids(impl Into<String>)/set_vpc_security_group_ids(Option<Vec::<String>>):
required: falseA list of EC2 VPC security groups to associate with the new elastic cluster.
subnet_ids(impl Into<String>)/set_subnet_ids(Option<Vec::<String>>):
required: falseThe Amazon EC2 subnet IDs for the new elastic cluster.
kms_key_id(impl Into<String>)/set_kms_key_id(Option<String>):
required: falseThe KMS key identifier to use to encrypt the new elastic cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.
If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseThe client token for the elastic cluster.
preferred_maintenance_window(impl Into<String>)/set_preferred_maintenance_window(Option<String>):
required: falseThe weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format:
ddd:hh24:mi-ddd:hh24:miDefault: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.
Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to be assigned to the new elastic cluster.
backup_retention_period(i32)/set_backup_retention_period(Option<i32>):
required: falseThe number of days for which automatic snapshots are retained.
preferred_backup_window(impl Into<String>)/set_preferred_backup_window(Option<String>):
required: falseThe daily time range during which automated backups are created if automated backups are enabled, as determined by the
backupRetentionPeriod.shard_instance_count(i32)/set_shard_instance_count(Option<i32>):
required: falseThe number of replica instances applying to all shards in the elastic cluster. A
shardInstanceCountvalue of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
- On success, responds with
CreateClusterOutputwith field(s):cluster(Option<Cluster>):The new elastic cluster that has been created.
- On failure, responds with
SdkError<CreateClusterError>
Source§impl Client
impl Client
Sourcepub fn create_cluster_snapshot(&self) -> CreateClusterSnapshotFluentBuilder
pub fn create_cluster_snapshot(&self) -> CreateClusterSnapshotFluentBuilder
Constructs a fluent builder for the CreateClusterSnapshot operation.
- The fluent builder is configurable:
cluster_arn(impl Into<String>)/set_cluster_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster of which you want to create a snapshot.
snapshot_name(impl Into<String>)/set_snapshot_name(Option<String>):
required: trueThe name of the new elastic cluster snapshot.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to be assigned to the new elastic cluster snapshot.
- On success, responds with
CreateClusterSnapshotOutputwith field(s):snapshot(Option<ClusterSnapshot>):Returns information about the new elastic cluster snapshot.
- On failure, responds with
SdkError<CreateClusterSnapshotError>
Source§impl Client
impl Client
Sourcepub fn delete_cluster(&self) -> DeleteClusterFluentBuilder
pub fn delete_cluster(&self) -> DeleteClusterFluentBuilder
Constructs a fluent builder for the DeleteCluster operation.
- The fluent builder is configurable:
cluster_arn(impl Into<String>)/set_cluster_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster that is to be deleted.
- On success, responds with
DeleteClusterOutputwith field(s):cluster(Option<Cluster>):Returns information about the newly deleted elastic cluster.
- On failure, responds with
SdkError<DeleteClusterError>
Source§impl Client
impl Client
Sourcepub fn delete_cluster_snapshot(&self) -> DeleteClusterSnapshotFluentBuilder
pub fn delete_cluster_snapshot(&self) -> DeleteClusterSnapshotFluentBuilder
Constructs a fluent builder for the DeleteClusterSnapshot operation.
- The fluent builder is configurable:
snapshot_arn(impl Into<String>)/set_snapshot_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster snapshot that is to be deleted.
- On success, responds with
DeleteClusterSnapshotOutputwith field(s):snapshot(Option<ClusterSnapshot>):Returns information about the newly deleted elastic cluster snapshot.
- On failure, responds with
SdkError<DeleteClusterSnapshotError>
Source§impl Client
impl Client
Sourcepub fn get_cluster(&self) -> GetClusterFluentBuilder
pub fn get_cluster(&self) -> GetClusterFluentBuilder
Constructs a fluent builder for the GetCluster operation.
- The fluent builder is configurable:
cluster_arn(impl Into<String>)/set_cluster_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster.
- On success, responds with
GetClusterOutputwith field(s):cluster(Option<Cluster>):Returns information about a specific elastic cluster.
- On failure, responds with
SdkError<GetClusterError>
Source§impl Client
impl Client
Sourcepub fn get_cluster_snapshot(&self) -> GetClusterSnapshotFluentBuilder
pub fn get_cluster_snapshot(&self) -> GetClusterSnapshotFluentBuilder
Constructs a fluent builder for the GetClusterSnapshot operation.
- The fluent builder is configurable:
snapshot_arn(impl Into<String>)/set_snapshot_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster snapshot.
- On success, responds with
GetClusterSnapshotOutputwith field(s):snapshot(Option<ClusterSnapshot>):Returns information about a specific elastic cluster snapshot.
- On failure, responds with
SdkError<GetClusterSnapshotError>
Source§impl Client
impl Client
Sourcepub fn get_pending_maintenance_action(
&self,
) -> GetPendingMaintenanceActionFluentBuilder
pub fn get_pending_maintenance_action( &self, ) -> GetPendingMaintenanceActionFluentBuilder
Constructs a fluent builder for the GetPendingMaintenanceAction operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueRetrieves pending maintenance actions for a specific Amazon Resource Name (ARN).
- On success, responds with
GetPendingMaintenanceActionOutputwith field(s):resource_pending_maintenance_action(Option<ResourcePendingMaintenanceAction>):Provides information about a pending maintenance action for a resource.
- On failure, responds with
SdkError<GetPendingMaintenanceActionError>
Source§impl Client
impl Client
Sourcepub fn list_cluster_snapshots(&self) -> ListClusterSnapshotsFluentBuilder
pub fn list_cluster_snapshots(&self) -> ListClusterSnapshotsFluentBuilder
Constructs a fluent builder for the ListClusterSnapshots operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
cluster_arn(impl Into<String>)/set_cluster_arn(Option<String>):
required: falseThe ARN identifier of the elastic cluster.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by
max-results.If there is no more data in the responce, the
nextTokenwill not be returned.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of elastic cluster snapshot results to receive in the response.
snapshot_type(impl Into<String>)/set_snapshot_type(Option<String>):
required: falseThe type of cluster snapshots to be returned. You can specify one of the following values:
-
automated- Return all cluster snapshots that Amazon DocumentDB has automatically created for your Amazon Web Services account. -
manual- Return all cluster snapshots that you have manually created for your Amazon Web Services account.
-
- On success, responds with
ListClusterSnapshotsOutputwith field(s):snapshots(Option<Vec::<ClusterSnapshotInList>>):A list of snapshots for a specified elastic cluster.
next_token(Option<String>):A pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by
max-results.If there is no more data in the responce, the
nextTokenwill not be returned.
- On failure, responds with
SdkError<ListClusterSnapshotsError>
Source§impl Client
impl Client
Sourcepub fn list_clusters(&self) -> ListClustersFluentBuilder
pub fn list_clusters(&self) -> ListClustersFluentBuilder
Constructs a fluent builder for the ListClusters operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by
max-results.If there is no more data in the responce, the
nextTokenwill not be returned.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of elastic cluster snapshot results to receive in the response.
- On success, responds with
ListClustersOutputwith field(s):clusters(Option<Vec::<ClusterInList>>):A list of Amazon DocumentDB elastic clusters.
next_token(Option<String>):A pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by
max-results.If there is no more data in the responce, the
nextTokenwill not be returned.
- On failure, responds with
SdkError<ListClustersError>
Source§impl Client
impl Client
Sourcepub fn list_pending_maintenance_actions(
&self,
) -> ListPendingMaintenanceActionsFluentBuilder
pub fn list_pending_maintenance_actions( &self, ) -> ListPendingMaintenanceActionsFluentBuilder
Constructs a fluent builder for the ListPendingMaintenanceActions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by
maxResults.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to include in the response. If more records exist than the specified
maxResultsvalue, a pagination token (marker) is included in the response so that the remaining results can be retrieved.
- On success, responds with
ListPendingMaintenanceActionsOutputwith field(s):resource_pending_maintenance_actions(Vec::<ResourcePendingMaintenanceAction>):Provides information about a pending maintenance action for a resource.
next_token(Option<String>):An optional pagination token provided by a previous request. If this parameter is displayed, the responses will include only records beyond the marker, up to the value specified by
maxResults.
- On failure, responds with
SdkError<ListPendingMaintenanceActionsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster resource.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>):The list of tags for the specified elastic cluster resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn restore_cluster_from_snapshot(
&self,
) -> RestoreClusterFromSnapshotFluentBuilder
pub fn restore_cluster_from_snapshot( &self, ) -> RestoreClusterFromSnapshotFluentBuilder
Constructs a fluent builder for the RestoreClusterFromSnapshot operation.
- The fluent builder is configurable:
cluster_name(impl Into<String>)/set_cluster_name(Option<String>):
required: trueThe name of the elastic cluster.
snapshot_arn(impl Into<String>)/set_snapshot_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster snapshot.
vpc_security_group_ids(impl Into<String>)/set_vpc_security_group_ids(Option<Vec::<String>>):
required: falseA list of EC2 VPC security groups to associate with the elastic cluster.
subnet_ids(impl Into<String>)/set_subnet_ids(Option<Vec::<String>>):
required: falseThe Amazon EC2 subnet IDs for the elastic cluster.
kms_key_id(impl Into<String>)/set_kms_key_id(Option<String>):
required: falseThe KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.
If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA list of the tag names to be assigned to the restored elastic cluster, in the form of an array of key-value pairs in which the key is the tag name and the value is the key value.
shard_capacity(i32)/set_shard_capacity(Option<i32>):
required: falseThe capacity of each shard in the new restored elastic cluster.
shard_instance_count(i32)/set_shard_instance_count(Option<i32>):
required: falseThe number of replica instances applying to all shards in the elastic cluster. A
shardInstanceCountvalue of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
- On success, responds with
RestoreClusterFromSnapshotOutputwith field(s):cluster(Option<Cluster>):Returns information about a the restored elastic cluster.
- On failure, responds with
SdkError<RestoreClusterFromSnapshotError>
Source§impl Client
impl Client
Sourcepub fn start_cluster(&self) -> StartClusterFluentBuilder
pub fn start_cluster(&self) -> StartClusterFluentBuilder
Constructs a fluent builder for the StartCluster operation.
- The fluent builder is configurable:
cluster_arn(impl Into<String>)/set_cluster_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster.
- On success, responds with
StartClusterOutputwith field(s):cluster(Option<Cluster>):Returns information about a specific elastic cluster.
- On failure, responds with
SdkError<StartClusterError>
Source§impl Client
impl Client
Sourcepub fn stop_cluster(&self) -> StopClusterFluentBuilder
pub fn stop_cluster(&self) -> StopClusterFluentBuilder
Constructs a fluent builder for the StopCluster operation.
- The fluent builder is configurable:
cluster_arn(impl Into<String>)/set_cluster_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster.
- On success, responds with
StopClusterOutputwith field(s):cluster(Option<Cluster>):Returns information about a specific elastic cluster.
- On failure, responds with
SdkError<StopClusterError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster resource.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueThe tags that are assigned to the elastic cluster resource.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster resource.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe tag keys to be removed from the elastic cluster resource.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_cluster(&self) -> UpdateClusterFluentBuilder
pub fn update_cluster(&self) -> UpdateClusterFluentBuilder
Constructs a fluent builder for the UpdateCluster operation.
- The fluent builder is configurable:
cluster_arn(impl Into<String>)/set_cluster_arn(Option<String>):
required: trueThe ARN identifier of the elastic cluster.
auth_type(Auth)/set_auth_type(Option<Auth>):
required: falseThe authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are
PLAIN_TEXTorSECRET_ARN.shard_capacity(i32)/set_shard_capacity(Option<i32>):
required: falseThe number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.
shard_count(i32)/set_shard_count(Option<i32>):
required: falseThe number of shards assigned to the elastic cluster. Maximum is 32.
vpc_security_group_ids(impl Into<String>)/set_vpc_security_group_ids(Option<Vec::<String>>):
required: falseA list of EC2 VPC security groups to associate with the elastic cluster.
subnet_ids(impl Into<String>)/set_subnet_ids(Option<Vec::<String>>):
required: falseThe Amazon EC2 subnet IDs for the elastic cluster.
admin_user_password(impl Into<String>)/set_admin_user_password(Option<String>):
required: falseThe password associated with the elastic cluster administrator. This password can contain any printable ASCII character except forward slash (/), double quote (“), or the “at” symbol (@).
Constraints: Must contain from 8 to 100 characters.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseThe client token for the elastic cluster.
preferred_maintenance_window(impl Into<String>)/set_preferred_maintenance_window(Option<String>):
required: falseThe weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format:
ddd:hh24:mi-ddd:hh24:miDefault: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.
Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
backup_retention_period(i32)/set_backup_retention_period(Option<i32>):
required: falseThe number of days for which automatic snapshots are retained.
preferred_backup_window(impl Into<String>)/set_preferred_backup_window(Option<String>):
required: falseThe daily time range during which automated backups are created if automated backups are enabled, as determined by the
backupRetentionPeriod.shard_instance_count(i32)/set_shard_instance_count(Option<i32>):
required: falseThe number of replica instances applying to all shards in the elastic cluster. A
shardInstanceCountvalue of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
- On success, responds with
UpdateClusterOutputwith field(s):cluster(Option<Cluster>):Returns information about the updated elastic cluster.
- On failure, responds with
SdkError<UpdateClusterError>
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_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis 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_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo 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);