DocDBElastic

Client

class DocDBElastic.Client

A low-level client representing Amazon DocumentDB Elastic Clusters (DocDB Elastic)

The new Amazon Elastic DocumentDB service endpoint.

client = session.create_client('docdb-elastic')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
close()

Closes underlying endpoint connections.

create_cluster(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.create_cluster(
    adminUserName='string',
    adminUserPassword='string',
    authType='PLAIN_TEXT'|'SECRET_ARN',
    clientToken='string',
    clusterName='string',
    kmsKeyId='string',
    preferredMaintenanceWindow='string',
    shardCapacity=123,
    shardCount=123,
    subnetIds=[
        'string',
    ],
    tags={
        'string': 'string'
    },
    vpcSecurityGroupIds=[
        'string',
    ]
)
Parameters
  • adminUserName (string) --

    [REQUIRED]

    The name of the Elastic DocumentDB cluster administrator.

    Constraints :
    • Must be from 1 to 63 letters or numbers.
    • The first character must be a letter.
    • Cannot be a reserved word.
  • adminUserPassword (string) --

    [REQUIRED]

    The password for the Elastic DocumentDB cluster administrator and 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 (@).
  • authType (string) --

    [REQUIRED]

    The authentication type for the Elastic DocumentDB cluster.

  • clientToken (string) --

    The client token for the Elastic DocumentDB cluster.

    This field is autopopulated if not provided.

  • clusterName (string) --

    [REQUIRED]

    The name of the new Elastic DocumentDB 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
  • kmsKeyId (string) --

    The KMS key identifier to use to encrypt the new Elastic DocumentDB 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, Elastic DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

  • preferredMaintenanceWindow (string) --

    The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

    Format : ddd:hh24:mi-ddd:hh24:mi

    Default : 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.

  • shardCapacity (integer) --

    [REQUIRED]

    The capacity of each shard in the new Elastic DocumentDB cluster.

  • shardCount (integer) --

    [REQUIRED]

    The number of shards to create in the new Elastic DocumentDB cluster.

  • subnetIds (list) --

    The Amazon EC2 subnet IDs for the new Elastic DocumentDB cluster.

    • (string) --
  • tags (dict) --

    The tags to be assigned to the new Elastic DocumentDB cluster.

    • (string) --
      • (string) --
  • vpcSecurityGroupIds (list) --

    A list of EC2 VPC security groups to associate with the new Elastic DocumentDB cluster.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'cluster': {
        'adminUserName': 'string',
        'authType': 'PLAIN_TEXT'|'SECRET_ARN',
        'clusterArn': 'string',
        'clusterEndpoint': 'string',
        'clusterName': 'string',
        'createTime': 'string',
        'kmsKeyId': 'string',
        'preferredMaintenanceWindow': 'string',
        'shardCapacity': 123,
        'shardCount': 123,
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --

    • cluster (dict) --

      The new Elastic DocumentDB cluster that has been created.

      • adminUserName (string) --

        The name of the Elastic DocumentDB cluster administrator.

      • authType (string) --

        The authentication type for the Elastic DocumentDB cluster.

      • clusterArn (string) --

        The arn of the Elastic DocumentDB cluster.

      • clusterEndpoint (string) --

        The URL used to connect to the Elastic DocumentDB cluster.

      • clusterName (string) --

        The name of the Elastic DocumentDB cluster.

      • createTime (string) --

        The time when the Elastic DocumentDB cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) --

        The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.

      • preferredMaintenanceWindow (string) --

        The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

        Format : ddd:hh24:mi-ddd:hh24:mi

      • shardCapacity (integer) --

        The capacity of each shard in the Elastic DocumentDB cluster.

      • shardCount (integer) --

        The number of shards in the Elastic DocumentDB cluster.

      • status (string) --

        The status of the Elastic DocumentDB cluster.

      • subnetIds (list) --

        The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.

        • (string) --
      • vpcSecurityGroupIds (list) --

        A list of EC2 VPC security groups associated with this cluster.

        • (string) --

Exceptions

create_cluster_snapshot(**kwargs)

Creates a snapshot of a cluster.

See also: AWS API Documentation

Request Syntax

response = client.create_cluster_snapshot(
    clusterArn='string',
    snapshotName='string',
    tags={
        'string': 'string'
    }
)
Parameters
  • clusterArn (string) --

    [REQUIRED]

    The arn of the Elastic DocumentDB cluster that the snapshot will be taken from.

  • snapshotName (string) --

    [REQUIRED]

    The name of the Elastic DocumentDB snapshot.

  • tags (dict) --

    The tags to be assigned to the new Elastic DocumentDB snapshot.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{
    'snapshot': {
        'adminUserName': 'string',
        'clusterArn': 'string',
        'clusterCreationTime': 'string',
        'kmsKeyId': 'string',
        'snapshotArn': 'string',
        'snapshotCreationTime': 'string',
        'snapshotName': 'string',
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --

    • snapshot (dict) --

      Returns information about the new Elastic DocumentDB snapshot.

      • adminUserName (string) --

        The name of the Elastic DocumentDB cluster administrator.

      • clusterArn (string) --

        The arn of the Elastic DocumentDB cluster.

      • clusterCreationTime (string) --

        The time when the Elastic DocumentDB cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) --

        The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.

      • snapshotArn (string) --

        The arn of the Elastic DocumentDB snapshot

      • snapshotCreationTime (string) --

        The time when the Elastic DocumentDB snapshot was created in Universal Coordinated Time (UTC).

      • snapshotName (string) --

        The name of the Elastic DocumentDB snapshot.

      • status (string) --

        The status of the Elastic DocumentDB snapshot.

      • subnetIds (list) --

        A list of the IDs of subnets associated with the DB cluster snapshot.

        • (string) --
      • vpcSecurityGroupIds (list) --

        A list of the IDs of the VPC security groups associated with the cluster snapshot.

        • (string) --

Exceptions

delete_cluster(**kwargs)

Delete a Elastic DocumentDB cluster.

See also: AWS API Documentation

Request Syntax

response = client.delete_cluster(
    clusterArn='string'
)
Parameters
clusterArn (string) --

[REQUIRED]

The arn of the Elastic DocumentDB cluster that is to be deleted.

Return type
dict
Returns
Response Syntax
{
    'cluster': {
        'adminUserName': 'string',
        'authType': 'PLAIN_TEXT'|'SECRET_ARN',
        'clusterArn': 'string',
        'clusterEndpoint': 'string',
        'clusterName': 'string',
        'createTime': 'string',
        'kmsKeyId': 'string',
        'preferredMaintenanceWindow': 'string',
        'shardCapacity': 123,
        'shardCount': 123,
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --
    • cluster (dict) --

      Returns information about the newly deleted Elastic DocumentDB cluster.

      • adminUserName (string) --

        The name of the Elastic DocumentDB cluster administrator.

      • authType (string) --

        The authentication type for the Elastic DocumentDB cluster.

      • clusterArn (string) --

        The arn of the Elastic DocumentDB cluster.

      • clusterEndpoint (string) --

        The URL used to connect to the Elastic DocumentDB cluster.

      • clusterName (string) --

        The name of the Elastic DocumentDB cluster.

      • createTime (string) --

        The time when the Elastic DocumentDB cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) --

        The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.

      • preferredMaintenanceWindow (string) --

        The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

        Format : ddd:hh24:mi-ddd:hh24:mi
      • shardCapacity (integer) --

        The capacity of each shard in the Elastic DocumentDB cluster.

      • shardCount (integer) --

        The number of shards in the Elastic DocumentDB cluster.

      • status (string) --

        The status of the Elastic DocumentDB cluster.

      • subnetIds (list) --

        The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.

        • (string) --
      • vpcSecurityGroupIds (list) --

        A list of EC2 VPC security groups associated with this cluster.

        • (string) --

Exceptions

delete_cluster_snapshot(**kwargs)

Delete a Elastic DocumentDB snapshot.

See also: AWS API Documentation

Request Syntax

response = client.delete_cluster_snapshot(
    snapshotArn='string'
)
Parameters
snapshotArn (string) --

[REQUIRED]

The arn of the Elastic DocumentDB snapshot that is to be deleted.

Return type
dict
Returns
Response Syntax
{
    'snapshot': {
        'adminUserName': 'string',
        'clusterArn': 'string',
        'clusterCreationTime': 'string',
        'kmsKeyId': 'string',
        'snapshotArn': 'string',
        'snapshotCreationTime': 'string',
        'snapshotName': 'string',
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --
    • snapshot (dict) --

      Returns information about the newly deleted Elastic DocumentDB snapshot.

      • adminUserName (string) --

        The name of the Elastic DocumentDB cluster administrator.

      • clusterArn (string) --

        The arn of the Elastic DocumentDB cluster.

      • clusterCreationTime (string) --

        The time when the Elastic DocumentDB cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) --

        The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.

      • snapshotArn (string) --

        The arn of the Elastic DocumentDB snapshot

      • snapshotCreationTime (string) --

        The time when the Elastic DocumentDB snapshot was created in Universal Coordinated Time (UTC).

      • snapshotName (string) --

        The name of the Elastic DocumentDB snapshot.

      • status (string) --

        The status of the Elastic DocumentDB snapshot.

      • subnetIds (list) --

        A list of the IDs of subnets associated with the DB cluster snapshot.

        • (string) --
      • vpcSecurityGroupIds (list) --

        A list of the IDs of the VPC security groups associated with the cluster snapshot.

        • (string) --

Exceptions

get_cluster(**kwargs)

Returns information about a specific Elastic DocumentDB cluster.

See also: AWS API Documentation

Request Syntax

response = client.get_cluster(
    clusterArn='string'
)
Parameters
clusterArn (string) --

[REQUIRED]

The arn of the Elastic DocumentDB cluster.

Return type
dict
Returns
Response Syntax
{
    'cluster': {
        'adminUserName': 'string',
        'authType': 'PLAIN_TEXT'|'SECRET_ARN',
        'clusterArn': 'string',
        'clusterEndpoint': 'string',
        'clusterName': 'string',
        'createTime': 'string',
        'kmsKeyId': 'string',
        'preferredMaintenanceWindow': 'string',
        'shardCapacity': 123,
        'shardCount': 123,
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --
    • cluster (dict) --

      Returns information about a specific Elastic DocumentDB cluster.

      • adminUserName (string) --

        The name of the Elastic DocumentDB cluster administrator.

      • authType (string) --

        The authentication type for the Elastic DocumentDB cluster.

      • clusterArn (string) --

        The arn of the Elastic DocumentDB cluster.

      • clusterEndpoint (string) --

        The URL used to connect to the Elastic DocumentDB cluster.

      • clusterName (string) --

        The name of the Elastic DocumentDB cluster.

      • createTime (string) --

        The time when the Elastic DocumentDB cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) --

        The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.

      • preferredMaintenanceWindow (string) --

        The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

        Format : ddd:hh24:mi-ddd:hh24:mi
      • shardCapacity (integer) --

        The capacity of each shard in the Elastic DocumentDB cluster.

      • shardCount (integer) --

        The number of shards in the Elastic DocumentDB cluster.

      • status (string) --

        The status of the Elastic DocumentDB cluster.

      • subnetIds (list) --

        The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.

        • (string) --
      • vpcSecurityGroupIds (list) --

        A list of EC2 VPC security groups associated with this cluster.

        • (string) --

Exceptions

get_cluster_snapshot(**kwargs)

Returns information about a specific Elastic DocumentDB snapshot

See also: AWS API Documentation

Request Syntax

response = client.get_cluster_snapshot(
    snapshotArn='string'
)
Parameters
snapshotArn (string) --

[REQUIRED]

The arn of the Elastic DocumentDB snapshot.

Return type
dict
Returns
Response Syntax
{
    'snapshot': {
        'adminUserName': 'string',
        'clusterArn': 'string',
        'clusterCreationTime': 'string',
        'kmsKeyId': 'string',
        'snapshotArn': 'string',
        'snapshotCreationTime': 'string',
        'snapshotName': 'string',
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --
    • snapshot (dict) --

      Returns information about a specific Elastic DocumentDB snapshot.

      • adminUserName (string) --

        The name of the Elastic DocumentDB cluster administrator.

      • clusterArn (string) --

        The arn of the Elastic DocumentDB cluster.

      • clusterCreationTime (string) --

        The time when the Elastic DocumentDB cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) --

        The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.

      • snapshotArn (string) --

        The arn of the Elastic DocumentDB snapshot

      • snapshotCreationTime (string) --

        The time when the Elastic DocumentDB snapshot was created in Universal Coordinated Time (UTC).

      • snapshotName (string) --

        The name of the Elastic DocumentDB snapshot.

      • status (string) --

        The status of the Elastic DocumentDB snapshot.

      • subnetIds (list) --

        A list of the IDs of subnets associated with the DB cluster snapshot.

        • (string) --
      • vpcSecurityGroupIds (list) --

        A list of the IDs of the VPC security groups associated with the cluster snapshot.

        • (string) --

Exceptions

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_cluster_snapshots(**kwargs)

Returns information about Elastic DocumentDB snapshots for a specified cluster.

See also: AWS API Documentation

Request Syntax

response = client.list_cluster_snapshots(
    clusterArn='string',
    maxResults=123,
    nextToken='string'
)
Parameters
  • clusterArn (string) -- The arn of the Elastic DocumentDB cluster.
  • maxResults (integer) -- The maximum number of entries to recieve in the response.
  • nextToken (string) -- The nextToken which is used the get the next page of data.
Return type

dict

Returns

Response Syntax

{
    'nextToken': 'string',
    'snapshots': [
        {
            'clusterArn': 'string',
            'snapshotArn': 'string',
            'snapshotCreationTime': 'string',
            'snapshotName': 'string',
            'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The response will provide a nextToken if there is more data beyond the maxResults.

      If there is no more data in the responce, the nextToken will not be returned.

    • snapshots (list) --

      A list of Elastic DocumentDB snapshots for a specified cluster.

      • (dict) --

        A list of Elastic DocumentDB snapshots.

        • clusterArn (string) --

          The arn of the Elastic DocumentDB cluster.

        • snapshotArn (string) --

          The arn of the Elastic DocumentDB snapshot

        • snapshotCreationTime (string) --

          The time when the Elastic DocumentDB snapshot was created in Universal Coordinated Time (UTC).

        • snapshotName (string) --

          The name of the Elastic DocumentDB snapshot.

        • status (string) --

          The status of the Elastic DocumentDB snapshot.

Exceptions

list_clusters(**kwargs)

Returns information about provisioned Elastic DocumentDB clusters.

See also: AWS API Documentation

Request Syntax

response = client.list_clusters(
    maxResults=123,
    nextToken='string'
)
Parameters
  • maxResults (integer) -- The maximum number of entries to recieve in the response.
  • nextToken (string) -- The nextToken which is used the get the next page of data.
Return type

dict

Returns

Response Syntax

{
    'clusters': [
        {
            'clusterArn': 'string',
            'clusterName': 'string',
            'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • clusters (list) --

      A list of Elastic DocumentDB cluster.

      • (dict) --

        A list of Elastic DocumentDB cluster.

        • clusterArn (string) --

          The arn of the Elastic DocumentDB cluster.

        • clusterName (string) --

          The name of the Elastic DocumentDB cluster.

        • status (string) --

          The status of the Elastic DocumentDB cluster.

    • nextToken (string) --

      The response will provide a nextToken if there is more data beyond the maxResults.

      If there is no more data in the responce, the nextToken will not be returned.

Exceptions

list_tags_for_resource(**kwargs)

Lists all tags on a Elastic DocumentDB resource

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The arn of the Elastic DocumentDB resource.

Return type
dict
Returns
Response Syntax
{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • tags (dict) --

      The list of tags for the specified Elastic DocumentDB resource.

      • (string) --
        • (string) --

Exceptions

restore_cluster_from_snapshot(**kwargs)

Restores a Elastic DocumentDB cluster from a snapshot.

See also: AWS API Documentation

Request Syntax

response = client.restore_cluster_from_snapshot(
    clusterName='string',
    kmsKeyId='string',
    snapshotArn='string',
    subnetIds=[
        'string',
    ],
    tags={
        'string': 'string'
    },
    vpcSecurityGroupIds=[
        'string',
    ]
)
Parameters
  • clusterName (string) --

    [REQUIRED]

    The name of the Elastic DocumentDB cluster.

  • kmsKeyId (string) --

    The KMS key identifier to use to encrypt the new Elastic DocumentDB 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, Elastic DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

  • snapshotArn (string) --

    [REQUIRED]

    The arn of the Elastic DocumentDB snapshot.

  • subnetIds (list) --

    The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.

    • (string) --
  • tags (dict) --

    A list of the tag names to be assigned to the restored DB 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.

    • (string) --
      • (string) --
  • vpcSecurityGroupIds (list) --

    A list of EC2 VPC security groups to associate with the Elastic DocumentDB cluster.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'cluster': {
        'adminUserName': 'string',
        'authType': 'PLAIN_TEXT'|'SECRET_ARN',
        'clusterArn': 'string',
        'clusterEndpoint': 'string',
        'clusterName': 'string',
        'createTime': 'string',
        'kmsKeyId': 'string',
        'preferredMaintenanceWindow': 'string',
        'shardCapacity': 123,
        'shardCount': 123,
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --

    • cluster (dict) --

      Returns information about a the restored Elastic DocumentDB cluster.

      • adminUserName (string) --

        The name of the Elastic DocumentDB cluster administrator.

      • authType (string) --

        The authentication type for the Elastic DocumentDB cluster.

      • clusterArn (string) --

        The arn of the Elastic DocumentDB cluster.

      • clusterEndpoint (string) --

        The URL used to connect to the Elastic DocumentDB cluster.

      • clusterName (string) --

        The name of the Elastic DocumentDB cluster.

      • createTime (string) --

        The time when the Elastic DocumentDB cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) --

        The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.

      • preferredMaintenanceWindow (string) --

        The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

        Format : ddd:hh24:mi-ddd:hh24:mi

      • shardCapacity (integer) --

        The capacity of each shard in the Elastic DocumentDB cluster.

      • shardCount (integer) --

        The number of shards in the Elastic DocumentDB cluster.

      • status (string) --

        The status of the Elastic DocumentDB cluster.

      • subnetIds (list) --

        The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.

        • (string) --
      • vpcSecurityGroupIds (list) --

        A list of EC2 VPC security groups associated with this cluster.

        • (string) --

Exceptions

tag_resource(**kwargs)

Adds metadata tags to a Elastic DocumentDB resource

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The arn of the Elastic DocumentDB resource.

  • tags (dict) --

    [REQUIRED]

    The tags to be assigned to the Elastic DocumentDB resource.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

untag_resource(**kwargs)

Removes metadata tags to a Elastic DocumentDB resource

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The arn of the Elastic DocumentDB resource.

  • tagKeys (list) --

    [REQUIRED]

    The tag keys to be removed from the Elastic DocumentDB resource.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

update_cluster(**kwargs)

Modifies a Elastic DocumentDB cluster. This includes updating admin-username/password, upgrading API version setting up a backup window and maintenance window

See also: AWS API Documentation

Request Syntax

response = client.update_cluster(
    adminUserPassword='string',
    authType='PLAIN_TEXT'|'SECRET_ARN',
    clientToken='string',
    clusterArn='string',
    preferredMaintenanceWindow='string',
    shardCapacity=123,
    shardCount=123,
    subnetIds=[
        'string',
    ],
    vpcSecurityGroupIds=[
        'string',
    ]
)
Parameters
  • adminUserPassword (string) --

    The password for the Elastic DocumentDB 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.
  • authType (string) -- The authentication type for the Elastic DocumentDB cluster.
  • clientToken (string) --

    The client token for the Elastic DocumentDB cluster.

    This field is autopopulated if not provided.

  • clusterArn (string) --

    [REQUIRED]

    The arn of the Elastic DocumentDB cluster.

  • preferredMaintenanceWindow (string) --

    The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

    Format : ddd:hh24:mi-ddd:hh24:mi

    Default : 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.

  • shardCapacity (integer) -- The capacity of each shard in the Elastic DocumentDB cluster.
  • shardCount (integer) -- The number of shards to create in the Elastic DocumentDB cluster.
  • subnetIds (list) --

    The number of shards to create in the Elastic DocumentDB cluster.

    • (string) --
  • vpcSecurityGroupIds (list) --

    A list of EC2 VPC security groups to associate with the new Elastic DocumentDB cluster.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'cluster': {
        'adminUserName': 'string',
        'authType': 'PLAIN_TEXT'|'SECRET_ARN',
        'clusterArn': 'string',
        'clusterEndpoint': 'string',
        'clusterName': 'string',
        'createTime': 'string',
        'kmsKeyId': 'string',
        'preferredMaintenanceWindow': 'string',
        'shardCapacity': 123,
        'shardCount': 123,
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS',
        'subnetIds': [
            'string',
        ],
        'vpcSecurityGroupIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --

    • cluster (dict) --

      Returns information about the updated Elastic DocumentDB cluster.

      • adminUserName (string) --

        The name of the Elastic DocumentDB cluster administrator.

      • authType (string) --

        The authentication type for the Elastic DocumentDB cluster.

      • clusterArn (string) --

        The arn of the Elastic DocumentDB cluster.

      • clusterEndpoint (string) --

        The URL used to connect to the Elastic DocumentDB cluster.

      • clusterName (string) --

        The name of the Elastic DocumentDB cluster.

      • createTime (string) --

        The time when the Elastic DocumentDB cluster was created in Universal Coordinated Time (UTC).

      • kmsKeyId (string) --

        The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.

      • preferredMaintenanceWindow (string) --

        The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

        Format : ddd:hh24:mi-ddd:hh24:mi

      • shardCapacity (integer) --

        The capacity of each shard in the Elastic DocumentDB cluster.

      • shardCount (integer) --

        The number of shards in the Elastic DocumentDB cluster.

      • status (string) --

        The status of the Elastic DocumentDB cluster.

      • subnetIds (list) --

        The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.

        • (string) --
      • vpcSecurityGroupIds (list) --

        A list of EC2 VPC security groups associated with this cluster.

        • (string) --

Exceptions

Client Exceptions

Client exceptions are available on a client instance via the exceptions property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.

The available client exceptions are:

class DocDBElastic.Client.exceptions.AccessDeniedException

An exception that occurs when there are not sufficient permissions to perform an action.

Example

try:
  ...
except client.exceptions.AccessDeniedException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    An exception that occurs when there are not sufficient permissions to perform an action.

    • message (string) --

      An error message explaining why access was denied.

    • Error (dict) -- Normalized access to common exception attributes.

      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class DocDBElastic.Client.exceptions.ConflictException

There was an access conflict.

Example

try:
  ...
except client.exceptions.ConflictException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'resourceId': 'string',
    'resourceType': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    There was an access conflict.

    • message (string) --

    • resourceId (string) --

      The ID of the resource where there was an access conflict.

    • resourceType (string) --

      The type of the resource where there was an access conflict.

    • Error (dict) -- Normalized access to common exception attributes.

      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class DocDBElastic.Client.exceptions.InternalServerException

There was an internal server error.

Example

try:
  ...
except client.exceptions.InternalServerException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    There was an internal server error.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class DocDBElastic.Client.exceptions.ResourceNotFoundException

The specified resource could not be located.

Example

try:
  ...
except client.exceptions.ResourceNotFoundException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'resourceId': 'string',
    'resourceType': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The specified resource could not be located.

    • message (string) --

      An error message describing the failure.

    • resourceId (string) --

      The ID of the resource that could not be located.

    • resourceType (string) --

      The type of the resource that could not be found.

    • Error (dict) -- Normalized access to common exception attributes.

      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class DocDBElastic.Client.exceptions.ServiceQuotaExceededException

The service quota for the action was exceeded.

Example

try:
  ...
except client.exceptions.ServiceQuotaExceededException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The service quota for the action was exceeded.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class DocDBElastic.Client.exceptions.ThrottlingException

ThrottlingException will be thrown when request was denied due to request throttling.

Example

try:
  ...
except client.exceptions.ThrottlingException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'retryAfterSeconds': 123,
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    ThrottlingException will be thrown when request was denied due to request throttling.

    • message (string) --

    • retryAfterSeconds (integer) --

      The number of seconds to wait before retrying the operation.

    • Error (dict) -- Normalized access to common exception attributes.

      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class DocDBElastic.Client.exceptions.ValidationException

A structure defining a validation exception.

Example

try:
  ...
except client.exceptions.ValidationException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'fieldList': [
        {
            'message': 'string',
            'name': 'string'
        },
    ],
    'message': 'string',
    'reason': 'unknownOperation'|'cannotParse'|'fieldValidationFailed'|'other',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    A structure defining a validation exception.

    • fieldList (list) --

      A list of the fields in which the validation exception occurred.

      • (dict) --

        A specific field in which a given validation exception occurred.

        • message (string) --

          An error message describing the validation exception in this field.

        • name (string) --

          The name of the field where the validation exception occurred.

    • message (string) --

      An error message describing the validation exception.

    • reason (string) --

      The reason why the validation exception occurred (one of unknownOperation , cannotParse , fieldValidationFailed , or other ).

    • Error (dict) -- Normalized access to common exception attributes.

      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.

Paginators

The available paginators are:

class DocDBElastic.Paginator.ListClusterSnapshots
paginator = client.get_paginator('list_cluster_snapshots')
paginate(**kwargs)

Creates an iterator that will paginate through responses from DocDBElastic.Client.list_cluster_snapshots().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    clusterArn='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • clusterArn (string) -- The arn of the Elastic DocumentDB cluster.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'snapshots': [
        {
            'clusterArn': 'string',
            'snapshotArn': 'string',
            'snapshotCreationTime': 'string',
            'snapshotName': 'string',
            'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • snapshots (list) --

      A list of Elastic DocumentDB snapshots for a specified cluster.

      • (dict) --

        A list of Elastic DocumentDB snapshots.

        • clusterArn (string) --

          The arn of the Elastic DocumentDB cluster.

        • snapshotArn (string) --

          The arn of the Elastic DocumentDB snapshot

        • snapshotCreationTime (string) --

          The time when the Elastic DocumentDB snapshot was created in Universal Coordinated Time (UTC).

        • snapshotName (string) --

          The name of the Elastic DocumentDB snapshot.

        • status (string) --

          The status of the Elastic DocumentDB snapshot.

    • NextToken (string) --

      A token to resume pagination.

class DocDBElastic.Paginator.ListClusters
paginator = client.get_paginator('list_clusters')
paginate(**kwargs)

Creates an iterator that will paginate through responses from DocDBElastic.Client.list_clusters().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'clusters': [
        {
            'clusterArn': 'string',
            'clusterName': 'string',
            'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'VPC_ENDPOINT_LIMIT_EXCEEDED'|'IP_ADDRESS_LIMIT_EXCEEDED'|'INVALID_SECURITY_GROUP_ID'|'INVALID_SUBNET_ID'|'INACCESSIBLE_ENCRYPTION_CREDS'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --
    • clusters (list) --

      A list of Elastic DocumentDB cluster.

      • (dict) --

        A list of Elastic DocumentDB cluster.

        • clusterArn (string) --

          The arn of the Elastic DocumentDB cluster.

        • clusterName (string) --

          The name of the Elastic DocumentDB cluster.

        • status (string) --

          The status of the Elastic DocumentDB cluster.

    • NextToken (string) --

      A token to resume pagination.