Class: Aws::DocDB::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb

Overview

An API client for DocDB. To construct a client, you need to configure a :region and :credentials.

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

For details on configuring region and credentials see the developer guide.

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See Aws::DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    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.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :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, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :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.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::DocDB::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::DocDB::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.



446
447
448
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 446

def initialize(*args)
  super
end

Instance Method Details

#add_source_identifier_to_subscription(params = {}) ⇒ Types::AddSourceIdentifierToSubscriptionResult

Adds a source identifier to an existing event notification subscription.

Examples:

Request syntax with placeholder values


resp = client.add_source_identifier_to_subscription({
  subscription_name: "String", # required
  source_identifier: "String", # required
})

Response structure


resp.event_subscription.customer_aws_id #=> String
resp.event_subscription.cust_subscription_id #=> String
resp.event_subscription.sns_topic_arn #=> String
resp.event_subscription.status #=> String
resp.event_subscription.subscription_creation_time #=> String
resp.event_subscription.source_type #=> String
resp.event_subscription.source_ids_list #=> Array
resp.event_subscription.source_ids_list[0] #=> String
resp.event_subscription.event_categories_list #=> Array
resp.event_subscription.event_categories_list[0] #=> String
resp.event_subscription.enabled #=> Boolean
resp.event_subscription.event_subscription_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :subscription_name (required, String)

    The name of the Amazon DocumentDB event notification subscription that you want to add a source identifier to.

  • :source_identifier (required, String)

    The identifier of the event source to be added:

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

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

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

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

Returns:

See Also:



504
505
506
507
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 504

def add_source_identifier_to_subscription(params = {}, options = {})
  req = build_request(:add_source_identifier_to_subscription, params)
  req.send_request(options)
end

#add_tags_to_resource(params = {}) ⇒ 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 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",
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



539
540
541
542
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 539

def add_tags_to_resource(params = {}, options = {})
  req = build_request(:add_tags_to_resource, params)
  req.send_request(options)
end

#apply_pending_maintenance_action(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



597
598
599
600
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 597

def apply_pending_maintenance_action(params = {}, options = {})
  req = build_request(:apply_pending_maintenance_action, params)
  req.send_request(options)
end

#copy_db_cluster_parameter_group(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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 Amazon Web Services 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 Amazon Web Services 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:



672
673
674
675
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 672

def copy_db_cluster_parameter_group(params = {}, options = {})
  req = build_request(:copy_db_cluster_parameter_group, params)
  req.send_request(options)
end

