You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::DocDB::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for Amazon DocumentDB with MongoDB compatibility. To construct a client, you need to configure a :region and :credentials.

docdb = Aws::DocDB::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::DocDB::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::DocDB::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#add_tags_to_resource(options = {}) ⇒ Struct

Adds metadata tags to an Amazon DocumentDB resource. You can use these tags with cost allocation reporting to track costs that are associated with Amazon DocumentDB resources. or in a Condition statement in an AWS Identity and Access Management (IAM) policy for Amazon DocumentDB.

Examples:

Request syntax with placeholder values


resp = client.add_tags_to_resource({
  resource_name: "String", # required
  tags: [ # required
    {
      key: "String",
      value: "String",
    },
  ],
})

Options Hash (options):

  • :resource_name (required, String)

    The Amazon DocumentDB resource that the tags are added to. This value is an Amazon Resource Name .

  • :tags (required, Array<Types::Tag>)

    The tags to be assigned to the Amazon DocumentDB resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#apply_pending_maintenance_action(options = {}) ⇒ Types::ApplyPendingMaintenanceActionResult

Applies a pending maintenance action to a resource (for example, to an Amazon DocumentDB instance).

Examples:

Request syntax with placeholder values


resp = client.apply_pending_maintenance_action({
  resource_identifier: "String", # required
  apply_action: "String", # required
  opt_in_type: "String", # required
})

Response structure


resp.resource_pending_maintenance_actions.resource_identifier #=> String
resp.resource_pending_maintenance_actions.pending_maintenance_action_details #=> Array
resp.resource_pending_maintenance_actions.pending_maintenance_action_details[0].action #=> String
resp.resource_pending_maintenance_actions.pending_maintenance_action_details[0].auto_applied_after_date #=> Time
resp.resource_pending_maintenance_actions.pending_maintenance_action_details[0].forced_apply_date #=> Time
resp.resource_pending_maintenance_actions.pending_maintenance_action_details[0].opt_in_status #=> String
resp.resource_pending_maintenance_actions.pending_maintenance_action_details[0].current_apply_date #=> Time
resp.resource_pending_maintenance_actions.pending_maintenance_action_details[0].description #=> String

Options Hash (options):

  • :resource_identifier (required, String)

    The Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to.

  • :apply_action (required, String)

    The pending maintenance action to apply to this resource.

    Valid values: system-update, db-upgrade

  • :opt_in_type (required, String)

    A value that specifies the type of opt-in request or undoes an opt-in request. An opt-in request of type immediate can\'t be undone.

    Valid values:

    • immediate - Apply the maintenance action immediately.

    • next-maintenance - Apply the maintenance action during the next maintenance window for the resource.

    • undo-opt-in - Cancel any existing next-maintenance opt-in requests.

Returns:

See Also:

#copy_db_cluster_parameter_group(options = {}) ⇒ Types::CopyDBClusterParameterGroupResult

Copies the specified cluster parameter group.

Examples:

Request syntax with placeholder values


