Struct aws_sdk_docdb::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for Amazon DocumentDB with MongoDB compatibility

Client for invoking operations on Amazon DocumentDB with MongoDB compatibility. Each operation on Amazon DocumentDB with MongoDB compatibility is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_docdb::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_docdb::config::Builder::from(&shared_config)
  .retry_config(RetryConfig::disabled())
  .build();
let client = aws_sdk_docdb::Client::from_conf(config);

Implementations§

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the AddSourceIdentifierToSubscription operation.

Constructs a fluent builder for the AddTagsToResource operation.

Constructs a fluent builder for the ApplyPendingMaintenanceAction operation.

Constructs a fluent builder for the CopyDBClusterParameterGroup operation.

Constructs a fluent builder for the CopyDBClusterSnapshot operation.

  • The fluent builder is configurable:
    • source_db_cluster_snapshot_identifier(impl Into<String>) / set_source_db_cluster_snapshot_identifier(Option<String>):

      The identifier of the cluster snapshot to copy. This parameter is not case sensitive.

      Constraints:

      • Must specify a valid system snapshot in the available state.

      • If the source snapshot is in the same Amazon Web Services Region as the copy, specify a valid snapshot identifier.

      • If the source snapshot is in a different Amazon Web Services Region than the copy, specify a valid cluster snapshot ARN.

      Example: my-cluster-snapshot1

    • target_db_cluster_snapshot_identifier(impl Into<String>) / set_target_db_cluster_snapshot_identifier(Option<String>):

      The identifier of the new 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: my-cluster-snapshot2

    • kms_key_id(impl Into<String>) / set_kms_key_id(Option<String>):

      The KMS key ID for an encrypted cluster snapshot. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.

      If you copy an encrypted cluster snapshot from your Amazon Web Services account, you can specify a value for KmsKeyId to encrypt the copy with a new KMS encryption key. If you don’t specify a value for KmsKeyId, then the copy of the cluster snapshot is encrypted with the same KMS key as the source cluster snapshot.

      If you copy an encrypted cluster snapshot that is shared from another Amazon Web Services account, then you must specify a value for KmsKeyId.

      To copy an encrypted cluster snapshot to another Amazon Web Services Region, set KmsKeyId to the KMS key ID that you want to use to encrypt the copy of the cluster snapshot in the destination Region. 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 cluster snapshot and specify a value for the KmsKeyId parameter, an error is returned.

    • pre_signed_url(impl Into<String>) / set_pre_signed_url(Option<String>):

      The URL that contains a Signature Version 4 signed request for theCopyDBClusterSnapshot API action in the Amazon Web Services Region that contains the source cluster snapshot to copy. You must use the PreSignedUrl parameter when copying a cluster snapshot from another Amazon Web Services Region.

      If you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion (or –source-region for the CLI) instead of specifying PreSignedUrl manually. Specifying SourceRegion autogenerates a pre-signed URL that is a valid request for the operation that can be executed in the source Amazon Web Services Region.

      The presigned URL must be a valid request for the CopyDBClusterSnapshot API action that can be executed in the source Amazon Web Services Region that contains the cluster snapshot to be copied. The presigned URL request must contain the following parameter values:

      • SourceRegion - The ID of the region that contains the snapshot to be copied.

      • SourceDBClusterSnapshotIdentifier - The identifier for the the encrypted cluster snapshot to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source Amazon Web Services Region. For example, if you are copying an encrypted cluster snapshot from the us-east-1 Amazon Web Services Region, then your SourceDBClusterSnapshotIdentifier looks something like the following: arn:aws:rds:us-east-1:12345678012:sample-cluster:sample-cluster-snapshot.

      • TargetDBClusterSnapshotIdentifier - The identifier for the new cluster snapshot to be created. This parameter isn’t case sensitive.

    • copy_tags(bool) / set_copy_tags(Option<bool>):

      Set to true to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwise false. The default is false.

    • tags(Vec<Tag>) / set_tags(Option<Vec<Tag>>):

      The tags to be assigned to the cluster snapshot.

  • On success, responds with CopyDbClusterSnapshotOutput with field(s):
  • On failure, responds with SdkError<CopyDBClusterSnapshotError>

Constructs a fluent builder for the CreateDBCluster operation.

Constructs a fluent builder for the CreateDBClusterParameterGroup operation.

Constructs a fluent builder for the CreateDBClusterSnapshot operation.

Constructs a fluent builder for the CreateDBInstance operation.

Constructs a fluent builder for the CreateDBSubnetGroup operation.

Constructs a fluent builder for the CreateEventSubscription operation.

Constructs a fluent builder for the CreateGlobalCluster operation.

Constructs a fluent builder for the DeleteDBCluster operation.

Constructs a fluent builder for the DeleteDBClusterParameterGroup operation.

Constructs a fluent builder for the DeleteDBClusterSnapshot operation.

Constructs a fluent builder for the DeleteDBInstance operation.

Constructs a fluent builder for the DeleteDBSubnetGroup operation.

Constructs a fluent builder for the DeleteEventSubscription operation.

Constructs a fluent builder for the DeleteGlobalCluster operation.

Constructs a fluent builder for the DescribeCertificates operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeDBClusterParameterGroups operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeDBClusterParameters operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeDBClusters operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeDBClusterSnapshotAttributes operation.

Constructs a fluent builder for the DescribeDBClusterSnapshots operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • db_cluster_identifier(impl Into<String>) / set_db_cluster_identifier(Option<String>):

      The ID of the cluster to retrieve the list of cluster snapshots for. This parameter can’t be used with the DBClusterSnapshotIdentifier parameter. This parameter is not case sensitive.

      Constraints:

      • If provided, must match the identifier of an existing DBCluster.

    • db_cluster_snapshot_identifier(impl Into<String>) / set_db_cluster_snapshot_identifier(Option<String>):

      A specific cluster snapshot identifier to describe. This parameter can’t be used with the DBClusterIdentifier parameter. This value is stored as a lowercase string.

      Constraints:

      • If provided, must match the identifier of an existing DBClusterSnapshot.

      • If this identifier is for an automated snapshot, the SnapshotType parameter must also be specified.

    • snapshot_type(impl Into<String>) / set_snapshot_type(Option<String>):

      The 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.

      • shared - Return all manual cluster snapshots that have been shared to your Amazon Web Services account.

      • public - Return all cluster snapshots that have been marked as public.

      If you don’t specify a SnapshotType value, then both automated and manual cluster snapshots are returned. You can include shared cluster snapshots with these results by setting the IncludeShared parameter to true. You can include public cluster snapshots with these results by setting theIncludePublic parameter to true.

      The IncludeShared and IncludePublic parameters don’t apply for SnapshotType values of manual or automated. The IncludePublic parameter doesn’t apply when SnapshotType is set to shared. The IncludeShared parameter doesn’t apply when SnapshotType is set to public.

    • filters(Vec<Filter>) / set_filters(Option<Vec<Filter>>):

      This parameter is not currently supported.

    • max_records(i32) / set_max_records(Option<i32>):

      The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token (marker) is included in the response so that the remaining results can be retrieved.

      Default: 100

      Constraints: Minimum 20, maximum 100.

    • marker(impl Into<String>) / set_marker(Option<String>):

      An 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 MaxRecords.

    • include_shared(bool) / set_include_shared(bool):

      Set to true to include shared manual cluster snapshots from other Amazon Web Services accounts that this Amazon Web Services account has been given permission to copy or restore, and otherwise false. The default is false.

    • include_public(bool) / set_include_public(bool):

      Set to true to include manual cluster snapshots that are public and can be copied or restored by any Amazon Web Services account, and otherwise false. The default is false.

  • On success, responds with DescribeDbClusterSnapshotsOutput with field(s):
  • On failure, responds with SdkError<DescribeDBClusterSnapshotsError>

Constructs a fluent builder for the DescribeDBEngineVersions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeDBInstances operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • db_instance_identifier(impl Into<String>) / set_db_instance_identifier(Option<String>):

      The user-provided instance identifier. If this parameter is specified, information from only the specific instance is returned. This parameter isn’t case sensitive.

      Constraints:

      • If provided, must match the identifier of an existing DBInstance.

    • filters(Vec<Filter>) / set_filters(Option<Vec<Filter>>):

      A filter that specifies one or more instances to describe.

      Supported filters:

      • db-cluster-id - Accepts cluster identifiers and cluster Amazon Resource Names (ARNs). The results list includes only the information about the instances that are associated with the clusters that are identified by these ARNs.

      • db-instance-id - Accepts instance identifiers and instance ARNs. The results list includes only the information about the instances that are identified by these ARNs.

    • max_records(i32) / set_max_records(Option<i32>):

      The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token (marker) is included in the response so that the remaining results can be retrieved.

      Default: 100

      Constraints: Minimum 20, maximum 100.

    • marker(impl Into<String>) / set_marker(Option<String>):

      An 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 MaxRecords.

  • On success, responds with DescribeDbInstancesOutput with field(s):
    • marker(Option<String>):

      An 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 MaxRecords.

    • db_instances(Option<Vec<DbInstance>>):

      Detailed information about one or more instances.

  • On failure, responds with SdkError<DescribeDBInstancesError>

Constructs a fluent builder for the DescribeDBSubnetGroups operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeEngineDefaultClusterParameters operation.

Constructs a fluent builder for the DescribeEventCategories operation.

Constructs a fluent builder for the DescribeEvents operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeEventSubscriptions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeGlobalClusters operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribeOrderableDBInstanceOptions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the DescribePendingMaintenanceActions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the FailoverDBCluster operation.

Constructs a fluent builder for the ListTagsForResource operation.

Constructs a fluent builder for the ModifyDBCluster operation.

Constructs a fluent builder for the ModifyDBClusterParameterGroup operation.

Constructs a fluent builder for the ModifyDBClusterSnapshotAttribute operation.

Constructs a fluent builder for the ModifyDBInstance operation.

Constructs a fluent builder for the ModifyDBSubnetGroup operation.

Constructs a fluent builder for the ModifyEventSubscription operation.

Constructs a fluent builder for the ModifyGlobalCluster operation.

Constructs a fluent builder for the RebootDBInstance operation.

Constructs a fluent builder for the RemoveFromGlobalCluster operation.

Constructs a fluent builder for the RemoveSourceIdentifierFromSubscription operation.

Constructs a fluent builder for the RemoveTagsFromResource operation.

Constructs a fluent builder for the ResetDBClusterParameterGroup operation.

Constructs a fluent builder for the RestoreDBClusterFromSnapshot operation.

Constructs a fluent builder for the RestoreDBClusterToPointInTime operation.

Constructs a fluent builder for the StartDBCluster operation.

Constructs a fluent builder for the StopDBCluster operation.

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 the sleep_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 the http_connector on the Config passed into this function to fix it.

Creates a new client from the service Config.

Panics
  • This method will panic if the conf is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the conf is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more