Class: Aws::RDS::Client

Inherits:
Seahorse::Client::Base
  • Object
show all
Includes:
ClientStubs
Defined in:
lib/aws-sdk-rds/client.rb

Overview

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

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

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

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

    • The `:access_key_id`, `:secret_access_key`, and `:session_token` options.

    • ENV, ENV

    • `~/.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::InstanceProfileCredentails` or `Aws::ECSCredentials` to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV 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:

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

  • :endpoint (String)

    The client endpoint is normally constructed from the `:region` option. You should only configure an `:endpoint` when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

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

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

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

  • :secret_access_key (String)
  • :session_token (String)
  • :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.

  • :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::RDS::EndpointProvider)

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a `Timeout::Error`.

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

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

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

  • :ssl_verify_peer (Boolean) — default: true

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

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


367
368
369
# File 'lib/aws-sdk-rds/client.rb', line 367

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


24449
24450
24451
# File 'lib/aws-sdk-rds/client.rb', line 24449

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


24452
24453
24454
# File 'lib/aws-sdk-rds/client.rb', line 24452

def errors_module
  Errors
end

Instance Method Details

#add_role_to_db_cluster(params = {}) ⇒ Struct

Associates an Identity and Access Management (IAM) role with a DB cluster.

Examples:

Request syntax with placeholder values


resp = client.add_role_to_db_cluster({
  db_cluster_identifier: "String", # required
  role_arn: "String", # required
  feature_name: "String",
})

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_identifier (required, String)

    The name of the DB cluster to associate the IAM role with.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of the IAM role to associate with the Aurora DB cluster, for example `arn:aws:iam::123456789012:role/AuroraAccessRole`.

  • :feature_name (String)

    The name of the feature for the DB cluster that the IAM role is to be associated with. For information about supported feature names, see DBEngineVersion.

Returns:

  • (Struct)

    Returns an empty response.

See Also:


403
404
405
406
# File 'lib/aws-sdk-rds/client.rb', line 403

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

#add_role_to_db_instance(params = {}) ⇒ Struct

Associates an Amazon Web Services Identity and Access Management (IAM) role with a DB instance.

<note markdown=“1”> To add a role to a DB instance, the status of the DB instance must be `available`.

</note>

This command doesn't apply to RDS Custom.

Examples:

Request syntax with placeholder values


resp = client.add_role_to_db_instance({
  db_instance_identifier: "String", # required
  role_arn: "String", # required
  feature_name: "String", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :db_instance_identifier (required, String)

    The name of the DB instance to associate the IAM role with.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of the IAM role to associate with the DB instance, for example `arn:aws:iam::123456789012:role/AccessRole`.

  • :feature_name (required, String)

    The name of the feature for the DB instance that the IAM role is to be associated with. For information about supported feature names, see DBEngineVersion.

Returns:

  • (Struct)

    Returns an empty response.

See Also:


444
445
446
447
# File 'lib/aws-sdk-rds/client.rb', line 444

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

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

Adds a source identifier to an existing RDS event notification subscription.

Examples:

Example: To add a source identifier to an event notification subscription


# This example add a source identifier to an event notification subscription.

resp = client.add_source_identifier_to_subscription({
  source_identifier: "mymysqlinstance", 
  subscription_name: "mymysqleventsubscription", 
})

resp.to_h outputs the following:
{
  event_subscription: {
  }, 
}

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 RDS event notification subscription you want to add a source identifier to.

  • :source_identifier (required, String)

    The identifier of the event source to be added.

    Constraints:

    • If the source type is a DB instance, a `DBInstanceIdentifier` value must be supplied.

    • If the source type is a DB cluster, a `DBClusterIdentifier` value must be supplied.

    • If the source type is a DB parameter group, a `DBParameterGroupName` value must be supplied.

    • If the source type is a DB security group, a `DBSecurityGroupName` value must be supplied.

    • If the source type is a DB snapshot, a `DBSnapshotIdentifier` value must be supplied.

    • If the source type is a DB cluster snapshot, a `DBClusterSnapshotIdentifier` value must be supplied.

    • If the source type is an RDS Proxy, a `DBProxyName` value must be supplied.

Returns:

See Also:


528
529
530
531
# File 'lib/aws-sdk-rds/client.rb', line 528

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 RDS resource. These tags can also be used with cost allocation reporting to track cost associated with Amazon RDS resources, or used in a Condition statement in an IAM policy for Amazon RDS.

For an overview on tagging Amazon RDS resources, see [Tagging Amazon RDS Resources].

[1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Tagging.html

Examples:

Example: To add tags to a resource


# This example adds a tag to an option group.

resp = client.add_tags_to_resource({
  resource_name: "arn:aws:rds:us-east-1:992648334831:og:mymysqloptiongroup", 
  tags: [
    {
      key: "Staging", 
      value: "LocationDB", 
    }, 
  ], 
})

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:


590
591
592
593
# File 'lib/aws-sdk-rds/client.rb', line 590

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 a DB instance).

Examples:

Example: To apply a pending maintenance action


# This example immediately applies a pending system update to a DB instance.

resp = client.apply_pending_maintenance_action({
  apply_action: "system-update", 
  opt_in_type: "immediate", 
  resource_identifier: "arn:aws:rds:us-east-1:992648334831:db:mymysqlinstance", 
})

resp.to_h outputs the following:
{
  resource_pending_maintenance_actions: {
  }, 
}

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 RDS Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see [ Constructing an RDS Amazon Resource Name (ARN)].

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing

  • :apply_action (required, String)

    The pending maintenance action to apply to this resource.

    Valid values: `system-update`, `db-upgrade`, `hardware-maintenance`, `ca-certificate-rotation`

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


671
672
673
674
# File 'lib/aws-sdk-rds/client.rb', line 671

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

#authorize_db_security_group_ingress(params = {}) ⇒ Types::AuthorizeDBSecurityGroupIngressResult

Enables ingress to a DBSecurityGroup using one of two forms of authorization. First, EC2 or VPC security groups can be added to the DBSecurityGroup if the application using the database is running on EC2 or VPC instances. Second, IP ranges are available if the application accessing your database is running on the internet. Required parameters for this API are one of CIDR range, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId for non-VPC).

You can't authorize ingress from an EC2 security group in one Amazon Web Services Region to an Amazon RDS DB instance in another. You can't authorize ingress from a VPC security group in one VPC to an Amazon RDS DB instance in another.

For an overview of CIDR ranges, go to the [Wikipedia Tutorial].

<note markdown=“1”> EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see [Migrate from EC2-Classic to a VPC] in the *Amazon EC2 User Guide*, the blog [EC2-Classic Networking is Retiring – Here’s How to Prepare], and [Moving a DB instance not in a VPC into a VPC] in the *Amazon RDS User Guide*.

</note>

[1]: en.wikipedia.org/wiki/Classless_Inter-Domain_Routing [2]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html [3]: aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/ [4]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html

Examples:

Example: To authorize DB security group integress


# This example authorizes access to the specified security group by the specified CIDR block.

resp = client.authorize_db_security_group_ingress({
  cidrip: "203.0.113.5/32", 
  db_security_group_name: "mydbsecuritygroup", 
})

resp.to_h outputs the following:
{
  db_security_group: {
  }, 
}

Request syntax with placeholder values


resp = client.authorize_db_security_group_ingress({
  db_security_group_name: "String", # required
  cidrip: "String",
  ec2_security_group_name: "String",
  ec2_security_group_id: "String",
  ec2_security_group_owner_id: "String",
})

Response structure


resp.db_security_group.owner_id #=> String
resp.db_security_group.db_security_group_name #=> String
resp.db_security_group.db_security_group_description #=> String
resp.db_security_group.vpc_id #=> String
resp.db_security_group.ec2_security_groups #=> Array
resp.db_security_group.ec2_security_groups[0].status #=> String
resp.db_security_group.ec2_security_groups[0].ec2_security_group_name #=> String
resp.db_security_group.ec2_security_groups[0].ec2_security_group_id #=> String
resp.db_security_group.ec2_security_groups[0].ec2_security_group_owner_id #=> String
resp.db_security_group.ip_ranges #=> Array
resp.db_security_group.ip_ranges[0].status #=> String
resp.db_security_group.ip_ranges[0].cidrip #=> String
resp.db_security_group.db_security_group_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_security_group_name (required, String)

    The name of the DB security group to add authorization to.

  • :cidrip (String)

    The IP range to authorize.

  • :ec2_security_group_name (String)

    Name of the EC2 security group to authorize. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.

  • :ec2_security_group_id (String)

    Id of the EC2 security group to authorize. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.

  • :ec2_security_group_owner_id (String)

    Amazon Web Services account number of the owner of the EC2 security group specified in the `EC2SecurityGroupName` parameter. The Amazon Web Services access key ID isn't an acceptable value. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.

Returns:

See Also:


784
785
786
787
# File 'lib/aws-sdk-rds/client.rb', line 784

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

#backtrack_db_cluster(params = {}) ⇒ Types::DBClusterBacktrack

Backtracks a DB cluster to a specific time, without creating a new DB cluster.

For more information on backtracking, see [ Backtracking an Aurora DB Cluster] in the *Amazon Aurora User Guide*.

<note markdown=“1”> This action applies only to Aurora MySQL DB clusters.

</note>

[1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html

Examples:

Request syntax with placeholder values


resp = client.backtrack_db_cluster({
  db_cluster_identifier: "String", # required
  backtrack_to: Time.now, # required
  force: false,
  use_earliest_time_on_point_in_time_unavailable: false,
})

Response structure


resp.db_cluster_identifier #=> String
resp.backtrack_identifier #=> String
resp.backtrack_to #=> Time
resp.backtracked_from #=> Time
resp.backtrack_request_creation_time #=> Time
resp.status #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_identifier (required, String)

    The DB cluster identifier of the DB cluster to be backtracked. This parameter is stored as a lowercase string.

    Constraints:

    • Must contain from 1 to 63 alphanumeric characters or hyphens.

    • First character must be a letter.

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

    Example: `my-cluster1`

  • :backtrack_to (required, Time, DateTime, Date, Integer, String)

    The timestamp of the time to backtrack the DB cluster to, specified in ISO 8601 format. For more information about ISO 8601, see the [ISO8601 Wikipedia page.]

    <note markdown=“1”> If the specified time isn't a consistent time for the DB cluster, Aurora automatically chooses the nearest possible consistent time for the DB cluster.

    </note>
    

    Constraints:

    • Must contain a valid ISO 8601 timestamp.

    • Can't contain a timestamp set in the future.

    Example: `2017-07-08T18:00Z`

    [1]: en.wikipedia.org/wiki/ISO_8601

  • :force (Boolean)

    A value that indicates whether to force the DB cluster to backtrack when binary logging is enabled. Otherwise, an error occurs when binary logging is enabled.

  • :use_earliest_time_on_point_in_time_unavailable (Boolean)

    A value that indicates whether to backtrack the DB cluster to the earliest possible backtrack time when BacktrackTo is set to a timestamp earlier than the earliest backtrack time. When this parameter is disabled and BacktrackTo is set to a timestamp earlier than the earliest backtrack time, an error occurs.

Returns:

See Also:


883
884
885
886
# File 'lib/aws-sdk-rds/client.rb', line 883

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

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

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

24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
# File 'lib/aws-sdk-rds/client.rb', line 24300

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config)
  context[:gem_name] = 'aws-sdk-rds'
  context[:gem_version] = '1.174.0'
  Seahorse::Client::Request.new(handlers, context)
end

#cancel_export_task(params = {}) ⇒ Types::ExportTask

Cancels an export task in progress that is exporting a snapshot or cluster to Amazon S3. Any data that has already been written to the S3 bucket isn't removed.

Examples:

Request syntax with placeholder values


resp = client.cancel_export_task({
  export_task_identifier: "String", # required
})

Response structure


resp.export_task_identifier #=> String
resp.source_arn #=> String
resp.export_only #=> Array
resp.export_only[0] #=> String
resp.snapshot_time #=> Time
resp.task_start_time #=> Time
resp.task_end_time #=> Time
resp.s3_bucket #=> String
resp.s3_prefix #=> String
resp.iam_role_arn #=> String
resp.kms_key_id #=> String
resp.status #=> String
resp.percent_progress #=> Integer
resp.total_extracted_data_in_gb #=> Integer
resp.failure_cause #=> String
resp.warning_message #=> String
resp.source_type #=> String, one of "SNAPSHOT", "CLUSTER"

Parameters:

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

    ({})

Options Hash (params):

  • :export_task_identifier (required, String)

    The identifier of the snapshot or cluster export task to cancel.

Returns:

See Also:


944
945
946
947
# File 'lib/aws-sdk-rds/client.rb', line 944

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

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

Copies the specified DB cluster parameter group.

Examples:

Example: To copy a DB cluster parameter group


# This example copies a DB cluster parameter group.

resp = client.copy_db_cluster_parameter_group({
  source_db_cluster_parameter_group_identifier: "mydbclusterparametergroup", 
  target_db_cluster_parameter_group_description: "My DB cluster parameter group copy", 
  target_db_cluster_parameter_group_identifier: "mydbclusterparametergroup-copy", 
})

resp.to_h outputs the following:
{
  db_cluster_parameter_group: {
  }, 
}

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 DB cluster parameter group. For information about creating an ARN, see [ Constructing an ARN for Amazon RDS] in the *Amazon Aurora User Guide*.

    Constraints:

    • Must specify a valid DB cluster parameter group.

    ^

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing

  • :target_db_cluster_parameter_group_identifier (required, String)

    The identifier for the copied DB cluster parameter group.

    Constraints:

    • Can't be null, empty, or blank

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

    • First character must be a letter

    • Can't 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 DB cluster parameter group.

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

Returns:

See Also:


1039
1040
1041
1042
# File 'lib/aws-sdk-rds/client.rb', line 1039

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 DB cluster.

To copy a DB cluster snapshot from a shared manual DB cluster snapshot, `SourceDBClusterSnapshotIdentifier` must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.

You can copy an encrypted DB cluster snapshot from another Amazon Web Services Region. In that case, the Amazon Web Services Region where you call the `CopyDBClusterSnapshot` operation is the destination Amazon Web Services Region for the encrypted DB cluster snapshot to be copied to. To copy an encrypted DB cluster snapshot from another Amazon Web Services Region, you must provide the following values:

  • `KmsKeyId` - The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to encrypt the copy of the DB cluster snapshot in the destination Amazon Web Services Region.

  • `TargetDBClusterSnapshotIdentifier` - The identifier for the new copy of the DB cluster snapshot in the destination Amazon Web Services Region.

  • `SourceDBClusterSnapshotIdentifier` - The DB cluster snapshot identifier for the encrypted DB cluster snapshot to be copied. This identifier must be in the ARN format for the source Amazon Web Services Region and is the same value as the `SourceDBClusterSnapshotIdentifier` in the presigned URL.

To cancel the copy operation once it is in progress, delete the target DB cluster snapshot identified by `TargetDBClusterSnapshotIdentifier` while that DB cluster snapshot is in “copying” status.

For more information on copying encrypted Amazon Aurora DB cluster snapshots from one Amazon Web Services Region to another, see [ Copying a Snapshot] in the *Amazon Aurora User Guide*.

For more information on Amazon Aurora DB clusters, see [ What is Amazon Aurora?] in the *Amazon Aurora User Guide*.

For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments] in the *Amazon RDS User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html [3]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html

Examples:

Example: To copy a DB cluster snapshot


# The following example copies an automated snapshot of a DB cluster to a new DB cluster snapshot.

resp = client.copy_db_cluster_snapshot({
  source_db_cluster_snapshot_identifier: "rds:sample-cluster-2016-09-14-10-38", 
  target_db_cluster_snapshot_identifier: "cluster-snapshot-copy-1", 
})

resp.to_h outputs the following:
{
  db_cluster_snapshot: {
  }, 
}

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.engine_mode #=> String
resp.db_cluster_snapshot.allocated_storage #=> Integer
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.license_model #=> 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.iam_database_authentication_enabled #=> Boolean
resp.db_cluster_snapshot.tag_list #=> Array
resp.db_cluster_snapshot.tag_list[0].key #=> String
resp.db_cluster_snapshot.tag_list[0].value #=> String
resp.db_cluster_snapshot.db_system_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :source_db_cluster_snapshot_identifier (required, String)

    The identifier of the DB cluster snapshot to copy. This parameter isn't case-sensitive.

    You can't copy an encrypted, shared DB cluster snapshot from one Amazon Web Services Region to another.

    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 DB snapshot identifier.

    • If the source snapshot is in a different Amazon Web Services Region than the copy, specify a valid DB cluster snapshot ARN. For more information, go to [ Copying Snapshots Across Amazon Web Services Regions] in the *Amazon Aurora User Guide*.

    Example: `my-cluster-snapshot1`

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html#USER_CopySnapshot.AcrossRegions

  • :target_db_cluster_snapshot_identifier (required, String)

    The identifier of the new DB cluster snapshot to create from the source DB cluster snapshot. This parameter isn't case-sensitive.

    Constraints:

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

    • First character must be a letter.

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

    Example: `my-cluster-snapshot2`

  • :kms_key_id (String)

    The Amazon Web Services KMS key identifier for an encrypted DB cluster snapshot. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the Amazon Web Services KMS key.

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

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

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

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

  • :pre_signed_url (String)

    When you are copying a DB cluster snapshot from one Amazon Web Services GovCloud (US) Region to another, the URL that contains a Signature Version 4 signed request for the `CopyDBClusterSnapshot` API operation in the Amazon Web Services Region that contains the source DB cluster snapshot to copy. Use the `PreSignedUrl` parameter when copying an encrypted DB cluster snapshot from another Amazon Web Services Region. Don't specify `PreSignedUrl` when copying an encrypted DB cluster snapshot in the same Amazon Web Services Region.

    This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions.

    The presigned URL must be a valid request for the `CopyDBClusterSnapshot` API operation that can run in the source Amazon Web Services Region that contains the encrypted DB cluster snapshot to copy. The presigned URL request must contain the following parameter values:

    • `KmsKeyId` - The KMS key identifier for the KMS key to use to encrypt the copy of the DB cluster snapshot in the destination Amazon Web Services Region. This is the same identifier for both the `CopyDBClusterSnapshot` operation that is called in the destination Amazon Web Services Region, and the operation contained in the presigned URL.

    • `DestinationRegion` - The name of the Amazon Web Services Region that the DB cluster snapshot is to be created in.

    • `SourceDBClusterSnapshotIdentifier` - The DB cluster snapshot identifier for the encrypted DB 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 DB cluster snapshot from the us-west-2 Amazon Web Services Region, then your `SourceDBClusterSnapshotIdentifier` looks like the following example: `arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115`.

    To learn how to generate a Signature Version 4 signed request, see [ Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)] and [ Signature Version 4 Signing Process].

    <note markdown=“1”> 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 presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.

    </note>
    

    [1]: docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html [2]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html

  • :copy_tags (Boolean)

    A value that indicates whether to copy all tags from the source DB cluster snapshot to the target DB cluster snapshot. By default, tags are not copied.

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

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


1300
1301
1302
1303
# File 'lib/aws-sdk-rds/client.rb', line 1300

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

#copy_db_parameter_group(params = {}) ⇒ Types::CopyDBParameterGroupResult

Copies the specified DB parameter group.

Examples:

Example: To copy a DB parameter group


# This example copies a DB parameter group.

resp = client.copy_db_parameter_group({
  source_db_parameter_group_identifier: "mymysqlparametergroup", 
  target_db_parameter_group_description: "My MySQL parameter group copy", 
  target_db_parameter_group_identifier: "mymysqlparametergroup-copy", 
})

resp.to_h outputs the following:
{
  db_parameter_group: {
  }, 
}

Request syntax with placeholder values