resp = client.copy_db_cluster_parameter_group({
  source_db_cluster_parameter_group_identifier: "String", # required
  target_db_cluster_parameter_group_identifier: "String", # required
  target_db_cluster_parameter_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_cluster_parameter_group.db_cluster_parameter_group_name #=> String
resp.db_cluster_parameter_group.db_parameter_group_family #=> String
resp.db_cluster_parameter_group.description #=> String
resp.db_cluster_parameter_group.db_cluster_parameter_group_arn #=> String

Options Hash (options):

  • :source_db_cluster_parameter_group_identifier (required, String)

    The identifier or Amazon Resource Name (ARN) for the source cluster parameter group.

    Constraints:

    • Must specify a valid cluster parameter group.

    • If the source cluster parameter group is in the same AWS Region as the copy, specify a valid parameter group identifier; for example, my-db-cluster-param-group, or a valid ARN.

    • If the source parameter group is in a different AWS Region than the copy, specify a valid cluster parameter group ARN; for example, arn:aws:rds:us-east-1:123456789012:sample-cluster:sample-parameter-group.

  • :target_db_cluster_parameter_group_identifier (required, String)

    The identifier for the copied cluster parameter group.

    Constraints:

    • Cannot be null, empty, or blank.

    • Must contain from 1 to 255 letters, numbers, or hyphens.

    • The first character must be a letter.

    • Cannot end with a hyphen or contain two consecutive hyphens.

    Example: my-cluster-param-group1

  • :target_db_cluster_parameter_group_description (required, String)

    A description for the copied cluster parameter group.

  • :tags (Array<Types::Tag>)

    The tags that are to be assigned to the parameter group.

Returns:

See Also:

#copy_db_cluster_snapshot(options = {}) ⇒ Types::CopyDBClusterSnapshotResult

Copies a snapshot of a cluster.

To copy a cluster snapshot from a shared manual cluster snapshot, SourceDBClusterSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared cluster snapshot. You can only copy a shared DB cluster snapshot, whether encrypted or not, in the same AWS Region.

To cancel the copy operation after it is in progress, delete the target cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that cluster snapshot is in the copying status.

Examples:

Request syntax with placeholder values


resp = client.copy_db_cluster_snapshot({
  source_db_cluster_snapshot_identifier: "String", # required
  target_db_cluster_snapshot_identifier: "String", # required
  kms_key_id: "String",
  pre_signed_url: "String",
  copy_tags: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_cluster_snapshot.availability_zones #=> Array
resp.db_cluster_snapshot.availability_zones[0] #=> String
resp.db_cluster_snapshot.db_cluster_snapshot_identifier #=> String
resp.db_cluster_snapshot.db_cluster_identifier #=> String
resp.db_cluster_snapshot.snapshot_create_time #=> Time
resp.db_cluster_snapshot.engine #=> String
resp.db_cluster_snapshot.status #=> String
resp.db_cluster_snapshot.port #=> Integer
resp.db_cluster_snapshot.vpc_id #=> String
resp.db_cluster_snapshot.cluster_create_time #=> Time
resp.db_cluster_snapshot.master_username #=> String
resp.db_cluster_snapshot.engine_version #=> String
resp.db_cluster_snapshot.snapshot_type #=> String
resp.db_cluster_snapshot.percent_progress #=> Integer
resp.db_cluster_snapshot.storage_encrypted #=> true/false
resp.db_cluster_snapshot.kms_key_id #=> String
resp.db_cluster_snapshot.db_cluster_snapshot_arn #=> String
resp.db_cluster_snapshot.source_db_cluster_snapshot_arn #=> String

Options Hash (options):

  • :source_db_cluster_snapshot_identifier (required, 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 AWS Region as the copy, specify a valid snapshot identifier.

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

    Example: my-cluster-snapshot1

  • :target_db_cluster_snapshot_identifier (required, 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 (String)

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

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

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

    To copy an encrypted cluster snapshot to another AWS Region, set KmsKeyId to the AWS KMS key ID that you want to use to encrypt the copy of the cluster snapshot in the destination Region. AWS KMS encryption keys are specific to the AWS Region that they are created in, and you can\'t use encryption keys from one AWS Region in another AWS Region.

    If you copy an unencrypted cluster snapshot and specify a value for the KmsKeyId parameter, an error is returned.

  • :pre_signed_url (String)

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

    If you are using an AWS SDK tool or the AWS CLI, you can specify SourceRegion (or --source-region for the AWS 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 AWS Region.

    The presigned URL must be a valid request for the CopyDBClusterSnapshot API action that can be executed in the source AWS 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 AWS Region. For example, if you are copying an encrypted cluster snapshot from the us-east-1 AWS 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 (Boolean)

    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 (Array<Types::Tag>)

    The tags to be assigned to the cluster snapshot.

Returns:

See Also:

#create_db_cluster(options = {}) ⇒ Types::CreateDBClusterResult

Creates a new Amazon DocumentDB cluster.

Examples:

Request syntax with placeholder values


resp = client.create_db_cluster({
  availability_zones: ["String"],
  backup_retention_period: 1,
  db_cluster_identifier: "String", # required
  db_cluster_parameter_group_name: "String",
  vpc_security_group_ids: ["String"],
  db_subnet_group_name: "String",
  engine: "String", # required
  engine_version: "String",
  port: 1,
  master_username: "String", # required
  master_user_password: "String", # required
  preferred_backup_window: "String",
  preferred_maintenance_window: "String",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  storage_encrypted: false,
  kms_key_id: "String",
  pre_signed_url: "String",
  enable_cloudwatch_logs_exports: ["String"],
  deletion_protection: false,
})

Response structure


resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.db_cluster_identifier #=> String
resp.db_cluster.db_cluster_parameter_group #=> String
resp.db_cluster.db_subnet_group #=> String
resp.db_cluster.status #=> String
resp.db_cluster.percent_progress #=> String
resp.db_cluster.earliest_restorable_time #=> Time
resp.db_cluster.endpoint #=> String
resp.db_cluster.reader_endpoint #=> String
resp.db_cluster.multi_az #=> true/false
resp.db_cluster.engine #=> String
resp.db_cluster.engine_version #=> String
resp.db_cluster.latest_restorable_time #=> Time
resp.db_cluster.port #=> Integer
resp.db_cluster.master_username #=> String
resp.db_cluster.preferred_backup_window #=> String
resp.db_cluster.preferred_maintenance_window #=> String
resp.db_cluster.db_cluster_members #=> Array
resp.db_cluster.db_cluster_members[0].db_instance_identifier #=> String
resp.db_cluster.db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_cluster.db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_cluster.db_cluster_members[0].promotion_tier #=> Integer
resp.db_cluster.vpc_security_groups #=> Array
resp.db_cluster.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_cluster.vpc_security_groups[0].status #=> String
resp.db_cluster.hosted_zone_id #=> String
resp.db_cluster.storage_encrypted #=> true/false
resp.db_cluster.kms_key_id #=> String
resp.db_cluster.db_cluster_resource_id #=> String
resp.db_cluster.db_cluster_arn #=> String
resp.db_cluster.associated_roles #=> Array
resp.db_cluster.associated_roles[0].role_arn #=> String
resp.db_cluster.associated_roles[0].status #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.deletion_protection #=> true/false

Options Hash (options):

  • :availability_zones (Array<String>)

    A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.

  • :backup_retention_period (Integer)

    The number of days for which automated backups are retained. You must specify a minimum value of 1.

    Default: 1

    Constraints:

    • Must be a value from 1 to 35.

    ^

  • :db_cluster_identifier (required, String)

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

  • :db_cluster_parameter_group_name (String)

    The name of the cluster parameter group to associate with this cluster.

  • :vpc_security_group_ids (Array<String>)

    A list of EC2 VPC security groups to associate with this cluster.

  • :db_subnet_group_name (String)

    A subnet group to associate with this cluster.

    Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.

    Example: mySubnetgroup

  • :engine (required, String)

    The name of the database engine to be used for this cluster.

    Valid values: docdb

  • :engine_version (String)

    The version number of the database engine to use. The --engine-version will default to the latest major engine version. For production workloads, we recommend explicitly declaring this parameter with the intended major engine version.

  • :port (Integer)

    The port number on which the instances in the cluster accept connections.

  • :master_username (required, String)

    The name of the master user for the cluster.

    Constraints:

    • Must be from 1 to 63 letters or numbers.

    • The first character must be a letter.

    • Cannot be a reserved word for the chosen database engine.

  • :master_user_password (required, String)

    The password for the master database user. 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.

  • :preferred_backup_window (String)

    The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region.

    Constraints:

    • Must be in the format hh24:mi-hh24:mi.

    • Must be in Universal Coordinated Time (UTC).

    • Must not conflict with the preferred maintenance window.

    • Must be at least 30 minutes.

  • :preferred_maintenance_window (String)

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

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

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

    Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun

    Constraints: Minimum 30-minute window.

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the cluster.

  • :storage_encrypted (Boolean)

    Specifies whether the cluster is encrypted.

  • :kms_key_id (String)

    The AWS KMS key identifier for an encrypted cluster.

    The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS KMS encryption key. If you are creating a cluster using the same AWS account that owns the AWS KMS encryption key that is used to encrypt the new cluster, you can use the AWS KMS key alias instead of the ARN for the AWS KMS encryption key.

    If an encryption key is not specified in KmsKeyId:

    • If the StorageEncrypted parameter is true, Amazon DocumentDB uses your default encryption key.

    ^

    AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS Region.

  • :pre_signed_url (String)

    Not currently supported.

  • :enable_cloudwatch_logs_exports (Array<String>)

    A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or profiler logs. For more information, see Auditing Amazon DocumentDB Events and Profiling Amazon DocumentDB Operations.

  • :deletion_protection (Boolean)

    Specifies whether this cluster can be deleted. If DeletionProtection is enabled, the cluster cannot be deleted unless it is modified and DeletionProtection is disabled. DeletionProtection protects clusters from being accidentally deleted.

Returns:

See Also:

#create_db_cluster_parameter_group(options = {}) ⇒ Types::CreateDBClusterParameterGroupResult

Creates a new cluster parameter group.

Parameters in a cluster parameter group apply to all of the instances in a cluster.

A cluster parameter group is initially created with the default parameters for the database engine used by instances in the cluster. In Amazon DocumentDB, you cannot make modifications directly to the default.docdb3.6 cluster parameter group. If your Amazon DocumentDB cluster is using the default cluster parameter group and you want to modify a value in it, you must first create a new parameter group or copy an existing parameter group, modify it, and then apply the modified parameter group to your cluster. For the new cluster parameter group and associated settings to take effect, you must then reboot the instances in the cluster without failover. For more information, see Modifying Amazon DocumentDB Cluster Parameter Groups.

Examples:

Request syntax with placeholder values


resp = client.create_db_cluster_parameter_group({
  db_cluster_parameter_group_name: "String", # required
  db_parameter_group_family: "String", # required
  description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_cluster_parameter_group.db_cluster_parameter_group_name #=> String
resp.db_cluster_parameter_group.db_parameter_group_family #=> String
resp.db_cluster_parameter_group.description #=> String
resp.db_cluster_parameter_group.db_cluster_parameter_group_arn #=> String

Options Hash (options):

  • :db_cluster_parameter_group_name (required, String)

    The name of the cluster parameter group.

    Constraints:

    • Must not match the name of an existing DBClusterParameterGroup.

    ^

    This value is stored as a lowercase string.

  • :db_parameter_group_family (required, String)

    The cluster parameter group family name.

  • :description (required, String)

    The description for the cluster parameter group.

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the cluster parameter group.

Returns:

See Also:

#create_db_cluster_snapshot(options = {}) ⇒ Types::CreateDBClusterSnapshotResult

Creates a snapshot of a cluster.

Examples:

Request syntax with placeholder values


resp = client.create_db_cluster_snapshot({
  db_cluster_snapshot_identifier: "String", # required
  db_cluster_identifier: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_cluster_snapshot.availability_zones #=> Array
resp.db_cluster_snapshot.availability_zones[0] #=> String
resp.db_cluster_snapshot.db_cluster_snapshot_identifier #=> String
resp.db_cluster_snapshot.db_cluster_identifier #=> String
resp.db_cluster_snapshot.snapshot_create_time #=> Time
resp.db_cluster_snapshot.engine #=> String
resp.db_cluster_snapshot.status #=> String
resp.db_cluster_snapshot.port #=> Integer
resp.db_cluster_snapshot.vpc_id #=> String
resp.db_cluster_snapshot.cluster_create_time #=> Time
resp.db_cluster_snapshot.master_username #=> String
resp.db_cluster_snapshot.engine_version #=> String
resp.db_cluster_snapshot.snapshot_type #=> String
resp.db_cluster_snapshot.percent_progress #=> Integer
resp.db_cluster_snapshot.storage_encrypted #=> true/false
resp.db_cluster_snapshot.kms_key_id #=> String
resp.db_cluster_snapshot.db_cluster_snapshot_arn #=> String
resp.db_cluster_snapshot.source_db_cluster_snapshot_arn #=> String

Options Hash (options):

  • :db_cluster_snapshot_identifier (required, String)

    The identifier of the cluster snapshot. 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-snapshot1

  • :db_cluster_identifier (required, String)

    The identifier of the cluster to create a snapshot for. This parameter is not case sensitive.

    Constraints:

    • Must match the identifier of an existing DBCluster.

    ^

    Example: my-cluster

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the cluster snapshot.

Returns:

See Also:

#create_db_instance(options = {}) ⇒ Types::CreateDBInstanceResult

Creates a new instance.

Examples:

Request syntax with placeholder values


resp = client.create_db_instance({
  db_instance_identifier: "String", # required
  db_instance_class: "String", # required
  engine: "String", # required
  availability_zone: "String",
  preferred_maintenance_window: "String",
  auto_minor_version_upgrade: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  db_cluster_identifier: "String", # required
  promotion_tier: 1,
})

Response structure


resp.db_instance.db_instance_identifier #=> String
resp.db_instance.db_instance_class #=> String
resp.db_instance.engine #=> String
resp.db_instance.db_instance_status #=> String
resp.db_instance.endpoint.address #=> String
resp.db_instance.endpoint.port #=> Integer
resp.db_instance.endpoint.hosted_zone_id #=> String
resp.db_instance.instance_create_time #=> Time
resp.db_instance.preferred_backup_window #=> String
resp.db_instance.backup_retention_period #=> Integer
resp.db_instance.vpc_security_groups #=> Array
resp.db_instance.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_instance.vpc_security_groups[0].status #=> String
resp.db_instance.availability_zone #=> String
resp.db_instance.db_subnet_group.db_subnet_group_name #=> String
resp.db_instance.db_subnet_group.db_subnet_group_description #=> String
resp.db_instance.db_subnet_group.vpc_id #=> String
resp.db_instance.db_subnet_group.subnet_group_status #=> String
resp.db_instance.db_subnet_group.subnets #=> Array
resp.db_instance.db_subnet_group.subnets[0].subnet_identifier #=> String
resp.db_instance.db_subnet_group.subnets[0].subnet_availability_zone.name #=> String
resp.db_instance.db_subnet_group.subnets[0].subnet_status #=> String
resp.db_instance.db_subnet_group.db_subnet_group_arn #=> String
resp.db_instance.preferred_maintenance_window #=> String
resp.db_instance.pending_modified_values.db_instance_class #=> String
resp.db_instance.pending_modified_values.allocated_storage #=> Integer
resp.db_instance.pending_modified_values.master_user_password #=> String
resp.db_instance.pending_modified_values.port #=> Integer
resp.db_instance.pending_modified_values.backup_retention_period #=> Integer
resp.db_instance.pending_modified_values.multi_az #=> true/false
resp.db_instance.pending_modified_values.engine_version #=> String
resp.db_instance.pending_modified_values.license_model #=> String
resp.db_instance.pending_modified_values.iops #=> Integer
resp.db_instance.pending_modified_values.db_instance_identifier #=> String
resp.db_instance.pending_modified_values.storage_type #=> String
resp.db_instance.pending_modified_values.ca_certificate_identifier #=> String
resp.db_instance.pending_modified_values.db_subnet_group_name #=> String
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable #=> Array
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable[0] #=> String
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable #=> Array
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable[0] #=> String
resp.db_instance.latest_restorable_time #=> Time
resp.db_instance.engine_version #=> String
resp.db_instance.auto_minor_version_upgrade #=> true/false
resp.db_instance.publicly_accessible #=> true/false
resp.db_instance.status_infos #=> Array
resp.db_instance.status_infos[0].status_type #=> String
resp.db_instance.status_infos[0].normal #=> true/false
resp.db_instance.status_infos[0].status #=> String
resp.db_instance.status_infos[0].message #=> String
resp.db_instance.db_cluster_identifier #=> String
resp.db_instance.storage_encrypted #=> true/false
resp.db_instance.kms_key_id #=> String
resp.db_instance.dbi_resource_id #=> String
resp.db_instance.ca_certificate_identifier #=> String
resp.db_instance.promotion_tier #=> Integer
resp.db_instance.db_instance_arn #=> String
resp.db_instance.enabled_cloudwatch_logs_exports #=> Array
resp.db_instance.enabled_cloudwatch_logs_exports[0] #=> String

Options Hash (options):

  • :db_instance_identifier (required, String)

    The instance identifier. 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: mydbinstance

  • :db_instance_class (required, String)

    The compute and memory capacity of the instance; for example, db.r5.large.

  • :engine (required, String)

    The name of the database engine to be used for this instance.

    Valid value: docdb

  • :availability_zone (String)

    The Amazon EC2 Availability Zone that the instance is created in.

    Default: A random, system-chosen Availability Zone in the endpoint\'s AWS Region.

    Example: us-east-1d

  • :preferred_maintenance_window (String)

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

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

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

    Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun

    Constraints: Minimum 30-minute window.

  • :auto_minor_version_upgrade (Boolean)

    Indicates that minor engine upgrades are applied automatically to the instance during the maintenance window.

    Default: true

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the instance. You can assign up to 10 tags to an instance.

  • :db_cluster_identifier (required, String)

    The identifier of the cluster that the instance will belong to.

  • :promotion_tier (Integer)

    A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after a failure of the existing primary instance.

    Default: 1

    Valid values: 0-15

Returns:

See Also:

#create_db_subnet_group(options = {}) ⇒ Types::CreateDBSubnetGroupResult

Creates a new subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the AWS Region.

Examples:

Request syntax with placeholder values


resp = client.create_db_subnet_group({
  db_subnet_group_name: "String", # required
  db_subnet_group_description: "String", # required
  subnet_ids: ["String"], # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_subnet_group.db_subnet_group_name #=> String
resp.db_subnet_group.db_subnet_group_description #=> String
resp.db_subnet_group.vpc_id #=> String
resp.db_subnet_group.subnet_group_status #=> String
resp.db_subnet_group.subnets #=> Array
resp.db_subnet_group.subnets[0].subnet_identifier #=> String
resp.db_subnet_group.subnets[0].subnet_availability_zone.name #=> String
resp.db_subnet_group.subnets[0].subnet_status #=> String
resp.db_subnet_group.db_subnet_group_arn #=> String

Options Hash (options):

  • :db_subnet_group_name (required, String)

    The name for the subnet group. This value is stored as a lowercase string.

    Constraints: Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens. Must not be default.

    Example: mySubnetgroup

  • :db_subnet_group_description (required, String)

    The description for the subnet group.

  • :subnet_ids (required, Array<String>)

    The Amazon EC2 subnet IDs for the subnet group.

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the subnet group.

Returns:

See Also:

#delete_db_cluster(options = {}) ⇒ Types::DeleteDBClusterResult

Deletes a previously provisioned cluster. When you delete a cluster, all automated backups for that cluster are deleted and can't be recovered. Manual DB cluster snapshots of the specified cluster are not deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_db_cluster({
  db_cluster_identifier: "String", # required
  skip_final_snapshot: false,
  final_db_snapshot_identifier: "String",
})

Response structure


resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.db_cluster_identifier #=> String
resp.db_cluster.db_cluster_parameter_group #=> String
resp.db_cluster.db_subnet_group #=> String
resp.db_cluster.status #=> String
resp.db_cluster.percent_progress #=> String
resp.db_cluster.earliest_restorable_time #=> Time
resp.db_cluster.endpoint #=> String
resp.db_cluster.reader_endpoint #=> String
resp.db_cluster.multi_az #=> true/false
resp.db_cluster.engine #=> String
resp.db_cluster.engine_version #=> String
resp.db_cluster.latest_restorable_time #=> Time
resp.db_cluster.port #=> Integer
resp.db_cluster.master_username #=> String
resp.db_cluster.preferred_backup_window #=> String
resp.db_cluster.preferred_maintenance_window #=> String
resp.db_cluster.db_cluster_members #=> Array
resp.db_cluster.db_cluster_members[0].db_instance_identifier #=> String
resp.db_cluster.db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_cluster.db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_cluster.db_cluster_members[0].promotion_tier #=> Integer
resp.db_cluster.vpc_security_groups #=> Array
resp.db_cluster.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_cluster.vpc_security_groups[0].status #=> String
resp.db_cluster.hosted_zone_id #=> String
resp.db_cluster.storage_encrypted #=> true/false
resp.db_cluster.kms_key_id #=> String
resp.db_cluster.db_cluster_resource_id #=> String
resp.db_cluster.db_cluster_arn #=> String
resp.db_cluster.associated_roles #=> Array
resp.db_cluster.associated_roles[0].role_arn #=> String
resp.db_cluster.associated_roles[0].status #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.deletion_protection #=> true/false

Options Hash (options):

  • :db_cluster_identifier (required, String)

    The cluster identifier for the cluster to be deleted. This parameter isn\'t case sensitive.

    Constraints:

    • Must match an existing DBClusterIdentifier.

    ^

  • :skip_final_snapshot (Boolean)

    Determines whether a final cluster snapshot is created before the cluster is deleted. If true is specified, no cluster snapshot is created. If false is specified, a cluster snapshot is created before the DB cluster is deleted.

    If SkipFinalSnapshot is false, you must specify a FinalDBSnapshotIdentifier parameter.

    Default: false

  • :final_db_snapshot_identifier (String)

    The cluster snapshot identifier of the new cluster snapshot created when SkipFinalSnapshot is set to false.

    Specifying this parameter and also setting the SkipFinalShapshot parameter to true results in an error.

    Constraints:

    • Must be from 1 to 255 letters, numbers, or hyphens.

    • The first character must be a letter.

    • Cannot end with a hyphen or contain two consecutive hyphens.

Returns:

See Also:

#delete_db_cluster_parameter_group(options = {}) ⇒ Struct

Deletes a specified cluster parameter group. The cluster parameter group to be deleted can't be associated with any clusters.

Examples:

Request syntax with placeholder values


resp = client.delete_db_cluster_parameter_group({
  db_cluster_parameter_group_name: "String", # required
})

Options Hash (options):

  • :db_cluster_parameter_group_name (required, String)

    The name of the cluster parameter group.

    Constraints:

    • Must be the name of an existing cluster parameter group.

    • You can\'t delete a default cluster parameter group.

    • Cannot be associated with any clusters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_db_cluster_snapshot(options = {}) ⇒ Types::DeleteDBClusterSnapshotResult

Deletes a cluster snapshot. If the snapshot is being copied, the copy operation is terminated.

The cluster snapshot must be in the available state to be deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_db_cluster_snapshot({
  db_cluster_snapshot_identifier: "String", # required
})

Response structure


resp.db_cluster_snapshot.availability_zones #=> Array
resp.db_cluster_snapshot.availability_zones[0] #=> String
resp.db_cluster_snapshot.db_cluster_snapshot_identifier #=> String
resp.db_cluster_snapshot.db_cluster_identifier #=> String
resp.db_cluster_snapshot.snapshot_create_time #=> Time
resp.db_cluster_snapshot.engine #=> String
resp.db_cluster_snapshot.status #=> String
resp.db_cluster_snapshot.port #=> Integer
resp.db_cluster_snapshot.vpc_id #=> String
resp.db_cluster_snapshot.cluster_create_time #=> Time
resp.db_cluster_snapshot.master_username #=> String
resp.db_cluster_snapshot.engine_version #=> String
resp.db_cluster_snapshot.snapshot_type #=> String
resp.db_cluster_snapshot.percent_progress #=> Integer
resp.db_cluster_snapshot.storage_encrypted #=> true/false
resp.db_cluster_snapshot.kms_key_id #=> String
resp.db_cluster_snapshot.db_cluster_snapshot_arn #=> String
resp.db_cluster_snapshot.source_db_cluster_snapshot_arn #=> String

Options Hash (options):

  • :db_cluster_snapshot_identifier (required, String)

    The identifier of the cluster snapshot to delete.

    Constraints: Must be the name of an existing cluster snapshot in the available state.

Returns:

See Also:

#delete_db_instance(options = {}) ⇒ Types::DeleteDBInstanceResult

Deletes a previously provisioned instance.

Examples:

Request syntax with placeholder values


resp = client.delete_db_instance({
  db_instance_identifier: "String", # required
})

Response structure


resp.db_instance.db_instance_identifier #=> String
resp.db_instance.db_instance_class #=> String
resp.db_instance.engine #=> String
resp.db_instance.db_instance_status #=> String
resp.db_instance.endpoint.address #=> String
resp.db_instance.endpoint.port #=> Integer
resp.db_instance.endpoint.hosted_zone_id #=> String
resp.db_instance.instance_create_time #=> Time
resp.db_instance.preferred_backup_window #=> String
resp.db_instance.backup_retention_period #=> Integer
resp.db_instance.vpc_security_groups #=> Array
resp.db_instance.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_instance.vpc_security_groups[0].status #=> String
resp.db_instance.availability_zone #=> String
resp.db_instance.db_subnet_group.db_subnet_group_name #=> String
resp.db_instance.db_subnet_group.db_subnet_group_description #=> String
resp.db_instance.db_subnet_group.vpc_id #=> String
resp.db_instance.db_subnet_group.subnet_group_status #=> String
resp.db_instance.db_subnet_group.subnets #=> Array
resp.db_instance.db_subnet_group.subnets[0].subnet_identifier #=> String
resp.db_instance.db_subnet_group.subnets[0].subnet_availability_zone.name #=> String
resp.db_instance.db_subnet_group.subnets[0].subnet_status #=> String
resp.db_instance.db_subnet_group.db_subnet_group_arn #=> String
resp.db_instance.preferred_maintenance_window #=> String
resp.db_instance.pending_modified_values.db_instance_class #=> String
resp.db_instance.pending_modified_values.allocated_storage #=> Integer
resp.db_instance.pending_modified_values.master_user_password #=> String
resp.db_instance.pending_modified_values.port #=> Integer
resp.db_instance.pending_modified_values.backup_retention_period #=> Integer
resp.db_instance.pending_modified_values.multi_az #=> true/false
resp.db_instance.pending_modified_values.engine_version #=> String
resp.db_instance.pending_modified_values.license_model #=> String
resp.db_instance.pending_modified_values.iops #=> Integer
resp.db_instance.pending_modified_values.db_instance_identifier #=> String
resp.db_instance.pending_modified_values.storage_type #=> String
resp.db_instance.pending_modified_values.ca_certificate_identifier #=> String
resp.db_instance.pending_modified_values.db_subnet_group_name #=> String
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable #=> Array
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable[0] #=> String
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable #=> Array
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable[0] #=> String
resp.db_instance.latest_restorable_time #=> Time
resp.db_instance.engine_version #=> String
resp.db_instance.auto_minor_version_upgrade #=> true/false
resp.db_instance.publicly_accessible #=> true/false
resp.db_instance.status_infos #=> Array
resp.db_instance.status_infos[0].status_type #=> String
resp.db_instance.status_infos[0].normal #=> true/false
resp.db_instance.status_infos[0].status #=> String
resp.db_instance.status_infos[0].message #=> String
resp.db_instance.db_cluster_identifier #=> String
resp.db_instance.storage_encrypted #=> true/false
resp.db_instance.kms_key_id #=> String
resp.db_instance.dbi_resource_id #=> String
resp.db_instance.ca_certificate_identifier #=> String
resp.db_instance.promotion_tier #=> Integer
resp.db_instance.db_instance_arn #=> String
resp.db_instance.enabled_cloudwatch_logs_exports #=> Array
resp.db_instance.enabled_cloudwatch_logs_exports[0] #=> String

Options Hash (options):

  • :db_instance_identifier (required, String)

    The instance identifier for the instance to be deleted. This parameter isn\'t case sensitive.

    Constraints:

    • Must match the name of an existing instance.

    ^

Returns:

See Also:

#delete_db_subnet_group(options = {}) ⇒ Struct

Deletes a subnet group.

The specified database subnet group must not be associated with any DB instances.

Examples:

Request syntax with placeholder values


resp = client.delete_db_subnet_group({
  db_subnet_group_name: "String", # required
})

Options Hash (options):

  • :db_subnet_group_name (required, String)

    The name of the database subnet group to delete.

    You can\'t delete the default subnet group.

    Constraints:

    Must match the name of an existing DBSubnetGroup. Must not be default.

    Example: mySubnetgroup

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#describe_certificates(options = {}) ⇒ Types::CertificateMessage

Returns a list of certificate authority (CA) certificates provided by Amazon DocumentDB for this AWS account.

Examples:

Request syntax with placeholder values


resp = client.describe_certificates({
  certificate_identifier: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.certificates #=> Array
resp.certificates[0].certificate_identifier #=> String
resp.certificates[0].certificate_type #=> String
resp.certificates[0].thumbprint #=> String
resp.certificates[0].valid_from #=> Time
resp.certificates[0].valid_till #=> Time
resp.certificates[0].certificate_arn #=> String
resp.marker #=> String

Options Hash (options):

  • :certificate_identifier (String)

    The user-supplied certificate identifier. If this parameter is specified, information for only the specified certificate is returned. If this parameter is omitted, a list of up to MaxRecords certificates is returned. This parameter is not case sensitive.

    Constraints

    • Must match an existing CertificateIdentifier.

    ^

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

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

    Default: 100

    Constraints:

    • Minimum: 20

    • Maximum: 100

  • :marker (String)

    An optional pagination token provided by a previous DescribeCertificates request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Returns:

See Also:

#describe_db_cluster_parameter_groups(options = {}) ⇒ Types::DBClusterParameterGroupsMessage

Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName parameter is specified, the list contains only the description of the specified cluster parameter group.

Examples:

Request syntax with placeholder values


resp = client.describe_db_cluster_parameter_groups({
  db_cluster_parameter_group_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.marker #=> String
resp.db_cluster_parameter_groups #=> Array
resp.db_cluster_parameter_groups[0].db_cluster_parameter_group_name #=> String
resp.db_cluster_parameter_groups[0].db_parameter_group_family #=> String
resp.db_cluster_parameter_groups[0].description #=> String
resp.db_cluster_parameter_groups[0].db_cluster_parameter_group_arn #=> String

Options Hash (options):

  • :db_cluster_parameter_group_name (String)

    The name of a specific cluster parameter group to return details for.

    Constraints:

    • If provided, must match the name of an existing DBClusterParameterGroup.

    ^

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

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

Returns:

See Also:

#describe_db_cluster_parameters(options = {}) ⇒ Types::DBClusterParameterGroupDetails

Returns the detailed parameter list for a particular cluster parameter group.

Examples:

Request syntax with placeholder values


resp = client.describe_db_cluster_parameters({
  db_cluster_parameter_group_name: "String", # required
  source: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.parameters #=> Array
resp.parameters[0].parameter_name #=> String
resp.parameters[0].parameter_value #=> String
resp.parameters[0].description #=> String
resp.parameters[0].source #=> String
resp.parameters[0].apply_type #=> String
resp.parameters[0].data_type #=> String
resp.parameters[0].allowed_values #=> String
resp.parameters[0].is_modifiable #=> true/false
resp.parameters[0].minimum_engine_version #=> String
resp.parameters[0].apply_method #=> String, one of "immediate", "pending-reboot"
resp.marker #=> String

Options Hash (options):

  • :db_cluster_parameter_group_name (required, String)

    The name of a specific cluster parameter group to return parameter details for.

    Constraints:

    • If provided, must match the name of an existing DBClusterParameterGroup.

    ^

  • :source (String)

    A value that indicates to return only parameters for a specific source. Parameter sources can be engine, service, or customer.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

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

Returns:

See Also:

#describe_db_cluster_snapshot_attributes(options = {}) ⇒ Types::DescribeDBClusterSnapshotAttributesResult

Returns a list of cluster snapshot attribute names and values for a manual DB cluster snapshot.

When you share snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes returns the restore attribute and a list of IDs for the AWS accounts that are authorized to copy or restore the manual cluster snapshot. If all is included in the list of values for the restore attribute, then the manual cluster snapshot is public and can be copied or restored by all AWS accounts.

Examples:

Request syntax with placeholder values


resp = client.describe_db_cluster_snapshot_attributes({
  db_cluster_snapshot_identifier: "String", # required
})

Response structure


resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_identifier #=> String
resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_attributes #=> Array
resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_attributes[0].attribute_name #=> String
resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_attributes[0].attribute_values #=> Array
resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_attributes[0].attribute_values[0] #=> String

Options Hash (options):

  • :db_cluster_snapshot_identifier (required, String)

    The identifier for the cluster snapshot to describe the attributes for.

Returns:

See Also:

#describe_db_cluster_snapshots(options = {}) ⇒ Types::DBClusterSnapshotMessage

Returns information about cluster snapshots. This API operation supports pagination.

Examples:

Request syntax with placeholder values


resp = client.describe_db_cluster_snapshots({
  db_cluster_identifier: "String",
  db_cluster_snapshot_identifier: "String",
  snapshot_type: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
  include_shared: false,
  include_public: false,
})

Response structure


resp.marker #=> String
resp.db_cluster_snapshots #=> Array
resp.db_cluster_snapshots[0].availability_zones #=> Array
resp.db_cluster_snapshots[0].availability_zones[0] #=> String
resp.db_cluster_snapshots[0].db_cluster_snapshot_identifier #=> String
resp.db_cluster_snapshots[0].db_cluster_identifier #=> String
resp.db_cluster_snapshots[0].snapshot_create_time #=> Time
resp.db_cluster_snapshots[0].engine #=> String
resp.db_cluster_snapshots[0].status #=> String
resp.db_cluster_snapshots[0].port #=> Integer
resp.db_cluster_snapshots[0].vpc_id #=> String
resp.db_cluster_snapshots[0].cluster_create_time #=> Time
resp.db_cluster_snapshots[0].master_username #=> String
resp.db_cluster_snapshots[0].engine_version #=> String
resp.db_cluster_snapshots[0].snapshot_type #=> String
resp.db_cluster_snapshots[0].percent_progress #=> Integer
resp.db_cluster_snapshots[0].storage_encrypted #=> true/false
resp.db_cluster_snapshots[0].kms_key_id #=> String
resp.db_cluster_snapshots[0].db_cluster_snapshot_arn #=> String
resp.db_cluster_snapshots[0].source_db_cluster_snapshot_arn #=> String

Options Hash (options):

  • :db_cluster_identifier (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 (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 (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 AWS account.

    • manual - Return all cluster snapshots that you have manually created for your AWS account.

    • shared - Return all manual cluster snapshots that have been shared to your AWS 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 the IncludePublic 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 (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

    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 (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 (Boolean)

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

  • :include_public (Boolean)

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

Returns:

See Also:

#describe_db_clusters(options = {}) ⇒ Types::DBClusterMessage

Returns information about provisioned Amazon DocumentDB clusters. This API operation supports pagination. For certain management features such as cluster and instance lifecycle management, Amazon DocumentDB leverages operational technology that is shared with Amazon RDS and Amazon Neptune. Use the filterName=engine,Values=docdb filter parameter to return only Amazon DocumentDB clusters.

Examples:

Request syntax with placeholder values


resp = client.describe_db_clusters({
  db_cluster_identifier: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.marker #=> String
resp.db_clusters #=> Array
resp.db_clusters[0].availability_zones #=> Array
resp.db_clusters[0].availability_zones[0] #=> String
resp.db_clusters[0].backup_retention_period #=> Integer
resp.db_clusters[0].db_cluster_identifier #=> String
resp.db_clusters[0].db_cluster_parameter_group #=> String
resp.db_clusters[0].db_subnet_group #=> String
resp.db_clusters[0].status #=> String
resp.db_clusters[0].percent_progress #=> String
resp.db_clusters[0].earliest_restorable_time #=> Time
resp.db_clusters[0].endpoint #=> String
resp.db_clusters[0].reader_endpoint #=> String
resp.db_clusters[0].multi_az #=> true/false
resp.db_clusters[0].engine #=> String
resp.db_clusters[0].engine_version #=> String
resp.db_clusters[0].latest_restorable_time #=> Time
resp.db_clusters[0].port #=> Integer
resp.db_clusters[0].master_username #=> String
resp.db_clusters[0].preferred_backup_window #=> String
resp.db_clusters[0].preferred_maintenance_window #=> String
resp.db_clusters[0].db_cluster_members #=> Array
resp.db_clusters[0].db_cluster_members[0].db_instance_identifier #=> String
resp.db_clusters[0].db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_clusters[0].db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_clusters[0].db_cluster_members[0].promotion_tier #=> Integer
resp.db_clusters[0].vpc_security_groups #=> Array
resp.db_clusters[0].vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_clusters[0].vpc_security_groups[0].status #=> String
resp.db_clusters[0].hosted_zone_id #=> String
resp.db_clusters[0].storage_encrypted #=> true/false
resp.db_clusters[0].kms_key_id #=> String
resp.db_clusters[0].db_cluster_resource_id #=> String
resp.db_clusters[0].db_cluster_arn #=> String
resp.db_clusters[0].associated_roles #=> Array
resp.db_clusters[0].associated_roles[0].role_arn #=> String
resp.db_clusters[0].associated_roles[0].status #=> String
resp.db_clusters[0].cluster_create_time #=> Time
resp.db_clusters[0].enabled_cloudwatch_logs_exports #=> Array
resp.db_clusters[0].enabled_cloudwatch_logs_exports[0] #=> String
resp.db_clusters[0].deletion_protection #=> true/false

Options Hash (options):

  • :db_cluster_identifier (String)

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

    Constraints:

    • If provided, must match an existing DBClusterIdentifier.

    ^

  • :filters (Array<Types::Filter>)

    A filter that specifies one or more clusters to describe.

    Supported filters:

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

    ^

  • :max_records (Integer)

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

Returns:

See Also:

#describe_db_engine_versions(options = {}) ⇒ Types::DBEngineVersionMessage

Returns a list of the available engines.

Examples:

Request syntax with placeholder values


resp = client.describe_db_engine_versions({
  engine: "String",
  engine_version: "String",
  db_parameter_group_family: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
  default_only: false,
  list_supported_character_sets: false,
  list_supported_timezones: false,
})

Response structure


resp.marker #=> String
resp.db_engine_versions #=> Array
resp.db_engine_versions[0].engine #=> String
resp.db_engine_versions[0].engine_version #=> String
resp.db_engine_versions[0].db_parameter_group_family #=> String
resp.db_engine_versions[0].db_engine_description #=> String
resp.db_engine_versions[0].db_engine_version_description #=> String
resp.db_engine_versions[0].valid_upgrade_target #=> Array
resp.db_engine_versions[0].valid_upgrade_target[0].engine #=> String
resp.db_engine_versions[0].valid_upgrade_target[0].engine_version #=> String
resp.db_engine_versions[0].valid_upgrade_target[0].description #=> String
resp.db_engine_versions[0].valid_upgrade_target[0].auto_upgrade #=> true/false
resp.db_engine_versions[0].valid_upgrade_target[0].is_major_version_upgrade #=> true/false
resp.db_engine_versions[0].exportable_log_types #=> Array
resp.db_engine_versions[0].exportable_log_types[0] #=> String
resp.db_engine_versions[0].supports_log_exports_to_cloudwatch_logs #=> true/false

Options Hash (options):

  • :engine (String)

    The database engine to return.

  • :engine_version (String)

    The database engine version to return.

    Example: 3.6.0

  • :db_parameter_group_family (String)

    The name of a specific parameter group family to return details for.

    Constraints:

    • If provided, must match an existing DBParameterGroupFamily.

    ^

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

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

  • :default_only (Boolean)

    Indicates that only the default version of the specified engine or engine and major version combination is returned.

  • :list_supported_character_sets (Boolean)

    If this parameter is specified and the requested engine supports the CharacterSetName parameter for CreateDBInstance, the response includes a list of supported character sets for each engine version.

  • :list_supported_timezones (Boolean)

    If this parameter is specified and the requested engine supports the TimeZone parameter for CreateDBInstance, the response includes a list of supported time zones for each engine version.

Returns:

See Also:

#describe_db_instances(options = {}) ⇒ Types::DBInstanceMessage

Returns information about provisioned Amazon DocumentDB instances. This API supports pagination.

Examples:

Request syntax with placeholder values


resp = client.describe_db_instances({
  db_instance_identifier: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.marker #=> String
resp.db_instances #=> Array
resp.db_instances[0].db_instance_identifier #=> String
resp.db_instances[0].db_instance_class #=> String
resp.db_instances[0].engine #=> String
resp.db_instances[0].db_instance_status #=> String
resp.db_instances[0].endpoint.address #=> String
resp.db_instances[0].endpoint.port #=> Integer
resp.db_instances[0].endpoint.hosted_zone_id #=> String
resp.db_instances[0].instance_create_time #=> Time
resp.db_instances[0].preferred_backup_window #=> String
resp.db_instances[0].backup_retention_period #=> Integer
resp.db_instances[0].vpc_security_groups #=> Array
resp.db_instances[0].vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_instances[0].vpc_security_groups[0].status #=> String
resp.db_instances[0].availability_zone #=> String
resp.db_instances[0].db_subnet_group.db_subnet_group_name #=> String
resp.db_instances[0].db_subnet_group.db_subnet_group_description #=> String
resp.db_instances[0].db_subnet_group.vpc_id #=> String
resp.db_instances[0].db_subnet_group.subnet_group_status #=> String
resp.db_instances[0].db_subnet_group.subnets #=> Array
resp.db_instances[0].db_subnet_group.subnets[0].subnet_identifier #=> String
resp.db_instances[0].db_subnet_group.subnets[0].subnet_availability_zone.name #=> String
resp.db_instances[0].db_subnet_group.subnets[0].subnet_status #=> String
resp.db_instances[0].db_subnet_group.db_subnet_group_arn #=> String
resp.db_instances[0].preferred_maintenance_window #=> String
resp.db_instances[0].pending_modified_values.db_instance_class #=> String
resp.db_instances[0].pending_modified_values.allocated_storage #=> Integer
resp.db_instances[0].pending_modified_values.master_user_password #=> String
resp.db_instances[0].pending_modified_values.port #=> Integer
resp.db_instances[0].pending_modified_values.backup_retention_period #=> Integer
resp.db_instances[0].pending_modified_values.multi_az #=> true/false
resp.db_instances[0].pending_modified_values.engine_version #=> String
resp.db_instances[0].pending_modified_values.license_model #=> String
resp.db_instances[0].pending_modified_values.iops #=> Integer
resp.db_instances[0].pending_modified_values.db_instance_identifier #=> String
resp.db_instances[0].pending_modified_values.storage_type #=> String
resp.db_instances[0].pending_modified_values.ca_certificate_identifier #=> String
resp.db_instances[0].pending_modified_values.db_subnet_group_name #=> String
resp.db_instances[0].pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable #=> Array
resp.db_instances[0].pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable[0] #=> String
resp.db_instances[0].pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable #=> Array
resp.db_instances[0].pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable[0] #=> String
resp.db_instances[0].latest_restorable_time #=> Time
resp.db_instances[0].engine_version #=> String
resp.db_instances[0].auto_minor_version_upgrade #=> true/false
resp.db_instances[0].publicly_accessible #=> true/false
resp.db_instances[0].status_infos #=> Array
resp.db_instances[0].status_infos[0].status_type #=> String
resp.db_instances[0].status_infos[0].normal #=> true/false
resp.db_instances[0].status_infos[0].status #=> String
resp.db_instances[0].status_infos[0].message #=> String
resp.db_instances[0].db_cluster_identifier #=> String
resp.db_instances[0].storage_encrypted #=> true/false
resp.db_instances[0].kms_key_id #=> String
resp.db_instances[0].dbi_resource_id #=> String
resp.db_instances[0].ca_certificate_identifier #=> String
resp.db_instances[0].promotion_tier #=> Integer
resp.db_instances[0].db_instance_arn #=> String
resp.db_instances[0].enabled_cloudwatch_logs_exports #=> Array
resp.db_instances[0].enabled_cloudwatch_logs_exports[0] #=> String

Options Hash (options):

  • :db_instance_identifier (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 (Array<Types::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 (Integer)

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

Returns:

See Also:

#describe_db_subnet_groups(options = {}) ⇒ Types::DBSubnetGroupMessage

Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, the list will contain only the descriptions of the specified DBSubnetGroup.

Examples:

Request syntax with placeholder values


resp = client.describe_db_subnet_groups({
  db_subnet_group_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.marker #=> String
resp.db_subnet_groups #=> Array
resp.db_subnet_groups[0].db_subnet_group_name #=> String
resp.db_subnet_groups[0].db_subnet_group_description #=> String
resp.db_subnet_groups[0].vpc_id #=> String
resp.db_subnet_groups[0].subnet_group_status #=> String
resp.db_subnet_groups[0].subnets #=> Array
resp.db_subnet_groups[0].subnets[0].subnet_identifier #=> String
resp.db_subnet_groups[0].subnets[0].subnet_availability_zone.name #=> String
resp.db_subnet_groups[0].subnets[0].subnet_status #=> String
resp.db_subnet_groups[0].db_subnet_group_arn #=> String

Options Hash (options):

  • :db_subnet_group_name (String)

    The name of the subnet group to return details for.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

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

Returns:

See Also:

#describe_engine_default_cluster_parameters(options = {}) ⇒ Types::DescribeEngineDefaultClusterParametersResult

Returns the default engine and system parameter information for the cluster database engine.

Examples:

Request syntax with placeholder values


resp = client.describe_engine_default_cluster_parameters({
  db_parameter_group_family: "String", # required
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.engine_defaults.db_parameter_group_family #=> String
resp.engine_defaults.marker #=> String
resp.engine_defaults.parameters #=> Array
resp.engine_defaults.parameters[0].parameter_name #=> String
resp.engine_defaults.parameters[0].parameter_value #=> String
resp.engine_defaults.parameters[0].description #=> String
resp.engine_defaults.parameters[0].source #=> String
resp.engine_defaults.parameters[0].apply_type #=> String
resp.engine_defaults.parameters[0].data_type #=> String
resp.engine_defaults.parameters[0].allowed_values #=> String
resp.engine_defaults.parameters[0].is_modifiable #=> true/false
resp.engine_defaults.parameters[0].minimum_engine_version #=> String
resp.engine_defaults.parameters[0].apply_method #=> String, one of "immediate", "pending-reboot"

Options Hash (options):

  • :db_parameter_group_family (required, String)

    The name of the cluster parameter group family to return the engine parameter information for.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

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

Returns:

See Also:

#describe_event_categories(options = {}) ⇒ Types::EventCategoriesMessage

Displays a list of categories for all event source types, or, if specified, for a specified source type.

Examples:

Request syntax with placeholder values


resp = client.describe_event_categories({
  source_type: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Response structure


resp.event_categories_map_list #=> Array
resp.event_categories_map_list[0].source_type #=> String
resp.event_categories_map_list[0].event_categories #=> Array
resp.event_categories_map_list[0].event_categories[0] #=> String

Options Hash (options):

  • :source_type (String)

    The type of source that is generating the events.

    Valid values: db-instance, db-parameter-group, db-security-group, db-snapshot

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:

See Also:

#describe_events(options = {}) ⇒ Types::EventsMessage

Returns events related to instances, security groups, snapshots, and DB parameter groups for the past 14 days. You can obtain events specific to a particular DB instance, security group, snapshot, or parameter group by providing the name as a parameter. By default, the events of the past hour are returned.

Examples:

Request syntax with placeholder values


resp = client.describe_events({
  source_identifier: "String",
  source_type: "db-instance", # accepts db-instance, db-parameter-group, db-security-group, db-snapshot, db-cluster, db-cluster-snapshot
  start_time: Time.now,
  end_time: Time.now,
  duration: 1,
  event_categories: ["String"],
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.marker #=> String
resp.events #=> Array
resp.events[0].source_identifier #=> String
resp.events[0].source_type #=> String, one of "db-instance", "db-parameter-group", "db-security-group", "db-snapshot", "db-cluster", "db-cluster-snapshot"
resp.events[0].message #=> String
resp.events[0].event_categories #=> Array
resp.events[0].event_categories[0] #=> String
resp.events[0].date #=> Time
resp.events[0].source_arn #=> String

Options Hash (options):

  • :source_identifier (String)

    The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.

    Constraints:

    • If SourceIdentifier is provided, SourceType must also be provided.

    • If the source type is DBInstance, a DBInstanceIdentifier must be provided.

    • If the source type is DBSecurityGroup, a DBSecurityGroupName must be provided.

    • If the source type is DBParameterGroup, a DBParameterGroupName must be provided.

    • If the source type is DBSnapshot, a DBSnapshotIdentifier must be provided.

    • Cannot end with a hyphen or contain two consecutive hyphens.

  • :source_type (String)

    The event source to retrieve events for. If no value is specified, all events are returned.

  • :start_time (Time)

    The beginning of the time interval to retrieve events for, specified in ISO 8601 format.

    Example: 2009-07-08T18:00Z

  • :end_time (Time)

    The end of the time interval for which to retrieve events, specified in ISO 8601 format.

    Example: 2009-07-08T18:00Z

  • :duration (Integer)

    The number of minutes to retrieve events for.

    Default: 60

  • :event_categories (Array<String>)

    A list of event categories that trigger notifications for an event notification subscription.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

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

Returns:

See Also:

#describe_orderable_db_instance_options(options = {}) ⇒ Types::OrderableDBInstanceOptionsMessage

Returns a list of orderable instance options for the specified engine.

Examples:

Request syntax with placeholder values


resp = client.describe_orderable_db_instance_options({
  engine: "String", # required
  engine_version: "String",
  db_instance_class: "String",
  license_model: "String",
  vpc: false,
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Response structure


resp.orderable_db_instance_options #=> Array
resp.orderable_db_instance_options[0].engine #=> String
resp.orderable_db_instance_options[0].engine_version #=> String
resp.orderable_db_instance_options[0].db_instance_class #=> String
resp.orderable_db_instance_options[0].license_model #=> String
resp.orderable_db_instance_options[0].availability_zones #=> Array
resp.orderable_db_instance_options[0].availability_zones[0].name #=> String
resp.orderable_db_instance_options[0].vpc #=> true/false
resp.marker #=> String

Options Hash (options):

  • :engine (required, String)

    The name of the engine to retrieve instance options for.

  • :engine_version (String)

    The engine version filter value. Specify this parameter to show only the available offerings that match the specified engine version.

  • :db_instance_class (String)

    The instance class filter value. Specify this parameter to show only the available offerings that match the specified instance class.

  • :license_model (String)

    The license model filter value. Specify this parameter to show only the available offerings that match the specified license model.

  • :vpc (Boolean)

    The virtual private cloud (VPC) filter value. Specify this parameter to show only the available VPC or non-VPC offerings.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

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

Returns:

See Also:

#describe_pending_maintenance_actions(options = {}) ⇒ Types::PendingMaintenanceActionsMessage

Returns a list of resources (for example, instances) that have at least one pending maintenance action.

Examples:

Request syntax with placeholder values


resp = client.describe_pending_maintenance_actions({
  resource_identifier: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  marker: "String",
  max_records: 1,
})

Response structure


resp.pending_maintenance_actions #=> Array
resp.pending_maintenance_actions[0].resource_identifier #=> String
resp.pending_maintenance_actions[0].pending_maintenance_action_details #=> Array
resp.pending_maintenance_actions[0].pending_maintenance_action_details[0].action #=> String
resp.pending_maintenance_actions[0].pending_maintenance_action_details[0].auto_applied_after_date #=> Time
resp.pending_maintenance_actions[0].pending_maintenance_action_details[0].forced_apply_date #=> Time
resp.pending_maintenance_actions[0].pending_maintenance_action_details[0].opt_in_status #=> String
resp.pending_maintenance_actions[0].pending_maintenance_action_details[0].current_apply_date #=> Time
resp.pending_maintenance_actions[0].pending_maintenance_action_details[0].description #=> String
resp.marker #=> String

Options Hash (options):

  • :resource_identifier (String)

    The ARN of a resource to return pending maintenance actions for.

  • :filters (Array<Types::Filter>)

    A filter that specifies one or more resources to return pending maintenance actions for.

    Supported filters:

    • db-cluster-id - Accepts cluster identifiers and cluster Amazon Resource Names (ARNs). The results list includes only pending maintenance actions for the clusters identified by these ARNs.

    • db-instance-id - Accepts instance identifiers and instance ARNs. The results list includes only pending maintenance actions for the DB instances identified by these ARNs.

  • :marker (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.

  • :max_records (Integer)

    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.

Returns:

See Also:

#failover_db_cluster(options = {}) ⇒ Types::FailoverDBClusterResult

Forces a failover for a cluster.

A failover for a cluster promotes one of the Amazon DocumentDB replicas (read-only instances) in the cluster to be the primary instance (the cluster writer).

If the primary instance fails, Amazon DocumentDB automatically fails over to an Amazon DocumentDB replica, if one exists. You can force a failover when you want to simulate a failure of a primary instance for testing.

Examples:

Request syntax with placeholder values


resp = client.failover_db_cluster({
  db_cluster_identifier: "String",
  target_db_instance_identifier: "String",
})

Response structure


resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.db_cluster_identifier #=> String
resp.db_cluster.db_cluster_parameter_group #=> String
resp.db_cluster.db_subnet_group #=> String
resp.db_cluster.status #=> String
resp.db_cluster.percent_progress #=> String
resp.db_cluster.earliest_restorable_time #=> Time
resp.db_cluster.endpoint #=> String
resp.db_cluster.reader_endpoint #=> String
resp.db_cluster.multi_az #=> true/false
resp.db_cluster.engine #=> String
resp.db_cluster.engine_version #=> String
resp.db_cluster.latest_restorable_time #=> Time
resp.db_cluster.port #=> Integer
resp.db_cluster.master_username #=> String
resp.db_cluster.preferred_backup_window #=> String
resp.db_cluster.preferred_maintenance_window #=> String
resp.db_cluster.db_cluster_members #=> Array
resp.db_cluster.db_cluster_members[0].db_instance_identifier #=> String
resp.db_cluster.db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_cluster.db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_cluster.db_cluster_members[0].promotion_tier #=> Integer
resp.db_cluster.vpc_security_groups #=> Array
resp.db_cluster.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_cluster.vpc_security_groups[0].status #=> String
resp.db_cluster.hosted_zone_id #=> String
resp.db_cluster.storage_encrypted #=> true/false
resp.db_cluster.kms_key_id #=> String
resp.db_cluster.db_cluster_resource_id #=> String
resp.db_cluster.db_cluster_arn #=> String
resp.db_cluster.associated_roles #=> Array
resp.db_cluster.associated_roles[0].role_arn #=> String
resp.db_cluster.associated_roles[0].status #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.deletion_protection #=> true/false

Options Hash (options):

  • :db_cluster_identifier (String)

    A cluster identifier to force a failover for. This parameter is not case sensitive.

    Constraints:

    • Must match the identifier of an existing DBCluster.

    ^

  • :target_db_instance_identifier (String)

    The name of the instance to promote to the primary instance.

    You must specify the instance identifier for an Amazon DocumentDB replica in the cluster. For example, mydbcluster-replica1.

Returns:

See Also:

#list_tags_for_resource(options = {}) ⇒ Types::TagListMessage

Lists all tags on an Amazon DocumentDB resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_name: "String", # required
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Response structure


resp.tag_list #=> Array
resp.tag_list[0].key #=> String
resp.tag_list[0].value #=> String

Options Hash (options):

  • :resource_name (required, String)

    The Amazon DocumentDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:

See Also:

#modify_db_cluster(options = {}) ⇒ Types::ModifyDBClusterResult

Modifies a setting for an Amazon DocumentDB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.

Examples:

Request syntax with placeholder values


resp = client.modify_db_cluster({
  db_cluster_identifier: "String", # required
  new_db_cluster_identifier: "String",
  apply_immediately: false,
  backup_retention_period: 1,
  db_cluster_parameter_group_name: "String",
  vpc_security_group_ids: ["String"],
  port: 1,
  master_user_password: "String",
  preferred_backup_window: "String",
  preferred_maintenance_window: "String",
  cloudwatch_logs_export_configuration: {
    enable_log_types: ["String"],
    disable_log_types: ["String"],
  },
  engine_version: "String",
  deletion_protection: false,
})

Response structure


resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.db_cluster_identifier #=> String
resp.db_cluster.db_cluster_parameter_group #=> String
resp.db_cluster.db_subnet_group #=> String
resp.db_cluster.status #=> String
resp.db_cluster.percent_progress #=> String
resp.db_cluster.earliest_restorable_time #=> Time
resp.db_cluster.endpoint #=> String
resp.db_cluster.reader_endpoint #=> String
resp.db_cluster.multi_az #=> true/false
resp.db_cluster.engine #=> String
resp.db_cluster.engine_version #=> String
resp.db_cluster.latest_restorable_time #=> Time
resp.db_cluster.port #=> Integer
resp.db_cluster.master_username #=> String
resp.db_cluster.preferred_backup_window #=> String
resp.db_cluster.preferred_maintenance_window #=> String
resp.db_cluster.db_cluster_members #=> Array
resp.db_cluster.db_cluster_members[0].db_instance_identifier #=> String
resp.db_cluster.db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_cluster.db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_cluster.db_cluster_members[0].promotion_tier #=> Integer
resp.db_cluster.vpc_security_groups #=> Array
resp.db_cluster.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_cluster.vpc_security_groups[0].status #=> String
resp.db_cluster.hosted_zone_id #=> String
resp.db_cluster.storage_encrypted #=> true/false
resp.db_cluster.kms_key_id #=> String
resp.db_cluster.db_cluster_resource_id #=> String
resp.db_cluster.db_cluster_arn #=> String
resp.db_cluster.associated_roles #=> Array
resp.db_cluster.associated_roles[0].role_arn #=> String
resp.db_cluster.associated_roles[0].status #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.deletion_protection #=> true/false

Options Hash (options):

  • :db_cluster_identifier (required, String)

    The cluster identifier for the cluster that is being modified. This parameter is not case sensitive.

    Constraints:

    • Must match the identifier of an existing DBCluster.

    ^

  • :new_db_cluster_identifier (String)

    The new cluster identifier for the cluster when renaming a cluster. This value 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-cluster2

  • :apply_immediately (Boolean)

    A value that specifies whether the changes in this request and any pending changes are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the cluster. If this parameter is set to false, changes to the cluster are applied during the next maintenance window.

    The ApplyImmediately parameter affects only the NewDBClusterIdentifier and MasterUserPassword values. If you set this parameter value to false, the changes to the NewDBClusterIdentifier and MasterUserPassword values are applied during the next maintenance window. All other changes are applied immediately, regardless of the value of the ApplyImmediately parameter.

    Default: false

  • :backup_retention_period (Integer)

    The number of days for which automated backups are retained. You must specify a minimum value of 1.

    Default: 1

    Constraints:

    • Must be a value from 1 to 35.

    ^

  • :db_cluster_parameter_group_name (String)

    The name of the cluster parameter group to use for the cluster.

  • :vpc_security_group_ids (Array<String>)

    A list of virtual private cloud (VPC) security groups that the cluster will belong to.

  • :port (Integer)

    The port number on which the cluster accepts connections.

    Constraints: Must be a value from 1150 to 65535.

    Default: The same port as the original cluster.

  • :master_user_password (String)

    The password for the master database user. 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.

  • :preferred_backup_window (String)

    The daily time range during which automated backups are created if automated backups are enabled, using the BackupRetentionPeriod parameter.

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region.

    Constraints:

    • Must be in the format hh24:mi-hh24:mi.

    • Must be in Universal Coordinated Time (UTC).

    • Must not conflict with the preferred maintenance window.

    • Must be at least 30 minutes.

  • :preferred_maintenance_window (String)

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

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

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

    Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun

    Constraints: Minimum 30-minute window.

  • :cloudwatch_logs_export_configuration (Types::CloudwatchLogsExportConfiguration)

    The configuration setting for the log types to be enabled for export to Amazon CloudWatch Logs for a specific instance or cluster. The EnableLogTypes and DisableLogTypes arrays determine which logs are exported (or not exported) to CloudWatch Logs.

  • :engine_version (String)

    The version number of the database engine to which you want to upgrade. Changing this parameter results in an outage. The change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true.

  • :deletion_protection (Boolean)

    Specifies whether this cluster can be deleted. If DeletionProtection is enabled, the cluster cannot be deleted unless it is modified and DeletionProtection is disabled. DeletionProtection protects clusters from being accidentally deleted.

Returns:

See Also:

#modify_db_cluster_parameter_group(options = {}) ⇒ Types::DBClusterParameterGroupNameMessage

Modifies the parameters of a cluster parameter group. To modify more than one parameter, submit a list of the following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 parameters can be modified in a single request.

Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot or maintenance window before the change can take effect.

After you create a cluster parameter group, you should wait at least 5 minutes before creating your first cluster that uses that cluster parameter group as the default parameter group. This allows Amazon DocumentDB to fully complete the create action before the parameter group is used as the default for a new cluster. This step is especially important for parameters that are critical when creating the default database for a cluster, such as the character set for the default database defined by the character_set_database parameter.

Examples:

Request syntax with placeholder values


resp = client.modify_db_cluster_parameter_group({
  db_cluster_parameter_group_name: "String", # required
  parameters: [ # required
    {
      parameter_name: "String",
      parameter_value: "String",
      description: "String",
      source: "String",
      apply_type: "String",
      data_type: "String",
      allowed_values: "String",
      is_modifiable: false,
      minimum_engine_version: "String",
      apply_method: "immediate", # accepts immediate, pending-reboot
    },
  ],
})

Response structure


resp.db_cluster_parameter_group_name #=> String

Options Hash (options):

  • :db_cluster_parameter_group_name (required, String)

    The name of the cluster parameter group to modify.

  • :parameters (required, Array<Types::Parameter>)

    A list of parameters in the cluster parameter group to modify.

Returns:

See Also:

#modify_db_cluster_snapshot_attribute(options = {}) ⇒ Types::ModifyDBClusterSnapshotAttributeResult

Adds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.

To share a manual cluster snapshot with other AWS accounts, specify restore as the AttributeName, and use the ValuesToAdd parameter to add a list of IDs of the AWS accounts that are authorized to restore the manual cluster snapshot. Use the value all to make the manual cluster snapshot public, which means that it can be copied or restored by all AWS accounts. Do not add the all value for any manual DB cluster snapshots that contain private information that you don't want available to all AWS accounts. If a manual cluster snapshot is encrypted, it can be shared, but only by specifying a list of authorized AWS account IDs for the ValuesToAdd parameter. You can't use all as a value for that parameter in this case.

Examples:

Request syntax with placeholder values


resp = client.modify_db_cluster_snapshot_attribute({
  db_cluster_snapshot_identifier: "String", # required
  attribute_name: "String", # required
  values_to_add: ["String"],
  values_to_remove: ["String"],
})

Response structure


resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_identifier #=> String
resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_attributes #=> Array
resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_attributes[0].attribute_name #=> String
resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_attributes[0].attribute_values #=> Array
resp.db_cluster_snapshot_attributes_result.db_cluster_snapshot_attributes[0].attribute_values[0] #=> String

Options Hash (options):

  • :db_cluster_snapshot_identifier (required, String)

    The identifier for the cluster snapshot to modify the attributes for.

  • :attribute_name (required, String)

    The name of the cluster snapshot attribute to modify.

    To manage authorization for other AWS accounts to copy or restore a manual cluster snapshot, set this value to restore.

  • :values_to_add (Array<String>)

    A list of cluster snapshot attributes to add to the attribute specified by AttributeName.

    To authorize other AWS accounts to copy or restore a manual cluster snapshot, set this list to include one or more AWS account IDs. To make the manual cluster snapshot restorable by any AWS account, set it to all. Do not add the all value for any manual cluster snapshots that contain private information that you don\'t want to be available to all AWS accounts.

  • :values_to_remove (Array<String>)

    A list of cluster snapshot attributes to remove from the attribute specified by AttributeName.

    To remove authorization for other AWS accounts to copy or restore a manual cluster snapshot, set this list to include one or more AWS account identifiers. To remove authorization for any AWS account to copy or restore the cluster snapshot, set it to all . If you specify all, an AWS account whose account ID is explicitly added to the restore attribute can still copy or restore a manual cluster snapshot.

Returns:

See Also:

#modify_db_instance(options = {}) ⇒ Types::ModifyDBInstanceResult

Modifies settings for an instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.

Examples:

Request syntax with placeholder values


resp = client.modify_db_instance({
  db_instance_identifier: "String", # required
  db_instance_class: "String",
  apply_immediately: false,
  preferred_maintenance_window: "String",
  auto_minor_version_upgrade: false,
  new_db_instance_identifier: "String",
  ca_certificate_identifier: "String",
  promotion_tier: 1,
})

Response structure


resp.db_instance.db_instance_identifier #=> String
resp.db_instance.db_instance_class #=> String
resp.db_instance.engine #=> String
resp.db_instance.db_instance_status #=> String
resp.db_instance.endpoint.address #=> String
resp.db_instance.endpoint.port #=> Integer
resp.db_instance.endpoint.hosted_zone_id #=> String
resp.db_instance.instance_create_time #=> Time
resp.db_instance.preferred_backup_window #=> String
resp.db_instance.backup_retention_period #=> Integer
resp.db_instance.vpc_security_groups #=> Array
resp.db_instance.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_instance.vpc_security_groups[0].status #=> String
resp.db_instance.availability_zone #=> String
resp.db_instance.db_subnet_group.db_subnet_group_name #=> String
resp.db_instance.db_subnet_group.db_subnet_group_description #=> String
resp.db_instance.db_subnet_group.vpc_id #=> String
resp.db_instance.db_subnet_group.subnet_group_status #=> String
resp.db_instance.db_subnet_group.subnets #=> Array
resp.db_instance.db_subnet_group.subnets[0].subnet_identifier #=> String
resp.db_instance.db_subnet_group.subnets[0].subnet_availability_zone.name #=> String
resp.db_instance.db_subnet_group.subnets[0].subnet_status #=> String
resp.db_instance.db_subnet_group.db_subnet_group_arn #=> String
resp.db_instance.preferred_maintenance_window #=> String
resp.db_instance.pending_modified_values.db_instance_class #=> String
resp.db_instance.pending_modified_values.allocated_storage #=> Integer
resp.db_instance.pending_modified_values.master_user_password #=> String
resp.db_instance.pending_modified_values.port #=> Integer
resp.db_instance.pending_modified_values.backup_retention_period #=> Integer
resp.db_instance.pending_modified_values.multi_az #=> true/false
resp.db_instance.pending_modified_values.engine_version #=> String
resp.db_instance.pending_modified_values.license_model #=> String
resp.db_instance.pending_modified_values.iops #=> Integer
resp.db_instance.pending_modified_values.db_instance_identifier #=> String
resp.db_instance.pending_modified_values.storage_type #=> String
resp.db_instance.pending_modified_values.ca_certificate_identifier #=> String
resp.db_instance.pending_modified_values.db_subnet_group_name #=> String
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable #=> Array
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable[0] #=> String
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable #=> Array
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable[0] #=> String
resp.db_instance.latest_restorable_time #=> Time
resp.db_instance.engine_version #=> String
resp.db_instance.auto_minor_version_upgrade #=> true/false
resp.db_instance.publicly_accessible #=> true/false
resp.db_instance.status_infos #=> Array
resp.db_instance.status_infos[0].status_type #=> String
resp.db_instance.status_infos[0].normal #=> true/false
resp.db_instance.status_infos[0].status #=> String
resp.db_instance.status_infos[0].message #=> String
resp.db_instance.db_cluster_identifier #=> String
resp.db_instance.storage_encrypted #=> true/false
resp.db_instance.kms_key_id #=> String
resp.db_instance.dbi_resource_id #=> String
resp.db_instance.ca_certificate_identifier #=> String
resp.db_instance.promotion_tier #=> Integer
resp.db_instance.db_instance_arn #=> String
resp.db_instance.enabled_cloudwatch_logs_exports #=> Array
resp.db_instance.enabled_cloudwatch_logs_exports[0] #=> String

Options Hash (options):

  • :db_instance_identifier (required, String)

    The instance identifier. This value is stored as a lowercase string.

    Constraints:

    • Must match the identifier of an existing DBInstance.

    ^

  • :db_instance_class (String)

    The new compute and memory capacity of the instance; for example, db.r5.large. Not all instance classes are available in all AWS Regions.

    If you modify the instance class, an outage occurs during the change. The change is applied during the next maintenance window, unless ApplyImmediately is specified as true for this request.

    Default: Uses existing setting.

  • :apply_immediately (Boolean)

    Specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the instance.

    If this parameter is set to false, changes to the instance are applied during the next maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.

    Default: false

  • :preferred_maintenance_window (String)

    The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter doesn\'t result in an outage except in the following situation, and the change is asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance window is changed to include the current time, changing this parameter causes a reboot of the instance. If you are moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure that pending changes are applied.

    Default: Uses existing setting.

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

    Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun

    Constraints: Must be at least 30 minutes.

  • :auto_minor_version_upgrade (Boolean)

    Indicates that minor version upgrades are applied automatically to the instance during the maintenance window. Changing this parameter doesn\'t result in an outage except in the following case, and the change is asynchronously applied as soon as possible. An outage results if this parameter is set to true during the maintenance window, and a newer minor version is available, and Amazon DocumentDB has enabled automatic patching for that engine version.

  • :new_db_instance_identifier (String)

    The new instance identifier for the instance when renaming an instance. When you change the instance identifier, an instance reboot occurs immediately if you set Apply Immediately to true. It occurs during the next maintenance window if you set Apply Immediately to false. This value 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: mydbinstance

  • :ca_certificate_identifier (String)

    Indicates the certificate that needs to be associated with the instance.

  • :promotion_tier (Integer)

    A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after a failure of the existing primary instance.

    Default: 1

    Valid values: 0-15

Returns:

See Also:

#modify_db_subnet_group(options = {}) ⇒ Types::ModifyDBSubnetGroupResult

Modifies an existing subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the AWS Region.

Examples:

Request syntax with placeholder values


resp = client.modify_db_subnet_group({
  db_subnet_group_name: "String", # required
  db_subnet_group_description: "String",
  subnet_ids: ["String"], # required
})

Response structure


resp.db_subnet_group.db_subnet_group_name #=> String
resp.db_subnet_group.db_subnet_group_description #=> String
resp.db_subnet_group.vpc_id #=> String
resp.db_subnet_group.subnet_group_status #=> String
resp.db_subnet_group.subnets #=> Array
resp.db_subnet_group.subnets[0].subnet_identifier #=> String
resp.db_subnet_group.subnets[0].subnet_availability_zone.name #=> String
resp.db_subnet_group.subnets[0].subnet_status #=> String
resp.db_subnet_group.db_subnet_group_arn #=> String

Options Hash (options):

  • :db_subnet_group_name (required, String)

    The name for the subnet group. This value is stored as a lowercase string. You can\'t modify the default subnet group.

    Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.

    Example: mySubnetgroup

  • :db_subnet_group_description (String)

    The description for the subnet group.

  • :subnet_ids (required, Array<String>)

    The Amazon EC2 subnet IDs for the subnet group.

Returns:

See Also:

#reboot_db_instance(options = {}) ⇒ Types::RebootDBInstanceResult

You might need to reboot your instance, usually for maintenance reasons. For example, if you make certain changes, or if you change the cluster parameter group that is associated with the instance, you must reboot the instance for the changes to take effect.

Rebooting an instance restarts the database engine service. Rebooting an instance results in a momentary outage, during which the instance status is set to rebooting.

Examples:

Request syntax with placeholder values


resp = client.reboot_db_instance({
  db_instance_identifier: "String", # required
  force_failover: false,
})

Response structure


resp.db_instance.db_instance_identifier #=> String
resp.db_instance.db_instance_class #=> String
resp.db_instance.engine #=> String
resp.db_instance.db_instance_status #=> String
resp.db_instance.endpoint.address #=> String
resp.db_instance.endpoint.port #=> Integer
resp.db_instance.endpoint.hosted_zone_id #=> String
resp.db_instance.instance_create_time #=> Time
resp.db_instance.preferred_backup_window #=> String
resp.db_instance.backup_retention_period #=> Integer
resp.db_instance.vpc_security_groups #=> Array
resp.db_instance.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_instance.vpc_security_groups[0].status #=> String
resp.db_instance.availability_zone #=> String
resp.db_instance.db_subnet_group.db_subnet_group_name #=> String
resp.db_instance.db_subnet_group.db_subnet_group_description #=> String
resp.db_instance.db_subnet_group.vpc_id #=> String
resp.db_instance.db_subnet_group.subnet_group_status #=> String
resp.db_instance.db_subnet_group.subnets #=> Array
resp.db_instance.db_subnet_group.subnets[0].subnet_identifier #=> String
resp.db_instance.db_subnet_group.subnets[0].subnet_availability_zone.name #=> String
resp.db_instance.db_subnet_group.subnets[0].subnet_status #=> String
resp.db_instance.db_subnet_group.db_subnet_group_arn #=> String
resp.db_instance.preferred_maintenance_window #=> String
resp.db_instance.pending_modified_values.db_instance_class #=> String
resp.db_instance.pending_modified_values.allocated_storage #=> Integer
resp.db_instance.pending_modified_values.master_user_password #=> String
resp.db_instance.pending_modified_values.port #=> Integer
resp.db_instance.pending_modified_values.backup_retention_period #=> Integer
resp.db_instance.pending_modified_values.multi_az #=> true/false
resp.db_instance.pending_modified_values.engine_version #=> String
resp.db_instance.pending_modified_values.license_model #=> String
resp.db_instance.pending_modified_values.iops #=> Integer
resp.db_instance.pending_modified_values.db_instance_identifier #=> String
resp.db_instance.pending_modified_values.storage_type #=> String
resp.db_instance.pending_modified_values.ca_certificate_identifier #=> String
resp.db_instance.pending_modified_values.db_subnet_group_name #=> String
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable #=> Array
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable[0] #=> String
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable #=> Array
resp.db_instance.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable[0] #=> String
resp.db_instance.latest_restorable_time #=> Time
resp.db_instance.engine_version #=> String
resp.db_instance.auto_minor_version_upgrade #=> true/false
resp.db_instance.publicly_accessible #=> true/false
resp.db_instance.status_infos #=> Array
resp.db_instance.status_infos[0].status_type #=> String
resp.db_instance.status_infos[0].normal #=> true/false
resp.db_instance.status_infos[0].status #=> String
resp.db_instance.status_infos[0].message #=> String
resp.db_instance.db_cluster_identifier #=> String
resp.db_instance.storage_encrypted #=> true/false
resp.db_instance.kms_key_id #=> String
resp.db_instance.dbi_resource_id #=> String
resp.db_instance.ca_certificate_identifier #=> String
resp.db_instance.promotion_tier #=> Integer
resp.db_instance.db_instance_arn #=> String
resp.db_instance.enabled_cloudwatch_logs_exports #=> Array
resp.db_instance.enabled_cloudwatch_logs_exports[0] #=> String

Options Hash (options):

  • :db_instance_identifier (required, String)

    The instance identifier. This parameter is stored as a lowercase string.

    Constraints:

    • Must match the identifier of an existing DBInstance.

    ^

  • :force_failover (Boolean)

    When true, the reboot is conducted through a Multi-AZ failover.

    Constraint: You can\'t specify true if the instance is not configured for Multi-AZ.

Returns:

See Also:

#remove_tags_from_resource(options = {}) ⇒ Struct

Removes metadata tags from an Amazon DocumentDB resource.

Examples:

Request syntax with placeholder values


resp = client.remove_tags_from_resource({
  resource_name: "String", # required
  tag_keys: ["String"], # required
})

Options Hash (options):

  • :resource_name (required, String)

    The Amazon DocumentDB resource that the tags are removed from. This value is an Amazon Resource Name (ARN).

  • :tag_keys (required, Array<String>)

    The tag key (name) of the tag to be removed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#reset_db_cluster_parameter_group(options = {}) ⇒ Types::DBClusterParameterGroupNameMessage

Modifies the parameters of a cluster parameter group to the default value. To reset specific parameters, submit a list of the following: ParameterName and ApplyMethod. To reset the entire cluster parameter group, specify the DBClusterParameterGroupName and ResetAllParameters parameters.

When you reset the entire group, dynamic parameters are updated immediately and static parameters are set to pending-reboot to take effect on the next DB instance reboot.

Examples:

Request syntax with placeholder values


resp = client.reset_db_cluster_parameter_group({
  db_cluster_parameter_group_name: "String", # required
  reset_all_parameters: false,
  parameters: [
    {
      parameter_name: "String",
      parameter_value: "String",
      description: "String",
      source: "String",
      apply_type: "String",
      data_type: "String",
      allowed_values: "String",
      is_modifiable: false,
      minimum_engine_version: "String",
      apply_method: "immediate", # accepts immediate, pending-reboot
    },
  ],
})

Response structure


resp.db_cluster_parameter_group_name #=> String

Options Hash (options):

  • :db_cluster_parameter_group_name (required, String)

    The name of the cluster parameter group to reset.

  • :reset_all_parameters (Boolean)

    A value that is set to true to reset all parameters in the cluster parameter group to their default values, and false otherwise. You can\'t use this parameter if there is a list of parameter names specified for the Parameters parameter.

  • :parameters (Array<Types::Parameter>)

    A list of parameter names in the cluster parameter group to reset to the default values. You can\'t use this parameter if the ResetAllParameters parameter is set to true.

Returns:

See Also:

#restore_db_cluster_from_snapshot(options = {}) ⇒ Types::RestoreDBClusterFromSnapshotResult

Creates a new cluster from a snapshot or cluster snapshot.

If a snapshot is specified, the target cluster is created from the source DB snapshot with a default configuration and default security group.

If a cluster snapshot is specified, the target cluster is created from the source cluster restore point with the same configuration as the original source DB cluster, except that the new cluster is created with the default security group.

Examples:

Request syntax with placeholder values


resp = client.restore_db_cluster_from_snapshot({
  availability_zones: ["String"],
  db_cluster_identifier: "String", # required
  snapshot_identifier: "String", # required
  engine: "String", # required
  engine_version: "String",
  port: 1,
  db_subnet_group_name: "String",
  vpc_security_group_ids: ["String"],
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  kms_key_id: "String",
  enable_cloudwatch_logs_exports: ["String"],
  deletion_protection: false,
})

Response structure


resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.db_cluster_identifier #=> String
resp.db_cluster.db_cluster_parameter_group #=> String
resp.db_cluster.db_subnet_group #=> String
resp.db_cluster.status #=> String
resp.db_cluster.percent_progress #=> String
resp.db_cluster.earliest_restorable_time #=> Time
resp.db_cluster.endpoint #=> String
resp.db_cluster.reader_endpoint #=> String
resp.db_cluster.multi_az #=> true/false
resp.db_cluster.engine #=> String
resp.db_cluster.engine_version #=> String
resp.db_cluster.latest_restorable_time #=> Time
resp.db_cluster.port #=> Integer
resp.db_cluster.master_username #=> String
resp.db_cluster.preferred_backup_window #=> String
resp.db_cluster.preferred_maintenance_window #=> String
resp.db_cluster.db_cluster_members #=> Array
resp.db_cluster.db_cluster_members[0].db_instance_identifier #=> String
resp.db_cluster.db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_cluster.db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_cluster.db_cluster_members[0].promotion_tier #=> Integer
resp.db_cluster.vpc_security_groups #=> Array
resp.db_cluster.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_cluster.vpc_security_groups[0].status #=> String
resp.db_cluster.hosted_zone_id #=> String
resp.db_cluster.storage_encrypted #=> true/false
resp.db_cluster.kms_key_id #=> String
resp.db_cluster.db_cluster_resource_id #=> String
resp.db_cluster.db_cluster_arn #=> String
resp.db_cluster.associated_roles #=> Array
resp.db_cluster.associated_roles[0].role_arn #=> String
resp.db_cluster.associated_roles[0].status #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.deletion_protection #=> true/false

Options Hash (options):

  • :availability_zones (Array<String>)

    Provides the list of Amazon EC2 Availability Zones that instances in the restored DB cluster can be created in.

  • :db_cluster_identifier (required, String)

    The name of the cluster to create from the snapshot or cluster snapshot. This parameter isn\'t 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-snapshot-id

  • :snapshot_identifier (required, String)

    The identifier for the snapshot or cluster snapshot to restore from.

    You can use either the name or the Amazon Resource Name (ARN) to specify a cluster snapshot. However, you can use only the ARN to specify a snapshot.

    Constraints:

    • Must match the identifier of an existing snapshot.

    ^

  • :engine (required, String)

    The database engine to use for the new cluster.

    Default: The same as source.

    Constraint: Must be compatible with the engine of the source.

  • :engine_version (String)

    The version of the database engine to use for the new cluster.

  • :port (Integer)

    The port number on which the new cluster accepts connections.

    Constraints: Must be a value from 1150 to 65535.

    Default: The same port as the original cluster.

  • :db_subnet_group_name (String)

    The name of the subnet group to use for the new cluster.

    Constraints: If provided, must match the name of an existing DBSubnetGroup.

    Example: mySubnetgroup

  • :vpc_security_group_ids (Array<String>)

    A list of virtual private cloud (VPC) security groups that the new cluster will belong to.

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the restored cluster.

  • :kms_key_id (String)

    The AWS KMS key identifier to use when restoring an encrypted cluster from a DB snapshot or cluster snapshot.

    The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS KMS encryption key. If you are restoring a cluster with the same AWS account that owns the AWS KMS encryption key used to encrypt the new cluster, then you can use the AWS KMS key alias instead of the ARN for the AWS KMS encryption key.

    If you do not specify a value for the KmsKeyId parameter, then the following occurs:

    • If the snapshot or cluster snapshot in SnapshotIdentifier is encrypted, then the restored cluster is encrypted using the AWS KMS key that was used to encrypt the snapshot or the cluster snapshot.

    • If the snapshot or the cluster snapshot in SnapshotIdentifier is not encrypted, then the restored DB cluster is not encrypted.

  • :enable_cloudwatch_logs_exports (Array<String>)

    A list of log types that must be enabled for exporting to Amazon CloudWatch Logs.

  • :deletion_protection (Boolean)

    Specifies whether this cluster can be deleted. If DeletionProtection is enabled, the cluster cannot be deleted unless it is modified and DeletionProtection is disabled. DeletionProtection protects clusters from being accidentally deleted.

Returns:

See Also:

#restore_db_cluster_to_point_in_time(options = {}) ⇒ Types::RestoreDBClusterToPointInTimeResult

Restores a cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target cluster is created from the source cluster with the same configuration as the original cluster, except that the new cluster is created with the default security group.

Examples:

Request syntax with placeholder values


resp = client.restore_db_cluster_to_point_in_time({
  db_cluster_identifier: "String", # required
  source_db_cluster_identifier: "String", # required
  restore_to_time: Time.now,
  use_latest_restorable_time: false,
  port: 1,
  db_subnet_group_name: "String",
  vpc_security_group_ids: ["String"],
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  kms_key_id: "String",
  enable_cloudwatch_logs_exports: ["String"],
  deletion_protection: false,
})

Response structure


resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.db_cluster_identifier #=> String
resp.db_cluster.db_cluster_parameter_group #=> String
resp.db_cluster.db_subnet_group #=> String
resp.db_cluster.status #=> String
resp.db_cluster.percent_progress #=> String
resp.db_cluster.earliest_restorable_time #=> Time
resp.db_cluster.endpoint #=> String
resp.db_cluster.reader_endpoint #=> String
resp.db_cluster.multi_az #=> true/false
resp.db_cluster.engine #=> String
resp.db_cluster.engine_version #=> String
resp.db_cluster.latest_restorable_time #=> Time
resp.db_cluster.port #=> Integer
resp.db_cluster.master_username #=> String
resp.db_cluster.preferred_backup_window #=> String
resp.db_cluster.preferred_maintenance_window #=> String
resp.db_cluster.db_cluster_members #=> Array
resp.db_cluster.db_cluster_members[0].db_instance_identifier #=> String
resp.db_cluster.db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_cluster.db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_cluster.db_cluster_members[0].promotion_tier #=> Integer
resp.db_cluster.vpc_security_groups #=> Array
resp.db_cluster.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_cluster.vpc_security_groups[0].status #=> String
resp.db_cluster.hosted_zone_id #=> String
resp.db_cluster.storage_encrypted #=> true/false
resp.db_cluster.kms_key_id #=> String
resp.db_cluster.db_cluster_resource_id #=> String
resp.db_cluster.db_cluster_arn #=> String
resp.db_cluster.associated_roles #=> Array
resp.db_cluster.associated_roles[0].role_arn #=> String
resp.db_cluster.associated_roles[0].status #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.deletion_protection #=> true/false

Options Hash (options):

  • :db_cluster_identifier (required, String)

    The name of the new cluster to be created.

    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.

  • :source_db_cluster_identifier (required, String)

    The identifier of the source cluster from which to restore.

    Constraints:

    • Must match the identifier of an existing DBCluster.

    ^

  • :restore_to_time (Time)

    The date and time to restore the cluster to.

    Valid values: A time in Universal Coordinated Time (UTC) format.

    Constraints:

    • Must be before the latest restorable time for the instance.

    • Must be specified if the UseLatestRestorableTime parameter is not provided.

    • Cannot be specified if the UseLatestRestorableTime parameter is true.

    • Cannot be specified if the RestoreType parameter is copy-on-write.

    Example: 2015-03-07T23:45:00Z

  • :use_latest_restorable_time (Boolean)

    A value that is set to true to restore the cluster to the latest restorable backup time, and false otherwise.

    Default: false

    Constraints: Cannot be specified if the RestoreToTime parameter is provided.

  • :port (Integer)

    The port number on which the new cluster accepts connections.

    Constraints: Must be a value from 1150 to 65535.

    Default: The default port for the engine.

  • :db_subnet_group_name (String)

    The subnet group name to use for the new cluster.

    Constraints: If provided, must match the name of an existing DBSubnetGroup.

    Example: mySubnetgroup

  • :vpc_security_group_ids (Array<String>)

    A list of VPC security groups that the new cluster belongs to.

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the restored cluster.

  • :kms_key_id (String)

    The AWS KMS key identifier to use when restoring an encrypted cluster from an encrypted cluster.

    The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS KMS encryption key. If you are restoring a cluster with the same AWS account that owns the AWS KMS encryption key used to encrypt the new cluster, then you can use the AWS KMS key alias instead of the ARN for the AWS KMS encryption key.

    You can restore to a new cluster and encrypt the new cluster with an AWS KMS key that is different from the AWS KMS key used to encrypt the source cluster. The new DB cluster is encrypted with the AWS KMS key identified by the KmsKeyId parameter.

    If you do not specify a value for the KmsKeyId parameter, then the following occurs:

    • If the cluster is encrypted, then the restored cluster is encrypted using the AWS KMS key that was used to encrypt the source cluster.

    • If the cluster is not encrypted, then the restored cluster is not encrypted.

    If DBClusterIdentifier refers to a cluster that is not encrypted, then the restore request is rejected.

  • :enable_cloudwatch_logs_exports (Array<String>)

    A list of log types that must be enabled for exporting to Amazon CloudWatch Logs.

  • :deletion_protection (Boolean)

    Specifies whether this cluster can be deleted. If DeletionProtection is enabled, the cluster cannot be deleted unless it is modified and DeletionProtection is disabled. DeletionProtection protects clusters from being accidentally deleted.

Returns:

See Also:

#start_db_cluster(options = {}) ⇒ Types::StartDBClusterResult

Restarts the stopped cluster that is specified by DBClusterIdentifier. For more information, see Stopping and Starting an Amazon DocumentDB Cluster.

Examples:

Request syntax with placeholder values


resp = client.start_db_cluster({
  db_cluster_identifier: "String", # required
})

Response structure


resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.db_cluster_identifier #=> String
resp.db_cluster.db_cluster_parameter_group #=> String
resp.db_cluster.db_subnet_group #=> String
resp.db_cluster.status #=> String
resp.db_cluster.percent_progress #=> String
resp.db_cluster.earliest_restorable_time #=> Time
resp.db_cluster.endpoint #=> String
resp.db_cluster.reader_endpoint #=> String
resp.db_cluster.multi_az #=> true/false
resp.db_cluster.engine #=> String
resp.db_cluster.engine_version #=> String
resp.db_cluster.latest_restorable_time #=> Time
resp.db_cluster.port #=> Integer
resp.db_cluster.master_username #=> String
resp.db_cluster.preferred_backup_window #=> String
resp.db_cluster.preferred_maintenance_window #=> String
resp.db_cluster.db_cluster_members #=> Array
resp.db_cluster.db_cluster_members[0].db_instance_identifier #=> String
resp.db_cluster.db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_cluster.db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_cluster.db_cluster_members[0].promotion_tier #=> Integer
resp.db_cluster.vpc_security_groups #=> Array
resp.db_cluster.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_cluster.vpc_security_groups[0].status #=> String
resp.db_cluster.hosted_zone_id #=> String
resp.db_cluster.storage_encrypted #=> true/false
resp.db_cluster.kms_key_id #=> String
resp.db_cluster.db_cluster_resource_id #=> String
resp.db_cluster.db_cluster_arn #=> String
resp.db_cluster.associated_roles #=> Array
resp.db_cluster.associated_roles[0].role_arn #=> String
resp.db_cluster.associated_roles[0].status #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.deletion_protection #=> true/false

Options Hash (options):

  • :db_cluster_identifier (required, String)

    The identifier of the cluster to restart. Example: docdb-2019-05-28-15-24-52

Returns:

See Also:

#stop_db_cluster(options = {}) ⇒ Types::StopDBClusterResult

Stops the running cluster that is specified by DBClusterIdentifier. The cluster must be in the available state. For more information, see Stopping and Starting an Amazon DocumentDB Cluster.

Examples:

Request syntax with placeholder values


resp = client.stop_db_cluster({
  db_cluster_identifier: "String", # required
})

Response structure


resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.db_cluster_identifier #=> String
resp.db_cluster.db_cluster_parameter_group #=> String
resp.db_cluster.db_subnet_group #=> String
resp.db_cluster.status #=> String
resp.db_cluster.percent_progress #=> String
resp.db_cluster.earliest_restorable_time #=> Time
resp.db_cluster.endpoint #=> String
resp.db_cluster.reader_endpoint #=> String
resp.db_cluster.multi_az #=> true/false
resp.db_cluster.engine #=> String
resp.db_cluster.engine_version #=> String
resp.db_cluster.latest_restorable_time #=> Time
resp.db_cluster.port #=> Integer
resp.db_cluster.master_username #=> String
resp.db_cluster.preferred_backup_window #=> String
resp.db_cluster.preferred_maintenance_window #=> String
resp.db_cluster.db_cluster_members #=> Array
resp.db_cluster.db_cluster_members[0].db_instance_identifier #=> String
resp.db_cluster.db_cluster_members[0].is_cluster_writer #=> true/false
resp.db_cluster.db_cluster_members[0].db_cluster_parameter_group_status #=> String
resp.db_cluster.db_cluster_members[0].promotion_tier #=> Integer
resp.db_cluster.vpc_security_groups #=> Array
resp.db_cluster.vpc_security_groups[0].vpc_security_group_id #=> String
resp.db_cluster.vpc_security_groups[0].status #=> String
resp.db_cluster.hosted_zone_id #=> String
resp.db_cluster.storage_encrypted #=> true/false
resp.db_cluster.kms_key_id #=> String
resp.db_cluster.db_cluster_resource_id #=> String
resp.db_cluster.db_cluster_arn #=> String
resp.db_cluster.associated_roles #=> Array
resp.db_cluster.associated_roles[0].role_arn #=> String
resp.db_cluster.associated_roles[0].status #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.deletion_protection #=> true/false

Options Hash (options):

  • :db_cluster_identifier (required, String)

    The identifier of the cluster to stop. Example: docdb-2019-05-28-15-24-52

Returns:

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:
:db_instance_available#describe_db_instances3060
:db_instance_deleted#describe_db_instances3060

Returns:

  • (Array<Symbol>)

    the list of supported waiters.