Skip to content

DocDBElasticClient#

Index > DocDBElastic > DocDBElasticClient

Auto-generated documentation for DocDBElastic type annotations stubs module types-aiobotocore-docdb-elastic.

DocDBElasticClient#

Type annotations and code completion for session.create_client("docdb-elastic") boto3 documentation

DocDBElasticClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_docdb_elastic.client import DocDBElasticClient

session = get_session()
async with session.create_client("docdb-elastic") as client:
    client: DocDBElasticClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("docdb-elastic").exceptions structure.

DocDBElasticClient.exceptions usage example

async with session.create_client("docdb-elastic") as client:
    try:
        do_something(client)
    except (
            client.AccessDeniedException,
        client.ClientError,
        client.ConflictException,
        client.InternalServerException,
        client.ResourceNotFoundException,
        client.ServiceQuotaExceededException,
        client.ThrottlingException,
        client.ValidationException,
    ) as e:
        print(e)
DocDBElasticClient usage type checking example

from types_aiobotocore_docdb_elastic.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for session.create_client("docdb-elastic").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for session.create_client("docdb-elastic").close method. boto3 documentation

# close method definition

await def close(
    self,
) -> None:
    ...

create_cluster#

Creates a new Elastic DocumentDB cluster and returns its Cluster structure.

Type annotations and code completion for session.create_client("docdb-elastic").create_cluster method. boto3 documentation

# create_cluster method definition

await def create_cluster(
    self,
    *,
    adminUserName: str,
    adminUserPassword: str,
    authType: AuthType,  # (1)
    clusterName: str,
    shardCapacity: int,
    shardCount: int,
    clientToken: str = ...,
    kmsKeyId: str = ...,
    preferredMaintenanceWindow: str = ...,
    subnetIds: Sequence[str] = ...,
    tags: Mapping[str, str] = ...,
    vpcSecurityGroupIds: Sequence[str] = ...,
) -> CreateClusterOutputTypeDef:  # (2)
    ...
  1. See AuthType
  2. See CreateClusterOutputTypeDef
# create_cluster method usage example with argument unpacking

kwargs: CreateClusterInputRequestTypeDef = {  # (1)
    "adminUserName": ...,
    "adminUserPassword": ...,
    "authType": ...,
    "clusterName": ...,
    "shardCapacity": ...,
    "shardCount": ...,
}

parent.create_cluster(**kwargs)
  1. See CreateClusterInputRequestTypeDef

create_cluster_snapshot#

Creates a snapshot of a cluster.

Type annotations and code completion for session.create_client("docdb-elastic").create_cluster_snapshot method. boto3 documentation

# create_cluster_snapshot method definition

await def create_cluster_snapshot(
    self,
    *,
    clusterArn: str,
    snapshotName: str,
    tags: Mapping[str, str] = ...,
) -> CreateClusterSnapshotOutputTypeDef:  # (1)
    ...
  1. See CreateClusterSnapshotOutputTypeDef
# create_cluster_snapshot method usage example with argument unpacking

kwargs: CreateClusterSnapshotInputRequestTypeDef = {  # (1)
    "clusterArn": ...,
    "snapshotName": ...,
}

parent.create_cluster_snapshot(**kwargs)
  1. See CreateClusterSnapshotInputRequestTypeDef

delete_cluster#

Delete a Elastic DocumentDB cluster.

Type annotations and code completion for session.create_client("docdb-elastic").delete_cluster method. boto3 documentation

# delete_cluster method definition

await def delete_cluster(
    self,
    *,
    clusterArn: str,
) -> DeleteClusterOutputTypeDef:  # (1)
    ...
  1. See DeleteClusterOutputTypeDef
# delete_cluster method usage example with argument unpacking

kwargs: DeleteClusterInputRequestTypeDef = {  # (1)
    "clusterArn": ...,
}

parent.delete_cluster(**kwargs)
  1. See DeleteClusterInputRequestTypeDef

delete_cluster_snapshot#

Delete a Elastic DocumentDB snapshot.

Type annotations and code completion for session.create_client("docdb-elastic").delete_cluster_snapshot method. boto3 documentation

# delete_cluster_snapshot method definition

await def delete_cluster_snapshot(
    self,
    *,
    snapshotArn: str,
) -> DeleteClusterSnapshotOutputTypeDef:  # (1)
    ...
  1. See DeleteClusterSnapshotOutputTypeDef
# delete_cluster_snapshot method usage example with argument unpacking

kwargs: DeleteClusterSnapshotInputRequestTypeDef = {  # (1)
    "snapshotArn": ...,
}

parent.delete_cluster_snapshot(**kwargs)
  1. See DeleteClusterSnapshotInputRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.create_client("docdb-elastic").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_cluster#

Returns information about a specific Elastic DocumentDB cluster.

Type annotations and code completion for session.create_client("docdb-elastic").get_cluster method. boto3 documentation

# get_cluster method definition

await def get_cluster(
    self,
    *,
    clusterArn: str,
) -> GetClusterOutputTypeDef:  # (1)
    ...
  1. See GetClusterOutputTypeDef
# get_cluster method usage example with argument unpacking