resp = client.copy_db_parameter_group({
  source_db_parameter_group_identifier: "String", # required
  target_db_parameter_group_identifier: "String", # required
  target_db_parameter_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_parameter_group.db_parameter_group_name #=> String
resp.db_parameter_group.db_parameter_group_family #=> String
resp.db_parameter_group.description #=> String
resp.db_parameter_group.db_parameter_group_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :source_db_parameter_group_identifier (required, String)

    The identifier or ARN for the source DB parameter group. For information about creating an ARN, see [ Constructing an ARN for Amazon RDS] in the *Amazon RDS User Guide*.

    Constraints:

    • Must specify a valid DB parameter group.

    ^

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing

  • :target_db_parameter_group_identifier (required, String)

    The identifier for the copied DB parameter group.

    Constraints:

    • Can't be null, empty, or blank

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

    • First character must be a letter

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

    Example: `my-db-parameter-group`

  • :target_db_parameter_group_description (required, String)

    A description for the copied DB parameter group.

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

Returns:

See Also:


1394
1395
1396
1397
# File 'lib/aws-sdk-rds/client.rb', line 1394

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

#copy_db_snapshot(params = {}) ⇒ Types::CopyDBSnapshotResult

Copies the specified DB snapshot. The source DB snapshot must be in the `available` state.

You can copy a snapshot from one Amazon Web Services Region to another. In that case, the Amazon Web Services Region where you call the `CopyDBSnapshot` operation is the destination Amazon Web Services Region for the DB snapshot copy.

This command doesn't apply to RDS Custom.

For more information about copying snapshots, see [Copying a DB Snapshot] in the *Amazon RDS User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopyDBSnapshot

Examples:

Example: To copy a DB snapshot


# This example copies a DB snapshot.

resp = client.copy_db_snapshot({
  source_db_snapshot_identifier: "mydbsnapshot", 
  target_db_snapshot_identifier: "mydbsnapshot-copy", 
})

resp.to_h outputs the following:
{
  db_snapshot: {
  }, 
}

Request syntax with placeholder values


resp = client.copy_db_snapshot({
  source_db_snapshot_identifier: "String", # required
  target_db_snapshot_identifier: "String", # required
  kms_key_id: "String",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  copy_tags: false,
  pre_signed_url: "String",
  option_group_name: "String",
  target_custom_availability_zone: "String",
  copy_option_group: false,
  source_region: "String",
})

Response structure


resp.db_snapshot.db_snapshot_identifier #=> String
resp.db_snapshot.db_instance_identifier #=> String
resp.db_snapshot.snapshot_create_time #=> Time
resp.db_snapshot.engine #=> String
resp.db_snapshot.allocated_storage #=> Integer
resp.db_snapshot.status #=> String
resp.db_snapshot.port #=> Integer
resp.db_snapshot.availability_zone #=> String
resp.db_snapshot.vpc_id #=> String
resp.db_snapshot.instance_create_time #=> Time
resp.db_snapshot.master_username #=> String
resp.db_snapshot.engine_version #=> String
resp.db_snapshot.license_model #=> String
resp.db_snapshot.snapshot_type #=> String
resp.db_snapshot.iops #=> Integer
resp.db_snapshot.option_group_name #=> String
resp.db_snapshot.percent_progress #=> Integer
resp.db_snapshot.source_region #=> String
resp.db_snapshot.source_db_snapshot_identifier #=> String
resp.db_snapshot.storage_type #=> String
resp.db_snapshot.tde_credential_arn #=> String
resp.db_snapshot.encrypted #=> Boolean
resp.db_snapshot.kms_key_id #=> String
resp.db_snapshot.db_snapshot_arn #=> String
resp.db_snapshot.timezone #=> String
resp.db_snapshot.iam_database_authentication_enabled #=> Boolean
resp.db_snapshot.processor_features #=> Array
resp.db_snapshot.processor_features[0].name #=> String
resp.db_snapshot.processor_features[0].value #=> String
resp.db_snapshot.dbi_resource_id #=> String
resp.db_snapshot.tag_list #=> Array
resp.db_snapshot.tag_list[0].key #=> String
resp.db_snapshot.tag_list[0].value #=> String
resp.db_snapshot.original_snapshot_create_time #=> Time
resp.db_snapshot.snapshot_database_time #=> Time
resp.db_snapshot.snapshot_target #=> String
resp.db_snapshot.storage_throughput #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :source_db_snapshot_identifier (required, String)

    The identifier for the source DB snapshot.

    If the source snapshot is in the same Amazon Web Services Region as the copy, specify a valid DB snapshot identifier. For example, you might specify `rds:mysql-instance1-snapshot-20130805`.

    If the source snapshot is in a different Amazon Web Services Region than the copy, specify a valid DB snapshot ARN. For example, you might specify `arn:aws:rds:us-west-2:123456789012:snapshot:mysql-instance1-snapshot-20130805`.

    If you are copying from a shared manual DB snapshot, this parameter must be the Amazon Resource Name (ARN) of the shared DB snapshot.

    If you are copying an encrypted snapshot this parameter must be in the ARN format for the source Amazon Web Services Region.

    Constraints:

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

    ^

    Example: `rds:mydb-2012-04-02-00-01`

    Example: `arn:aws:rds:us-west-2:123456789012:snapshot:mysql-instance1-snapshot-20130805`

  • :target_db_snapshot_identifier (required, String)

    The identifier for the copy of the snapshot.

    Constraints:

    • Can't be null, empty, or blank

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

    • First character must be a letter

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

    Example: `my-db-snapshot`

  • :kms_key_id (String)

    The Amazon Web Services KMS key identifier for an encrypted DB snapshot. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

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

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

    If you specify this parameter when you copy an unencrypted snapshot, the copy is encrypted.

    If you copy an encrypted snapshot to a different Amazon Web Services Region, then you must specify an Amazon Web Services KMS key identifier for the destination Amazon Web Services Region. KMS keys are specific to the Amazon Web Services Region that they are created in, and you can't use KMS keys from one Amazon Web Services Region in another Amazon Web Services Region.

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

  • :copy_tags (Boolean)

    A value that indicates whether to copy all tags from the source DB snapshot to the target DB snapshot. By default, tags aren't copied.

  • :pre_signed_url (String)

    When you are copying a snapshot from one Amazon Web Services GovCloud (US) Region to another, the URL that contains a Signature Version 4 signed request for the `CopyDBSnapshot` API operation in the source Amazon Web Services Region that contains the source DB snapshot to copy.

    This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions.

    You must specify this parameter when you copy an encrypted DB snapshot from another Amazon Web Services Region by using the Amazon RDS API. Don't specify `PreSignedUrl` when you are copying an encrypted DB snapshot in the same Amazon Web Services Region.

    The presigned URL must be a valid request for the `CopyDBClusterSnapshot` API operation that can run in the source Amazon Web Services Region that contains the encrypted DB cluster snapshot to copy. The presigned URL request must contain the following parameter values:

    • `DestinationRegion` - The Amazon Web Services Region that the encrypted DB snapshot is copied to. This Amazon Web Services Region is the same one where the `CopyDBSnapshot` operation is called that contains this presigned URL.

      For example, if you copy an encrypted DB snapshot from the us-west-2 Amazon Web Services Region to the us-east-1 Amazon Web Services Region, then you call the `CopyDBSnapshot` operation in the us-east-1 Amazon Web Services Region and provide a presigned URL that contains a call to the `CopyDBSnapshot` operation in the us-west-2 Amazon Web Services Region. For this example, the `DestinationRegion` in the presigned URL must be set to the us-east-1 Amazon Web Services Region.

    • `KmsKeyId` - The KMS key identifier for the KMS key to use to encrypt the copy of the DB snapshot in the destination Amazon Web Services Region. This is the same identifier for both the `CopyDBSnapshot` operation that is called in the destination Amazon Web Services Region, and the operation contained in the presigned URL.

    • `SourceDBSnapshotIdentifier` - The DB snapshot identifier for the encrypted 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 DB snapshot from the us-west-2 Amazon Web Services Region, then your `SourceDBSnapshotIdentifier` looks like the following example: `arn:aws:rds:us-west-2:123456789012:snapshot:mysql-instance1-snapshot-20161115`.

    To learn how to generate a Signature Version 4 signed request, see [Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)] and [Signature Version 4 Signing Process].

    <note markdown=“1”> 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 presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.

    </note>
    

    [1]: docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html [2]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html

  • :option_group_name (String)

    The name of an option group to associate with the copy of the snapshot.

    Specify this option if you are copying a snapshot from one Amazon Web Services Region to another, and your DB instance uses a nondefault option group. If your source DB instance uses Transparent Data Encryption for Oracle or Microsoft SQL Server, you must specify this option when copying across Amazon Web Services Regions. For more information, see [Option group considerations] in the *Amazon RDS User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopySnapshot.Options

  • :target_custom_availability_zone (String)

    The external custom Availability Zone (CAZ) identifier for the target CAZ.

    Example: `rds-caz-aiqhTgQv`.

  • :copy_option_group (Boolean)

    A value that indicates whether to copy the DB option group associated with the source DB snapshot to the target Amazon Web Services account and associate with the target DB snapshot. The associated option group can be copied only with cross-account snapshot copy calls.

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


1680
1681
1682
1683
# File 'lib/aws-sdk-rds/client.rb', line 1680

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

#copy_option_group(params = {}) ⇒ Types::CopyOptionGroupResult

Copies the specified option group.

Examples:

Example: To copy an option group


# This example copies an option group.

resp = client.copy_option_group({
  source_option_group_identifier: "mymysqloptiongroup", 
  target_option_group_description: "My MySQL option group copy", 
  target_option_group_identifier: "mymysqloptiongroup-copy", 
})

resp.to_h outputs the following:
{
  option_group: {
  }, 
}

Request syntax with placeholder values


resp = client.copy_option_group({
  source_option_group_identifier: "String", # required
  target_option_group_identifier: "String", # required
  target_option_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.option_group.option_group_name #=> String
resp.option_group.option_group_description #=> String
resp.option_group.engine_name #=> String
resp.option_group.major_engine_version #=> String
resp.option_group.options #=> Array
resp.option_group.options[0].option_name #=> String
resp.option_group.options[0].option_description #=> String
resp.option_group.options[0].persistent #=> Boolean
resp.option_group.options[0].permanent #=> Boolean
resp.option_group.options[0].port #=> Integer
resp.option_group.options[0].option_version #=> String
resp.option_group.options[0].option_settings #=> Array
resp.option_group.options[0].option_settings[0].name #=> String
resp.option_group.options[0].option_settings[0].value #=> String
resp.option_group.options[0].option_settings[0].default_value #=> String
resp.option_group.options[0].option_settings[0].description #=> String
resp.option_group.options[0].option_settings[0].apply_type #=> String
resp.option_group.options[0].option_settings[0].data_type #=> String
resp.option_group.options[0].option_settings[0].allowed_values #=> String
resp.option_group.options[0].option_settings[0].is_modifiable #=> Boolean
resp.option_group.options[0].option_settings[0].is_collection #=> Boolean
resp.option_group.options[0].db_security_group_memberships #=> Array
resp.option_group.options[0].db_security_group_memberships[0].db_security_group_name #=> String
resp.option_group.options[0].db_security_group_memberships[0].status #=> String
resp.option_group.options[0].vpc_security_group_memberships #=> Array
resp.option_group.options[0].vpc_security_group_memberships[0].vpc_security_group_id #=> String
resp.option_group.options[0].vpc_security_group_memberships[0].status #=> String
resp.option_group.allows_vpc_and_non_vpc_instance_memberships #=> Boolean
resp.option_group.vpc_id #=> String
resp.option_group.option_group_arn #=> String
resp.option_group.source_option_group #=> String
resp.option_group. #=> String
resp.option_group.copy_timestamp #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :source_option_group_identifier (required, String)

    The identifier for the source option group.

    Constraints:

    • Must specify a valid option group.

    ^

  • :target_option_group_identifier (required, String)

    The identifier for the copied option group.

    Constraints:

    • Can't be null, empty, or blank

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

    • First character must be a letter

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

    Example: `my-option-group`

  • :target_option_group_description (required, String)

    The description for the copied option group.

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

Returns:

See Also:


1797
1798
1799
1800
# File 'lib/aws-sdk-rds/client.rb', line 1797

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

#create_blue_green_deployment(params = {}) ⇒ Types::CreateBlueGreenDeploymentResponse

Creates a blue/green deployment.

A blue/green deployment creates a staging environment that copies the production environment. In a blue/green deployment, the blue environment is the current production environment. The green environment is the staging environment. The staging environment stays in sync with the current production environment using logical replication.

You can make changes to the databases in the green environment without affecting production workloads. For example, you can upgrade the major or minor DB engine version, change database parameters, or make schema changes in the staging environment. You can thoroughly test changes in the green environment. When ready, you can switch over the environments to promote the green environment to be the new production environment. The switchover typically takes under a minute.

For more information, see [Using Amazon RDS Blue/Green Deployments for database updates] in the *Amazon RDS User Guide* and [ Using Amazon RDS Blue/Green Deployments for database updates] in the *Amazon Aurora User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html

Examples:

Request syntax with placeholder values


resp = client.create_blue_green_deployment({
  blue_green_deployment_name: "BlueGreenDeploymentName", # required
  source: "DatabaseArn", # required
  target_engine_version: "TargetEngineVersion",
  target_db_parameter_group_name: "TargetDBParameterGroupName",
  target_db_cluster_parameter_group_name: "TargetDBClusterParameterGroupName",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.blue_green_deployment.blue_green_deployment_identifier #=> String
resp.blue_green_deployment.blue_green_deployment_name #=> String
resp.blue_green_deployment.source #=> String
resp.blue_green_deployment.target #=> String
resp.blue_green_deployment.switchover_details #=> Array
resp.blue_green_deployment.switchover_details[0].source_member #=> String
resp.blue_green_deployment.switchover_details[0].target_member #=> String
resp.blue_green_deployment.switchover_details[0].status #=> String
resp.blue_green_deployment.tasks #=> Array
resp.blue_green_deployment.tasks[0].name #=> String
resp.blue_green_deployment.tasks[0].status #=> String
resp.blue_green_deployment.status #=> String
resp.blue_green_deployment.status_details #=> String
resp.blue_green_deployment.create_time #=> Time
resp.blue_green_deployment.delete_time #=> Time
resp.blue_green_deployment.tag_list #=> Array
resp.blue_green_deployment.tag_list[0].key #=> String
resp.blue_green_deployment.tag_list[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :blue_green_deployment_name (required, String)

    The name of the blue/green deployment.

    Constraints:

    • Can't be the same as an existing blue/green deployment name in the same account and Amazon Web Services Region.

    ^

  • :source (required, String)

    The Amazon Resource Name (ARN) of the source production database.

    Specify the database that you want to clone. The blue/green deployment creates this database in the green environment. You can make updates to the database in the green environment, such as an engine version upgrade. When you are ready, you can switch the database in the green environment to be the production database.

  • :target_engine_version (String)

    The engine version of the database in the green environment.

    Specify the engine version to upgrade to in the green environment.

  • :target_db_parameter_group_name (String)

    The DB parameter group associated with the DB instance in the green environment.

    To test parameter changes, specify a DB parameter group that is different from the one associated with the source DB instance.

  • :target_db_cluster_parameter_group_name (String)

    The DB cluster parameter group associated with the Aurora DB cluster in the green environment.

    To test parameter changes, specify a DB cluster parameter group that is different from the one associated with the source DB cluster.

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

    Tags to assign to the blue/green deployment.

Returns:

See Also:


1915
1916
1917
1918
# File 'lib/aws-sdk-rds/client.rb', line 1915

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

#create_custom_db_engine_version(params = {}) ⇒ Types::DBEngineVersion

Creates a custom DB engine version (CEV).

Examples:

Request syntax with placeholder values


resp = client.create_custom_db_engine_version({
  engine: "CustomEngineName", # required
  engine_version: "CustomEngineVersion", # required
  database_installation_files_s3_bucket_name: "BucketName",
  database_installation_files_s3_prefix: "String255",
  image_id: "String255",
  kms_key_id: "KmsKeyIdOrArn",
  description: "Description",
  manifest: "CustomDBEngineVersionManifest",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.engine #=> String
resp.engine_version #=> String
resp.db_parameter_group_family #=> String
resp.db_engine_description #=> String
resp.db_engine_version_description #=> String
resp.default_character_set.character_set_name #=> String
resp.default_character_set.character_set_description #=> String
resp.image.image_id #=> String
resp.image.status #=> String
resp.db_engine_media_type #=> String
resp.supported_character_sets #=> Array
resp.supported_character_sets[0].character_set_name #=> String
resp.supported_character_sets[0].character_set_description #=> String
resp.supported_nchar_character_sets #=> Array
resp.supported_nchar_character_sets[0].character_set_name #=> String
resp.supported_nchar_character_sets[0].character_set_description #=> String
resp.valid_upgrade_target #=> Array
resp.valid_upgrade_target[0].engine #=> String
resp.valid_upgrade_target[0].engine_version #=> String
resp.valid_upgrade_target[0].description #=> String
resp.valid_upgrade_target[0].auto_upgrade #=> Boolean
resp.valid_upgrade_target[0].is_major_version_upgrade #=> Boolean
resp.valid_upgrade_target[0].supported_engine_modes #=> Array
resp.valid_upgrade_target[0].supported_engine_modes[0] #=> String
resp.valid_upgrade_target[0].supports_parallel_query #=> Boolean
resp.valid_upgrade_target[0].supports_global_databases #=> Boolean
resp.valid_upgrade_target[0].supports_babelfish #=> Boolean
resp.supported_timezones #=> Array
resp.supported_timezones[0].timezone_name #=> String
resp.exportable_log_types #=> Array
resp.exportable_log_types[0] #=> String
resp.supports_log_exports_to_cloudwatch_logs #=> Boolean
resp.supports_read_replica #=> Boolean
resp.supported_engine_modes #=> Array
resp.supported_engine_modes[0] #=> String
resp.supported_feature_names #=> Array
resp.supported_feature_names[0] #=> String
resp.status #=> String
resp.supports_parallel_query #=> Boolean
resp.supports_global_databases #=> Boolean
resp.major_engine_version #=> String
resp.database_installation_files_s3_bucket_name #=> String
resp.database_installation_files_s3_prefix #=> String
resp.db_engine_version_arn #=> String
resp.kms_key_id #=> String
resp.create_time #=> Time
resp.tag_list #=> Array
resp.tag_list[0].key #=> String
resp.tag_list[0].value #=> String
resp.supports_babelfish #=> Boolean
resp.custom_db_engine_version_manifest #=> String
resp.supports_certificate_rotation_without_restart #=> Boolean
resp.supported_ca_certificate_identifiers #=> Array
resp.supported_ca_certificate_identifiers[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :engine (required, String)

    The database engine to use for your custom engine version (CEV). The only supported value is `custom-oracle-ee`.

  • :engine_version (required, String)

    The name of your CEV. The name format is 19.*customized_string*. For example, a valid CEV name is `19.my_cev1`. This setting is required for RDS Custom for Oracle, but optional for Amazon RDS. The combination of `Engine` and `EngineVersion` is unique per customer per Region.

  • :database_installation_files_s3_bucket_name (String)

    The name of an Amazon S3 bucket that contains database installation files for your CEV. For example, a valid bucket name is `my-custom-installation-files`.

  • :database_installation_files_s3_prefix (String)

    The Amazon S3 directory that contains the database installation files for your CEV. For example, a valid bucket name is `123456789012/cev1`. If this setting isn't specified, no prefix is assumed.

  • :image_id (String)

    The ID of the AMI. An AMI ID is required to create a CEV for RDS Custom for SQL Server.

  • :kms_key_id (String)

    The Amazon Web Services KMS key identifier for an encrypted CEV. A symmetric encryption KMS key is required for RDS Custom, but optional for Amazon RDS.

    If you have an existing symmetric encryption KMS key in your account, you can use it with RDS Custom. No further action is necessary. If you don't already have a symmetric encryption KMS key in your account, follow the instructions in [ Creating a symmetric encryption KMS key] in the *Amazon Web Services Key Management Service Developer Guide*.

    You can choose the same symmetric encryption key when you create a CEV and a DB instance, or choose different keys.

    [1]: docs.aws.amazon.com/kms/latest/developerguide/create-keys.html#create-symmetric-cmk

  • :description (String)

    An optional description of your CEV.

  • :manifest (String)

    The CEV manifest, which is a JSON document that describes the installation .zip files stored in Amazon S3. Specify the name/value pairs in a file or a quoted string. RDS Custom applies the patches in the order in which they are listed.

    The following JSON fields are valid:

    MediaImportTemplateVersion

    : Version of the CEV manifest. The date is in the format `YYYY-MM-DD`.

    databaseInstallationFileNames

    : Ordered list of installation files for the CEV.

    opatchFileNames

    : Ordered list of OPatch installers used for the Oracle DB engine.

    psuRuPatchFileNames

    : The PSU and RU patches for this CEV.

    OtherPatchFileNames

    : The patches that are not in the list of PSU and RU patches. Amazon

    RDS applies these patches after applying the PSU and RU patches.
    

    For more information, see [ Creating the CEV manifest] in the *Amazon RDS User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.preparing.manifest

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

Returns:

See Also:


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

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

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

Creates a new Amazon Aurora DB cluster or Multi-AZ DB cluster.

If you create an Aurora DB cluster, the request creates an empty cluster. You must explicitly create the writer instance for your DB cluster using the [CreateDBInstance] operation. If you create a Multi-AZ DB cluster, the request creates a writer and two reader DB instances for you, each in a different Availability Zone.

You can use the `ReplicationSourceIdentifier` parameter to create an Amazon Aurora DB cluster as a read replica of another DB cluster or Amazon RDS for MySQL or PostgreSQL DB instance. For more information about Amazon Aurora, see [What is Amazon Aurora?] in the *Amazon Aurora User Guide*.

You can also use the `ReplicationSourceIdentifier` parameter to create a Multi-AZ DB cluster read replica with an RDS for MySQL or PostgreSQL DB instance as the source. For more information about Multi-AZ DB clusters, see [Multi-AZ DB cluster deployments] in the *Amazon RDS User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html [3]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html

Examples:

Example: To create a DB cluster


# This example creates a DB cluster.

resp = client.create_db_cluster({
  availability_zones: [
    "us-east-1a", 
  ], 
  backup_retention_period: 1, 
  db_cluster_identifier: "mydbcluster", 
  db_cluster_parameter_group_name: "mydbclusterparametergroup", 
  database_name: "myauroradb", 
  engine: "aurora", 
  engine_version: "5.6.10a", 
  master_user_password: "mypassword", 
  master_username: "myuser", 
  port: 3306, 
  storage_encrypted: true, 
})

resp.to_h outputs the following:
{
  db_cluster: {
  }, 
}

Request syntax with placeholder values


resp = client.create_db_cluster({
  availability_zones: ["String"],
  backup_retention_period: 1,
  character_set_name: "String",
  database_name: "String",
  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",
  option_group_name: "String",
  preferred_backup_window: "String",
  preferred_maintenance_window: "String",
  replication_source_identifier: "String",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  storage_encrypted: false,
  kms_key_id: "String",
  pre_signed_url: "String",
  enable_iam_database_authentication: false,
  backtrack_window: 1,
  enable_cloudwatch_logs_exports: ["String"],
  engine_mode: "String",
  scaling_configuration: {
    min_capacity: 1,
    max_capacity: 1,
    auto_pause: false,
    seconds_until_auto_pause: 1,
    timeout_action: "String",
    seconds_before_timeout: 1,
  },
  deletion_protection: false,
  global_cluster_identifier: "String",
  enable_http_endpoint: false,
  copy_tags_to_snapshot: false,
  domain: "String",
  domain_iam_role_name: "String",
  enable_global_write_forwarding: false,
  db_cluster_instance_class: "String",
  allocated_storage: 1,
  storage_type: "String",
  iops: 1,
  publicly_accessible: false,
  auto_minor_version_upgrade: false,
  monitoring_interval: 1,
  monitoring_role_arn: "String",
  enable_performance_insights: false,
  performance_insights_kms_key_id: "String",
  performance_insights_retention_period: 1,
  serverless_v2_scaling_configuration: {
    min_capacity: 1.0,
    max_capacity: 1.0,
  },
  network_type: "String",
  db_system_id: "String",
  manage_master_user_password: false,
  master_user_secret_kms_key_id: "String",
  source_region: "String",
})

Response structure


resp.db_cluster.allocated_storage #=> Integer
resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.character_set_name #=> String
resp.db_cluster.database_name #=> String
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.automatic_restart_time #=> Time
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.custom_endpoints #=> Array
resp.db_cluster.custom_endpoints[0] #=> 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.db_cluster_option_group_memberships #=> Array
resp.db_cluster.db_cluster_option_group_memberships[0].db_cluster_option_group_name #=> String
resp.db_cluster.db_cluster_option_group_memberships[0].status #=> 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.associated_roles[0].feature_name #=> String
resp.db_cluster.iam_database_authentication_enabled #=> Boolean
resp.db_cluster.clone_group_id #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.earliest_backtrack_time #=> Time
resp.db_cluster.backtrack_window #=> Integer
resp.db_cluster.backtrack_consumed_change_records #=> Integer
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.capacity #=> Integer
resp.db_cluster.engine_mode #=> String
resp.db_cluster.scaling_configuration_info.min_capacity #=> Integer
resp.db_cluster.scaling_configuration_info.max_capacity #=> Integer
resp.db_cluster.scaling_configuration_info.auto_pause #=> Boolean
resp.db_cluster.scaling_configuration_info.seconds_until_auto_pause #=> Integer
resp.db_cluster.scaling_configuration_info.timeout_action #=> String
resp.db_cluster.scaling_configuration_info.seconds_before_timeout #=> Integer
resp.db_cluster.deletion_protection #=> Boolean
resp.db_cluster.http_endpoint_enabled #=> Boolean
resp.db_cluster.activity_stream_mode #=> String, one of "sync", "async"
resp.db_cluster.activity_stream_status #=> String, one of "stopped", "starting", "started", "stopping"
resp.db_cluster.activity_stream_kms_key_id #=> String
resp.db_cluster.activity_stream_kinesis_stream_name #=> String
resp.db_cluster.copy_tags_to_snapshot #=> Boolean
resp.db_cluster. #=> Boolean
resp.db_cluster.domain_memberships #=> Array
resp.db_cluster.domain_memberships[0].domain #=> String
resp.db_cluster.domain_memberships[0].status #=> String
resp.db_cluster.domain_memberships[0].fqdn #=> String
resp.db_cluster.domain_memberships[0].iam_role_name #=> String
resp.db_cluster.tag_list #=> Array
resp.db_cluster.tag_list[0].key #=> String
resp.db_cluster.tag_list[0].value #=> String
resp.db_cluster.global_write_forwarding_status #=> String, one of "enabled", "disabled", "enabling", "disabling", "unknown"
resp.db_cluster.global_write_forwarding_requested #=> Boolean
resp.db_cluster.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable #=> Array
resp.db_cluster.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable[0] #=> String
resp.db_cluster.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable #=> Array
resp.db_cluster.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable[0] #=> String
resp.db_cluster.pending_modified_values.db_cluster_identifier #=> String
resp.db_cluster.pending_modified_values.master_user_password #=> String
resp.db_cluster.pending_modified_values.iam_database_authentication_enabled #=> Boolean
resp.db_cluster.pending_modified_values.engine_version #=> String
resp.db_cluster.pending_modified_values.backup_retention_period #=> Integer
resp.db_cluster.pending_modified_values.allocated_storage #=> Integer
resp.db_cluster.pending_modified_values.iops #=> Integer
resp.db_cluster.db_cluster_instance_class #=> String
resp.db_cluster.storage_type #=> String
resp.db_cluster.iops #=> Integer
resp.db_cluster.publicly_accessible #=> Boolean
resp.db_cluster.auto_minor_version_upgrade #=> Boolean
resp.db_cluster.monitoring_interval #=> Integer
resp.db_cluster.monitoring_role_arn #=> String
resp.db_cluster.performance_insights_enabled #=> Boolean
resp.db_cluster.performance_insights_kms_key_id #=> String
resp.db_cluster.performance_insights_retention_period #=> Integer
resp.db_cluster.serverless_v2_scaling_configuration.min_capacity #=> Float
resp.db_cluster.serverless_v2_scaling_configuration.max_capacity #=> Float
resp.db_cluster.network_type #=> String
resp.db_cluster.db_system_id #=> String
resp.db_cluster.master_user_secret.secret_arn #=> String
resp.db_cluster.master_user_secret.secret_status #=> String
resp.db_cluster.master_user_secret.kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :availability_zones (Array<String>)

    A list of Availability Zones (AZs) where DB instances in the DB cluster can be created.

    For information on Amazon Web Services Regions and Availability Zones, see [Choosing the Regions and Availability Zones] in the *Amazon Aurora User Guide*.

    Valid for: Aurora DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html

  • :backup_retention_period (Integer)

    The number of days for which automated backups are retained.

    Default: 1

    Constraints:

    • Must be a value from 1 to 35

    ^

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :character_set_name (String)

    A value that indicates that the DB cluster should be associated with the specified CharacterSet.

    Valid for: Aurora DB clusters only

  • :database_name (String)

    The name for your database of up to 64 alphanumeric characters. If you do not provide a name, Amazon RDS doesn't create a database in the DB cluster you are creating.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :db_cluster_identifier (required, String)

    The DB cluster identifier. This parameter is stored as a lowercase string.

    Constraints:

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

    • First character must be a letter.

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

    Example: `my-cluster1`

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :db_cluster_parameter_group_name (String)

    The name of the DB cluster parameter group to associate with this DB cluster. If you do not specify a value, then the default DB cluster parameter group for the specified DB engine and version is used.

    Constraints:

    • If supplied, must match the name of an existing DB cluster parameter group.

    ^

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :vpc_security_group_ids (Array<String>)

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

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :db_subnet_group_name (String)

    A DB subnet group to associate with this DB cluster.

    This setting is required to create a Multi-AZ DB cluster.

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

    Example: `mydbsubnetgroup`

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :engine (required, String)

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

    Valid Values:

    • `aurora-mysql`

    • `aurora-postgresql`

    • `mysql`

    • `postgres`

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :engine_version (String)

    The version number of the database engine to use.

    To list all of the available engine versions for Aurora MySQL version 2 (5.7-compatible) and version 3 (MySQL 8.0-compatible), use the following command:

    `aws rds describe-db-engine-versions –engine aurora-mysql –query “DBEngineVersions[].EngineVersion”`

    You can supply either `5.7` or `8.0` to use the default engine version for Aurora MySQL version 2 or version 3, respectively.

    To list all of the available engine versions for Aurora PostgreSQL, use the following command:

    `aws rds describe-db-engine-versions –engine aurora-postgresql –query “DBEngineVersions[].EngineVersion”`

    To list all of the available engine versions for RDS for MySQL, use the following command:

    `aws rds describe-db-engine-versions –engine mysql –query “DBEngineVersions[].EngineVersion”`

    To list all of the available engine versions for RDS for PostgreSQL, use the following command:

    `aws rds describe-db-engine-versions –engine postgres –query “DBEngineVersions[].EngineVersion”`

    **Aurora MySQL**

    For information, see [Database engine updates for Amazon Aurora MySQL] in the *Amazon Aurora User Guide*.

    **Aurora PostgreSQL**

    For information, see [Amazon Aurora PostgreSQL releases and engine versions] in the *Amazon Aurora User Guide*.

    MySQL

    For information, see [Amazon RDS for MySQL] in the *Amazon RDS User Guide*.

    PostgreSQL

    For information, see [Amazon RDS for PostgreSQL] in the *Amazon RDS User Guide*.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html [3]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt [4]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts

  • :port (Integer)

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

    **RDS for MySQL and Aurora MySQL**

    Default: `3306`

    Valid values: `1150-65535`

    **RDS for PostgreSQL and Aurora PostgreSQL**

    Default: `5432`

    Valid values: `1150-65535`

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :master_username (String)

    The name of the master user for the DB cluster.

    Constraints:

    • Must be 1 to 16 letters or numbers.

    • First character must be a letter.

    • Can't be a reserved word for the chosen database engine.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :master_user_password (String)

    The password for the master database user. This password can contain any printable ASCII character except “/”, “”“, or ”@“.

    Constraints:

    • Must contain from 8 to 41 characters.

    • Can't be specified if `ManageMasterUserPassword` is turned on.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :option_group_name (String)

    A value that indicates that the DB cluster should be associated with the specified option group.

    DB clusters are associated with a default option group that can't be modified.

  • :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. To view the time blocks available, see [ Backup window] in the *Amazon Aurora User Guide*.

    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.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.Backups.BackupWindow

  • :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. To see the time blocks available, see [ Adjusting the Preferred DB Cluster Maintenance Window] in the *Amazon Aurora User Guide*.

    Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.

    Constraints: Minimum 30-minute window.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora

  • :replication_source_identifier (String)

    The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a read replica.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

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

    Tags to assign to the DB cluster.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :storage_encrypted (Boolean)

    A value that indicates whether the DB cluster is encrypted.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :kms_key_id (String)

    The Amazon Web Services KMS key identifier for an encrypted DB cluster.

    The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.

    When a KMS key isn't specified in `KmsKeyId`:

    • If `ReplicationSourceIdentifier` identifies an encrypted source, then Amazon RDS will use the KMS key used to encrypt the source. Otherwise, Amazon RDS will use your default KMS key.

    • If the `StorageEncrypted` parameter is enabled and `ReplicationSourceIdentifier` isn't specified, then Amazon RDS will use 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.

    If you create a read replica of an encrypted DB cluster in another Amazon Web Services Region, you must set `KmsKeyId` to a KMS key identifier that is valid in the destination Amazon Web Services Region. This KMS key is used to encrypt the read replica in that Amazon Web Services Region.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :pre_signed_url (String)

    When you are replicating a DB cluster from one Amazon Web Services GovCloud (US) Region to another, an URL that contains a Signature Version 4 signed request for the `CreateDBCluster` operation to be called in the source Amazon Web Services Region where the DB cluster is replicated from. Specify `PreSignedUrl` only when you are performing cross-Region replication from an encrypted DB cluster.

    The presigned URL must be a valid request for the `CreateDBCluster` API operation that can run in the source Amazon Web Services Region that contains the encrypted DB cluster to copy.

    The presigned URL request must contain the following parameter values:

    • `KmsKeyId` - The KMS key identifier for the KMS key to use to encrypt the copy of the DB cluster in the destination Amazon Web Services Region. This should refer to the same KMS key for both the `CreateDBCluster` operation that is called in the destination Amazon Web Services Region, and the operation contained in the presigned URL.

    • `DestinationRegion` - The name of the Amazon Web Services Region that Aurora read replica will be created in.

    • `ReplicationSourceIdentifier` - The DB cluster identifier for the encrypted DB cluster 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 DB cluster from the us-west-2 Amazon Web Services Region, then your `ReplicationSourceIdentifier` would look like Example: `arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1`.

    To learn how to generate a Signature Version 4 signed request, see [ Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)] and [ Signature Version 4 Signing Process].

    <note markdown=“1”> 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 presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.

    </note>
    

    Valid for: Aurora DB clusters only

    [1]: docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html [2]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html

  • :enable_iam_database_authentication (Boolean)

    A value that indicates whether to enable mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts. By default, mapping isn't enabled.

    For more information, see [ IAM Database Authentication] in the *Amazon Aurora User Guide*.

    Valid for: Aurora DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html

  • :backtrack_window (Integer)

    The target backtrack window, in seconds. To disable backtracking, set this value to 0.

    Default: 0

    Constraints:

    • If specified, this value must be set to a number from 0 to 259,200 (72 hours).

    ^

    Valid for: Aurora MySQL DB clusters only

  • :enable_cloudwatch_logs_exports (Array<String>)

    The list of log types that need to be enabled for exporting to CloudWatch Logs. The values in the list depend on the DB engine being used.

    **RDS for MySQL**

    Possible values are `error`, `general`, and `slowquery`.

    **RDS for PostgreSQL**

    Possible values are `postgresql` and `upgrade`.

    **Aurora MySQL**

    Possible values are `audit`, `error`, `general`, and `slowquery`.

    **Aurora PostgreSQL**

    Possible value is `postgresql`.

    For more information about exporting CloudWatch Logs for Amazon RDS, see [Publishing Database Logs to Amazon CloudWatch Logs] in the *Amazon RDS User Guide*.

    For more information about exporting CloudWatch Logs for Amazon Aurora, see [Publishing Database Logs to Amazon CloudWatch Logs] in the *Amazon Aurora User Guide*.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch

  • :engine_mode (String)

    The DB engine mode of the DB cluster, either `provisioned` or `serverless`.

    The `serverless` engine mode only applies for Aurora Serverless v1 DB clusters.

    Limitations and requirements apply to some DB engine modes. For more information, see the following sections in the *Amazon Aurora User Guide*:

    • Limitations of Aurora Serverless v1][1
    • Requirements for Aurora Serverless v2][2
    • Limitations of parallel query][3
    • Limitations of Aurora global databases][4

    Valid for: Aurora DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.limitations [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.requirements.html [3]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-mysql-parallel-query.html#aurora-mysql-parallel-query-limitations [4]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html#aurora-global-database.limitations

  • :scaling_configuration (Types::ScalingConfiguration)

    For DB clusters in `serverless` DB engine mode, the scaling properties of the DB cluster.

    Valid for: Aurora DB clusters only

  • :deletion_protection (Boolean)

    A value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection isn't enabled.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :global_cluster_identifier (String)

    The global cluster ID of an Aurora cluster that becomes the primary cluster in the new global database cluster.

    Valid for: Aurora DB clusters only

  • :enable_http_endpoint (Boolean)

    A value that indicates whether to enable the HTTP endpoint for an Aurora Serverless v1 DB cluster. By default, the HTTP endpoint is disabled.

    When enabled, the HTTP endpoint provides a connectionless web service API for running SQL queries on the Aurora Serverless v1 DB cluster. You can also query your database from inside the RDS console with the query editor.

    For more information, see [Using the Data API for Aurora Serverless v1] in the *Amazon Aurora User Guide*.

    Valid for: Aurora DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html

  • :copy_tags_to_snapshot (Boolean)

    A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. The default is not to copy them.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • :domain (String)

    The Active Directory directory ID to create the DB cluster in.

    For Amazon Aurora DB clusters, Amazon RDS can use Kerberos authentication to authenticate users that connect to the DB cluster.

    For more information, see [Kerberos authentication] in the *Amazon Aurora User Guide*.

    Valid for: Aurora DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html

  • :domain_iam_role_name (String)

    Specify the name of the IAM role to be used when making API calls to the Directory Service.

    Valid for: Aurora DB clusters only

  • :enable_global_write_forwarding (Boolean)

    A value that indicates whether to enable this DB cluster to forward write operations to the primary cluster of an Aurora global database (GlobalCluster). By default, write operations are not allowed on Aurora DB clusters that are secondary clusters in an Aurora global database.

    You can set this value only on Aurora DB clusters that are members of an Aurora global database. With this parameter enabled, a secondary cluster can forward writes to the current primary cluster and the resulting changes are replicated back to this cluster. For the primary DB cluster of an Aurora global database, this value is used immediately if the primary is demoted by the FailoverGlobalCluster API operation, but it does nothing until then.

    Valid for: Aurora DB clusters only

  • :db_cluster_instance_class (String)

    The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example db.m6gd.xlarge. Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.

    For the full list of DB instance classes and availability for your engine, see [DB instance class] in the *Amazon RDS User Guide*.

    This setting is required to create a Multi-AZ DB cluster.

    Valid for: Multi-AZ DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html

  • :allocated_storage (Integer)

    The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster.

    This setting is required to create a Multi-AZ DB cluster.

    Valid for: Multi-AZ DB clusters only

  • :storage_type (String)

    Specifies the storage type to be associated with the DB cluster.

    This setting is required to create a Multi-AZ DB cluster.

    Valid values: `io1`

    When specified, a value for the `Iops` parameter is required.

    Default: `io1`

    Valid for: Multi-AZ DB clusters only

  • :iops (Integer)

    The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster.

    For information about valid IOPS values, see [Provisioned IOPS storage] in the *Amazon RDS User Guide*.

    This setting is required to create a Multi-AZ DB cluster.

    Constraints: Must be a multiple between .5 and 50 of the storage amount for the DB cluster.

    Valid for: Multi-AZ DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS

  • :publicly_accessible (Boolean)

    A value that indicates whether the DB cluster is publicly accessible.

    When the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB cluster's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access to the DB cluster is ultimately controlled by the security group it uses. That public access isn't permitted if the security group assigned to the DB cluster doesn't permit it.

    When the DB cluster isn't publicly accessible, it is an internal DB cluster with a DNS name that resolves to a private IP address.

    Default: The default behavior varies depending on whether `DBSubnetGroupName` is specified.

    If `DBSubnetGroupName` isn't specified, and `PubliclyAccessible` isn't specified, the following applies:

    • If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB cluster is private.

    • If the default VPC in the target Region has an internet gateway attached to it, the DB cluster is public.

    If `DBSubnetGroupName` is specified, and `PubliclyAccessible` isn't specified, the following applies:

    • If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB cluster is private.

    • If the subnets are part of a VPC that has an internet gateway attached to it, the DB cluster is public.

    Valid for: Multi-AZ DB clusters only

  • :auto_minor_version_upgrade (Boolean)

    A value that indicates whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window. By default, minor engine upgrades are applied automatically.

    Valid for: Multi-AZ DB clusters only

  • :monitoring_interval (Integer)

    The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off collecting Enhanced Monitoring metrics, specify 0. The default is 0.

    If `MonitoringRoleArn` is specified, also set `MonitoringInterval` to a value other than 0.

    Valid Values: `0, 1, 5, 10, 15, 30, 60`

    Valid for: Multi-AZ DB clusters only

  • :monitoring_role_arn (String)

    The Amazon Resource Name (ARN) for the IAM role that permits RDS to send Enhanced Monitoring metrics to Amazon CloudWatch Logs. An example is `arn:aws:iam:123456789012:role/emaccess`. For information on creating a monitoring role, see [Setting up and enabling Enhanced Monitoring] in the *Amazon RDS User Guide*.

    If `MonitoringInterval` is set to a value other than 0, supply a `MonitoringRoleArn` value.

    Valid for: Multi-AZ DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling

  • :enable_performance_insights (Boolean)

    A value that indicates whether to turn on Performance Insights for the DB cluster.

    For more information, see [ Using Amazon Performance Insights] in the *Amazon RDS User Guide*.

    Valid for: Multi-AZ DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html

  • :performance_insights_kms_key_id (String)

    The Amazon Web Services KMS key identifier for encryption of Performance Insights data.

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

    If you don't specify a value for `PerformanceInsightsKMSKeyId`, then Amazon RDS 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.

    Valid for: Multi-AZ DB clusters only

  • :performance_insights_retention_period (Integer)

    The number of days to retain Performance Insights data. The default is 7 days. The following values are valid:

    • 7

    • month * 31, where month is a number of months from 1-23

    • 731

    For example, the following values are valid:

    • 93 (3 months * 31)

    • 341 (11 months * 31)

    • 589 (19 months * 31)

    • 731

    If you specify a retention period such as 94, which isn't a valid value, RDS issues an error.

    Valid for: Multi-AZ DB clusters only

  • :serverless_v2_scaling_configuration (Types::ServerlessV2ScalingConfiguration)

    Contains the scaling configuration of an Aurora Serverless v2 DB cluster.

    For more information, see [Using Amazon Aurora Serverless v2] in the *Amazon Aurora User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html

  • :network_type (String)

    The network type of the DB cluster.

    Valid values:

    • `IPV4`

    • `DUAL`

    The network type is determined by the `DBSubnetGroup` specified for the DB cluster. A `DBSubnetGroup` can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (`DUAL`).

    For more information, see [ Working with a DB instance in a VPC] in the *Amazon Aurora User Guide.*

    Valid for: Aurora DB clusters only

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html

  • :db_system_id (String)

    Reserved for future use.

  • :manage_master_user_password (Boolean)

    A value that indicates whether to manage the master user password with Amazon Web Services Secrets Manager.

    For more information, see [Password management with Amazon Web Services Secrets Manager] in the *Amazon RDS User Guide* and

    Password management with Amazon Web Services Secrets Manager][2

    in

    the *Amazon Aurora User Guide.*

    Constraints:

    • Can't manage the master user password with Amazon Web Services Secrets Manager if `MasterUserPassword` is specified.

    ^

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html

  • :master_user_secret_kms_key_id (String)

    The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.

    This setting is valid only if the master user password is managed by RDS in Amazon Web Services Secrets Manager for the DB cluster.

    The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.

    If you don't specify `MasterUserSecretKmsKeyId`, then the `aws/secretsmanager` KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the `aws/secretsmanager` KMS key to encrypt the secret, and you must use a customer managed 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.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

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


3179
3180
3181
3182
# File 'lib/aws-sdk-rds/client.rb', line 3179

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

#create_db_cluster_endpoint(params = {}) ⇒ Types::DBClusterEndpoint

Creates a new custom endpoint and associates it with an Amazon Aurora DB cluster.

<note markdown=“1”> This action applies only to Aurora DB clusters.

</note>

Examples:

Request syntax with placeholder values


resp = client.create_db_cluster_endpoint({
  db_cluster_identifier: "String", # required
  db_cluster_endpoint_identifier: "String", # required
  endpoint_type: "String", # required
  static_members: ["String"],
  excluded_members: ["String"],
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_cluster_endpoint_identifier #=> String
resp.db_cluster_identifier #=> String
resp.db_cluster_endpoint_resource_identifier #=> String
resp.endpoint #=> String
resp.status #=> String
resp.endpoint_type #=> String
resp.custom_endpoint_type #=> String
resp.static_members #=> Array
resp.static_members[0] #=> String
resp.excluded_members #=> Array
resp.excluded_members[0] #=> String
resp.db_cluster_endpoint_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_identifier (required, String)

    The DB cluster identifier of the DB cluster associated with the endpoint. This parameter is stored as a lowercase string.

  • :db_cluster_endpoint_identifier (required, String)

    The identifier to use for the new endpoint. This parameter is stored as a lowercase string.

  • :endpoint_type (required, String)

    The type of the endpoint, one of: `READER`, `WRITER`, `ANY`.

  • :static_members (Array<String>)

    List of DB instance identifiers that are part of the custom endpoint group.

  • :excluded_members (Array<String>)

    List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. This parameter is relevant only if the list of static members is empty.

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

    The tags to be assigned to the Amazon RDS resource.

Returns:

See Also:


3263
3264
3265
3266
# File 'lib/aws-sdk-rds/client.rb', line 3263

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

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

Creates a new DB cluster parameter group.

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

A DB cluster parameter group is initially created with the default parameters for the database engine used by instances in the DB cluster. To provide custom values for any of the parameters, you must modify the group after creating it using `ModifyDBClusterParameterGroup`. Once you've created a DB cluster parameter group, you need to associate it with your DB cluster using `ModifyDBCluster`.

When you associate a new DB cluster parameter group with a running Aurora DB cluster, reboot the DB instances in the DB cluster without failover for the new DB cluster parameter group and associated settings to take effect.

When you associate a new DB cluster parameter group with a running Multi-AZ DB cluster, reboot the DB cluster without failover for the new DB cluster parameter group and associated settings to take effect.

After you create a DB cluster parameter group, you should wait at least 5 minutes before creating your first DB cluster that uses that DB cluster parameter group as the default parameter group. This allows Amazon RDS to fully complete the create action before the DB cluster parameter group is used as the default for a new DB cluster. This is especially important for parameters that are critical when creating the default database for a DB cluster, such as the character set for the default database defined by the `character_set_database` parameter. You can use the *Parameter Groups* option of the [Amazon RDS console] or the `DescribeDBClusterParameters` operation to verify that your DB cluster parameter group has been created or modified.

For more information on Amazon Aurora, see [ What is Amazon Aurora?] in the *Amazon Aurora User Guide*.

For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments] in the *Amazon RDS User Guide*.

[1]: console.aws.amazon.com/rds/ [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html [3]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html

Examples:

Example: To create a DB cluster parameter group


# This example creates a DB cluster parameter group.

resp = client.create_db_cluster_parameter_group({
  db_cluster_parameter_group_name: "mydbclusterparametergroup", 
  db_parameter_group_family: "aurora5.6", 
  description: "My DB cluster parameter group", 
})

resp.to_h outputs the following:
{
  db_cluster_parameter_group: {
  }, 
}

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 DB cluster parameter group.

    Constraints:

    • Must not match the name of an existing DB cluster parameter group.

    ^

    <note markdown=“1”> This value is stored as a lowercase string.

    </note>
    
  • :db_parameter_group_family (required, String)

    The DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.

    **Aurora MySQL**

    Example: `aurora5.6`, `aurora-mysql5.7`, `aurora-mysql8.0`

    **Aurora PostgreSQL**

    Example: `aurora-postgresql9.6`

    **RDS for MySQL**

    Example: `mysql8.0`

    **RDS for PostgreSQL**

    Example: `postgres12`

    To list all of the available parameter group families for a DB engine, use the following command:

    `aws rds describe-db-engine-versions –query “DBEngineVersions[].DBParameterGroupFamily” –engine <engine>`

    For example, to list all of the available parameter group families for the Aurora PostgreSQL DB engine, use the following command:

    `aws rds describe-db-engine-versions –query “DBEngineVersions[].DBParameterGroupFamily” –engine aurora-postgresql`

    <note markdown=“1”> The output contains duplicates.

    </note>
    

    The following are the valid DB engine values:

    • `aurora` (for MySQL 5.6-compatible Aurora)

    • `aurora-mysql` (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora)

    • `aurora-postgresql`

    • `mysql`

    • `postgres`

  • :description (required, String)

    The description for the DB cluster parameter group.

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

    Tags to assign to the DB cluster parameter group.

Returns:

See Also:


3433
3434
3435
3436
# File 'lib/aws-sdk-rds/client.rb', line 3433

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 DB cluster.

For more information on Amazon Aurora, see [ What is Amazon Aurora?] in the *Amazon Aurora User Guide*.

For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments] in the *Amazon RDS User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html [2]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html

Examples:

Example: To create a DB cluster snapshot


# This example creates a DB cluster snapshot.

resp = client.create_db_cluster_snapshot({
  db_cluster_identifier: "mydbcluster", 
  db_cluster_snapshot_identifier: "mydbclustersnapshot", 
})

resp.to_h outputs the following:
{
  db_cluster_snapshot: {
  }, 
}

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.engine_mode #=> String
resp.db_cluster_snapshot.allocated_storage #=> Integer
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.license_model #=> 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.iam_database_authentication_enabled #=> Boolean
resp.db_cluster_snapshot.tag_list #=> Array
resp.db_cluster_snapshot.tag_list[0].key #=> String
resp.db_cluster_snapshot.tag_list[0].value #=> String
resp.db_cluster_snapshot.db_system_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_snapshot_identifier (required, String)

    The identifier of the DB cluster snapshot. This parameter is stored as a lowercase string.

    Constraints:

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

    • First character must be a letter.

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

    Example: `my-cluster1-snapshot1`

  • :db_cluster_identifier (required, String)

    The identifier of the DB cluster to create a snapshot for. This parameter isn't case-sensitive.

    Constraints:

    • Must match the identifier of an existing DBCluster.

    ^

    Example: `my-cluster1`

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

    The tags to be assigned to the DB cluster snapshot.

Returns:

See Also:


3546
3547
3548
3549
# File 'lib/aws-sdk-rds/client.rb', line 3546

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 DB instance.

The new DB instance can be an RDS DB instance, or it can be a DB instance in an Aurora DB cluster. For an Aurora DB cluster, you can call this operation multiple times to add more than one DB instance to the cluster.

For more information about creating an RDS DB instance, see [ Creating an Amazon RDS DB instance] in the *Amazon RDS User Guide*.

For more information about creating a DB instance in an Aurora DB cluster, see [ Creating an Amazon Aurora DB cluster] in the *Amazon Aurora User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.CreateInstance.html

Examples:

Example: To create a DB instance.


# This example creates a DB instance.

resp = client.create_db_instance({
  allocated_storage: 5, 
  db_instance_class: "db.t2.micro", 
  db_instance_identifier: "mymysqlinstance", 
  engine: "MySQL", 
  master_user_password: "MyPassword", 
  master_username: "MyUser", 
})

resp.to_h outputs the following:
{
  db_instance: {
  }, 
}

Request syntax with placeholder values


resp = client.create_db_instance({
  db_name: "String",
  db_instance_identifier: "String", # required
  allocated_storage: 1,
  db_instance_class: "String", # required
  engine: "String", # required
  master_username: "String",
  master_user_password: "String",
  db_security_groups: ["String"],
  vpc_security_group_ids: ["String"],
  availability_zone: "String",
  db_subnet_group_name: "String",
  preferred_maintenance_window: "String",
  db_parameter_group_name: "String",
  backup_retention_period: 1,
  preferred_backup_window: "String",
  port: 1,
  multi_az: false,
  engine_version: "String",
  auto_minor_version_upgrade: false,
  license_model: "String",
  iops: 1,
  option_group_name: "String",
  character_set_name: "String",
  nchar_character_set_name: "String",
  publicly_accessible: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  db_cluster_identifier: "String",
  storage_type: "String",
  tde_credential_arn: "String",
  tde_credential_password: "String",
  storage_encrypted: false,
  kms_key_id: "String",
  domain: "String",
  copy_tags_to_snapshot: false,
  monitoring_interval: 1,
  monitoring_role_arn: "String",
  domain_iam_role_name: "String",
  promotion_tier: 1,
  timezone: "String",
  enable_iam_database_authentication: false,
  enable_performance_insights: false,
  performance_insights_kms_key_id: "String",
  performance_insights_retention_period: 1,
  enable_cloudwatch_logs_exports: ["String"],
  processor_features: [
    {
      name: "String",
      value: "String",
    },
  ],
  deletion_protection: false,
  max_allocated_storage: 1,
  enable_customer_owned_ip: false,
  custom_iam_instance_profile: "String",
  backup_target: "String",
  network_type: "String",
  storage_throughput: 1,
  manage_master_user_password: false,
  master_user_secret_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.automatic_restart_time #=> Time
resp.db_instance.master_username #=> String
resp.db_instance.db_name #=> String
resp.db_instance.endpoint.address #=> String
resp.db_instance.endpoint.port #=> Integer
resp.db_instance.endpoint.hosted_zone_id #=> String
resp.db_instance.allocated_storage #=> Integer
resp.db_instance.instance_create_time #=> Time
resp.db_instance.preferred_backup_window #=> String
resp.db_instance.backup_retention_period #=> Integer
resp.db_instance.db_security_groups #=> Array
resp.db_instance.db_security_groups[0].db_security_group_name #=> String
resp.db_instance.db_security_groups[0].status #=> String
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.db_parameter_groups #=> Array
resp.db_instance.db_parameter_groups[0].db_parameter_group_name #=> String
resp.db_instance.db_parameter_groups[0].parameter_apply_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_outpost.arn #=> 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.db_subnet_group.supported_network_types #=> Array
resp.db_instance.db_subnet_group.supported_network_types[0] #=> 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.pending_modified_values.processor_features #=> Array
resp.db_instance.pending_modified_values.processor_features[0].name #=> String
resp.db_instance.pending_modified_values.processor_features[0].value #=> String
resp.db_instance.pending_modified_values.iam_database_authentication_enabled #=> Boolean
resp.db_instance.pending_modified_values.automation_mode #=> String, one of "full", "all-paused"
resp.db_instance.pending_modified_values.resume_full_automation_mode_time #=> Time
resp.db_instance.pending_modified_values.storage_throughput #=> Integer
resp.db_instance.latest_restorable_time #=> Time
resp.db_instance.multi_az #=> Boolean
resp.db_instance.engine_version #=> String
resp.db_instance.auto_minor_version_upgrade #=> Boolean
resp.db_instance.read_replica_source_db_instance_identifier #=> String
resp.db_instance.read_replica_db_instance_identifiers #=> Array
resp.db_instance.read_replica_db_instance_identifiers[0] #=> String
resp.db_instance.read_replica_db_cluster_identifiers #=> Array
resp.db_instance.read_replica_db_cluster_identifiers[0] #=> String
resp.db_instance.replica_mode #=> String, one of "open-read-only", "mounted"
resp.db_instance.license_model #=> String
resp.db_instance.iops #=> Integer
resp.db_instance.option_group_memberships #=> Array
resp.db_instance.option_group_memberships[0].option_group_name #=> String
resp.db_instance.option_group_memberships[0].status #=> String
resp.db_instance.character_set_name #=> String
resp.db_instance.nchar_character_set_name #=> String
resp.db_instance.secondary_availability_zone #=> String
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.storage_type #=> String
resp.db_instance.tde_credential_arn #=> String
resp.db_instance.db_instance_port #=> Integer
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.domain_memberships #=> Array
resp.db_instance.domain_memberships[0].domain #=> String
resp.db_instance.domain_memberships[0].status #=> String
resp.db_instance.domain_memberships[0].fqdn #=> String
resp.db_instance.domain_memberships[0].iam_role_name #=> String
resp.db_instance.copy_tags_to_snapshot #=> Boolean
resp.db_instance.monitoring_interval #=> Integer
resp.db_instance.enhanced_monitoring_resource_arn #=> String
resp.db_instance.monitoring_role_arn #=> String
resp.db_instance.promotion_tier #=> Integer
resp.db_instance.db_instance_arn #=> String
resp.db_instance.timezone #=> String
resp.db_instance.iam_database_authentication_enabled #=> Boolean
resp.db_instance.performance_insights_enabled #=> Boolean
resp.db_instance.performance_insights_kms_key_id #=> String
resp.db_instance.performance_insights_retention_period #=> Integer
resp.db_instance.enabled_cloudwatch_logs_exports #=> Array
resp.db_instance.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_instance.processor_features #=> Array
resp.db_instance.processor_features[0].name #=> String
resp.db_instance.processor_features[0].value #=> String
resp.db_instance.deletion_protection #=> Boolean
resp.db_instance.associated_roles #=> Array
resp.db_instance.associated_roles[0].role_arn #=> String
resp.db_instance.associated_roles[0].feature_name #=> String
resp.db_instance.associated_roles[0].status #=> String
resp.db_instance.listener_endpoint.address #=> String
resp.db_instance.listener_endpoint.port #=> Integer
resp.db_instance.listener_endpoint.hosted_zone_id #=> String
resp.db_instance.max_allocated_storage #=> Integer
resp.db_instance.tag_list #=> Array
resp.db_instance.tag_list[0].key #=> String
resp.db_instance.tag_list[0].value #=> String
resp.db_instance.db_instance_automated_backups_replications #=> Array
resp.db_instance.db_instance_automated_backups_replications[0].db_instance_automated_backups_arn #=> String
resp.db_instance.customer_owned_ip_enabled #=> Boolean
resp.db_instance.aws_backup_recovery_point_arn #=> String
resp.db_instance.activity_stream_status #=> String, one of "stopped", "starting", "started", "stopping"
resp.db_instance.activity_stream_kms_key_id #=> String
resp.db_instance.activity_stream_kinesis_stream_name #=> String
resp.db_instance.activity_stream_mode #=> String, one of "sync", "async"
resp.db_instance.activity_stream_engine_native_audit_fields_included #=> Boolean
resp.db_instance.automation_mode #=> String, one of "full", "all-paused"
resp.db_instance.resume_full_automation_mode_time #=> Time
resp.db_instance.custom_iam_instance_profile #=> String
resp.db_instance.backup_target #=> String
resp.db_instance.network_type #=> String
resp.db_instance.activity_stream_policy_status #=> String, one of "locked", "unlocked", "locking-policy", "unlocking-policy"
resp.db_instance.storage_throughput #=> Integer
resp.db_instance.db_system_id #=> String
resp.db_instance.master_user_secret.secret_arn #=> String
resp.db_instance.master_user_secret.secret_status #=> String
resp.db_instance.master_user_secret.kms_key_id #=> String
resp.db_instance.certificate_details.ca_identifier #=> String
resp.db_instance.certificate_details.valid_till #=> Time
resp.db_instance.read_replica_source_db_cluster_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_name (String)

    The meaning of this parameter differs according to the database engine you use.

    MySQL

    The name of the database to create when the DB instance is created. If this parameter isn't specified, no database is created in the DB instance.

    Constraints:

    • Must contain 1 to 64 letters or numbers.

    • Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0-9).

    • Can't be a word reserved by the specified database engine

    MariaDB

    The name of the database to create when the DB instance is created. If this parameter isn't specified, no database is created in the DB instance.

    Constraints:

    • Must contain 1 to 64 letters or numbers.

    • Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0-9).

    • Can't be a word reserved by the specified database engine

    PostgreSQL

    The name of the database to create when the DB instance is created. If this parameter isn't specified, a database named `postgres` is created in the DB instance.

    Constraints:

    • Must contain 1 to 63 letters, numbers, or underscores.

    • Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0-9).

    • Can't be a word reserved by the specified database engine

    Oracle

    The Oracle System ID (SID) of the created DB instance. If you specify `null`, the default value `ORCL` is used. You can't specify the string NULL, or any other reserved word, for `DBName`.

    Default: `ORCL`

    Constraints:

    • Can't be longer than 8 characters

    ^

    **Amazon RDS Custom for Oracle**

    The Oracle System ID (SID) of the created RDS Custom DB instance. If you don't specify a value, the default value is `ORCL`.

    Default: `ORCL`

    Constraints:

    • It must contain 1 to 8 alphanumeric characters.

    • It must contain a letter.

    • It can't be a word reserved by the database engine.

    **Amazon RDS Custom for SQL Server**

    Not applicable. Must be null.

    **SQL Server**

    Not applicable. Must be null.

    **Amazon Aurora MySQL**

    The name of the database to create when the primary DB instance of the Aurora MySQL DB cluster is created. If this parameter isn't specified for an Aurora MySQL DB cluster, no database is created in the DB cluster.

    Constraints:

    • It must contain 1 to 64 alphanumeric characters.

    • It can't be a word reserved by the database engine.

    **Amazon Aurora PostgreSQL**

    The name of the database to create when the primary DB instance of the Aurora PostgreSQL DB cluster is created. If this parameter isn't specified for an Aurora PostgreSQL DB cluster, a database named `postgres` is created in the DB cluster.

    Constraints:

    • It must contain 1 to 63 alphanumeric characters.

    • It must begin with a letter. Subsequent characters can be letters, underscores, or digits (0 to 9).

    • It can't be a word reserved by the database engine.

  • :db_instance_identifier (required, String)

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

    Constraints:

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

    • First character must be a letter.

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

    Example: `mydbinstance`

  • :allocated_storage (Integer)

    The amount of storage in gibibytes (GiB) to allocate for the DB instance.

    Type: Integer

    **Amazon Aurora**

    Not applicable. Aurora cluster volumes automatically grow as the amount of data in your database increases, though you are only charged for the space that you use in an Aurora cluster volume.

    **Amazon RDS Custom**

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2, gp3): Must be an integer from 40 to 65536 for RDS Custom for Oracle, 16384 for RDS Custom for SQL Server.

    • Provisioned IOPS storage (io1): Must be an integer from 40 to 65536 for RDS Custom for Oracle, 16384 for RDS Custom for SQL Server.

    MySQL

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2, gp3): Must be an integer from 20 to 65536.

    • Provisioned IOPS storage (io1): Must be an integer from 100 to 65536.

    • Magnetic storage (standard): Must be an integer from 5 to 3072.

    MariaDB

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2, gp3): Must be an integer from 20 to 65536.

    • Provisioned IOPS storage (io1): Must be an integer from 100 to 65536.

    • Magnetic storage (standard): Must be an integer from 5 to 3072.

    PostgreSQL

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2, gp3): Must be an integer from 20 to 65536.

    • Provisioned IOPS storage (io1): Must be an integer from 100 to 65536.

    • Magnetic storage (standard): Must be an integer from 5 to 3072.

    Oracle

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2, gp3): Must be an integer from 20 to 65536.

    • Provisioned IOPS storage (io1): Must be an integer from 100 to 65536.

    • Magnetic storage (standard): Must be an integer from 10 to 3072.

    **SQL Server**

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2, gp3):

      • Enterprise and Standard editions: Must be an integer from 20 to 16384.

      • Web and Express editions: Must be an integer from 20 to 16384.

    • Provisioned IOPS storage (io1):

      • Enterprise and Standard editions: Must be an integer from 100 to 16384.

      • Web and Express editions: Must be an integer from 100 to 16384.

    • Magnetic storage (standard):

      • Enterprise and Standard editions: Must be an integer from 20 to 1024.

      • Web and Express editions: Must be an integer from 20 to 1024.

  • :db_instance_class (required, String)

    The compute and memory capacity of the DB instance, for example db.m5.large. Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines. For the full list of DB instance classes, and availability for your engine, see [DB instance classes] in the *Amazon RDS User Guide* or [Aurora DB instance classes] in the *Amazon Aurora User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html

  • :engine (required, String)

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

    Not every database engine is available for every Amazon Web Services Region.

    Valid Values:

    • `aurora` (for MySQL 5.6-compatible Aurora)

    • `aurora-mysql` (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora)

    • `aurora-postgresql`

    • `custom-oracle-ee (for RDS Custom for Oracle instances)`

    • `custom-sqlserver-ee (for RDS Custom for SQL Server instances)`

    • `custom-sqlserver-se (for RDS Custom for SQL Server instances)`

    • `custom-sqlserver-web (for RDS Custom for SQL Server instances)`

    • `mariadb`

    • `mysql`

    • `oracle-ee`

    • `oracle-ee-cdb`

    • `oracle-se2`

    • `oracle-se2-cdb`

    • `postgres`

    • `sqlserver-ee`

    • `sqlserver-se`

    • `sqlserver-ex`

    • `sqlserver-web`

  • :master_username (String)

    The name for the master user.

    **Amazon Aurora**

    Not applicable. The name for the master user is managed by the DB cluster.

    **Amazon RDS**

    Constraints:

    • Required.

    • Must be 1 to 16 letters, numbers, or underscores.

    • First character must be a letter.

    • Can't be a reserved word for the chosen database engine.

  • :master_user_password (String)

    The password for the master user. The password can include any printable ASCII character except “/”, “”“, or ”@“.

    **Amazon Aurora**

    Not applicable. The password for the master user is managed by the DB cluster.

    Constraints: Can't be specified if `ManageMasterUserPassword` is turned on.

    MariaDB

    Constraints: Must contain from 8 to 41 characters.

    **Microsoft SQL Server**

    Constraints: Must contain from 8 to 128 characters.

    MySQL

    Constraints: Must contain from 8 to 41 characters.

    Oracle

    Constraints: Must contain from 8 to 30 characters.

    PostgreSQL

    Constraints: Must contain from 8 to 128 characters.

  • :db_security_groups (Array<String>)

    A list of DB security groups to associate with this DB instance.

    This setting applies to the legacy EC2-Classic platform, which is no longer used to create new DB instances. Use the `VpcSecurityGroupIds` setting instead.

  • :vpc_security_group_ids (Array<String>)

    A list of Amazon EC2 VPC security groups to associate with this DB instance.

    **Amazon Aurora**

    Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster.

    Default: The default EC2 VPC security group for the DB subnet group's VPC.

  • :availability_zone (String)

    The Availability Zone (AZ) where the database will be created. For information on Amazon Web Services Regions and Availability Zones, see [Regions and Availability Zones].

    **Amazon Aurora**

    Each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.

    Default: A random, system-chosen Availability Zone in the endpoint's Amazon Web Services Region.

    Example: `us-east-1d`

    Constraint: The `AvailabilityZone` parameter can't be specified if the DB instance is a Multi-AZ deployment. The specified Availability Zone must be in the same Amazon Web Services Region as the current endpoint.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html

  • :db_subnet_group_name (String)

    A DB subnet group to associate with this DB instance.

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

    Example: `mydbsubnetgroup`

  • :preferred_maintenance_window (String)

    The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC). For more information, see [Amazon RDS Maintenance Window].

    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.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance

  • :db_parameter_group_name (String)

    The name of the DB parameter group to associate with this DB instance. If you do not specify a value, then the default DB parameter group for the specified DB engine and version is used.

    This setting doesn't apply to RDS Custom.

    Constraints:

    • It must be 1 to 255 letters, numbers, or hyphens.

    • The first character must be a letter.

    • It can't end with a hyphen or contain two consecutive hyphens.

  • :backup_retention_period (Integer)

    The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.

    **Amazon Aurora**

    Not applicable. The retention period for automated backups is managed by the DB cluster.

    Default: 1

    Constraints:

    • Must be a value from 0 to 35

    • Can't be set to 0 if the DB instance is a source to read replicas

    • Can't be set to 0 for an RDS Custom for Oracle DB instance

  • :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. For more information, see [Backup window] in the *Amazon RDS User Guide*.

    **Amazon Aurora**

    Not applicable. The daily time range for creating automated backups is managed by the DB cluster.

    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.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow

  • :port (Integer)

    The port number on which the database accepts connections.

    MySQL

    Default: `3306`

    Valid values: `1150-65535`

    Type: Integer

    MariaDB

    Default: `3306`

    Valid values: `1150-65535`

    Type: Integer

    PostgreSQL

    Default: `5432`

    Valid values: `1150-65535`

    Type: Integer

    Oracle

    Default: `1521`

    Valid values: `1150-65535`

    **SQL Server**

    Default: `1433`

    Valid values: `1150-65535` except `1234`, `1434`, `3260`, `3343`, `3389`, `47001`, and `49152-49156`.

    **Amazon Aurora**

    Default: `3306`

    Valid values: `1150-65535`

    Type: Integer

  • :multi_az (Boolean)

    A value that indicates whether the DB instance is a Multi-AZ deployment. You can't set the `AvailabilityZone` parameter if the DB instance is a Multi-AZ deployment.

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable. DB instance Availability Zones (AZs) are managed by the DB cluster.

  • :engine_version (String)

    The version number of the database engine to use.

    For a list of valid engine versions, use the `DescribeDBEngineVersions` operation.

    The following are the database engines and links to information about the major and minor versions that are available with Amazon RDS. Not every database engine is available for every Amazon Web Services Region.

    **Amazon Aurora**

    Not applicable. The version number of the database engine to be used by the DB instance is managed by the DB cluster.

    **Amazon RDS Custom for Oracle**

    A custom engine version (CEV) that you have previously created. This setting is required for RDS Custom for Oracle. The CEV name has the following format: 19.*customized_string*. A valid CEV name is `19.my_cev1`. For more information, see [ Creating an RDS Custom for Oracle DB instance] in the *Amazon RDS User Guide*.

    **Amazon RDS Custom for SQL Server**

    See [RDS Custom for SQL Server general requirements] in the *Amazon RDS User Guide*.

    MariaDB

    For information, see [MariaDB on Amazon RDS Versions] in the *Amazon RDS User Guide*.

    **Microsoft SQL Server**

    For information, see [Microsoft SQL Server Versions on Amazon RDS] in the *Amazon RDS User Guide*.

    MySQL

    For information, see [MySQL on Amazon RDS Versions] in the *Amazon RDS User Guide*.

    Oracle

    For information, see [Oracle Database Engine Release Notes] in the *Amazon RDS User Guide*.

    PostgreSQL

    For information, see [Amazon RDS for PostgreSQL versions and extensions] in the *Amazon RDS User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-creating.html#custom-creating.create [2]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-reqs-limits-MS.html [3]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt [4]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport [5]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt [6]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html [7]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts

  • :auto_minor_version_upgrade (Boolean)

    A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window. By default, minor engine upgrades are applied automatically.

    If you create an RDS Custom DB instance, you must set `AutoMinorVersionUpgrade` to `false`.

  • :license_model (String)

    License model information for this DB instance.

    Valid values: `license-included` | `bring-your-own-license` | `general-public-license`

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable.

  • :iops (Integer)

    The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance. For information about valid IOPS values, see [Amazon RDS DB instance storage] in the *Amazon RDS User Guide*.

    Constraints: For MariaDB, MySQL, Oracle, and PostgreSQL DB instances, must be a multiple between .5 and 50 of the storage amount for the DB instance. For SQL Server DB instances, must be a multiple between 1 and 50 of the storage amount for the DB instance.

    **Amazon Aurora**

    Not applicable. Storage is managed by the DB cluster.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html

  • :option_group_name (String)

    A value that indicates that the DB instance should be associated with the specified option group.

    Permanent options, such as the TDE option for Oracle Advanced Security TDE, can't be removed from an option group. Also, that option group can't be removed from a DB instance after it is associated with a DB instance.

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable.

  • :character_set_name (String)

    For supported engines, this value indicates that the DB instance should be associated with the specified `CharacterSet`.

    This setting doesn't apply to RDS Custom. However, if you need to change the character set, you can change it on the database itself.

    **Amazon Aurora**

    Not applicable. The character set is managed by the DB cluster. For more information, see `CreateDBCluster`.

  • :nchar_character_set_name (String)

    The name of the NCHAR character set for the Oracle DB instance.

    This parameter doesn't apply to RDS Custom.

  • :publicly_accessible (Boolean)

    A value that indicates whether the DB instance is publicly accessible.

    When the DB instance is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB instance's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses. That public access is not permitted if the security group assigned to the DB instance doesn't permit it.

    When the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.

    Default: The default behavior varies depending on whether `DBSubnetGroupName` is specified.

    If `DBSubnetGroupName` isn't specified, and `PubliclyAccessible` isn't specified, the following applies:

    • If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB instance is private.

    • If the default VPC in the target Region has an internet gateway attached to it, the DB instance is public.

    If `DBSubnetGroupName` is specified, and `PubliclyAccessible` isn't specified, the following applies:

    • If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB instance is private.

    • If the subnets are part of a VPC that has an internet gateway attached to it, the DB instance is public.

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

    Tags to assign to the DB instance.

  • :db_cluster_identifier (String)

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

    This setting doesn't apply to RDS Custom.

  • :storage_type (String)

    Specifies the storage type to be associated with the DB instance.

    Valid values: `gp2 | gp3 | io1 | standard`

    If you specify `io1` or `gp3`, you must also include a value for the `Iops` parameter.

    Default: `io1` if the `Iops` parameter is specified, otherwise `gp2`

    **Amazon Aurora**

    Not applicable. Storage is managed by the DB cluster.

  • :tde_credential_arn (String)

    The ARN from the key store with which to associate the instance for TDE encryption.

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable.

  • :tde_credential_password (String)

    The password for the given ARN from the key store in order to access the device.

    This setting doesn't apply to RDS Custom.

  • :storage_encrypted (Boolean)

    A value that indicates whether the DB instance is encrypted. By default, it isn't encrypted.

    For RDS Custom instances, either set this parameter to `true` or leave it unset. If you set this parameter to `false`, RDS reports an error.

    **Amazon Aurora**

    Not applicable. The encryption for DB instances is managed by the DB cluster.

  • :kms_key_id (String)

    The Amazon Web Services KMS key identifier for an encrypted DB instance.

    The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.

    **Amazon Aurora**

    Not applicable. The Amazon Web Services KMS key identifier is managed by the DB cluster. For more information, see `CreateDBCluster`.

    If `StorageEncrypted` is enabled, and you do not specify a value for the `KmsKeyId` parameter, then Amazon RDS 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.

    **Amazon RDS Custom**

    A KMS key is required for RDS Custom instances. For most RDS engines, if you leave this parameter empty while enabling `StorageEncrypted`, the engine uses the default KMS key. However, RDS Custom doesn't use the default key when this parameter is empty. You must explicitly specify a key.

  • :domain (String)

    The Active Directory directory ID to create the DB instance in. Currently, only MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.

    For more information, see [ Kerberos Authentication] in the *Amazon RDS User Guide*.

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable. The domain is managed by the DB cluster.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html

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

    **Amazon Aurora**

    Not applicable. Copying tags to snapshots is managed by the DB cluster. Setting this value for an Aurora DB instance has no effect on the DB cluster setting.

  • :monitoring_interval (Integer)

    The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collection of Enhanced Monitoring metrics, specify 0. The default is 0.

    If `MonitoringRoleArn` is specified, then you must set `MonitoringInterval` to a value other than 0.

    This setting doesn't apply to RDS Custom.

    Valid Values: `0, 1, 5, 10, 15, 30, 60`

  • :monitoring_role_arn (String)

    The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, `arn:aws:iam:123456789012:role/emaccess`. For information on creating a monitoring role, see [Setting Up and Enabling Enhanced Monitoring] in the *Amazon RDS User Guide*.

    If `MonitoringInterval` is set to a value other than 0, then you must supply a `MonitoringRoleArn` value.

    This setting doesn't apply to RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling

  • :domain_iam_role_name (String)

    Specify the name of the IAM role to be used when making API calls to the Directory Service.

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable. The domain is managed by the DB cluster.

  • :promotion_tier (Integer)

    A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. For more information, see [ Fault Tolerance for an Aurora DB Cluster] in the *Amazon Aurora User Guide*.

    This setting doesn't apply to RDS Custom.

    Default: 1

    Valid Values: 0 - 15

    [1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance

  • :timezone (String)

    The time zone of the DB instance. The time zone parameter is currently supported only by [Microsoft SQL Server].

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone

  • :enable_iam_database_authentication (Boolean)

    A value that indicates whether to enable mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts. By default, mapping isn't enabled.

    For more information, see [ IAM Database Authentication for MySQL and PostgreSQL] in the *Amazon RDS User Guide*.

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable. Mapping Amazon Web Services IAM accounts to database accounts is managed by the DB cluster.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html

  • :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] in the *Amazon RDS User Guide*.

    This setting doesn't apply to RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html

  • :performance_insights_kms_key_id (String)

    The Amazon Web Services KMS key identifier for encryption of Performance Insights data.

    The Amazon Web Services 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 RDS 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.

    This setting doesn't apply to RDS Custom.

  • :performance_insights_retention_period (Integer)

    The number of days to retain Performance Insights data. The default is 7 days. The following values are valid:

    • 7

    • month * 31, where month is a number of months from 1-23

    • 731

    For example, the following values are valid:

    • 93 (3 months * 31)

    • 341 (11 months * 31)

    • 589 (19 months * 31)

    • 731

    If you specify a retention period such as 94, which isn't a valid value, RDS issues an error.

    This setting doesn't apply to RDS Custom.

  • :enable_cloudwatch_logs_exports (Array<String>)

    The list of log types that need to be enabled for exporting to CloudWatch Logs. The values in the list depend on the DB engine. For more information, see [ Publishing Database Logs to Amazon CloudWatch Logs] in the *Amazon RDS User Guide*.

    **Amazon Aurora**

    Not applicable. CloudWatch Logs exports are managed by the DB cluster.

    **RDS Custom**

    Not applicable.

    MariaDB

    Possible values are `audit`, `error`, `general`, and `slowquery`.

    **Microsoft SQL Server**

    Possible values are `agent` and `error`.

    MySQL

    Possible values are `audit`, `error`, `general`, and `slowquery`.

    Oracle

    Possible values are `alert`, `audit`, `listener`, `trace`, and `oemagent`.

    PostgreSQL

    Possible values are `postgresql` and `upgrade`.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch

  • :processor_features (Array<Types::ProcessorFeature>)

    The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable.

  • :deletion_protection (Boolean)

    A value that indicates whether the DB instance has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection isn't enabled. For more information, see [ Deleting a DB Instance].

    **Amazon Aurora**

    Not applicable. You can enable or disable deletion protection for the DB cluster. For more information, see `CreateDBCluster`. DB instances in a DB cluster can be deleted even when deletion protection is enabled for the DB cluster.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html

  • :max_allocated_storage (Integer)

    The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.

    For more information about this setting, including limitations that apply to it, see [ Managing capacity automatically with Amazon RDS storage autoscaling] in the *Amazon RDS User Guide*.

    This setting doesn't apply to RDS Custom.

    **Amazon Aurora**

    Not applicable. Storage is managed by the DB cluster.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling

  • :enable_customer_owned_ip (Boolean)

    A value that indicates whether to enable a customer-owned IP address (CoIP) for an RDS on Outposts DB instance.

    A CoIP provides local or external connectivity to resources in your Outpost subnets through your on-premises network. For some use cases, a CoIP can provide lower latency for connections to the DB instance from outside of its virtual private cloud (VPC) on your local network.

    For more information about RDS on Outposts, see [Working with Amazon RDS on Amazon Web Services Outposts] in the *Amazon RDS User Guide*.

    For more information about CoIPs, see [Customer-owned IP addresses] in the *Amazon Web Services Outposts User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html [2]: docs.aws.amazon.com/outposts/latest/userguide/routing.html#ip-addressing

  • :custom_iam_instance_profile (String)

    The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance. The instance profile must meet the following requirements:

    • The profile must exist in your account.

    • The profile must have an IAM role that Amazon EC2 has permissions to assume.

    • The instance profile name and the associated IAM role name must start with the prefix `AWSRDSCustom`.

    For the list of permissions required for the IAM role, see [ Configure IAM and your VPC] in the *Amazon RDS User Guide*.

    This setting is required for RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-setup-orcl.html#custom-setup-orcl.iam-vpc

  • :backup_target (String)

    Specifies where automated backups and manual snapshots are stored.

    Possible values are `outposts` (Amazon Web Services Outposts) and `region` (Amazon Web Services Region). The default is `region`.

    For more information, see [Working with Amazon RDS on Amazon Web Services Outposts] in the *Amazon RDS User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html

  • :network_type (String)

    The network type of the DB instance.

    Valid values:

    • `IPV4`

    • `DUAL`

    The network type is determined by the `DBSubnetGroup` specified for the DB instance. A `DBSubnetGroup` can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (`DUAL`).

    For more information, see [ Working with a DB instance in a VPC] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html

  • :storage_throughput (Integer)

    Specifies the storage throughput value for the DB instance.

    This setting applies only to the `gp3` storage type.

    This setting doesn't apply to RDS Custom or Amazon Aurora.

  • :manage_master_user_password (Boolean)

    A value that indicates whether to manage the master user password with Amazon Web Services Secrets Manager.

    For more information, see [Password management with Amazon Web Services Secrets Manager] in the *Amazon RDS User Guide.*

    Constraints:

    • Can't manage the master user password with Amazon Web Services Secrets Manager if `MasterUserPassword` is specified.

    ^

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html

  • :master_user_secret_kms_key_id (String)

    The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.

    This setting is valid only if the master user password is managed by RDS in Amazon Web Services Secrets Manager for the DB instance.

    The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.

    If you don't specify `MasterUserSecretKmsKeyId`, then the `aws/secretsmanager` KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the `aws/secretsmanager` KMS key to encrypt the secret, and you must use a customer managed 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)

    Specifies the CA certificate identifier to use for the DB instance’s server certificate.

    This setting doesn't apply to RDS Custom.

    For more information, see [Using SSL/TLS to encrypt a connection to a DB instance] in the *Amazon RDS User Guide* and [ Using SSL/TLS to encrypt a connection to a DB cluster] in the *Amazon Aurora User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html

Returns:

See Also:


4985
4986
4987
4988
# File 'lib/aws-sdk-rds/client.rb', line 4985

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

#create_db_instance_read_replica(params = {}) ⇒ Types::CreateDBInstanceReadReplicaResult

Creates a new DB instance that acts as a read replica for an existing source DB instance or Multi-AZ DB cluster. You can create a read replica for a DB instance running MySQL, MariaDB, Oracle, PostgreSQL, or SQL Server. You can create a read replica for a Multi-AZ DB cluster running MySQL or PostgreSQL. For more information, see [Working with read replicas] and [Migrating from a Multi-AZ DB cluster to a DB instance using a read replica] in the *Amazon RDS User Guide*.

Amazon Aurora doesn't support this operation. Call the `CreateDBInstance` operation to create a DB instance for an Aurora DB cluster.

All read replica DB instances are created with backups disabled. All other attributes (including DB security groups and DB parameter groups) are inherited from the source DB instance or cluster, except as specified.

Your source DB instance or cluster must have backup retention enabled.

[1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html [2]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html#multi-az-db-clusters-migrating-to-instance-with-read-replica

Examples:

Example: To create a DB instance read replica.


# This example creates a DB instance read replica.

resp = client.create_db_instance_read_replica({
  availability_zone: "us-east-1a", 
  copy_tags_to_snapshot: true, 
  db_instance_class: "db.t2.micro", 
  db_instance_identifier: "mydbreadreplica", 
  publicly_accessible: true, 
  source_db_instance_identifier: "mymysqlinstance", 
  storage_type: "gp2", 
  tags: [
    {
      key: "mydbreadreplicakey", 
      value: "mydbreadreplicavalue", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  db_instance: {
  }, 
}

Request syntax with placeholder values


resp = client.create_db_instance_read_replica({
  db_instance_identifier: "String", # required
  source_db_instance_identifier: "String",
  db_instance_class: "String",
  availability_zone: "String",
  port: 1,
  multi_az: false,
  auto_minor_version_upgrade: false,
  iops: 1,
  option_group_name: "String",
  db_parameter_group_name: "String",
  publicly_accessible: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  db_subnet_group_name: "String",
  vpc_security_group_ids: ["String"],
  storage_type: "String",
  copy_tags_to_snapshot: false,
  monitoring_interval: 1,
  monitoring_role_arn: "String",
  kms_key_id: "String",
  pre_signed_url: "String",
  enable_iam_database_authentication: false,
  enable_performance_insights: false,
  performance_insights_kms_key_id: "String",
  performance_insights_retention_period: 1,
  enable_cloudwatch_logs_exports: ["String"],
  processor_features: [
    {
      name: "String",
      value: "String",
    },
  ],
  use_default_processor_features: false,
  deletion_protection: false,
  domain: "String",
  domain_iam_role_name: "String",
  replica_mode: "open-read-only", # accepts open-read-only, mounted
  max_allocated_storage: 1,
  custom_iam_instance_profile: "String",
  network_type: "String",
  storage_throughput: 1,
  enable_customer_owned_ip: false,
  allocated_storage: 1,
  source_db_cluster_identifier: "String",
  source_region: "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.automatic_restart_time #=> Time
resp.db_instance.master_username #=> String
resp.db_instance.db_name #=> String
resp.db_instance.endpoint.address #=> String
resp.db_instance.endpoint.port #=> Integer
resp.db_instance.endpoint.hosted_zone_id #=> String
resp.db_instance.allocated_storage #=> Integer
resp.db_instance.instance_create_time #=> Time
resp.db_instance.preferred_backup_window #=> String
resp.db_instance.backup_retention_period #=> Integer
resp.db_instance.db_security_groups #=> Array
resp.db_instance.db_security_groups[0].db_security_group_name #=> String
resp.db_instance.db_security_groups[0].status #=> String
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.db_parameter_groups #=> Array
resp.db_instance.db_parameter_groups[0].db_parameter_group_name #=> String
resp.db_instance.db_parameter_groups[0].parameter_apply_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_outpost.arn #=> 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.db_subnet_group.supported_network_types #=> Array
resp.db_instance.db_subnet_group.supported_network_types[0] #=> 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.pending_modified_values.processor_features #=> Array
resp.db_instance.pending_modified_values.processor_features[0].name #=> String
resp.db_instance.pending_modified_values.processor_features[0].value #=> String
resp.db_instance.pending_modified_values.iam_database_authentication_enabled #=> Boolean
resp.db_instance.pending_modified_values.automation_mode #=> String, one of "full", "all-paused"
resp.db_instance.pending_modified_values.resume_full_automation_mode_time #=> Time
resp.db_instance.pending_modified_values.storage_throughput #=> Integer
resp.db_instance.latest_restorable_time #=> Time
resp.db_instance.multi_az #=> Boolean
resp.db_instance.engine_version #=> String
resp.db_instance.auto_minor_version_upgrade #=> Boolean
resp.db_instance.read_replica_source_db_instance_identifier #=> String
resp.db_instance.read_replica_db_instance_identifiers #=> Array
resp.db_instance.read_replica_db_instance_identifiers[0] #=> String
resp.db_instance.read_replica_db_cluster_identifiers #=> Array
resp.db_instance.read_replica_db_cluster_identifiers[0] #=> String
resp.db_instance.replica_mode #=> String, one of "open-read-only", "mounted"
resp.db_instance.license_model #=> String
resp.db_instance.iops #=> Integer
resp.db_instance.option_group_memberships #=> Array
resp.db_instance.option_group_memberships[0].option_group_name #=> String
resp.db_instance.option_group_memberships[0].status #=> String
resp.db_instance.character_set_name #=> String
resp.db_instance.nchar_character_set_name #=> String
resp.db_instance.secondary_availability_zone #=> String
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.storage_type #=> String
resp.db_instance.tde_credential_arn #=> String
resp.db_instance.db_instance_port #=> Integer
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.domain_memberships #=> Array
resp.db_instance.domain_memberships[0].domain #=> String
resp.db_instance.domain_memberships[0].status #=> String
resp.db_instance.domain_memberships[0].fqdn #=> String
resp.db_instance.domain_memberships[0].iam_role_name #=> String
resp.db_instance.copy_tags_to_snapshot #=> Boolean
resp.db_instance.monitoring_interval #=> Integer
resp.db_instance.enhanced_monitoring_resource_arn #=> String
resp.db_instance.monitoring_role_arn #=> String
resp.db_instance.promotion_tier #=> Integer
resp.db_instance.db_instance_arn #=> String
resp.db_instance.timezone #=> String
resp.db_instance.iam_database_authentication_enabled #=> Boolean
resp.db_instance.performance_insights_enabled #=> Boolean
resp.db_instance.performance_insights_kms_key_id #=> String
resp.db_instance.performance_insights_retention_period #=> Integer
resp.db_instance.enabled_cloudwatch_logs_exports #=> Array
resp.db_instance.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_instance.processor_features #=> Array
resp.db_instance.processor_features[0].name #=> String
resp.db_instance.processor_features[0].value #=> String
resp.db_instance.deletion_protection #=> Boolean
resp.db_instance.associated_roles #=> Array
resp.db_instance.associated_roles[0].role_arn #=> String
resp.db_instance.associated_roles[0].feature_name #=> String
resp.db_instance.associated_roles[0].status #=> String
resp.db_instance.listener_endpoint.address #=> String
resp.db_instance.listener_endpoint.port #=> Integer
resp.db_instance.listener_endpoint.hosted_zone_id #=> String
resp.db_instance.max_allocated_storage #=> Integer
resp.db_instance.tag_list #=> Array
resp.db_instance.tag_list[0].key #=> String
resp.db_instance.tag_list[0].value #=> String
resp.db_instance.db_instance_automated_backups_replications #=> Array
resp.db_instance.db_instance_automated_backups_replications[0].db_instance_automated_backups_arn #=> String
resp.db_instance.customer_owned_ip_enabled #=> Boolean
resp.db_instance.aws_backup_recovery_point_arn #=> String
resp.db_instance.activity_stream_status #=> String, one of "stopped", "starting", "started", "stopping"
resp.db_instance.activity_stream_kms_key_id #=> String
resp.db_instance.activity_stream_kinesis_stream_name #=> String
resp.db_instance.activity_stream_mode #=> String, one of "sync", "async"
resp.db_instance.activity_stream_engine_native_audit_fields_included #=> Boolean
resp.db_instance.automation_mode #=> String, one of "full", "all-paused"
resp.db_instance.resume_full_automation_mode_time #=> Time
resp.db_instance.custom_iam_instance_profile #=> String
resp.db_instance.backup_target #=> String
resp.db_instance.network_type #=> String
resp.db_instance.activity_stream_policy_status #=> String, one of "locked", "unlocked", "locking-policy", "unlocking-policy"
resp.db_instance.storage_throughput #=> Integer
resp.db_instance.db_system_id #=> String
resp.db_instance.master_user_secret.secret_arn #=> String
resp.db_instance.master_user_secret.secret_status #=> String
resp.db_instance.master_user_secret.kms_key_id #=> String
resp.db_instance.certificate_details.ca_identifier #=> String
resp.db_instance.certificate_details.valid_till #=> Time
resp.db_instance.read_replica_source_db_cluster_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_instance_identifier (required, String)

    The DB instance identifier of the read replica. This identifier is the unique key that identifies a DB instance. This parameter is stored as a lowercase string.

  • :source_db_instance_identifier (String)

    The identifier of the DB instance that will act as the source for the read replica. Each DB instance can have up to 15 read replicas, with the exception of Oracle and SQL Server, which can have up to five.

    Constraints:

    • Must be the identifier of an existing MySQL, MariaDB, Oracle, PostgreSQL, or SQL Server DB instance.

    • Can't be specified if the `SourceDBClusterIdentifier` parameter is also specified.

    • For the limitations of Oracle read replicas, see [Version and licensing considerations for RDS for Oracle replicas] in the *Amazon RDS User Guide*.

    • For the limitations of SQL Server read replicas, see [Read replica limitations with SQL Server] in the *Amazon RDS User Guide*.

    • The specified DB instance must have automatic backups enabled, that is, its backup retention period must be greater than 0.

    • If the source DB instance is in the same Amazon Web Services Region as the read replica, specify a valid DB instance identifier.

    • If the source DB instance is in a different Amazon Web Services Region from the read replica, specify a valid DB instance ARN. For more information, see [Constructing an ARN for Amazon RDS] in the *Amazon RDS User Guide*. This doesn't apply to SQL Server or RDS Custom, which don't support cross-Region replicas.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.limitations.html#oracle-read-replicas.limitations.versions-and-licenses [2]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.ReadReplicas.html#SQLServer.ReadReplicas.Limitations [3]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing

  • :db_instance_class (String)

    The compute and memory capacity of the read replica, for example db.m4.large. Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines. For the full list of DB instance classes, and availability for your engine, see [DB Instance Class] in the *Amazon RDS User Guide*.

    Default: Inherits from the source DB instance.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html

  • :availability_zone (String)

    The Availability Zone (AZ) where the read replica will be created.

    Default: A random, system-chosen Availability Zone in the endpoint's Amazon Web Services Region.

    Example: `us-east-1d`

  • :port (Integer)

    The port number that the DB instance uses for connections.

    Default: Inherits from the source DB instance

    Valid Values: `1150-65535`

  • :multi_az (Boolean)

    A value that indicates whether the read replica is in a Multi-AZ deployment.

    You can create a read replica as a Multi-AZ DB instance. RDS creates a standby of your replica in another Availability Zone for failover support for the replica. Creating your read replica as a Multi-AZ DB instance is independent of whether the source is a Multi-AZ DB instance or a Multi-AZ DB cluster.

    This setting doesn't apply to RDS Custom.

  • :auto_minor_version_upgrade (Boolean)

    A value that indicates whether minor engine upgrades are applied automatically to the read replica during the maintenance window.

    This setting doesn't apply to RDS Custom.

    Default: Inherits from the source DB instance

  • :iops (Integer)

    The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.

  • :option_group_name (String)

    The option group the DB instance is associated with. If omitted, the option group associated with the source instance or cluster is used.

    <note markdown=“1”> For SQL Server, you must use the option group associated with the source.

    </note>
    

    This setting doesn't apply to RDS Custom.

  • :db_parameter_group_name (String)

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

    If you do not specify a value for `DBParameterGroupName`, then Amazon RDS uses the `DBParameterGroup` of source DB instance for a same Region read replica, or the default `DBParameterGroup` for the specified DB engine for a cross-Region read replica.

    Specifying a parameter group for this operation is only supported for MySQL and Oracle DB instances. It isn't supported for RDS Custom.

    Constraints:

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

    • First character must be a letter

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

  • :publicly_accessible (Boolean)

    A value that indicates whether the DB instance is publicly accessible.

    When the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB cluster's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access to the DB cluster is ultimately controlled by the security group it uses. That public access isn't permitted if the security group assigned to the DB cluster doesn't permit it.

    When the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.

    For more information, see CreateDBInstance.

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

  • :db_subnet_group_name (String)

    Specifies a DB subnet group for the DB instance. The new DB instance is created in the VPC associated with the DB subnet group. If no DB subnet group is specified, then the new DB instance isn't created in a VPC.

    Constraints:

    • Can only be specified if the source DB instance identifier specifies a DB instance in another Amazon Web Services Region.

    • If supplied, must match the name of an existing DBSubnetGroup.

    • The specified DB subnet group must be in the same Amazon Web Services Region in which the operation is running.

    • All read replicas in one Amazon Web Services Region that are created from the same source DB instance must either:&gt;

      • Specify DB subnet groups from the same VPC. All these read replicas are created in the same VPC.

      • Not specify a DB subnet group. All these read replicas are created outside of any VPC.

    Example: `mydbsubnetgroup`

  • :vpc_security_group_ids (Array<String>)

    A list of Amazon EC2 VPC security groups to associate with the read replica.

    This setting doesn't apply to RDS Custom.

    Default: The default EC2 VPC security group for the DB subnet group's VPC.

  • :storage_type (String)

    Specifies the storage type to be associated with the read replica.

    Valid values: `gp2 | gp3 | io1 | standard`

    If you specify `io1` or `gp3`, you must also include a value for the `Iops` parameter.

    Default: `io1` if the `Iops` parameter is specified, otherwise `gp2`

  • :copy_tags_to_snapshot (Boolean)

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

  • :monitoring_interval (Integer)

    The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the read replica. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.

    If `MonitoringRoleArn` is specified, then you must also set `MonitoringInterval` to a value other than 0.

    This setting doesn't apply to RDS Custom.

    Valid Values: `0, 1, 5, 10, 15, 30, 60`

  • :monitoring_role_arn (String)

    The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, `arn:aws:iam:123456789012:role/emaccess`. For information on creating a monitoring role, go to [To create an IAM role for Amazon RDS Enhanced Monitoring] in the *Amazon RDS User Guide*.

    If `MonitoringInterval` is set to a value other than 0, then you must supply a `MonitoringRoleArn` value.

    This setting doesn't apply to RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole

  • :kms_key_id (String)

    The Amazon Web Services KMS key identifier for an encrypted read replica.

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

    If you create an encrypted read replica in the same Amazon Web Services Region as the source DB instance or Multi-AZ DB cluster, don't specify a value for this parameter. A read replica in the same Amazon Web Services Region is always encrypted with the same KMS key as the source DB instance or cluster.

    If you create an encrypted read replica in a different Amazon Web Services Region, then you must specify a KMS key identifier for the destination Amazon Web Services Region. KMS keys are specific to the Amazon Web Services Region that they are created in, and you can't use KMS keys from one Amazon Web Services Region in another Amazon Web Services Region.

    You can't create an encrypted read replica from an unencrypted DB instance or Multi-AZ DB cluster.

    This setting doesn't apply to RDS Custom, which uses the same KMS key as the primary replica.

  • :pre_signed_url (String)

    When you are creating a read replica from one Amazon Web Services GovCloud (US) Region to another or from one China Amazon Web Services Region to another, the URL that contains a Signature Version 4 signed request for the `CreateDBInstanceReadReplica` API operation in the source Amazon Web Services Region that contains the source DB instance.

    This setting applies only to Amazon Web Services GovCloud (US) Regions and China Amazon Web Services Regions. It's ignored in other Amazon Web Services Regions.

    This setting applies only when replicating from a source DB instance. Source DB clusters aren't supported in Amazon Web Services GovCloud (US) Regions and China Amazon Web Services Regions.

    You must specify this parameter when you create an encrypted read replica from another Amazon Web Services Region by using the Amazon RDS API. Don't specify `PreSignedUrl` when you are creating an encrypted read replica in the same Amazon Web Services Region.

    The presigned URL must be a valid request for the `CreateDBInstanceReadReplica` API operation that can run in the source Amazon Web Services Region that contains the encrypted source DB instance. The presigned URL request must contain the following parameter values:

    • `DestinationRegion` - The Amazon Web Services Region that the encrypted read replica is created in. This Amazon Web Services Region is the same one where the `CreateDBInstanceReadReplica` operation is called that contains this presigned URL.

      For example, if you create an encrypted DB instance in the us-west-1 Amazon Web Services Region, from a source DB instance in the us-east-2 Amazon Web Services Region, then you call the `CreateDBInstanceReadReplica` operation in the us-east-1 Amazon Web Services Region and provide a presigned URL that contains a call to the `CreateDBInstanceReadReplica` operation in the us-west-2 Amazon Web Services Region. For this example, the `DestinationRegion` in the presigned URL must be set to the us-east-1 Amazon Web Services Region.

    • `KmsKeyId` - The KMS key identifier for the key to use to encrypt the read replica in the destination Amazon Web Services Region. This is the same identifier for both the `CreateDBInstanceReadReplica` operation that is called in the destination Amazon Web Services Region, and the operation contained in the presigned URL.

    • `SourceDBInstanceIdentifier` - The DB instance identifier for the encrypted DB instance to be replicated. This identifier must be in the Amazon Resource Name (ARN) format for the source Amazon Web Services Region. For example, if you are creating an encrypted read replica from a DB instance in the us-west-2 Amazon Web Services Region, then your `SourceDBInstanceIdentifier` looks like the following example: `arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115`.

    To learn how to generate a Signature Version 4 signed request, see [Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)] and [Signature Version 4 Signing Process].

    <note markdown=“1”> 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 presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region.

    `SourceRegion` isn't supported for SQL Server, because Amazon RDS for
    

    SQL Server doesn't support cross-Region read replicas.

    </note>
    

    This setting doesn't apply to RDS Custom.

    [1]: docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html [2]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html

  • :enable_iam_database_authentication (Boolean)

    A value that indicates whether to enable mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts. By default, mapping isn't enabled.

    For more information about IAM database authentication, see [ IAM Database Authentication for MySQL and PostgreSQL] in the *Amazon RDS User Guide*.

    This setting doesn't apply to RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html

  • :enable_performance_insights (Boolean)

    A value that indicates whether to enable Performance Insights for the read replica.

    For more information, see [Using Amazon Performance Insights] in the *Amazon RDS User Guide*.

    This setting doesn't apply to RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html

  • :performance_insights_kms_key_id (String)

    The Amazon Web Services KMS key identifier for encryption of Performance Insights data.

    The Amazon Web Services 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 RDS 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.

    This setting doesn't apply to RDS Custom.

  • :performance_insights_retention_period (Integer)

    The number of days to retain Performance Insights data. The default is 7 days. The following values are valid:

    • 7

    • month * 31, where month is a number of months from 1-23

    • 731

    For example, the following values are valid:

    • 93 (3 months * 31)

    • 341 (11 months * 31)

    • 589 (19 months * 31)

    • 731

    If you specify a retention period such as 94, which isn't a valid value, RDS issues an error.

    This setting doesn't apply to RDS Custom.

  • :enable_cloudwatch_logs_exports (Array<String>)

    The list of logs that the new DB instance is to export to CloudWatch Logs. The values in the list depend on the DB engine being used. For more information, see [Publishing Database Logs to Amazon CloudWatch Logs ][1] in the *Amazon RDS User Guide*.

    This setting doesn't apply to RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch

  • :processor_features (Array<Types::ProcessorFeature>)

    The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.

    This setting doesn't apply to RDS Custom.

  • :use_default_processor_features (Boolean)

    A value that indicates whether the DB instance class of the DB instance uses its default processor features.

    This setting doesn't apply to RDS Custom.

  • :deletion_protection (Boolean)

    A value that indicates whether the DB instance has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection isn't enabled. For more information, see [ Deleting a DB Instance].

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html

  • :domain (String)

    The Active Directory directory ID to create the DB instance in. Currently, only MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.

    For more information, see [ Kerberos Authentication] in the *Amazon RDS User Guide*.

    This setting doesn't apply to RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html

  • :domain_iam_role_name (String)

    The name of the IAM role to be used when making API calls to the Directory Service.

    This setting doesn't apply to RDS Custom.

  • :replica_mode (String)

    The open mode of the replica database: mounted or read-only.

    <note markdown=“1”> This parameter is only supported for Oracle DB instances.

    </note>
    

    Mounted DB replicas are included in Oracle Database Enterprise Edition. The main use case for mounted replicas is cross-Region disaster recovery. The primary database doesn't use Active Data Guard to transmit information to the mounted replica. Because it doesn't accept user connections, a mounted replica can't serve a read-only workload.

    You can create a combination of mounted and read-only DB replicas for the same primary DB instance. For more information, see [Working with Oracle Read Replicas for Amazon RDS] in the *Amazon RDS User Guide*.

    For RDS Custom, you must specify this parameter and set it to `mounted`. The value won't be set by default. After replica creation, you can manage the open mode manually.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html

  • :max_allocated_storage (Integer)

    The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.

    For more information about this setting, including limitations that apply to it, see [ Managing capacity automatically with Amazon RDS storage autoscaling] in the *Amazon RDS User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling

  • :custom_iam_instance_profile (String)

    The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance. The instance profile must meet the following requirements:

    • The profile must exist in your account.

    • The profile must have an IAM role that Amazon EC2 has permissions to assume.

    • The instance profile name and the associated IAM role name must start with the prefix `AWSRDSCustom`.

    For the list of permissions required for the IAM role, see [ Configure IAM and your VPC] in the *Amazon RDS User Guide*.

    This setting is required for RDS Custom.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-setup-orcl.html#custom-setup-orcl.iam-vpc

  • :network_type (String)

    The network type of the DB instance.

    Valid values:

    • `IPV4`

    • `DUAL`

    The network type is determined by the `DBSubnetGroup` specified for read replica. A `DBSubnetGroup` can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (`DUAL`).

    For more information, see [ Working with a DB instance in a VPC] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html

  • :storage_throughput (Integer)

    Specifies the storage throughput value for the read replica.

    This setting doesn't apply to RDS Custom or Amazon Aurora.

  • :enable_customer_owned_ip (Boolean)

    A value that indicates whether to enable a customer-owned IP address (CoIP) for an RDS on Outposts read replica.

    A CoIP provides local or external connectivity to resources in your Outpost subnets through your on-premises network. For some use cases, a CoIP can provide lower latency for connections to the read replica from outside of its virtual private cloud (VPC) on your local network.

    For more information about RDS on Outposts, see [Working with Amazon RDS on Amazon Web Services Outposts] in the *Amazon RDS User Guide*.

    For more information about CoIPs, see [Customer-owned IP addresses] in the *Amazon Web Services Outposts User Guide*.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html [2]: docs.aws.amazon.com/outposts/latest/userguide/routing.html#ip-addressing

  • :allocated_storage (Integer)

    The amount of storage (in gibibytes) to allocate initially for the read replica. Follow the allocation rules specified in `CreateDBInstance`.

    <note markdown=“1”> Be sure to allocate enough storage for your read replica so that the create operation can succeed. You can also allocate additional storage for future growth.

    </note>
    
  • :source_db_cluster_identifier (String)

    The identifier of the Multi-AZ DB cluster that will act as the source for the read replica. Each DB cluster can have up to 15 read replicas.

    Constraints:

    • Must be the identifier of an existing Multi-AZ DB cluster.

    • Can't be specified if the `SourceDBInstanceIdentifier` parameter is also specified.

    • The specified DB cluster must have automatic backups enabled, that is, its backup retention period must be greater than 0.

    • The source DB cluster must be in the same Amazon Web Services Region as the read replica. Cross-Region replication isn't supported.

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


5847
5848
5849
5850
# File 'lib/aws-sdk-rds/client.rb', line 5847

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

#create_db_parameter_group(params = {}) ⇒ Types::CreateDBParameterGroupResult

Creates a new DB parameter group.

A DB parameter group is initially created with the default parameters for the database engine used by the DB instance. To provide custom values for any of the parameters, you must modify the group after creating it using `ModifyDBParameterGroup`. Once you've created a DB parameter group, you need to associate it with your DB instance using `ModifyDBInstance`. When you associate a new DB parameter group with a running DB instance, you need to reboot the DB instance without failover for the new DB parameter group and associated settings to take effect.

This command doesn't apply to RDS Custom.

After you create a DB parameter group, you should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group as the default parameter group. This allows Amazon RDS to fully complete the create action before the parameter group is used as the default for a new DB instance. This is especially important for parameters that are critical when creating the default database for a DB instance, such as the character set for the default database defined by the `character_set_database` parameter. You can use the *Parameter Groups* option of the [Amazon RDS console] or the DescribeDBParameters command to verify that your DB parameter group has been created or modified.

[1]: console.aws.amazon.com/rds/

Examples:

Example: To create a DB parameter group.


# This example creates a DB parameter group.

resp = client.create_db_parameter_group({
  db_parameter_group_family: "mysql5.6", 
  db_parameter_group_name: "mymysqlparametergroup", 
  description: "My MySQL parameter group", 
})

resp.to_h outputs the following:
{
  db_parameter_group: {
  }, 
}

Request syntax with placeholder values


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

Response structure


resp.db_parameter_group.db_parameter_group_name #=> String
resp.db_parameter_group.db_parameter_group_family #=> String
resp.db_parameter_group.description #=> String
resp.db_parameter_group.db_parameter_group_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_parameter_group_name (required, String)

    The name of the DB parameter group.

    Constraints:

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

    • First character must be a letter

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

    <note markdown=“1”> This value is stored as a lowercase string.

    </note>
    
  • :db_parameter_group_family (required, String)

    The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.

    To list all of the available parameter group families for a DB engine, use the following command:

    `aws rds describe-db-engine-versions –query “DBEngineVersions[].DBParameterGroupFamily” –engine <engine>`

    For example, to list all of the available parameter group families for the MySQL DB engine, use the following command:

    `aws rds describe-db-engine-versions –query “DBEngineVersions[].DBParameterGroupFamily” –engine mysql`

    <note markdown=“1”> The output contains duplicates.

    </note>
    

    The following are the valid DB engine values:

    • `aurora` (for MySQL 5.6-compatible Aurora)

    • `aurora-mysql` (for MySQL 5.7-compatible and MySQL 8.0-compatible Aurora)

    • `aurora-postgresql`

    • `mariadb`

    • `mysql`

    • `oracle-ee`

    • `oracle-ee-cdb`

    • `oracle-se2`

    • `oracle-se2-cdb`

    • `postgres`

    • `sqlserver-ee`

    • `sqlserver-se`

    • `sqlserver-ex`

    • `sqlserver-web`

  • :description (required, String)

    The description for the DB parameter group.

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

    Tags to assign to the DB parameter group.

Returns:

See Also:


6002
6003
6004
6005
# File 'lib/aws-sdk-rds/client.rb', line 6002

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

#create_db_proxy(params = {}) ⇒ Types::CreateDBProxyResponse

Creates a new DB proxy.

Examples:

Request syntax with placeholder values


resp = client.create_db_proxy({
  db_proxy_name: "String", # required
  engine_family: "MYSQL", # required, accepts MYSQL, POSTGRESQL, SQLSERVER
  auth: [ # required
    {
      description: "String",
      user_name: "String",
      auth_scheme: "SECRETS", # accepts SECRETS
      secret_arn: "String",
      iam_auth: "DISABLED", # accepts DISABLED, REQUIRED, ENABLED
      client_password_auth_type: "MYSQL_NATIVE_PASSWORD", # accepts MYSQL_NATIVE_PASSWORD, POSTGRES_SCRAM_SHA_256, POSTGRES_MD5, SQL_SERVER_AUTHENTICATION
    },
  ],
  role_arn: "String", # required
  vpc_subnet_ids: ["String"], # required
  vpc_security_group_ids: ["String"],
  require_tls: false,
  idle_client_timeout: 1,
  debug_logging: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_proxy.db_proxy_name #=> String
resp.db_proxy.db_proxy_arn #=> String
resp.db_proxy.status #=> String, one of "available", "modifying", "incompatible-network", "insufficient-resource-limits", "creating", "deleting", "suspended", "suspending", "reactivating"
resp.db_proxy.engine_family #=> String
resp.db_proxy.vpc_id #=> String
resp.db_proxy.vpc_security_group_ids #=> Array
resp.db_proxy.vpc_security_group_ids[0] #=> String
resp.db_proxy.vpc_subnet_ids #=> Array
resp.db_proxy.vpc_subnet_ids[0] #=> String
resp.db_proxy.auth #=> Array
resp.db_proxy.auth[0].description #=> String
resp.db_proxy.auth[0].user_name #=> String
resp.db_proxy.auth[0].auth_scheme #=> String, one of "SECRETS"
resp.db_proxy.auth[0].secret_arn #=> String
resp.db_proxy.auth[0].iam_auth #=> String, one of "DISABLED", "REQUIRED", "ENABLED"
resp.db_proxy.auth[0].client_password_auth_type #=> String, one of "MYSQL_NATIVE_PASSWORD", "POSTGRES_SCRAM_SHA_256", "POSTGRES_MD5", "SQL_SERVER_AUTHENTICATION"
resp.db_proxy.role_arn #=> String
resp.db_proxy.endpoint #=> String
resp.db_proxy.require_tls #=> Boolean
resp.db_proxy.idle_client_timeout #=> Integer
resp.db_proxy.debug_logging #=> Boolean
resp.db_proxy.created_date #=> Time
resp.db_proxy.updated_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :db_proxy_name (required, String)

    The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region. 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.

  • :engine_family (required, String)

    The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify `MYSQL`. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify `POSTGRESQL`. For RDS for Microsoft SQL Server, specify `SQLSERVER`.

  • :auth (required, Array<Types::UserAuthConfig>)

    The authorization mechanism that the proxy uses.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.

  • :vpc_subnet_ids (required, Array<String>)

    One or more VPC subnet IDs to associate with the new proxy.

  • :vpc_security_group_ids (Array<String>)

    One or more VPC security group IDs to associate with the new proxy.

  • :require_tls (Boolean)

    A Boolean parameter that specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy.

  • :idle_client_timeout (Integer)

    The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database.

  • :debug_logging (Boolean)

    Whether the proxy includes detailed information about SQL statements in its logs. This information helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive information that appears in the logs.

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

    An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.

Returns:

See Also:


6123
6124
6125
6126
# File 'lib/aws-sdk-rds/client.rb', line 6123

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

#create_db_proxy_endpoint(params = {}) ⇒ Types::CreateDBProxyEndpointResponse

Creates a `DBProxyEndpoint`. Only applies to proxies that are associated with Aurora DB clusters. You can use DB proxy endpoints to specify read/write or read-only access to the DB cluster. You can also use DB proxy endpoints to access a DB proxy through a different VPC than the proxy's default VPC.

Examples:

Request syntax with placeholder values


resp = client.create_db_proxy_endpoint({
  db_proxy_name: "DBProxyName", # required
  db_proxy_endpoint_name: "DBProxyEndpointName", # required
  vpc_subnet_ids: ["String"], # required
  vpc_security_group_ids: ["String"],
  target_role: "READ_WRITE", # accepts READ_WRITE, READ_ONLY
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_proxy_endpoint.db_proxy_endpoint_name #=> String
resp.db_proxy_endpoint.db_proxy_endpoint_arn #=> String
resp.db_proxy_endpoint.db_proxy_name #=> String
resp.db_proxy_endpoint.status #=> String, one of "available", "modifying", "incompatible-network", "insufficient-resource-limits", "creating", "deleting"
resp.db_proxy_endpoint.vpc_id #=> String
resp.db_proxy_endpoint.vpc_security_group_ids #=> Array
resp.db_proxy_endpoint.vpc_security_group_ids[0] #=> String
resp.db_proxy_endpoint.vpc_subnet_ids #=> Array
resp.db_proxy_endpoint.vpc_subnet_ids[0] #=> String
resp.db_proxy_endpoint.endpoint #=> String
resp.db_proxy_endpoint.created_date #=> Time
resp.db_proxy_endpoint.target_role #=> String, one of "READ_WRITE", "READ_ONLY"
resp.db_proxy_endpoint.is_default #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :db_proxy_name (required, String)

    The name of the DB proxy associated with the DB proxy endpoint that you create.

  • :db_proxy_endpoint_name (required, String)

    The name of the DB proxy endpoint to create.

  • :vpc_subnet_ids (required, Array<String>)

    The VPC subnet IDs for the DB proxy endpoint that you create. You can specify a different set of subnet IDs than for the original DB proxy.

  • :vpc_security_group_ids (Array<String>)

    The VPC security group IDs for the DB proxy endpoint that you create. You can specify a different set of security group IDs than for the original DB proxy. The default is the default security group for the VPC.

  • :target_role (String)

    A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations. The default is `READ_WRITE`. The only role that proxies for RDS for Microsoft SQL Server support is `READ_WRITE`.

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

Returns:

See Also:


6205
6206
6207
6208
# File 'lib/aws-sdk-rds/client.rb', line 6205

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

#create_db_security_group(params = {}) ⇒ Types::CreateDBSecurityGroupResult

Creates a new DB security group. DB security groups control access to a DB instance.

A DB security group controls access to EC2-Classic DB instances that are not in a VPC.

<note markdown=“1”> EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see [Migrate from EC2-Classic to a VPC] in the *Amazon EC2 User Guide*, the blog [EC2-Classic Networking is Retiring – Here’s How to Prepare], and [Moving a DB instance not in a VPC into a VPC] in the *Amazon RDS User Guide*.

</note>

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html [2]: aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/ [3]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html

Examples:

Example: To create a DB security group.


# This example creates a DB security group.

resp = client.create_db_security_group({
  db_security_group_description: "My DB security group", 
  db_security_group_name: "mydbsecuritygroup", 
})

resp.to_h outputs the following:
{
  db_security_group: {
  }, 
}

Request syntax with placeholder values


resp = client.create_db_security_group({
  db_security_group_name: "String", # required
  db_security_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_security_group.owner_id #=> String
resp.db_security_group.db_security_group_name #=> String
resp.db_security_group.db_security_group_description #=> String
resp.db_security_group.vpc_id #=> String
resp.db_security_group.ec2_security_groups #=> Array
resp.db_security_group.ec2_security_groups[0].status #=> String
resp.db_security_group.ec2_security_groups[0].ec2_security_group_name #=> String
resp.db_security_group.ec2_security_groups[0].ec2_security_group_id #=> String
resp.db_security_group.ec2_security_groups[0].ec2_security_group_owner_id #=> String
resp.db_security_group.ip_ranges #=> Array
resp.db_security_group.ip_ranges[0].status #=> String
resp.db_security_group.ip_ranges[0].cidrip #=> String
resp.db_security_group.db_security_group_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_security_group_name (required, String)

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

    Constraints:

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

    • First character must be a letter

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

    • Must not be “Default”

    Example: `mysecuritygroup`

  • :db_security_group_description (required, String)

    The description for the DB security group.

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

    Tags to assign to the DB security group.

Returns:

See Also:


6306
6307
6308
6309
# File 'lib/aws-sdk-rds/client.rb', line 6306

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

#create_db_snapshot(params = {}) ⇒ Types::CreateDBSnapshotResult

Creates a snapshot of a DB instance. The source DB instance must be in the `available` or `storage-optimization` state.

Examples:

Example: To create a DB snapshot.


# This example creates a DB snapshot.

resp = client.create_db_snapshot({
  db_instance_identifier: "mymysqlinstance", 
  db_snapshot_identifier: "mydbsnapshot", 
})

resp.to_h outputs the following:
{
  db_snapshot: {
  }, 
}

Request syntax with placeholder values


resp = client.create_db_snapshot({
  db_snapshot_identifier: "String", # required
  db_instance_identifier: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_snapshot.db_snapshot_identifier #=> String
resp.db_snapshot.db_instance_identifier #=> String
resp.db_snapshot.snapshot_create_time #=> Time
resp.db_snapshot.engine #=> String
resp.db_snapshot.allocated_storage #=> Integer
resp.db_snapshot.status #=> String
resp.db_snapshot.port #=> Integer
resp.db_snapshot.availability_zone #=> String
resp.db_snapshot.vpc_id #=> String
resp.db_snapshot.instance_create_time #=> Time
resp.db_snapshot.master_username #=> String
resp.db_snapshot.engine_version #=> String
resp.db_snapshot.license_model #=> String
resp.db_snapshot.snapshot_type #=> String
resp.db_snapshot.iops #=> Integer
resp.db_snapshot.option_group_name #=> String
resp.db_snapshot.percent_progress #=> Integer
resp.db_snapshot.source_region #=> String
resp.db_snapshot.source_db_snapshot_identifier #=> String
resp.db_snapshot.storage_type #=> String
resp.db_snapshot.tde_credential_arn #=> String
resp.db_snapshot.encrypted #=> Boolean
resp.db_snapshot.kms_key_id #=> String
resp.db_snapshot.db_snapshot_arn #=> String
resp.db_snapshot.timezone #=> String
resp.db_snapshot.iam_database_authentication_enabled #=> Boolean
resp.db_snapshot.processor_features #=> Array
resp.db_snapshot.processor_features[0].name #=> String
resp.db_snapshot.processor_features[0].value #=> String
resp.db_snapshot.dbi_resource_id #=> String
resp.db_snapshot.tag_list #=> Array
resp.db_snapshot.tag_list[0].key #=> String
resp.db_snapshot.tag_list[0].value #=> String
resp.db_snapshot.original_snapshot_create_time #=> Time
resp.db_snapshot.snapshot_database_time #=> Time
resp.db_snapshot.snapshot_target #=> String
resp.db_snapshot.storage_throughput #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :db_snapshot_identifier (required, String)

    The identifier for the DB snapshot.

    Constraints:

    • Can't be null, empty, or blank

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

    • First character must be a letter

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

    Example: `my-snapshot-id`

  • :db_instance_identifier (required, String)

    The identifier of the DB instance that you want to create the snapshot of.

    Constraints:

    • Must match the identifier of an existing DBInstance.

    ^

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

Returns:

See Also:


6424
6425
6426
6427
# File 'lib/aws-sdk-rds/client.rb', line 6424

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

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

Creates a new DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the Amazon Web Services Region.

Examples:

Example: To create a DB subnet group.


# This example creates a DB subnet group.

resp = client.create_db_subnet_group({
  db_subnet_group_description: "My DB subnet group", 
  db_subnet_group_name: "mydbsubnetgroup", 
  subnet_ids: [
    "subnet-1fab8a69", 
    "subnet-d43a468c", 
  ], 
})

resp.to_h outputs the following:
{
  db_subnet_group: {
  }, 
}

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_outpost.arn #=> String
resp.db_subnet_group.subnets[0].subnet_status #=> String
resp.db_subnet_group.db_subnet_group_arn #=> String
resp.db_subnet_group.supported_network_types #=> Array
resp.db_subnet_group.supported_network_types[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_subnet_group_name (required, String)

    The name for the DB 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.

    • First character must be a letter.

    Example: `mydbsubnetgroup`

  • :db_subnet_group_description (required, String)

    The description for the DB subnet group.

  • :subnet_ids (required, Array<String>)

    The EC2 Subnet IDs for the DB subnet group.

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

    Tags to assign to the DB subnet group.

Returns:

See Also:


6513
6514
6515
6516
# File 'lib/aws-sdk-rds/client.rb', line 6513

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 RDS event notification subscription. This operation requires a topic Amazon Resource Name (ARN) created by either the RDS console, the SNS console, or the SNS API. To obtain an ARN with SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS console.

You can specify the type of source (`SourceType`) that you want to be notified of and provide a list of RDS sources (`SourceIds`) that triggers the events. You can also 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 `SourceIds` = `myDBInstance1`, you are notified of all the `db-instance` events for the specified source. If you specify a `SourceType` but do not specify `SourceIds`, you receive notice of the events for that source type for all your RDS sources. If you don't specify either the SourceType or the `SourceIds`, you are notified of events generated from all RDS sources belonging to your customer account.

For more information about subscribing to an event for RDS DB engines, see [ Subscribing to Amazon RDS event notification] in the *Amazon RDS User Guide*.

For more information about subscribing to an event for Aurora DB engines, see [ Subscribing to Amazon RDS event notification] in the *Amazon Aurora User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Subscribing.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Subscribing.html

Examples:

Example: To create an event notification subscription


# This example creates an event notification subscription.

resp = client.create_event_subscription({
  enabled: true, 
  event_categories: [
    "availability", 
  ], 
  sns_topic_arn: "arn:aws:sns:us-east-1:992648334831:MyDemoSNSTopic", 
  source_ids: [
    "mymysqlinstance", 
  ], 
  source_type: "db-instance", 
  subscription_name: "mymysqleventsubscription", 
})

resp.to_h outputs the following:
{
  event_subscription: {
  }, 
}

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 less than 255 characters.

  • :sns_topic_arn (required, 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 a DB instance, you set this parameter to `db-instance`. For RDS Proxy events, specify `db-proxy`. If this value isn't specified, all events are returned.

    Valid values: `db-instance` | `db-cluster` | `db-parameter-group` | `db-security-group` | `db-snapshot` | `db-cluster-snapshot` | `db-proxy`

  • :event_categories (Array<String>)

    A list of event categories for a particular source type (`SourceType`) that you want to subscribe to. You can see a list of the categories for a given source type in the “Amazon RDS event categories and event messages” section of the [ *Amazon RDS User Guide* ][1] or the [ *Amazon Aurora User Guide* ][2]. You can also see this list by using the `DescribeEventCategories` operation.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Messages.html

  • :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 supplied, `SourceType` must also be provided.

    • If the source type is a DB instance, a `DBInstanceIdentifier` value must be supplied.

    • If the source type is a DB cluster, a `DBClusterIdentifier` value must be supplied.

    • If the source type is a DB parameter group, a `DBParameterGroupName` value must be supplied.

    • If the source type is a DB security group, a `DBSecurityGroupName` value must be supplied.

    • If the source type is a DB snapshot, a `DBSnapshotIdentifier` value must be supplied.

    • If the source type is a DB cluster snapshot, a `DBClusterSnapshotIdentifier` value must be supplied.

    • If the source type is an RDS Proxy, a `DBProxyName` value must be supplied.

  • :enabled (Boolean)

    A value that indicates whether to activate the subscription. If the event notification subscription isn't activated, the subscription is created but not active.

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

    A list of tags. For more information, see [Tagging Amazon RDS Resources] in the *Amazon RDS User Guide.*

    [1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html

Returns:

See Also:


6696
6697
6698
6699
# File 'lib/aws-sdk-rds/client.rb', line 6696

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 Aurora global database spread across multiple Amazon Web Services Regions. The global database contains a single primary cluster with read-write capability, and a read-only secondary cluster that receives data from the primary cluster through high-speed replication performed by the Aurora storage subsystem.

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

<note markdown=“1”> This action applies only to Aurora DB clusters.

</note>

Examples:

Request syntax with placeholder values


resp = client.create_global_cluster({
  global_cluster_identifier: "String",
  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
resp.global_cluster.global_cluster_members[0].global_write_forwarding_status #=> String, one of "enabled", "disabled", "enabling", "disabling", "unknown"
resp.global_cluster.failover_state.status #=> String, one of "pending", "failing-over", "cancelling"
resp.global_cluster.failover_state.from_db_cluster_arn #=> String
resp.global_cluster.failover_state.to_db_cluster_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :global_cluster_identifier (String)

    The cluster identifier of the new global database cluster.

  • :source_db_cluster_identifier (String)

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

  • :engine (String)

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

  • :engine_version (String)

    The engine version of the Aurora global database.

  • :deletion_protection (Boolean)

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

  • :database_name (String)

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

  • :storage_encrypted (Boolean)

    The storage encryption setting for the new global database cluster.

Returns:

See Also:


6782
6783
6784
6785
# File 'lib/aws-sdk-rds/client.rb', line 6782

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

#create_option_group(params = {}) ⇒ Types::CreateOptionGroupResult

Creates a new option group. You can create up to 20 option groups.

This command doesn't apply to RDS Custom.

Examples:

Example: To create an option group


# This example creates an option group.

resp = client.create_option_group({
  engine_name: "MySQL", 
  major_engine_version: "5.6", 
  option_group_description: "My MySQL 5.6 option group", 
  option_group_name: "mymysqloptiongroup", 
})

resp.to_h outputs the following:
{
  option_group: {
  }, 
}

Request syntax with placeholder values


resp = client.create_option_group({
  option_group_name: "String", # required
  engine_name: "String", # required
  major_engine_version: "String", # required
  option_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.option_group.option_group_name #=> String
resp.option_group.option_group_description #=> String
resp.option_group.engine_name #=> String
resp.option_group.major_engine_version #=> String
resp.option_group.options #=> Array
resp.option_group.options[0].option_name #=> String
resp.option_group.options[0].option_description #=> String
resp.option_group.options[0].persistent #=> Boolean
resp.option_group.options[0].permanent #=> Boolean
resp.option_group.options[0].port #=> Integer
resp.option_group.options[0].option_version #=> String
resp.option_group.options[0].option_settings #=> Array
resp.option_group.options[0].option_settings[0].name #=> String
resp.option_group.options[0].option_settings[0].value #=> String
resp.option_group.options[0].option_settings[0].default_value #=> String
resp.option_group.options[0].option_settings[0].description #=> String
resp.option_group.options[0].option_settings[0].apply_type #=> String
resp.option_group.options[0].option_settings[0].data_type #=> String
resp.option_group.options[0].option_settings[0].allowed_values #=> String
resp.option_group.options[0].option_settings[0].is_modifiable #=> Boolean
resp.option_group.options[0].option_settings[0].is_collection #=> Boolean
resp.option_group.options[0].db_security_group_memberships #=> Array
resp.option_group.options[0].db_security_group_memberships[0].db_security_group_name #=> String
resp.option_group.options[0].db_security_group_memberships[0].status #=> String
resp.option_group.options[0].vpc_security_group_memberships #=> Array
resp.option_group.options[0].vpc_security_group_memberships[0].vpc_security_group_id #=> String
resp.option_group.options[0].vpc_security_group_memberships[0].status #=> String
resp.option_group.allows_vpc_and_non_vpc_instance_memberships #=> Boolean
resp.option_group.vpc_id #=> String
resp.option_group.option_group_arn #=> String
resp.option_group.source_option_group #=> String
resp.option_group. #=> String
resp.option_group.copy_timestamp #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :option_group_name (required, String)

    Specifies the name of the option group to be created.

    Constraints:

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

    • First character must be a letter

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

    Example: `myoptiongroup`

  • :engine_name (required, String)

    Specifies the name of the engine that this option group should be associated with.

    Valid Values:

    • `mariadb`

    • `mysql`

    • `oracle-ee`

    • `oracle-ee-cdb`

    • `oracle-se2`

    • `oracle-se2-cdb`

    • `postgres`

    • `sqlserver-ee`

    • `sqlserver-se`

    • `sqlserver-ex`

    • `sqlserver-web`

  • :major_engine_version (required, String)

    Specifies the major version of the engine that this option group should be associated with.

  • :option_group_description (required, String)

    The description of the option group.

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

    Tags to assign to the option group.

Returns:

See Also:


6919
6920
6921
6922
# File 'lib/aws-sdk-rds/client.rb', line 6919

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

#delete_blue_green_deployment(params = {}) ⇒ Types::DeleteBlueGreenDeploymentResponse

Deletes a blue/green deployment.

For more information, see [Using Amazon RDS Blue/Green Deployments for database updates] in the *Amazon RDS User Guide* and [ Using Amazon RDS Blue/Green Deployments for database updates] in the *Amazon Aurora User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html [2]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html

Examples:

Request syntax with placeholder values


resp = client.delete_blue_green_deployment({
  blue_green_deployment_identifier: "BlueGreenDeploymentIdentifier", # required
  delete_target: false,
})

Response structure


resp.blue_green_deployment.blue_green_deployment_identifier #=> String
resp.blue_green_deployment.blue_green_deployment_name #=> String
resp.blue_green_deployment.source #=> String
resp.blue_green_deployment.target #=> String
resp.blue_green_deployment.switchover_details #=> Array
resp.blue_green_deployment.switchover_details[0].source_member #=> String
resp.blue_green_deployment.switchover_details[0].target_member #=> String
resp.blue_green_deployment.switchover_details[0].status #=> String
resp.blue_green_deployment.tasks #=> Array
resp.blue_green_deployment.tasks[0].name #=> String
resp.blue_green_deployment.tasks[0].status #=> String
resp.blue_green_deployment.status #=> String
resp.blue_green_deployment.status_details #=> String
resp.blue_green_deployment.create_time #=> Time
resp.blue_green_deployment.delete_time #=> Time
resp.blue_green_deployment.tag_list #=> Array
resp.blue_green_deployment.tag_list[0].key #=> String
resp.blue_green_deployment.tag_list[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :blue_green_deployment_identifier (required, String)

    The blue/green deployment identifier of the deployment to be deleted. This parameter isn't case-sensitive.

    Constraints:

    • Must match an existing blue/green deployment identifier.

    ^

  • :delete_target (Boolean)

    A value that indicates whether to delete the resources in the green environment. You can't specify this option if the blue/green deployment [status] is `SWITCHOVER_COMPLETED`.

    [1]: docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_BlueGreenDeployment.html

Returns:

See Also:


6991
6992
6993
6994
# File 'lib/aws-sdk-rds/client.rb', line 6991

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

#delete_custom_db_engine_version(params = {}) ⇒ Types::DBEngineVersion

Deletes a custom engine version. To run this command, make sure you meet the following prerequisites:

  • The CEV must not be the default for RDS Custom. If it is, change the default before running this command.

  • The CEV must not be associated with an RDS Custom DB instance, RDS Custom instance snapshot, or automated backup of your RDS Custom instance.

Typically, deletion takes a few minutes.

<note markdown=“1”> The MediaImport service that imports files from Amazon S3 to create CEVs isn't integrated with Amazon Web Services CloudTrail. If you turn on data logging for Amazon RDS in CloudTrail, calls to the `DeleteCustomDbEngineVersion` event aren't logged. However, you might see calls from the API gateway that accesses your Amazon S3 bucket. These calls originate from the MediaImport service for the `DeleteCustomDbEngineVersion` event.

</note>

For more information, see [Deleting a CEV] in the *Amazon RDS User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.delete

Examples:

Request syntax with placeholder values


resp = client.delete_custom_db_engine_version({
  engine: "CustomEngineName", # required
  engine_version: "CustomEngineVersion", # required
})

Response structure


resp.engine #=> String
resp.engine_version #=> String
resp.db_parameter_group_family #=> String
resp.db_engine_description #=> String
resp.db_engine_version_description #=> String
resp.default_character_set.character_set_name #=> String
resp.default_character_set.character_set_description #=> String
resp.image.image_id #=> String
resp.image.status #=> String
resp.db_engine_media_type #=> String
resp.supported_character_sets #=> Array
resp.supported_character_sets[0].character_set_name #=> String
resp.supported_character_sets[0].character_set_description #=> String
resp.supported_nchar_character_sets #=> Array
resp.supported_nchar_character_sets[0].character_set_name #=> String
resp.supported_nchar_character_sets[0].character_set_description #=> String
resp.valid_upgrade_target #=> Array
resp.valid_upgrade_target[0].engine #=> String
resp.valid_upgrade_target[0].engine_version #=> String
resp.valid_upgrade_target[0].description #=> String
resp.valid_upgrade_target[0].auto_upgrade #=> Boolean
resp.valid_upgrade_target[0].is_major_version_upgrade #=> Boolean
resp.valid_upgrade_target[0].supported_engine_modes #=> Array
resp.valid_upgrade_target[0].supported_engine_modes[0] #=> String
resp.valid_upgrade_target[0].supports_parallel_query #=> Boolean
resp.valid_upgrade_target[0].supports_global_databases #=> Boolean
resp.valid_upgrade_target[0].supports_babelfish #=> Boolean
resp.supported_timezones #=> Array
resp.supported_timezones[0].timezone_name #=> String
resp.exportable_log_types #=> Array
resp.exportable_log_types[0] #=> String
resp.supports_log_exports_to_cloudwatch_logs #=> Boolean
resp.supports_read_replica #=> Boolean
resp.supported_engine_modes #=> Array
resp.supported_engine_modes[0] #=> String
resp.supported_feature_names #=> Array
resp.supported_feature_names[0] #=> String
resp.status #=> String
resp.supports_parallel_query #=> Boolean
resp.supports_global_databases #=> Boolean
resp.major_engine_version #=> String
resp.database_installation_files_s3_bucket_name #=> String
resp.database_installation_files_s3_prefix #=> String
resp.db_engine_version_arn #=> String
resp.kms_key_id #=> String
resp.create_time #=> Time
resp.tag_list #=> Array
resp.tag_list[0].key #=> String
resp.tag_list[0].value #=> String
resp.supports_babelfish #=> Boolean
resp.custom_db_engine_version_manifest #=> String
resp.supports_certificate_rotation_without_restart #=> Boolean
resp.supported_ca_certificate_identifiers #=> Array
resp.supported_ca_certificate_identifiers[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :engine (required, String)

    The database engine. The only supported engine is `custom-oracle-ee`.

  • :engine_version (required, String)

    The custom engine version (CEV) for your DB instance. This option is required for RDS Custom, but optional for Amazon RDS. The combination of `Engine` and `EngineVersion` is unique per customer per Amazon Web Services Region.

Returns:

See Also:


7136
7137
7138
7139
# File 'lib/aws-sdk-rds/client.rb', line 7136

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

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

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

If you're deleting a Multi-AZ DB cluster with read replicas, all cluster members are terminated and read replicas are promoted to standalone instances.

For more information on Amazon Aurora, see [ What is Amazon Aurora?] in the *Amazon Aurora User Guide*.

For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments] in the *Amazon RDS User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html [2]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html

Examples:

Example: To delete a DB cluster.


# This example deletes the specified DB cluster.

resp = client.delete_db_cluster({
  db_cluster_identifier: "mydbcluster", 
  skip_final_snapshot: true, 
})

resp.to_h outputs the following:
{
  db_cluster: {
  }, 
}

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.allocated_storage #=> Integer
resp.db_cluster.availability_zones #=> Array
resp.db_cluster.availability_zones[0] #=> String
resp.db_cluster.backup_retention_period #=> Integer
resp.db_cluster.character_set_name #=> String
resp.db_cluster.database_name #=> String
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.automatic_restart_time #=> Time
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.custom_endpoints #=> Array
resp.db_cluster.custom_endpoints[0] #=> 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.db_cluster_option_group_memberships #=> Array
resp.db_cluster.db_cluster_option_group_memberships[0].db_cluster_option_group_name #=> String
resp.db_cluster.db_cluster_option_group_memberships[0].status #=> 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.associated_roles[0].feature_name #=> String
resp.db_cluster.iam_database_authentication_enabled #=> Boolean
resp.db_cluster.clone_group_id #=> String
resp.db_cluster.cluster_create_time #=> Time
resp.db_cluster.earliest_backtrack_time #=> Time
resp.db_cluster.backtrack_window #=> Integer
resp.db_cluster.backtrack_consumed_change_records #=> Integer
resp.db_cluster.enabled_cloudwatch_logs_exports #=> Array
resp.db_cluster.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_cluster.capacity #=> Integer
resp.db_cluster.engine_mode #=> String
resp.db_cluster.scaling_configuration_info.min_capacity #=> Integer
resp.db_cluster.scaling_configuration_info.max_capacity #=> Integer
resp.db_cluster.scaling_configuration_info.auto_pause #=> Boolean
resp.db_cluster.scaling_configuration_info.seconds_until_auto_pause #=> Integer
resp.db_cluster.scaling_configuration_info.timeout_action #=> String
resp.db_cluster.scaling_configuration_info.seconds_before_timeout #=> Integer
resp.db_cluster.deletion_protection #=> Boolean
resp.db_cluster.http_endpoint_enabled #=> Boolean
resp.db_cluster.activity_stream_mode #=> String, one of "sync", "async"
resp.db_cluster.activity_stream_status #=> String, one of "stopped", "starting", "started", "stopping"
resp.db_cluster.activity_stream_kms_key_id #=> String
resp.db_cluster.activity_stream_kinesis_stream_name #=> String
resp.db_cluster.copy_tags_to_snapshot #=> Boolean
resp.db_cluster. #=> Boolean
resp.db_cluster.domain_memberships #=> Array
resp.db_cluster.domain_memberships[0].domain #=> String
resp.db_cluster.domain_memberships[0].status #=> String
resp.db_cluster.domain_memberships[0].fqdn #=> String
resp.db_cluster.domain_memberships[0].iam_role_name #=> String
resp.db_cluster.tag_list #=> Array
resp.db_cluster.tag_list[0].key #=> String
resp.db_cluster.tag_list[0].value #=> String
resp.db_cluster.global_write_forwarding_status #=> String, one of "enabled", "disabled", "enabling", "disabling", "unknown"
resp.db_cluster.global_write_forwarding_requested #=> Boolean
resp.db_cluster.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable #=> Array
resp.db_cluster.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_enable[0] #=> String
resp.db_cluster.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable #=> Array
resp.db_cluster.pending_modified_values.pending_cloudwatch_logs_exports.log_types_to_disable[0] #=> String
resp.db_cluster.pending_modified_values.db_cluster_identifier #=> String
resp.db_cluster.pending_modified_values.master_user_password #=> String
resp.db_cluster.pending_modified_values.iam_database_authentication_enabled #=> Boolean
resp.db_cluster.pending_modified_values.engine_version #=> String
resp.db_cluster.pending_modified_values.backup_retention_period #=> Integer
resp.db_cluster.pending_modified_values.allocated_storage #=> Integer
resp.db_cluster.pending_modified_values.iops #=> Integer
resp.db_cluster.db_cluster_instance_class #=> String
resp.db_cluster.storage_type #=> String
resp.db_cluster.iops #=> Integer
resp.db_cluster.publicly_accessible #=> Boolean
resp.db_cluster.auto_minor_version_upgrade #=> Boolean
resp.db_cluster.monitoring_interval #=> Integer
resp.db_cluster.monitoring_role_arn #=> String
resp.db_cluster.performance_insights_enabled #=> Boolean
resp.db_cluster.performance_insights_kms_key_id #=> String
resp.db_cluster.performance_insights_retention_period #=> Integer
resp.db_cluster.serverless_v2_scaling_configuration.min_capacity #=> Float
resp.db_cluster.serverless_v2_scaling_configuration.max_capacity #=> Float
resp.db_cluster.network_type #=> String
resp.db_cluster.db_system_id #=> String
resp.db_cluster.master_user_secret.secret_arn #=> String
resp.db_cluster.master_user_secret.secret_status #=> String
resp.db_cluster.master_user_secret.kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_identifier (required, String)

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

    Constraints:

    • Must match an existing DBClusterIdentifier.

    ^

  • :skip_final_snapshot (Boolean)

    A value that indicates whether to skip the creation of a final DB cluster snapshot before the DB cluster is deleted. If skip is specified, no DB cluster snapshot is created. If skip isn't specified, a DB cluster snapshot is created before the DB cluster is deleted. By default, skip isn't specified, and the DB cluster snapshot is created. By default, this parameter is disabled.

    <note markdown=“1”> You must specify a `FinalDBSnapshotIdentifier` parameter if `SkipFinalSnapshot` is disabled.

    </note>
    
  • :final_db_snapshot_identifier (String)

    The DB cluster snapshot identifier of the new DB cluster snapshot created when `SkipFinalSnapshot` is disabled.

    <note markdown=“1”> Specifying this parameter and also skipping the creation of a final DB cluster snapshot with the `SkipFinalShapshot` parameter results in an error.

    </note>
    

    Constraints:

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

    • First character must be a letter

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

Returns:

See Also:


7347
7348
7349
7350
# File 'lib/aws-sdk-rds/client.rb', line 7347

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

#delete_db_cluster_endpoint(params = {}) ⇒ Types::DBClusterEndpoint

Deletes a custom endpoint and removes it from an Amazon Aurora DB cluster.

<note markdown=“1”> This action only applies to Aurora DB clusters.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_db_cluster_endpoint({
  db_cluster_endpoint_identifier: "String", # required
})

Response structure


resp.db_cluster_endpoint_identifier #=> String
resp.db_cluster_identifier #=> String
resp.db_cluster_endpoint_resource_identifier #=> String
resp.endpoint #=> String
resp.status #=> String
resp.endpoint_type #=> String
resp.custom_endpoint_type #=> String
resp.static_members #=> Array
resp.static_members[0] #=> String
resp.excluded_members #=> Array
resp.excluded_members[0] #=> String
resp.db_cluster_endpoint_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_endpoint_identifier (required, String)

    The identifier associated with the custom endpoint. This parameter is stored as a lowercase string.

Returns:

See Also:


7401
7402
7403
7404
# File 'lib/aws-sdk-rds/client.rb', line 7401

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

#delete_db_cluster_parameter_group(params = {}) ⇒ Struct

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

For more information on Amazon Aurora, see [ What is Amazon Aurora?] in the *Amazon Aurora User Guide*.

For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments] in the *Amazon RDS User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html [2]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html

Examples:

Example: To delete a DB cluster parameter group.


# This example deletes the specified DB cluster parameter group.

resp = client.delete_db_cluster_parameter_group({
  db_cluster_parameter_group_name: "mydbclusterparametergroup", 
})

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 DB cluster parameter group.

    Constraints:

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

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

    • Can't be associated with any DB clusters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:


7453
7454
7455
7456
# File 'lib/aws-sdk-rds/client.rb', line 7453

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 DB cluster snapshot. If the snapshot is being copied, the copy operation is terminated.

<note markdown=“1”> The DB cluster snapshot must be in the `available` state to be deleted.

</note>

For more information on Amazon Aurora, see [ What is Amazon Aurora?] in the *Amazon Aurora User Guide*.

For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments] in the *Amazon RDS User Guide*.

[1]: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html [2]: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html

Examples:

Example: To delete a DB cluster snapshot.


# This example deletes the specified DB cluster snapshot.

resp = client.delete_db_cluster_snapshot({
  db_cluster_snapshot_identifier: "mydbclustersnapshot", 
})

resp.to_h outputs the following:
{
  db_cluster_snapshot: {
  }, 
}

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.engine_mode #=> String
resp.db_cluster_snapshot.allocated_storage #=> Integer
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.license_model #=> 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.iam_database_authentication_enabled #=> Boolean
resp.db_cluster_snapshot.tag_list #=> Array
resp.db_cluster_snapshot.tag_list[0].key #=> String
resp.db_cluster_snapshot.tag_list[0].value #=> String
resp.db_cluster_snapshot.db_system_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_cluster_snapshot_identifier (required, String)

    The identifier of the DB cluster snapshot to delete.

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

Returns:

See Also:


7541
7542
7543
7544
# File 'lib/aws-sdk-rds/client.rb', line 7541

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

The DeleteDBInstance action deletes a previously provisioned DB instance. When you delete a DB instance, all automated backups for that instance are deleted and can't be recovered. Manual DB snapshots of the DB instance to be deleted by `DeleteDBInstance` are not deleted.

If you request a final DB snapshot the status of the Amazon RDS DB instance is `deleting` until the DB snapshot is created. The API action `DescribeDBInstance` is used to monitor the status of this operation. The action can't be canceled or reverted once submitted.

When a DB instance is in a failure state and has a status of `failed`, `incompatible-restore`, or `incompatible-network`, you can only delete it when you skip creation of the final snapshot with the `SkipFinalSnapshot` parameter.

If the specified DB instance is part of an Amazon Aurora DB cluster, you can't delete the DB instance if both of the following conditions are true:

  • The DB cluster is a read replica of another Amazon Aurora DB cluster.

  • The DB instance is the only instance in the DB cluster.

To delete a DB instance in this case, first call the `PromoteReadReplicaDBCluster` API action to promote the DB cluster so it's no longer a read replica. After the promotion completes, then call the `DeleteDBInstance` API action to delete the final instance in the DB cluster.

Examples:

Example: To delete a DB instance.


# This example deletes the specified DB instance.

resp = client.delete_db_instance({
  db_instance_identifier: "mymysqlinstance", 
  skip_final_snapshot: true, 
})

resp.to_h outputs the following:
{
  db_instance: {
  }, 
}

Request syntax with placeholder values


resp = client.delete_db_instance({
  db_instance_identifier: "String", # required
  skip_final_snapshot: false,
  final_db_snapshot_identifier: "String",
  delete_automated_backups: 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.automatic_restart_time #=> Time
resp.db_instance.master_username #=> String
resp.db_instance.db_name #=> String
resp.db_instance.endpoint.address #=> String
resp.db_instance.endpoint.port #=> Integer
resp.db_instance.endpoint.hosted_zone_id #=> String
resp.db_instance.allocated_storage #=> Integer
resp.db_instance.instance_create_time #=> Time
resp.db_instance.preferred_backup_window #=> String
resp.db_instance.backup_retention_period #=> Integer
resp.db_instance.db_security_groups #=> Array
resp.db_instance.db_security_groups[0].db_security_group_name #=> String
resp.db_instance.db_security_groups[0].status #=> String
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.db_parameter_groups #=> Array
resp.db_instance.db_parameter_groups[0].db_parameter_group_name #=> String
resp.db_instance.db_parameter_groups[0].parameter_apply_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_outpost.arn #=> 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.db_subnet_group.supported_network_types #=> Array
resp.db_instance.db_subnet_group.supported_network_types[0] #=> 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.pending_modified_values.processor_features #=> Array
resp.db_instance.pending_modified_values.processor_features[0].name #=> String
resp.db_instance.pending_modified_values.processor_features[0].value #=> String
resp.db_instance.pending_modified_values.iam_database_authentication_enabled #=> Boolean
resp.db_instance.pending_modified_values.automation_mode #=> String, one of "full", "all-paused"
resp.db_instance.pending_modified_values.resume_full_automation_mode_time #=> Time
resp.db_instance.pending_modified_values.storage_throughput #=> Integer
resp.db_instance.latest_restorable_time #=> Time
resp.db_instance.multi_az #=> Boolean
resp.db_instance.engine_version #=> String
resp.db_instance.auto_minor_version_upgrade #=> Boolean
resp.db_instance.read_replica_source_db_instance_identifier #=> String
resp.db_instance.read_replica_db_instance_identifiers #=> Array
resp.db_instance.read_replica_db_instance_identifiers[0] #=> String
resp.db_instance.read_replica_db_cluster_identifiers #=> Array
resp.db_instance.read_replica_db_cluster_identifiers[0] #=> String
resp.db_instance.replica_mode #=> String, one of "open-read-only", "mounted"
resp.db_instance.license_model #=> String
resp.db_instance.iops #=> Integer
resp.db_instance.option_group_memberships #=> Array
resp.db_instance.option_group_memberships[0].option_group_name #=> String
resp.db_instance.option_group_memberships[0].status #=> String
resp.db_instance.character_set_name #=> String
resp.db_instance.nchar_character_set_name #=> String
resp.db_instance.secondary_availability_zone #=> String
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.storage_type #=> String
resp.db_instance.tde_credential_arn #=> String
resp.db_instance.db_instance_port #=> Integer
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.domain_memberships #=> Array
resp.db_instance.domain_memberships[0].domain #=> String
resp.db_instance.domain_memberships[0].status #=> String
resp.db_instance.domain_memberships[0].fqdn #=> String
resp.db_instance.domain_memberships[0].iam_role_name #=> String
resp.db_instance.copy_tags_to_snapshot #=> Boolean
resp.db_instance.monitoring_interval #=> Integer
resp.db_instance.enhanced_monitoring_resource_arn #=> String
resp.db_instance.monitoring_role_arn #=> String
resp.db_instance.promotion_tier #=> Integer
resp.db_instance.db_instance_arn #=> String
resp.db_instance.timezone #=> String
resp.db_instance.iam_database_authentication_enabled #=> Boolean
resp.db_instance.performance_insights_enabled #=> Boolean
resp.db_instance.performance_insights_kms_key_id #=> String
resp.db_instance.performance_insights_retention_period #=> Integer
resp.db_instance.enabled_cloudwatch_logs_exports #=> Array
resp.db_instance.enabled_cloudwatch_logs_exports[0] #=> String
resp.db_instance.processor_features #=> Array
resp.db_instance.processor_features[0].name #=> String
resp.db_instance.processor_features[0].value #=> String
resp.db_instance.deletion_protection #=> Boolean
resp.db_instance.associated_roles #=> Array
resp.db_instance.associated_roles[0].role_arn #=> String
resp.db_instance.associated_roles[0].feature_name #=> String
resp.db_instance.associated_roles[0].status #=> String
resp.db_instance.listener_endpoint.address #=> String
resp.db_instance.listener_endpoint.port #=> Integer
resp.db_instance.listener_endpoint.hosted_zone_id #=> String
resp.db_instance.max_allocated_storage #=> Integer
resp.db_instance.tag_list #=> Array
resp.db_instance.tag_list[0].key #=> String
resp.db_instance.tag_list[0].value #=> String
resp.db_instance.db_instance_automated_backups_replications #=> Array
resp.db_instance.db_instance_automated_backups_replications[0].db_instance_automated_backups_arn #=> String
resp.db_instance.customer_owned_ip_enabled #=> Boolean
resp.db_instance.aws_backup_recovery_point_arn #=> String
resp.db_instance.activity_stream_status #=> String, one of "stopped", "starting", "started", "stopping"
resp.db_instance.activity_stream_kms_key_id #=> String
resp.db_instance.activity_stream_kinesis_stream_name #=> String
resp.db_instance.activity_stream_mode #=> String, one of "sync", "async"
resp.db_instance.activity_stream_engine_native_audit_fields_included #=> Boolean
resp.db_instance.automation_mode #=> String, one of "full", "all-paused"
resp.db_instance.resume_full_automation_mode_time #=> Time
resp.db_instance.custom_iam_instance_profile #=> String
resp.db_instance.backup_target #=> String
resp.db_instance.network_type #=> String
resp.db_instance.activity_stream_policy_status #=> String, one of "locked", "unlocked", "locking-policy", "unlocking-policy"
resp.db_instance.storage_throughput #=> Integer
resp.db_instance.db_system_id #=> String
resp.db_instance.master_user_secret.secret_arn #=> String
resp.db_instance.master_user_secret.secret_status #=> String
resp.db_instance.master_user_secret.kms_key_id #=> String
resp.db_instance.certificate_details.ca_identifier #=> String
resp.db_instance.certificate_details.valid_till #=> Time
resp.db_instance.read_replica_source_db_cluster_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_instance_identifier (required, String)

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

    Constraints:

    • Must match the name of an existing DB instance.

    ^

  • :skip_final_snapshot (Boolean)

    A value that indicates whether to skip the creation of a final DB snapshot before deleting the instance. If you enable this parameter, RDS doesn't create a DB snapshot. If you don't enable this parameter, RDS creates a DB snapshot before the DB instance is deleted. By default, skip isn't enabled, and the DB snapshot is created.

    <note markdown=“1”> If you don't enable this parameter, you must specify the `FinalDBSnapshotIdentifier` parameter.

    </note>
    

    When a DB instance is in a failure state and has a status of `failed`, `incompatible-restore`, or `incompatible-network`, RDS can delete the instance only if you enable this parameter.

    If you delete a read replica or an RDS Custom instance, you must enable this setting.

    This setting is required for RDS Custom.

  • :final_db_snapshot_identifier (String)

    The `DBSnapshotIdentifier` of the new `DBSnapshot` created when the `SkipFinalSnapshot` parameter is disabled.

    <note markdown=“1”> If you enable this parameter and also enable SkipFinalShapshot, the command results in an error.

    </note>
    

    This setting doesn't apply to RDS Custom.

    Constraints:

    • Must be 1 to 255 letters or numbers.

    • First character must be a letter.

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

    • Can't be specified when deleting a read replica.

  • :delete_automated_backups (Boolean)

    A value that indicates whether to remove automated backups immediately after the DB instance is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB instance is deleted.

Returns:

See Also:


7821
7822
7823
7824
# File 'lib/aws-sdk-rds/client.rb', line 7821

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

#delete_db_instance_automated_backup(params = {}) ⇒ Types::DeleteDBInstanceAutomatedBackupResult