#copy_db_cluster_snapshot(params = {}) ⇒ 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 Amazon Web Services 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",
    },
  ],
  source_region: "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 #=> Boolean
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
resp.db_cluster_snapshot.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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 Amazon Web Services Region as the copy, specify a valid snapshot identifier.

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

    Example: my-cluster-snapshot1

  • :target_db_cluster_snapshot_identifier (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 KMS key ID for an encrypted cluster snapshot. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.

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

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

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

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

  • :pre_signed_url (String)

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

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

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

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

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

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

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

  • :source_region (String)

    The source region of the snapshot. This is only needed when the shapshot is encrypted and in a different region.

Returns:

See Also:



840
841
842
843
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 840

def copy_db_cluster_snapshot(params = {}, options = {})
  req = build_request(:copy_db_cluster_snapshot, params)
  req.send_request(options)
end

#create_db_cluster(params = {}) ⇒ 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",
  master_user_password: "String",
  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,
  global_cluster_identifier: "GlobalClusterIdentifier",
  storage_type: "String",
  source_region: "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 #=> Boolean
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.replication_source_identifier #=> String
resp.db_cluster.read_replica_identifiers #=> Array
resp.db_cluster.read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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.clone_group_id #=> 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 #=> Boolean
resp.db_cluster.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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 (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 (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 Amazon Web Services 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 Amazon Web Services Region, occurring on a random day of the week.

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

    Constraints: Minimum 30-minute window.

  • :tags (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 KMS key identifier for an encrypted cluster.

    The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon Web Services account that owns the KMS encryption key that is used to encrypt the new cluster, you can use the KMS key alias instead of the ARN for the 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.

    ^

    KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Regions.

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

  • :global_cluster_identifier (String)

    The cluster identifier of the new global cluster.

  • :storage_type (String)

    The storage type to associate with the DB cluster.

    For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide.

    Valid values for storage type - standard | iopt1

    Default value is standard

    When you create a DocumentDB DB cluster with the storage type set to iopt1, the storage type is returned in the response. The storage type isn't returned when you set it to standard.

  • :source_region (String)

    The source region of the snapshot. This is only needed when the shapshot is encrypted and in a different region.

Returns:

See Also:



1114
1115
1116
1117
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1114

def create_db_cluster(params = {}, options = {})
  req = build_request(:create_db_cluster, params)
  req.send_request(options)
end

#create_db_cluster_parameter_group(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



1194
1195
1196
1197
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1194

def create_db_cluster_parameter_group(params = {}, options = {})
  req = build_request(:create_db_cluster_parameter_group, params)
  req.send_request(options)
end

#create_db_cluster_snapshot(params = {}) ⇒ 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 #=> Boolean
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
resp.db_cluster_snapshot.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



1273
1274
1275
1276
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1273

def create_db_cluster_snapshot(params = {}, options = {})
  req = build_request(:create_db_cluster_snapshot, params)
  req.send_request(options)
end

#create_db_instance(params = {}) ⇒ 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
  copy_tags_to_snapshot: false,
  promotion_tier: 1,
  enable_performance_insights: false,
  performance_insights_kms_key_id: "String",
  ca_certificate_identifier: "String",
})

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 #=> Boolean
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 #=> Boolean
resp.db_instance.publicly_accessible #=> Boolean
resp.db_instance.status_infos #=> Array
resp.db_instance.status_infos[0].status_type #=> String
resp.db_instance.status_infos[0].normal #=> Boolean
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 #=> Boolean
resp.db_instance.kms_key_id #=> String
resp.db_instance.dbi_resource_id #=> String
resp.db_instance.ca_certificate_identifier #=> String
resp.db_instance.copy_tags_to_snapshot #=> Boolean
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
resp.db_instance.certificate_details.ca_identifier #=> String
resp.db_instance.certificate_details.valid_till #=> Time
resp.db_instance.performance_insights_enabled #=> Boolean
resp.db_instance.performance_insights_kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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 Amazon Web Services 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 Amazon Web Services Region, occurring on a random day of the week.

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

    Constraints: Minimum 30-minute window.

  • :auto_minor_version_upgrade (Boolean)

    This parameter does not apply to Amazon DocumentDB. Amazon DocumentDB does not perform minor version upgrades regardless of the value set.

    Default: false

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

  • :copy_tags_to_snapshot (Boolean)

    A value that indicates whether to copy tags from the DB instance to snapshots of the DB instance. By default, tags are not copied.

  • :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

  • :enable_performance_insights (Boolean)

    A value that indicates whether to enable Performance Insights for the DB Instance. For more information, see Using Amazon Performance Insights.

  • :performance_insights_kms_key_id (String)

    The KMS key identifier for encryption of Performance Insights data.

    The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

    If you do not specify a value for PerformanceInsightsKMSKeyId, then Amazon DocumentDB uses your default KMS key. There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services region.

  • :ca_certificate_identifier (String)

    The CA certificate identifier to use for the DB instance's server certificate.

    For more information, see Updating Your Amazon DocumentDB TLS Certificates and Encrypting Data in Transit in the Amazon DocumentDB Developer Guide.

Returns:

See Also:



1483
1484
1485
1486
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1483

def create_db_instance(params = {}, options = {})
  req = build_request(:create_db_instance, params)
  req.send_request(options)
end

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

Creates a new subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the Amazon Web Services 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



1544
1545
1546
1547
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1544

def create_db_subnet_group(params = {}, options = {})
  req = build_request(:create_db_subnet_group, params)
  req.send_request(options)
end

#create_event_subscription(params = {}) ⇒ Types::CreateEventSubscriptionResult

Creates an Amazon DocumentDB event notification subscription. This action requires a topic Amazon Resource Name (ARN) created by using the Amazon DocumentDB console, the Amazon SNS console, or the Amazon SNS API. To obtain an ARN with Amazon SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the Amazon SNS console.

You can specify the type of source (SourceType) that you want to be notified of. You can also provide a list of Amazon DocumentDB sources (SourceIds) that trigger the events, and you can provide a list of event categories (EventCategories) for events that you want to be notified of. For example, you can specify SourceType = db-instance, SourceIds = mydbinstance1, mydbinstance2 and EventCategories = Availability, Backup.

If you specify both the SourceType and SourceIds (such as SourceType = db-instance and SourceIdentifier = myDBInstance1), you are notified of all the db-instance events for the specified source. If you specify a SourceType but do not specify a SourceIdentifier, you receive notice of the events for that source type for all your Amazon DocumentDB sources. If you do not specify either the SourceType or the SourceIdentifier, you are notified of events generated from all Amazon DocumentDB sources belonging to your customer account.

Examples:

Request syntax with placeholder values


resp = client.create_event_subscription({
  subscription_name: "String", # required
  sns_topic_arn: "String", # required
  source_type: "String",
  event_categories: ["String"],
  source_ids: ["String"],
  enabled: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.event_subscription.customer_aws_id #=> String
resp.event_subscription.cust_subscription_id #=> String
resp.event_subscription.sns_topic_arn #=> String
resp.event_subscription.status #=> String
resp.event_subscription.subscription_creation_time #=> String
resp.event_subscription.source_type #=> String
resp.event_subscription.source_ids_list #=> Array
resp.event_subscription.source_ids_list[0] #=> String
resp.event_subscription.event_categories_list #=> Array
resp.event_subscription.event_categories_list[0] #=> String
resp.event_subscription.enabled #=> Boolean
resp.event_subscription.event_subscription_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :subscription_name (required, String)

    The name of the subscription.

    Constraints: The name must be fewer than 255 characters.

  • :sns_topic_arn (required, String)

    The Amazon Resource Name (ARN) of the SNS topic created for event notification. Amazon SNS creates the ARN when you create a topic and subscribe to it.

  • :source_type (String)

    The type of source that is generating the events. For example, if you want to be notified of events generated by an instance, you would set this parameter to db-instance. If this value is not specified, all events are returned.

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

  • :event_categories (Array<String>)

    A list of event categories for a SourceType that you want to subscribe to.

  • :source_ids (Array<String>)

    The list of identifiers of the event sources for which events are returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.

    Constraints:

    • If SourceIds are provided, SourceType must also be provided.

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

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

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

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

  • :enabled (Boolean)

    A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

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

    The tags to be assigned to the event subscription.

Returns:

See Also:



1667
1668
1669
1670
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1667

def create_event_subscription(params = {}, options = {})
  req = build_request(:create_event_subscription, params)
  req.send_request(options)
end

#create_global_cluster(params = {}) ⇒ Types::CreateGlobalClusterResult

Creates an Amazon DocumentDB global cluster that can span multiple multiple Amazon Web Services Regions. The global cluster contains one primary cluster with read-write capability, and up-to give read-only secondary clusters. Global clusters uses storage-based fast replication across regions with latencies less than one second, using dedicated infrastructure with no impact to your workload’s performance.

You can create a global cluster that is initially empty, and then add a primary and a secondary to it. Or you can specify an existing cluster during the create operation, and this cluster becomes the primary of the global cluster.

This action only applies to Amazon DocumentDB clusters.

Examples:

Request syntax with placeholder values


resp = client.create_global_cluster({
  global_cluster_identifier: "GlobalClusterIdentifier", # required
  source_db_cluster_identifier: "String",
  engine: "String",
  engine_version: "String",
  deletion_protection: false,
  database_name: "String",
  storage_encrypted: false,
})

Response structure


resp.global_cluster.global_cluster_identifier #=> String
resp.global_cluster.global_cluster_resource_id #=> String
resp.global_cluster.global_cluster_arn #=> String
resp.global_cluster.status #=> String
resp.global_cluster.engine #=> String
resp.global_cluster.engine_version #=> String
resp.global_cluster.database_name #=> String
resp.global_cluster.storage_encrypted #=> Boolean
resp.global_cluster.deletion_protection #=> Boolean
resp.global_cluster.global_cluster_members #=> Array
resp.global_cluster.global_cluster_members[0].db_cluster_arn #=> String
resp.global_cluster.global_cluster_members[0].readers #=> Array
resp.global_cluster.global_cluster_members[0].readers[0] #=> String
resp.global_cluster.global_cluster_members[0].is_writer #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :global_cluster_identifier (required, String)

    The cluster identifier of the new global cluster.

  • :source_db_cluster_identifier (String)

    The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.

  • :engine (String)

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

  • :engine_version (String)

    The engine version of the global cluster.

  • :deletion_protection (Boolean)

    The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.

  • :database_name (String)

    The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.

  • :storage_encrypted (Boolean)

    The storage encryption setting for the new global cluster.

Returns:

See Also:



1753
1754
1755
1756
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1753

def create_global_cluster(params = {}, options = {})
  req = build_request(:create_global_cluster, params)
  req.send_request(options)
end

#delete_db_cluster(params = {}) ⇒ 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 #=> Boolean
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.replication_source_identifier #=> String
resp.db_cluster.read_replica_identifiers #=> Array
resp.db_cluster.read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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.clone_group_id #=> 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 #=> Boolean
resp.db_cluster.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



1866
1867
1868
1869
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1866

def delete_db_cluster(params = {}, options = {})
  req = build_request(:delete_db_cluster, params)
  req.send_request(options)
end

#delete_db_cluster_parameter_group(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



1897
1898
1899
1900
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1897

def delete_db_cluster_parameter_group(params = {}, options = {})
  req = build_request(:delete_db_cluster_parameter_group, params)
  req.send_request(options)
end

#delete_db_cluster_snapshot(params = {}) ⇒ 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 #=> Boolean
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
resp.db_cluster_snapshot.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



1951
1952
1953
1954
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1951

def delete_db_cluster_snapshot(params = {}, options = {})
  req = build_request(:delete_db_cluster_snapshot, params)
  req.send_request(options)
end

#delete_db_instance(params = {}) ⇒ 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 #=> Boolean
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 #=> Boolean
resp.db_instance.publicly_accessible #=> Boolean
resp.db_instance.status_infos #=> Array
resp.db_instance.status_infos[0].status_type #=> String
resp.db_instance.status_infos[0].normal #=> Boolean
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 #=> Boolean
resp.db_instance.kms_key_id #=> String
resp.db_instance.dbi_resource_id #=> String
resp.db_instance.ca_certificate_identifier #=> String
resp.db_instance.copy_tags_to_snapshot #=> Boolean
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
resp.db_instance.certificate_details.ca_identifier #=> String
resp.db_instance.certificate_details.valid_till #=> Time
resp.db_instance.performance_insights_enabled #=> Boolean
resp.db_instance.performance_insights_kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2049
2050
2051
2052
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2049

def delete_db_instance(params = {}, options = {})
  req = build_request(:delete_db_instance, params)
  req.send_request(options)
end

#delete_db_subnet_group(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2087
2088
2089
2090
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2087

def delete_db_subnet_group(params = {}, options = {})
  req = build_request(:delete_db_subnet_group, params)
  req.send_request(options)
end

#delete_event_subscription(params = {}) ⇒ Types::DeleteEventSubscriptionResult

Deletes an Amazon DocumentDB event notification subscription.

Examples:

Request syntax with placeholder values


resp = client.delete_event_subscription({
  subscription_name: "String", # required
})

Response structure


resp.event_subscription.customer_aws_id #=> String
resp.event_subscription.cust_subscription_id #=> String
resp.event_subscription.sns_topic_arn #=> String
resp.event_subscription.status #=> String
resp.event_subscription.subscription_creation_time #=> String
resp.event_subscription.source_type #=> String
resp.event_subscription.source_ids_list #=> Array
resp.event_subscription.source_ids_list[0] #=> String
resp.event_subscription.event_categories_list #=> Array
resp.event_subscription.event_categories_list[0] #=> String
resp.event_subscription.enabled #=> Boolean
resp.event_subscription.event_subscription_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :subscription_name (required, String)

    The name of the Amazon DocumentDB event notification subscription that you want to delete.

Returns:

See Also:



2127
2128
2129
2130
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2127

def delete_event_subscription(params = {}, options = {})
  req = build_request(:delete_event_subscription, params)
  req.send_request(options)
end

#delete_global_cluster(params = {}) ⇒ Types::DeleteGlobalClusterResult

Deletes a global cluster. The primary and secondary clusters must already be detached or deleted before attempting to delete a global cluster.

This action only applies to Amazon DocumentDB clusters.

Examples:

Request syntax with placeholder values


resp = client.delete_global_cluster({
  global_cluster_identifier: "GlobalClusterIdentifier", # required
})

Response structure


resp.global_cluster.global_cluster_identifier #=> String
resp.global_cluster.global_cluster_resource_id #=> String
resp.global_cluster.global_cluster_arn #=> String
resp.global_cluster.status #=> String
resp.global_cluster.engine #=> String
resp.global_cluster.engine_version #=> String
resp.global_cluster.database_name #=> String
resp.global_cluster.storage_encrypted #=> Boolean
resp.global_cluster.deletion_protection #=> Boolean
resp.global_cluster.global_cluster_members #=> Array
resp.global_cluster.global_cluster_members[0].db_cluster_arn #=> String
resp.global_cluster.global_cluster_members[0].readers #=> Array
resp.global_cluster.global_cluster_members[0].readers[0] #=> String
resp.global_cluster.global_cluster_members[0].is_writer #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :global_cluster_identifier (required, String)

    The cluster identifier of the global cluster being deleted.

Returns:

See Also:



2174
2175
2176
2177
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2174

def delete_global_cluster(params = {}, options = {})
  req = build_request(:delete_global_cluster, params)
  req.send_request(options)
end

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

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2253
2254
2255
2256
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2253

def describe_certificates(params = {}, options = {})
  req = build_request(:describe_certificates, params)
  req.send_request(options)
end

#describe_db_cluster_parameter_groups(params = {}) ⇒ 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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2325
2326
2327
2328
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2325

def describe_db_cluster_parameter_groups(params = {}, options = {})
  req = build_request(:describe_db_cluster_parameter_groups, params)
  req.send_request(options)
end

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

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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 #=> Boolean
resp.parameters[0].minimum_engine_version #=> String
resp.parameters[0].apply_method #=> String, one of "immediate", "pending-reboot"
resp.marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2407
2408
2409
2410
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2407

def describe_db_cluster_parameters(params = {}, options = {})
  req = build_request(:describe_db_cluster_parameters, params)
  req.send_request(options)
end

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

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

When you share snapshots with other Amazon Web Services accounts, DescribeDBClusterSnapshotAttributes returns the restore attribute and a list of IDs for the Amazon Web Services 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 Amazon Web Services 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

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_snapshot_identifier (required, String)

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

Returns:

See Also:



2449
2450
2451
2452
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2449

def describe_db_cluster_snapshot_attributes(params = {}, options = {})
  req = build_request(:describe_db_cluster_snapshot_attributes, params)
  req.send_request(options)
end

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

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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 #=> Boolean
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
resp.db_cluster_snapshots[0].storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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 Amazon Web Services account.

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

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

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

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

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

  • :filters (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 Amazon Web Services accounts that this Amazon Web Services account has been given permission to copy or restore, and otherwise false. The default is false.

  • :include_public (Boolean)

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

Returns:

See Also:



2591
2592
2593
2594
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2591

def describe_db_cluster_snapshots(params = {}, options = {})
  req = build_request(:describe_db_cluster_snapshots, params)
  req.send_request(options)
end

#describe_db_clusters(params = {}) ⇒ 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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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 #=> Boolean
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].replication_source_identifier #=> String
resp.db_clusters[0].read_replica_identifiers #=> Array
resp.db_clusters[0].read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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].clone_group_id #=> 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 #=> Boolean
resp.db_clusters[0].storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2714
2715
2716
2717
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2714

def describe_db_clusters(params = {}, options = {})
  req = build_request(:describe_db_clusters, params)
  req.send_request(options)
end

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

Returns a list of the available engines.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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 #=> Boolean
resp.db_engine_versions[0].valid_upgrade_target[0].is_major_version_upgrade #=> Boolean
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 #=> Boolean
resp.db_engine_versions[0].supported_ca_certificate_identifiers #=> Array
resp.db_engine_versions[0].supported_ca_certificate_identifiers[0] #=> String
resp.db_engine_versions[0].supports_certificate_rotation_without_restart #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2822
2823
2824
2825
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2822

def describe_db_engine_versions(params = {}, options = {})
  req = build_request(:describe_db_engine_versions, params)
  req.send_request(options)
end

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

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • db_instance_available
  • db_instance_deleted

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 #=> Boolean
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 #=> Boolean
resp.db_instances[0].publicly_accessible #=> Boolean
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 #=> Boolean
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 #=> Boolean
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].copy_tags_to_snapshot #=> Boolean
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
resp.db_instances[0].certificate_details.ca_identifier #=> String
resp.db_instances[0].certificate_details.valid_till #=> Time
resp.db_instances[0].performance_insights_enabled #=> Boolean
resp.db_instances[0].performance_insights_kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2970
2971
2972
2973
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2970

def describe_db_instances(params = {}, options = {})
  req = build_request(:describe_db_instances, params)
  req.send_request(options)
end

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

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3039
3040
3041
3042
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3039

def describe_db_subnet_groups(params = {}, options = {})
  req = build_request(:describe_db_subnet_groups, params)
  req.send_request(options)
end

#describe_engine_default_cluster_parameters(params = {}) ⇒ 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 #=> Boolean
resp.engine_defaults.parameters[0].minimum_engine_version #=> String
resp.engine_defaults.parameters[0].apply_method #=> String, one of "immediate", "pending-reboot"

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3107
3108
3109
3110
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3107

def describe_engine_default_cluster_parameters(params = {}, options = {})
  req = build_request(:describe_engine_default_cluster_parameters, params)
  req.send_request(options)
end

#describe_event_categories(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :source_type (String)

    The type of source that is generating the events.

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

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

    This parameter is not currently supported.

Returns:

See Also:



3150
3151
3152
3153
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3150

def describe_event_categories(params = {}, options = {})
  req = build_request(:describe_event_categories, params)
  req.send_request(options)
end

#describe_event_subscriptions(params = {}) ⇒ Types::EventSubscriptionsMessage

Lists all the subscription descriptions for a customer account. The description for a subscription includes SubscriptionName, SNSTopicARN, CustomerID, SourceType, SourceID, CreationTime, and Status.

If you specify a SubscriptionName, lists the description for that subscription.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


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

Response structure


resp.marker #=> String
resp.event_subscriptions_list #=> Array
resp.event_subscriptions_list[0].customer_aws_id #=> String
resp.event_subscriptions_list[0].cust_subscription_id #=> String
resp.event_subscriptions_list[0].sns_topic_arn #=> String
resp.event_subscriptions_list[0].status #=> String
resp.event_subscriptions_list[0].subscription_creation_time #=> String
resp.event_subscriptions_list[0].source_type #=> String
resp.event_subscriptions_list[0].source_ids_list #=> Array
resp.event_subscriptions_list[0].source_ids_list[0] #=> String
resp.event_subscriptions_list[0].event_categories_list #=> Array
resp.event_subscriptions_list[0].event_categories_list[0] #=> String
resp.event_subscriptions_list[0].enabled #=> Boolean
resp.event_subscriptions_list[0].event_subscription_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :subscription_name (String)

    The name of the Amazon DocumentDB event notification subscription that you want to describe.

  • :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:



3227
3228
3229
3230
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3227

def describe_event_subscriptions(params = {}, options = {})
  req = build_request(:describe_event_subscriptions, params)
  req.send_request(options)
end

#describe_events(params = {}) ⇒ 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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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

Parameters:

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

    ({})

Options Hash (params):

  • :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, DateTime, Date, Integer, String)

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

    Example: 2009-07-08T18:00Z

  • :end_time (Time, DateTime, Date, Integer, String)

    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:



3346
3347
3348
3349
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3346

def describe_events(params = {}, options = {})
  req = build_request(:describe_events, params)
  req.send_request(options)
end

#describe_global_clusters(params = {}) ⇒ Types::GlobalClustersMessage

Returns information about Amazon DocumentDB global clusters. This API supports pagination.

This action only applies to Amazon DocumentDB clusters.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


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

Response structure


resp.marker #=> String
resp.global_clusters #=> Array
resp.global_clusters[0].global_cluster_identifier #=> String
resp.global_clusters[0].global_cluster_resource_id #=> String
resp.global_clusters[0].global_cluster_arn #=> String
resp.global_clusters[0].status #=> String
resp.global_clusters[0].engine #=> String
resp.global_clusters[0].engine_version #=> String
resp.global_clusters[0].database_name #=> String
resp.global_clusters[0].storage_encrypted #=> Boolean
resp.global_clusters[0].deletion_protection #=> Boolean
resp.global_clusters[0].global_cluster_members #=> Array
resp.global_clusters[0].global_cluster_members[0].db_cluster_arn #=> String
resp.global_clusters[0].global_cluster_members[0].readers #=> Array
resp.global_clusters[0].global_cluster_members[0].readers[0] #=> String
resp.global_clusters[0].global_cluster_members[0].is_writer #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :global_cluster_identifier (String)

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

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

    A filter that specifies one or more global DB clusters to describe.

    Supported filters: db-cluster-id accepts cluster identifiers and cluster Amazon Resource Names (ARNs). The results list will only include 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 called a marker is included in the response so that you can retrieve the remaining results.

  • :marker (String)

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

Returns:

See Also:



3426
3427
3428
3429
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3426

def describe_global_clusters(params = {}, options = {})
  req = build_request(:describe_global_clusters, params)
  req.send_request(options)
end

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

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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 #=> Boolean
resp.orderable_db_instance_options[0].storage_type #=> String
resp.marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3512
3513
3514
3515
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3512

def describe_orderable_db_instance_options(params = {}, options = {})
  req = build_request(:describe_orderable_db_instance_options, params)
  req.send_request(options)
end

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

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3590
3591
3592
3593
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3590

def describe_pending_maintenance_actions(params = {}, options = {})
  req = build_request(:describe_pending_maintenance_actions, params)
  req.send_request(options)
end

#failover_db_cluster(params = {}) ⇒ 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 #=> Boolean
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.replication_source_identifier #=> String
resp.db_cluster.read_replica_identifiers #=> Array
resp.db_cluster.read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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.clone_group_id #=> 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 #=> Boolean
resp.db_cluster.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3684
3685
3686
3687
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3684

def failover_db_cluster(params = {}, options = {})
  req = build_request(:failover_db_cluster, params)
  req.send_request(options)
end

#failover_global_cluster(params = {}) ⇒ Types::FailoverGlobalClusterResult

Promotes the specified secondary DB cluster to be the primary DB cluster in the global cluster when failing over a global cluster occurs.

Use this operation to respond to an unplanned event, such as a regional disaster in the primary region. Failing over can result in a loss of write transaction data that wasn't replicated to the chosen secondary before the failover event occurred. However, the recovery process that promotes a DB instance on the chosen seconday DB cluster to be the primary writer DB instance guarantees that the data is in a transactionally consistent state.

Examples:

Request syntax with placeholder values


resp = client.failover_global_cluster({
  global_cluster_identifier: "GlobalClusterIdentifier", # required
  target_db_cluster_identifier: "DBClusterIdentifier", # required
  allow_data_loss: false,
  switchover: false,
})

Response structure


resp.global_cluster.global_cluster_identifier #=> String
resp.global_cluster.global_cluster_resource_id #=> String
resp.global_cluster.global_cluster_arn #=> String
resp.global_cluster.status #=> String
resp.global_cluster.engine #=> String
resp.global_cluster.engine_version #=> String
resp.global_cluster.database_name #=> String
resp.global_cluster.storage_encrypted #=> Boolean
resp.global_cluster.deletion_protection #=> Boolean
resp.global_cluster.global_cluster_members #=> Array
resp.global_cluster.global_cluster_members[0].db_cluster_arn #=> String
resp.global_cluster.global_cluster_members[0].readers #=> Array
resp.global_cluster.global_cluster_members[0].readers[0] #=> String
resp.global_cluster.global_cluster_members[0].is_writer #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :global_cluster_identifier (required, String)

    The identifier of the Amazon DocumentDB global cluster to apply this operation. The identifier is the unique key assigned by the user when the cluster is created. In other words, it's the name of the global cluster.

    Constraints:

    • Must match the identifier of an existing global cluster.

    • Minimum length of 1. Maximum length of 255.

    Pattern: [A-Za-z][0-9A-Za-z-:._]*

  • :target_db_cluster_identifier (required, String)

    The identifier of the secondary Amazon DocumentDB cluster that you want to promote to the primary for the global cluster. Use the Amazon Resource Name (ARN) for the identifier so that Amazon DocumentDB can locate the cluster in its Amazon Web Services region.

    Constraints:

    • Must match the identifier of an existing secondary cluster.

    • Minimum length of 1. Maximum length of 255.

    Pattern: [A-Za-z][0-9A-Za-z-:._]*

  • :allow_data_loss (Boolean)

    Specifies whether to allow data loss for this global cluster operation. Allowing data loss triggers a global failover operation.

    If you don't specify AllowDataLoss, the global cluster operation defaults to a switchover.

    Constraints:

    • Can't be specified together with the Switchover parameter.

    ^

  • :switchover (Boolean)

    Specifies whether to switch over this global database cluster.

    Constraints:

    • Can't be specified together with the AllowDataLoss parameter.

    ^

Returns:

See Also:



3785
3786
3787
3788
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3785

def failover_global_cluster(params = {}, options = {})
  req = build_request(:failover_global_cluster, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3825
3826
3827
3828
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3825

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#modify_db_cluster(params = {}) ⇒ 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",
  allow_major_version_upgrade: false,
  deletion_protection: false,
  storage_type: "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 #=> Boolean
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.replication_source_identifier #=> String
resp.db_cluster.read_replica_identifiers #=> Array
resp.db_cluster.read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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.clone_group_id #=> 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 #=> Boolean
resp.db_cluster.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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 Amazon Web Services 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 Amazon Web Services Region, occurring on a random day of the week.

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

    Constraints: Minimum 30-minute window.

  • :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 ApplyImmediately is enabled.

    To list all of the available engine versions for Amazon DocumentDB use the following command:

    aws docdb describe-db-engine-versions --engine docdb --query "DBEngineVersions[].EngineVersion"

  • :allow_major_version_upgrade (Boolean)

    A value that indicates whether major version upgrades are allowed.

    Constraints: You must allow major version upgrades when specifying a value for the EngineVersion parameter that is a different major version than the DB cluster's current version.

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

  • :storage_type (String)

    The storage type to associate with the DB cluster.

    For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide.

    Valid values for storage type - standard | iopt1

    Default value is standard

Returns:

See Also:



4060
4061
4062
4063
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4060

def modify_db_cluster(params = {}, options = {})
  req = build_request(:modify_db_cluster, params)
  req.send_request(options)
end

#modify_db_cluster_parameter_group(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4123
4124
4125
4126
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4123

def modify_db_cluster_parameter_group(params = {}, options = {})
  req = build_request(:modify_db_cluster_parameter_group, params)
  req.send_request(options)
end

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

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

To share a manual cluster snapshot with other Amazon Web Services accounts, specify restore as the AttributeName, and use the ValuesToAdd parameter to add a list of IDs of the Amazon Web Services 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 Amazon Web Services accounts. Do not add the all value for any manual cluster snapshots that contain private information that you don't want available to all Amazon Web Services accounts. If a manual cluster snapshot is encrypted, it can be shared, but only by specifying a list of authorized Amazon Web Services 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

Parameters:

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

    ({})

Options Hash (params):

  • :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 Amazon Web Services 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 Amazon Web Services accounts to copy or restore a manual cluster snapshot, set this list to include one or more Amazon Web Services account IDs. To make the manual cluster snapshot restorable by any Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services accounts to copy or restore a manual cluster snapshot, set this list to include one or more Amazon Web Services account identifiers. To remove authorization for any Amazon Web Services account to copy or restore the cluster snapshot, set it to all . If you specify all, an Amazon Web Services account whose account ID is explicitly added to the restore attribute can still copy or restore a manual cluster snapshot.

Returns:

See Also:



4203
4204
4205
4206
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4203

def modify_db_cluster_snapshot_attribute(params = {}, options = {})
  req = build_request(:modify_db_cluster_snapshot_attribute, params)
  req.send_request(options)
end

#modify_db_instance(params = {}) ⇒ 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",
  copy_tags_to_snapshot: false,
  promotion_tier: 1,
  enable_performance_insights: false,
  performance_insights_kms_key_id: "String",
  certificate_rotation_restart: 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 #=> Boolean
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 #=> Boolean
resp.db_instance.publicly_accessible #=> Boolean
resp.db_instance.status_infos #=> Array
resp.db_instance.status_infos[0].status_type #=> String
resp.db_instance.status_infos[0].normal #=> Boolean
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 #=> Boolean
resp.db_instance.kms_key_id #=> String
resp.db_instance.dbi_resource_id #=> String
resp.db_instance.ca_certificate_identifier #=> String
resp.db_instance.copy_tags_to_snapshot #=> Boolean
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
resp.db_instance.certificate_details.ca_identifier #=> String
resp.db_instance.certificate_details.valid_till #=> Time
resp.db_instance.performance_insights_enabled #=> Boolean
resp.db_instance.performance_insights_kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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 Amazon Web Services 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)

    This parameter does not apply to Amazon DocumentDB. Amazon DocumentDB does not perform minor version upgrades regardless of the value set.

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

  • :copy_tags_to_snapshot (Boolean)

    A value that indicates whether to copy all tags from the DB instance to snapshots of the DB instance. By default, tags are not copied.

  • :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

  • :enable_performance_insights (Boolean)

    A value that indicates whether to enable Performance Insights for the DB Instance. For more information, see Using Amazon Performance Insights.

  • :performance_insights_kms_key_id (String)

    The KMS key identifier for encryption of Performance Insights data.

    The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

    If you do not specify a value for PerformanceInsightsKMSKeyId, then Amazon DocumentDB uses your default KMS key. There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services region.

  • :certificate_rotation_restart (Boolean)

    Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.

    By default, the DB instance is restarted when you rotate your SSL/TLS certificate. The certificate is not updated until the DB instance is restarted.

    Set this parameter only if you are not using SSL/TLS to connect to the DB instance.

    If you are using SSL/TLS to connect to the DB instance, see Updating Your Amazon DocumentDB TLS Certificates and Encrypting Data in Transit in the Amazon DocumentDB Developer Guide.

Returns:

See Also:



4434
4435
4436
4437
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4434

def modify_db_instance(params = {}, options = {})
  req = build_request(:modify_db_instance, params)
  req.send_request(options)
end

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

Modifies an existing subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the Amazon Web Services 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4486
4487
4488
4489
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4486

def modify_db_subnet_group(params = {}, options = {})
  req = build_request(:modify_db_subnet_group, params)
  req.send_request(options)
end

#modify_event_subscription(params = {}) ⇒ Types::ModifyEventSubscriptionResult

Modifies an existing Amazon DocumentDB event notification subscription.

Examples:

Request syntax with placeholder values


resp = client.modify_event_subscription({
  subscription_name: "String", # required
  sns_topic_arn: "String",
  source_type: "String",
  event_categories: ["String"],
  enabled: false,
})

Response structure


resp.event_subscription.customer_aws_id #=> String
resp.event_subscription.cust_subscription_id #=> String
resp.event_subscription.sns_topic_arn #=> String
resp.event_subscription.status #=> String
resp.event_subscription.subscription_creation_time #=> String
resp.event_subscription.source_type #=> String
resp.event_subscription.source_ids_list #=> Array
resp.event_subscription.source_ids_list[0] #=> String
resp.event_subscription.event_categories_list #=> Array
resp.event_subscription.event_categories_list[0] #=> String
resp.event_subscription.enabled #=> Boolean
resp.event_subscription.event_subscription_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :subscription_name (required, String)

    The name of the Amazon DocumentDB event notification subscription.

  • :sns_topic_arn (String)

    The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

  • :source_type (String)

    The type of source that is generating the events. For example, if you want to be notified of events generated by an instance, set this parameter to db-instance. If this value is not specified, all events are returned.

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

  • :event_categories (Array<String>)

    A list of event categories for a SourceType that you want to subscribe to.

  • :enabled (Boolean)

    A Boolean value; set to true to activate the subscription.

Returns:

See Also:



4550
4551
4552
4553
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4550

def modify_event_subscription(params = {}, options = {})
  req = build_request(:modify_event_subscription, params)
  req.send_request(options)
end

#modify_global_cluster(params = {}) ⇒ Types::ModifyGlobalClusterResult

Modify a setting for an Amazon DocumentDB global cluster. You can change one or more configuration parameters (for example: deletion protection), or the global cluster identifier by specifying these parameters and the new values in the request.

This action only applies to Amazon DocumentDB clusters.

Examples:

Request syntax with placeholder values


resp = client.modify_global_cluster({
  global_cluster_identifier: "GlobalClusterIdentifier", # required
  new_global_cluster_identifier: "GlobalClusterIdentifier",
  deletion_protection: false,
})

Response structure


resp.global_cluster.global_cluster_identifier #=> String
resp.global_cluster.global_cluster_resource_id #=> String
resp.global_cluster.global_cluster_arn #=> String
resp.global_cluster.status #=> String
resp.global_cluster.engine #=> String
resp.global_cluster.engine_version #=> String
resp.global_cluster.database_name #=> String
resp.global_cluster.storage_encrypted #=> Boolean
resp.global_cluster.deletion_protection #=> Boolean
resp.global_cluster.global_cluster_members #=> Array
resp.global_cluster.global_cluster_members[0].db_cluster_arn #=> String
resp.global_cluster.global_cluster_members[0].readers #=> Array
resp.global_cluster.global_cluster_members[0].readers[0] #=> String
resp.global_cluster.global_cluster_members[0].is_writer #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :global_cluster_identifier (required, String)

    The identifier for the global cluster being modified. This parameter isn't case-sensitive.

    Constraints:

    • Must match the identifier of an existing global cluster.

    ^

  • :new_global_cluster_identifier (String)

    The new identifier for a global cluster when you modify a global cluster. This value is stored as a lowercase string.

    • Must contain from 1 to 63 letters, numbers, or hyphens

      The first character must be a letter

      Can't end with a hyphen or contain two consecutive hyphens

    Example: my-cluster2

  • :deletion_protection (Boolean)

    Indicates if the global cluster has deletion protection enabled. The global cluster can't be deleted when deletion protection is enabled.

Returns:

See Also:



4623
4624
4625
4626
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4623

def modify_global_cluster(params = {}, options = {})
  req = build_request(:modify_global_cluster, params)
  req.send_request(options)
end

#reboot_db_instance(params = {}) ⇒ 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 #=> Boolean
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 #=> Boolean
resp.db_instance.publicly_accessible #=> Boolean
resp.db_instance.status_infos #=> Array
resp.db_instance.status_infos[0].status_type #=> String
resp.db_instance.status_infos[0].normal #=> Boolean
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 #=> Boolean
resp.db_instance.kms_key_id #=> String
resp.db_instance.dbi_resource_id #=> String
resp.db_instance.ca_certificate_identifier #=> String
resp.db_instance.copy_tags_to_snapshot #=> Boolean
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
resp.db_instance.certificate_details.ca_identifier #=> String
resp.db_instance.certificate_details.valid_till #=> Time
resp.db_instance.performance_insights_enabled #=> Boolean
resp.db_instance.performance_insights_kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4735
4736
4737
4738
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4735

def reboot_db_instance(params = {}, options = {})
  req = build_request(:reboot_db_instance, params)
  req.send_request(options)
end

#remove_from_global_cluster(params = {}) ⇒ Types::RemoveFromGlobalClusterResult

Detaches an Amazon DocumentDB secondary cluster from a global cluster. The cluster becomes a standalone cluster with read-write capability instead of being read-only and receiving data from a primary in a different region.

This action only applies to Amazon DocumentDB clusters.

Examples:

Request syntax with placeholder values


resp = client.remove_from_global_cluster({
  global_cluster_identifier: "GlobalClusterIdentifier", # required
  db_cluster_identifier: "String", # required
})

Response structure


resp.global_cluster.global_cluster_identifier #=> String
resp.global_cluster.global_cluster_resource_id #=> String
resp.global_cluster.global_cluster_arn #=> String
resp.global_cluster.status #=> String
resp.global_cluster.engine #=> String
resp.global_cluster.engine_version #=> String
resp.global_cluster.database_name #=> String
resp.global_cluster.storage_encrypted #=> Boolean
resp.global_cluster.deletion_protection #=> Boolean
resp.global_cluster.global_cluster_members #=> Array
resp.global_cluster.global_cluster_members[0].db_cluster_arn #=> String
resp.global_cluster.global_cluster_members[0].readers #=> Array
resp.global_cluster.global_cluster_members[0].readers[0] #=> String
resp.global_cluster.global_cluster_members[0].is_writer #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :global_cluster_identifier (required, String)

    The cluster identifier to detach from the Amazon DocumentDB global cluster.

  • :db_cluster_identifier (required, String)

    The Amazon Resource Name (ARN) identifying the cluster that was detached from the Amazon DocumentDB global cluster.

Returns:

See Also:



4789
4790
4791
4792
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4789

def remove_from_global_cluster(params = {}, options = {})
  req = build_request(:remove_from_global_cluster, params)
  req.send_request(options)
end

#remove_source_identifier_from_subscription(params = {}) ⇒ Types::RemoveSourceIdentifierFromSubscriptionResult

Removes a source identifier from an existing Amazon DocumentDB event notification subscription.

Examples:

Request syntax with placeholder values


resp = client.remove_source_identifier_from_subscription({
  subscription_name: "String", # required
  source_identifier: "String", # required
})

Response structure


resp.event_subscription.customer_aws_id #=> String
resp.event_subscription.cust_subscription_id #=> String
resp.event_subscription.sns_topic_arn #=> String
resp.event_subscription.status #=> String
resp.event_subscription.subscription_creation_time #=> String
resp.event_subscription.source_type #=> String
resp.event_subscription.source_ids_list #=> Array
resp.event_subscription.source_ids_list[0] #=> String
resp.event_subscription.event_categories_list #=> Array
resp.event_subscription.event_categories_list[0] #=> String
resp.event_subscription.enabled #=> Boolean
resp.event_subscription.event_subscription_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :subscription_name (required, String)

    The name of the Amazon DocumentDB event notification subscription that you want to remove a source identifier from.

  • :source_identifier (required, String)

    The source identifier to be removed from the subscription, such as the instance identifier for an instance, or the name of a security group.

Returns:

See Also:



4835
4836
4837
4838
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4835

def remove_source_identifier_from_subscription(params = {}, options = {})
  req = build_request(:remove_source_identifier_from_subscription, params)
  req.send_request(options)
end

#remove_tags_from_resource(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4862
4863
4864
4865
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4862

def remove_tags_from_resource(params = {}, options = {})
  req = build_request(:remove_tags_from_resource, params)
  req.send_request(options)
end

#reset_db_cluster_parameter_group(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4924
4925
4926
4927
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4924

def reset_db_cluster_parameter_group(params = {}, options = {})
  req = build_request(:reset_db_cluster_parameter_group, params)
  req.send_request(options)
end

#restore_db_cluster_from_snapshot(params = {}) ⇒ 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,
  db_cluster_parameter_group_name: "String",
  storage_type: "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 #=> Boolean
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.replication_source_identifier #=> String
resp.db_cluster.read_replica_identifiers #=> Array
resp.db_cluster.read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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.clone_group_id #=> 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 #=> Boolean
resp.db_cluster.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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 KMS key identifier to use when restoring an encrypted cluster from a DB snapshot or cluster snapshot.

    The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a cluster with the same Amazon Web Services account that owns the KMS encryption key used to encrypt the new cluster, then you can use the KMS key alias instead of the ARN for the 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 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.

  • :db_cluster_parameter_group_name (String)

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

    Type: String.       Required: No.

    If this argument is omitted, the default DB cluster parameter group is used. If supplied, must match the name of an existing default DB cluster parameter group. The string must consist of from 1 to 255 letters, numbers or hyphens. Its first character must be a letter, and it cannot end with a hyphen or contain two consecutive hyphens.

  • :storage_type (String)

    The storage type to associate with the DB cluster.

    For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide.

    Valid values for storage type - standard | iopt1

    Default value is standard

Returns:

See Also:



5135
5136
5137
5138
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5135

def restore_db_cluster_from_snapshot(params = {}, options = {})
  req = build_request(:restore_db_cluster_from_snapshot, params)
  req.send_request(options)
end

#restore_db_cluster_to_point_in_time(params = {}) ⇒ 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
  restore_type: "String",
  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,
  storage_type: "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 #=> Boolean
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.replication_source_identifier #=> String
resp.db_cluster.read_replica_identifiers #=> Array
resp.db_cluster.read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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.clone_group_id #=> 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 #=> Boolean
resp.db_cluster.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

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

  • :restore_type (String)

    The type of restore to be performed. You can specify one of the following values:

    • full-copy - The new DB cluster is restored as a full copy of the source DB cluster.

    • copy-on-write - The new DB cluster is restored as a clone of the source DB cluster.

    Constraints: You can't specify copy-on-write if the engine version of the source DB cluster is earlier than 1.11.

    If you don't specify a RestoreType value, then the new DB cluster is restored as a full copy of the source DB cluster.

  • :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, DateTime, Date, Integer, String)

    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 KMS key identifier to use when restoring an encrypted cluster from an encrypted cluster.

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

    You can restore to a new cluster and encrypt the new cluster with an KMS key that is different from the KMS key used to encrypt the source cluster. The new DB cluster is encrypted with the 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 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.

  • :storage_type (String)

    The storage type to associate with the DB cluster.

    For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide.

    Valid values for storage type - standard | iopt1

    Default value is standard