kwargs: GetClusterInputRequestTypeDef = {  # (1)
    "clusterArn": ...,
}

parent.get_cluster(**kwargs)
  1. See GetClusterInputRequestTypeDef

get_cluster_snapshot#

Returns information about a specific Elastic DocumentDB snapshot See also: AWS API Documentation.

Type annotations and code completion for session.create_client("docdb-elastic").get_cluster_snapshot method. boto3 documentation

# get_cluster_snapshot method definition

await def get_cluster_snapshot(
    self,
    *,
    snapshotArn: str,
) -> GetClusterSnapshotOutputTypeDef:  # (1)
    ...
  1. See GetClusterSnapshotOutputTypeDef
# get_cluster_snapshot method usage example with argument unpacking

kwargs: GetClusterSnapshotInputRequestTypeDef = {  # (1)
    "snapshotArn": ...,
}

parent.get_cluster_snapshot(**kwargs)
  1. See GetClusterSnapshotInputRequestTypeDef

list_cluster_snapshots#

Returns information about Elastic DocumentDB snapshots for a specified cluster.

Type annotations and code completion for session.create_client("docdb-elastic").list_cluster_snapshots method. boto3 documentation

# list_cluster_snapshots method definition

await def list_cluster_snapshots(
    self,
    *,
    clusterArn: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListClusterSnapshotsOutputTypeDef:  # (1)
    ...
  1. See ListClusterSnapshotsOutputTypeDef
# list_cluster_snapshots method usage example with argument unpacking

kwargs: ListClusterSnapshotsInputRequestTypeDef = {  # (1)
    "clusterArn": ...,
}

parent.list_cluster_snapshots(**kwargs)
  1. See ListClusterSnapshotsInputRequestTypeDef

list_clusters#

Returns information about provisioned Elastic DocumentDB clusters.

Type annotations and code completion for session.create_client("docdb-elastic").list_clusters method. boto3 documentation

# list_clusters method definition

await def list_clusters(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListClustersOutputTypeDef:  # (1)
    ...
  1. See ListClustersOutputTypeDef
# list_clusters method usage example with argument unpacking

kwargs: ListClustersInputRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_clusters(**kwargs)
  1. See ListClustersInputRequestTypeDef

list_tags_for_resource#

Lists all tags on a Elastic DocumentDB resource See also: AWS API Documentation.

Type annotations and code completion for session.create_client("docdb-elastic").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

await def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

restore_cluster_from_snapshot#

Restores a Elastic DocumentDB cluster from a snapshot.

Type annotations and code completion for session.create_client("docdb-elastic").restore_cluster_from_snapshot method. boto3 documentation

# restore_cluster_from_snapshot method definition

await def restore_cluster_from_snapshot(
    self,
    *,
    clusterName: str,
    snapshotArn: str,
    kmsKeyId: str = ...,
    subnetIds: Sequence[str] = ...,
    tags: Mapping[str, str] = ...,
    vpcSecurityGroupIds: Sequence[str] = ...,
) -> RestoreClusterFromSnapshotOutputTypeDef:  # (1)
    ...
  1. See RestoreClusterFromSnapshotOutputTypeDef
# restore_cluster_from_snapshot method usage example with argument unpacking

kwargs: RestoreClusterFromSnapshotInputRequestTypeDef = {  # (1)
    "clusterName": ...,
    "snapshotArn": ...,
}

parent.restore_cluster_from_snapshot(**kwargs)
  1. See RestoreClusterFromSnapshotInputRequestTypeDef

tag_resource#

Adds metadata tags to a Elastic DocumentDB resource See also: AWS API Documentation.

Type annotations and code completion for session.create_client("docdb-elastic").tag_resource method. boto3 documentation

# tag_resource method definition

await def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes metadata tags to a Elastic DocumentDB resource See also: AWS API Documentation.

Type annotations and code completion for session.create_client("docdb-elastic").untag_resource method. boto3 documentation

# untag_resource method definition

await def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_cluster#

Modifies a Elastic DocumentDB cluster.

Type annotations and code completion for session.create_client("docdb-elastic").update_cluster method. boto3 documentation

# update_cluster method definition

await def update_cluster(
    self,
    *,
    clusterArn: str,
    adminUserPassword: str = ...,
    authType: AuthType = ...,  # (1)
    clientToken: str = ...,
    preferredMaintenanceWindow: str = ...,
    shardCapacity: int = ...,
    shardCount: int = ...,
    subnetIds: Sequence[str] = ...,
    vpcSecurityGroupIds: Sequence[str] = ...,
) -> UpdateClusterOutputTypeDef:  # (2)
    ...
  1. See AuthType
  2. See UpdateClusterOutputTypeDef
# update_cluster method usage example with argument unpacking

kwargs: UpdateClusterInputRequestTypeDef = {  # (1)
    "clusterArn": ...,
}

parent.update_cluster(**kwargs)
  1. See UpdateClusterInputRequestTypeDef

__aenter__#

Type annotations and code completion for session.create_client("docdb-elastic").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> DocDBElasticClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("docdb-elastic").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator#

Type annotations and code completion for session.create_client("docdb-elastic").get_paginator method with overloads.