Returns:

See Also:



5359
5360
5361
5362
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5359

def restore_db_cluster_to_point_in_time(params = {}, options = {})
  req = build_request(:restore_db_cluster_to_point_in_time, params)
  req.send_request(options)
end

#start_db_cluster(params = {}) ⇒ 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 #=> Boolean
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.replication_source_identifier #=> String
resp.db_cluster.read_replica_identifiers #=> Array
resp.db_cluster.read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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.clone_group_id #=> 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 #=> Boolean
resp.db_cluster.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_identifier (required, String)

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

Returns:

See Also:



5437
5438
5439
5440
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5437

def start_db_cluster(params = {}, options = {})
  req = build_request(:start_db_cluster, params)
  req.send_request(options)
end

#stop_db_cluster(params = {}) ⇒ 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 #=> Boolean
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.replication_source_identifier #=> String
resp.db_cluster.read_replica_identifiers #=> Array
resp.db_cluster.read_replica_identifiers[0] #=> 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 #=> Boolean
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 #=> Boolean
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.clone_group_id #=> 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 #=> Boolean
resp.db_cluster.storage_type #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_identifier (required, String)

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

Returns:

See Also:



5515
5516
5517
5518
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5515

def stop_db_cluster(params = {}, options = {})
  req = build_request(:stop_db_cluster, params)
  req.send_request(options)
end

#switchover_global_cluster(params = {}) ⇒ Types::SwitchoverGlobalClusterResult

Switches over the specified secondary Amazon DocumentDB cluster to be the new primary Amazon DocumentDB cluster in the global database cluster.

Examples:

Request syntax with placeholder values


resp = client.switchover_global_cluster({
  global_cluster_identifier: "GlobalClusterIdentifier", # required
  target_db_cluster_identifier: "DBClusterIdentifier", # required
})

Response structure


resp.global_cluster.global_cluster_identifier #=> String
resp.global_cluster.global_cluster_resource_id #=> String
resp.global_cluster.global_cluster_arn #=> String
resp.global_cluster.status #=> String
resp.global_cluster.engine #=> String
resp.global_cluster.engine_version #=> String
resp.global_cluster.database_name #=> String
resp.global_cluster.storage_encrypted #=> Boolean
resp.global_cluster.deletion_protection #=> Boolean
resp.global_cluster.global_cluster_members #=> Array
resp.global_cluster.global_cluster_members[0].db_cluster_arn #=> String
resp.global_cluster.global_cluster_members[0].readers #=> Array
resp.global_cluster.global_cluster_members[0].readers[0] #=> String
resp.global_cluster.global_cluster_members[0].is_writer #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :global_cluster_identifier (required, String)

    The identifier of the Amazon DocumentDB global database cluster to switch over. The identifier is the unique key assigned by the user when the cluster is created. In other words, it's the name of the global cluster. This parameter isn’t case-sensitive.

    Constraints:

    • Must match the identifier of an existing global cluster (Amazon DocumentDB global database).

    • Minimum length of 1. Maximum length of 255.

    Pattern: [A-Za-z][0-9A-Za-z-:._]*

  • :target_db_cluster_identifier (required, String)

    The identifier of the secondary Amazon DocumentDB cluster to promote to the new primary for the global database cluster. Use the Amazon Resource Name (ARN) for the identifier so that Amazon DocumentDB can locate the cluster in its Amazon Web Services region.

    Constraints:

    • Must match the identifier of an existing secondary cluster.

    • Minimum length of 1. Maximum length of 255.

    Pattern: [A-Za-z][0-9A-Za-z-:._]*

Returns:

See Also:



5585
5586
5587
5588
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5585

def switchover_global_cluster(params = {}, options = {})
  req = build_request(:switchover_global_cluster, params)
  req.send_request(options)
end

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

Polls an API operation until a resource enters a desired state.

Basic Usage

A waiter will call an API operation until:

  • It is successful
  • It enters a terminal state
  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

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

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

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(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

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

Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

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

Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default :delay and :max_attempts values.

waiter_name params :delay :max_attempts
db_instance_available #describe_db_instances 30 60
db_instance_deleted #describe_db_instances 30 60

Parameters:

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

    ({})

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

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

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.



5701
5702
5703
5704
5705
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5701

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end