Class: Aws::RDS::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-rds/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.

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

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

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

  • :credentials (required, Aws::CredentialProvider)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

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

  • :client_side_monitoring (Boolean) — default: false

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

  • :client_side_monitoring_client_id (String) — default: ""

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

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

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

  • :client_side_monitoring_port (Integer) — default: 31000

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

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

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

  • :convert_params (Boolean) — default: true

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

  • :correct_clock_skew (Boolean) — default: true

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

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

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

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :disable_request_compression (Boolean) — default: false

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

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

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

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

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

  • :endpoint_cache_max_threads (Integer) — default: 10

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

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

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

  • :ignore_configured_endpoint_urls (Boolean)

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

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

    The log formatter.

  • :log_level (Symbol) — default: :info

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

  • :logger (Logger)

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

  • :max_attempts (Integer) — default: 3

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

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

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

  • :request_min_compression_size_bytes (Integer) — default: 10240

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

  • :retry_backoff (Proc)

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

  • :retry_base_delay (Float) — default: 0.3

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

  • :retry_jitter (Symbol) — default: :none

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

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

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

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

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

    Specifies which retry algorithm to use. Values are:

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

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

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

  • :sdk_ua_app_id (String)

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

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

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

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :stub_responses (Boolean) — default: false

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

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

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

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

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

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

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

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

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

  • :use_dualstack_endpoint (Boolean)

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

  • :use_fips_endpoint (Boolean)

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

  • :validate_params (Boolean) — default: true

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

  • :endpoint_provider (Aws::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_continue_timeout (Float) — default: 1

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

  • :http_idle_timeout (Float) — default: 5

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

  • :http_open_timeout (Float) — default: 15

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_read_timeout (Float) — default: 60

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

  • :http_wire_trace (Boolean) — default: false

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

  • :on_chunk_received (Proc)

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

  • :on_chunk_sent (Proc)

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

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

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

  • :ssl_ca_directory (String)

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

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

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

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

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



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

def initialize(*args)
  super
end

Instance Method Details

#add_role_to_db_cluster(params = {}) ⇒ Struct

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

Examples:

Example: To associate an AWS Identity and Access Management (IAM) role with a DB cluster


# The following example associates a role with a DB cluster.

resp = client.add_role_to_db_cluster({
  db_cluster_identifier: "mydbcluster", 
  role_arn: "arn:aws:iam::123456789012:role/RDSLoadFromS3", 
})

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:



492
493
494
495
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 492

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.

To add a role to a DB instance, the status of the DB instance must be available.

This command doesn't apply to RDS Custom.

Examples:

Example: To associate an AWS Identity and Access Management (IAM) role with a DB instance


# The following example adds the role to a DB instance named test-instance.

resp = client.add_role_to_db_instance({
  db_instance_identifier: "test-instance", 
  feature_name: "S3_INTEGRATION", 
  role_arn: "arn:aws:iam::111122223333:role/rds-s3-integration-role", 
})

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:



544
545
546
547
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 544

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 a subscription


# The following example adds another source identifier to an existing subscription.

resp = client.add_source_identifier_to_subscription({
  source_identifier: "test-instance-repl", 
  subscription_name: "my-instance-events", 
})

resp.to_h outputs the following:
{
  event_subscription: {
    cust_subscription_id: "my-instance-events", 
    customer_aws_id: "123456789012", 
    enabled: false, 
    event_categories_list: [
      "backup", 
      "recovery", 
    ], 
    event_subscription_arn: "arn:aws:rds:us-east-1:123456789012:es:my-instance-events", 
    sns_topic_arn: "arn:aws:sns:us-east-1:123456789012:interesting-events", 
    source_ids_list: [
      "test-instance", 
      "test-instance-repl", 
    ], 
    source_type: "db-instance", 
    status: "modifying", 
    subscription_creation_time: "Tue Jul 31 23:22:01 UTC 2018", 
  }, 
}

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:



644
645
646
647
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 644

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 your relational database resources, see Tagging Amazon RDS Resources or Tagging Amazon Aurora and Amazon RDS Resources.

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

  • :resource_name (required, String)

    The Amazon RDS resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN).

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

    The tags to be assigned to the Amazon RDS resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



708
709
710
711
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 708

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 pending maintenance actions


# The following example applies the pending maintenance actions for a DB cluster.

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

resp.to_h outputs the following:
{
  resource_pending_maintenance_actions: {
    pending_maintenance_action_details: [
      {
        action: "system-update", 
        current_apply_date: Time.parse("2021-01-23T01:07:36.100Z"), 
        description: "Upgrade to Aurora PostgreSQL 3.3.2", 
        opt_in_status: "immediate", 
      }, 
    ], 
    resource_identifier: "arn:aws:rds:us-east-1:123456789012:cluster:my-db-cluster", 
  }, 
}

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

  • :apply_action (required, String)

    The pending maintenance action to apply to this resource.

    Valid Values:

    • ca-certificate-rotation

    • db-upgrade

    • hardware-maintenance

    • os-upgrade

    • system-update

    For more information about these actions, see Maintenance actions for Amazon Aurora or Maintenance actions for Amazon RDS.

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



815
816
817
818
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 815

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.

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.

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:



928
929
930
931
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 928

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.

This action applies only to Aurora MySQL DB clusters.

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.

    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.

    Constraints:

    • Must contain a valid ISO 8601 timestamp.

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

    Example: 2017-07-08T18:00Z

  • :force (Boolean)

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

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



1027
1028
1029
1030
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 1027

def backtrack_db_cluster(params = {}, options = {})
  req = build_request(:backtrack_db_cluster, params)
  req.send_request(options)
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:

Example: To cancel a snapshot export to Amazon S3


# The following example cancels an export task in progress that is exporting a snapshot to Amazon S3.

resp = client.cancel_export_task({
  export_task_identifier: "my-s3-export-1", 
})

resp.to_h outputs the following:
{
  export_task_identifier: "my-s3-export-1", 
  iam_role_arn: "arn:aws:iam::123456789012:role/service-role/export-snap-S3-role", 
  kms_key_id: "arn:aws:kms:us-east-1:123456789012:key/abcd0000-7bfd-4594-af38-aabbccddeeff", 
  percent_progress: 0, 
  s3_bucket: "mybucket", 
  s3_prefix: "", 
  snapshot_time: Time.parse("2019-03-24T20:01:09.815Z"), 
  source_arn: "arn:aws:rds:us-east-1:123456789012:snapshot:publisher-final-snapshot", 
  status: "CANCELING", 
  total_extracted_data_in_gb: 0, 
}

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:



1111
1112
1113
1114
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 1111

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.

You can't copy a default DB cluster parameter group. Instead, create a new custom DB cluster parameter group, which copies the default parameters and values for the specified DB cluster parameter group family.

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: {
    db_cluster_parameter_group_arn: "arn:aws:rds:us-east-1:123456789012:cluster-pg:mydbclusterparametergroup-copy", 
    db_cluster_parameter_group_name: "mydbclusterparametergroup-copy", 
    db_parameter_group_family: "aurora-mysql5.7", 
    description: "My DB cluster parameter group copy", 
  }, 
}

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.

    ^

  • :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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

Returns:

See Also:



1221
1222
1223
1224
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 1221

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.

Examples:

Example: To copy a DB cluster snapshot


# The following example creates a copy of a DB cluster snapshot, including its tags.

resp = client.copy_db_cluster_snapshot({
  copy_tags: true, 
  source_db_cluster_snapshot_identifier: "arn:aws:rds:us-east-1:123456789012:cluster-snapshot:rds:myaurora-2019-06-04-09-16", 
  target_db_cluster_snapshot_identifier: "myclustersnapshotcopy", 
})

resp.to_h outputs the following:
{
  db_cluster_snapshot: {
    allocated_storage: 0, 
    availability_zones: [
      "us-east-1a", 
      "us-east-1b", 
      "us-east-1e", 
    ], 
    cluster_create_time: Time.parse("2019-04-15T14:18:42.785Z"), 
    db_cluster_identifier: "myaurora", 
    db_cluster_snapshot_arn: "arn:aws:rds:us-east-1:123456789012:cluster-snapshot:myclustersnapshotcopy", 
    db_cluster_snapshot_identifier: "myclustersnapshotcopy", 
    engine: "aurora-mysql", 
    engine_version: "5.7.mysql_aurora.2.04.2", 
    iam_database_authentication_enabled: false, 
    kms_key_id: "arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE", 
    license_model: "aurora-mysql", 
    master_username: "myadmin", 
    percent_progress: 100, 
    port: 0, 
    snapshot_create_time: Time.parse("2019-06-04T09:16:42.649Z"), 
    snapshot_type: "manual", 
    status: "available", 
    storage_encrypted: true, 
    vpc_id: "vpc-123example", 
  }, 
}

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
resp.db_cluster_snapshot.storage_type #=> String
resp.db_cluster_snapshot.db_cluster_resource_id #=> String
resp.db_cluster_snapshot.storage_throughput #=> Integer

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

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

    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.

  • :copy_tags (Boolean)

    Specifies 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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

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



1512
1513
1514
1515
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 1512

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.

You can't copy a default DB parameter group. Instead, create a new custom DB parameter group, which copies the default parameters and values for the specified DB parameter group family.

Examples:

Example: To copy a DB parameter group


# The following example makes a copy of a DB parameter group.

resp = client.copy_db_parameter_group({
  source_db_parameter_group_identifier: "mydbpg", 
  target_db_parameter_group_description: "Copy of mydbpg parameter group", 
  target_db_parameter_group_identifier: "mydbpgcopy", 
})

resp.to_h outputs the following:
{
  db_parameter_group: {
    db_parameter_group_arn: "arn:aws:rds:us-east-1:814387698303:pg:mydbpgcopy", 
    db_parameter_group_family: "mysql5.7", 
    db_parameter_group_name: "mydbpgcopy", 
    description: "Copy of mydbpg 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.

    ^

  • :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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

Returns:

See Also:



1620
1621
1622
1623
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 1620

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.

Examples:

Example: To copy a DB snapshot


# The following example creates a copy of a DB snapshot.

resp = client.copy_db_snapshot({
  source_db_snapshot_identifier: "rds:database-mysql-2019-06-06-08-38", 
  target_db_snapshot_identifier: "mydbsnapshotcopy", 
})

resp.to_h outputs the following:
{
  db_snapshot: {
    allocated_storage: 100, 
    availability_zone: "us-east-1f", 
    db_instance_identifier: "database-mysql", 
    db_snapshot_arn: "arn:aws:rds:us-east-1:123456789012:snapshot:mydbsnapshotcopy", 
    db_snapshot_identifier: "mydbsnapshotcopy", 
    dbi_resource_id: "db-ZI7UJ5BLKMBYFGX7FDENCKADC4", 
    encrypted: true, 
    engine: "mysql", 
    engine_version: "5.6.40", 
    iam_database_authentication_enabled: false, 
    instance_create_time: Time.parse("2019-04-30T15:45:53.663Z"), 
    iops: 1000, 
    kms_key_id: "arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE", 
    license_model: "general-public-license", 
    master_username: "admin", 
    option_group_name: "default:mysql-5-6", 
    percent_progress: 0, 
    port: 3306, 
    processor_features: [
    ], 
    snapshot_type: "manual", 
    source_db_snapshot_identifier: "arn:aws:rds:us-east-1:123456789012:snapshot:rds:database-mysql-2019-06-06-08-38", 
    source_region: "us-east-1", 
    status: "creating", 
    storage_type: "io1", 
    vpc_id: "vpc-6594f31c", 
  }, 
}

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
resp.db_snapshot.db_system_id #=> String
resp.db_snapshot.dedicated_log_volume #=> Boolean
resp.db_snapshot.multi_tenant #=> Boolean

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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

  • :copy_tags (Boolean)

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

    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.

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

  • :target_custom_availability_zone (String)

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

    Example: rds-caz-aiqhTgQv.

  • :copy_option_group (Boolean)

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



1939
1940
1941
1942
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 1939

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


# The following example makes a copy of an option group.

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

resp.to_h outputs the following:
{
  option_group: {
    allows_vpc_and_non_vpc_instance_memberships: true, 
    engine_name: "oracle-ee", 
    major_engine_version: "11.2", 
    option_group_arn: "arn:aws:rds:us-east-1:123456789012:og:new-option-group", 
    option_group_description: "My option group copy", 
    option_group_name: "new-option-group", 
    options: [
    ], 
  }, 
}

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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

Returns:

See Also:



2068
2069
2070
2071
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 2068

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, and it stays in sync with the current production environment.

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.

Examples:

Example: To create a blue/green deployment for an RDS for MySQL DB instance


# The following example creates a blue/green deployment for a MySQL DB instance.

resp = client.create_blue_green_deployment({
  blue_green_deployment_name: "bgd-test-instance", 
  source: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance", 
  target_db_parameter_group_name: "mysql-80-group", 
  target_engine_version: "8.0", 
})

resp.to_h outputs the following:
{
  blue_green_deployment: {
    blue_green_deployment_identifier: "bgd-v53303651eexfake", 
    blue_green_deployment_name: "bgd-cli-test-instance", 
    create_time: Time.parse("2022-02-25T21:18:51.183000+00:00"), 
    source: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance", 
    status: "PROVISIONING", 
    switchover_details: [
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance", 
      }, 
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance-replica-1", 
      }, 
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance-replica-2", 
      }, 
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:db:my-db-instance-replica-3", 
      }, 
    ], 
    tasks: [
      {
        name: "CREATING_READ_REPLICA_OF_SOURCE", 
        status: "PENDING", 
      }, 
      {
        name: "DB_ENGINE_VERSION_UPGRADE", 
        status: "PENDING", 
      }, 
      {
        name: "CONFIGURE_BACKUPS", 
        status: "PENDING", 
      }, 
      {
        name: "CREATING_TOPOLOGY_OF_SOURCE", 
        status: "PENDING", 
      }, 
    ], 
  }, 
}

Example: To create a blue/green deployment for an Aurora MySQL DB cluster


# The following example creates a blue/green deployment for an Aurora MySQL DB cluster.

resp = client.create_blue_green_deployment({
  blue_green_deployment_name: "my-blue-green-deployment", 
  source: "arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-mysql-cluster", 
  target_db_cluster_parameter_group_name: "mysql-80-cluster-group", 
  target_db_parameter_group_name: "ams-80-binlog-enabled", 
  target_engine_version: "8.0", 
})

resp.to_h outputs the following:
{
  blue_green_deployment: {
    blue_green_deployment_identifier: "bgd-wi89nwzglccsfake", 
    blue_green_deployment_name: "my-blue-green-deployment", 
    create_time: Time.parse("2022-02-25T21:12:00.288000+00:00"), 
    source: "arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-mysql-cluster", 
    status: "PROVISIONING", 
    switchover_details: [
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-mysql-cluster", 
        status: "PROVISIONING", 
      }, 
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:db:my-aurora-mysql-cluster-1", 
        status: "PROVISIONING", 
      }, 
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:db:my-aurora-mysql-cluster-2", 
        status: "PROVISIONING", 
      }, 
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:db:my-aurora-mysql-cluster-3", 
        status: "PROVISIONING", 
      }, 
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:cluster-endpoint:my-excluded-member-endpoint", 
        status: "PROVISIONING", 
      }, 
      {
        source_member: "arn:aws:rds:us-east-1:123456789012:cluster-endpoint:my-reader-endpoint", 
        status: "PROVISIONING", 
      }, 
    ], 
    tasks: [
      {
        name: "CREATING_READ_REPLICA_OF_SOURCE", 
        status: "PENDING", 
      }, 
      {
        name: "DB_ENGINE_VERSION_UPGRADE", 
        status: "PENDING", 
      }, 
      {
        name: "CREATE_DB_INSTANCES_FOR_CLUSTER", 
        status: "PENDING", 
      }, 
      {
        name: "CREATE_CUSTOM_ENDPOINTS", 
        status: "PENDING", 
      }, 
    ], 
  }, 
}

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",
    },
  ],
  target_db_instance_class: "TargetDBInstanceClass",
  upgrade_target_storage_config: false,
  target_iops: 1,
  target_storage_type: "TargetStorageType",
  target_allocated_storage: 1,
  target_storage_throughput: 1,
})

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.

  • :target_db_instance_class (String)

    Specify the DB instance class for the databases in the green environment.

    This parameter only applies to RDS DB instances, because DB instances within an Aurora DB cluster can have multiple different instance classes. If you're creating a blue/green deployment from an Aurora DB cluster, don't specify this parameter. After the green environment is created, you can individually modify the instance classes of the DB instances within the green DB cluster.

  • :upgrade_target_storage_config (Boolean)

    Whether to upgrade the storage file system configuration on the green database. This option migrates the green DB instance from the older 32-bit file system to the preferred configuration. For more information, see Upgrading the storage file system for a DB instance.

  • :target_iops (Integer)

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

    This setting doesn't apply to Amazon Aurora blue/green deployments.

  • :target_storage_type (String)

    The storage type to associate with the green DB instance.

    Valid Values: gp2 | gp3 | io1 | io2

    This setting doesn't apply to Amazon Aurora blue/green deployments.

  • :target_allocated_storage (Integer)

    The amount of storage in gibibytes (GiB) to allocate for the green DB instance. You can choose to increase or decrease the allocated storage on the green DB instance.

    This setting doesn't apply to Amazon Aurora blue/green deployments.

  • :target_storage_throughput (Integer)

    The storage throughput value for the green DB instance.

    This setting applies only to the gp3 storage type.

    This setting doesn't apply to Amazon Aurora blue/green deployments.

Returns:

See Also:



2368
2369
2370
2371
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 2368

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",
    },
  ],
  source_custom_db_engine_version_identifier: "String255",
  use_aws_provided_latest_image: false,
})

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.valid_upgrade_target[0].supports_limitless_database #=> Boolean
resp.valid_upgrade_target[0].supports_local_write_forwarding #=> Boolean
resp.valid_upgrade_target[0].supports_integrations #=> 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_limitless_database #=> Boolean
resp.supports_certificate_rotation_without_restart #=> Boolean
resp.supported_ca_certificate_identifiers #=> Array
resp.supported_ca_certificate_identifiers[0] #=> String
resp.supports_local_write_forwarding #=> Boolean
resp.supports_integrations #=> Boolean
resp.serverless_v2_features_support.min_capacity #=> Float
resp.serverless_v2_features_support.max_capacity #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :engine (required, String)

    The database engine. RDS Custom for Oracle supports the following values:

    • custom-oracle-ee

    • custom-oracle-ee-cdb

    • custom-oracle-se2

    • custom-oracle-se2-cdb

  • :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 Amazon Machine Image (AMI). For RDS Custom for SQL Server, an AMI ID is required to create a CEV. For RDS Custom for Oracle, the default is the most recent AMI available, but you can specify an AMI ID that was used in a different Oracle CEV. Find the AMIs used by your CEVs by calling the DescribeDBEngineVersions operation.

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

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

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

    A list of tags.

    For more information, see Tagging Amazon RDS resources in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

  • :source_custom_db_engine_version_identifier (String)

    The ARN of a CEV to use as a source for creating a new CEV. You can specify a different Amazon Machine Imagine (AMI) by using either Source or UseAwsProvidedLatestImage. You can't specify a different JSON manifest when you specify SourceCustomDbEngineVersionIdentifier.

  • :use_aws_provided_latest_image (Boolean)

    Specifies whether to use the latest service-provided Amazon Machine Image (AMI) for the CEV. If you specify UseAwsProvidedLatestImage, you can't also specify ImageId.

Returns:

See Also:



2626
2627
2628
2629
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 2626

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.

Examples:

Example: To create a MySQL 5.7-compatible DB cluster


# The following example creates a MySQL 5.7-compatible Aurora DB cluster.

resp = client.create_db_cluster({
  db_cluster_identifier: "sample-cluster", 
  db_subnet_group_name: "default", 
  engine: "aurora-mysql", 
  engine_version: "5.7.12", 
  master_user_password: "mypassword", 
  master_username: "admin", 
  vpc_security_group_ids: [
    "sg-0b91305example", 
  ], 
})

resp.to_h outputs the following:
{
  db_cluster: {
    allocated_storage: 1, 
    associated_roles: [
    ], 
    availability_zones: [
      "us-east-1a", 
      "us-east-1b", 
      "us-east-1e", 
    ], 
    backup_retention_period: 1, 
    cluster_create_time: Time.parse("2019-06-07T23:21:33.048Z"), 
    copy_tags_to_snapshot: false, 
    db_cluster_arn: "arn:aws:rds:us-east-1:123456789012:cluster:sample-cluster", 
    db_cluster_identifier: "sample-cluster", 
    db_cluster_members: [
    ], 
    db_cluster_parameter_group: "default.aurora-mysql5.7", 
    db_subnet_group: "default", 
    db_cluster_resource_id: "cluster-ANPAJ4AE5446DAEXAMPLE", 
    deletion_protection: false, 
    endpoint: "sample-cluster.cluster-cnpexample.us-east-1.rds.amazonaws.com", 
    engine: "aurora-mysql", 
    engine_mode: "provisioned", 
    engine_version: "5.7.12", 
    hosted_zone_id: "Z2R2ITUGPM61AM", 
    http_endpoint_enabled: false, 
    iam_database_authentication_enabled: false, 
    master_username: "master", 
    multi_az: false, 
    port: 3306, 
    preferred_backup_window: "09:12-09:42", 
    preferred_maintenance_window: "mon:04:31-mon:05:01", 
    read_replica_identifiers: [
    ], 
    reader_endpoint: "sample-cluster.cluster-ro-cnpexample.us-east-1.rds.amazonaws.com", 
    status: "creating", 
    storage_encrypted: false, 
    vpc_security_groups: [
      {
        status: "active", 
        vpc_security_group_id: "sg-0b91305example", 
      }, 
    ], 
  }, 
}

Example: To create a PostgreSQL-compatible DB cluster


# The following example creates a PostgreSQL-compatible Aurora DB cluster.

resp = client.create_db_cluster({
  db_cluster_identifier: "sample-pg-cluster", 
  db_subnet_group_name: "default", 
  engine: "aurora-postgresql", 
  master_user_password: "mypassword", 
  master_username: "admin", 
  vpc_security_group_ids: [
    "sg-0b91305example", 
  ], 
})

resp.to_h outputs the following:
{
  db_cluster: {
    allocated_storage: 1, 
    associated_roles: [
    ], 
    availability_zones: [
      "us-east-1a", 
      "us-east-1b", 
      "us-east-1c", 
    ], 
    backup_retention_period: 1, 
    cluster_create_time: Time.parse("2019-06-07T23:26:08.371Z"), 
    copy_tags_to_snapshot: false, 
    db_cluster_arn: "arn:aws:rds:us-east-1:123456789012:cluster:sample-pg-cluster", 
    db_cluster_identifier: "sample-pg-cluster", 
    db_cluster_members: [
    ], 
    db_cluster_parameter_group: "default.aurora-postgresql9.6", 
    db_subnet_group: "default", 
    db_cluster_resource_id: "cluster-ANPAJ4AE5446DAEXAMPLE", 
    deletion_protection: false, 
    endpoint: "sample-pg-cluster.cluster-cnpexample.us-east-1.rds.amazonaws.com", 
    engine: "aurora-postgresql", 
    engine_mode: "provisioned", 
    engine_version: "9.6.9", 
    hosted_zone_id: "Z2R2ITUGPM61AM", 
    http_endpoint_enabled: false, 
    iam_database_authentication_enabled: false, 
    master_username: "master", 
    multi_az: false, 
    port: 5432, 
    preferred_backup_window: "09:56-10:26", 
    preferred_maintenance_window: "wed:03:33-wed:04:03", 
    read_replica_identifiers: [
    ], 
    reader_endpoint: "sample-pg-cluster.cluster-ro-cnpexample.us-east-1.rds.amazonaws.com", 
    status: "creating", 
    storage_encrypted: false, 
    vpc_security_groups: [
      {
        status: "active", 
        vpc_security_group_id: "sg-0b91305example", 
      }, 
    ], 
  }, 
}

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,
  },
  rds_custom_cluster_configuration: {
    interconnect_subnet_id: "String",
    transit_gateway_multicast_domain_id: "String",
    replica_mode: "open-read-only", # accepts open-read-only, mounted
  },
  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",
  database_insights_mode: "standard", # accepts standard, advanced
  enable_performance_insights: false,
  performance_insights_kms_key_id: "String",
  performance_insights_retention_period: 1,
  enable_limitless_database: false,
  serverless_v2_scaling_configuration: {
    min_capacity: 1.0,
    max_capacity: 1.0,
    seconds_until_auto_pause: 1,
  },
  network_type: "String",
  cluster_scalability_type: "standard", # accepts standard, limitless
  db_system_id: "String",
  manage_master_user_password: false,
  master_user_secret_kms_key_id: "String",
  enable_local_write_forwarding: false,
  ca_certificate_identifier: "String",
  engine_lifecycle_support: "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.status_infos #=> Array
resp.db_cluster.status_infos[0].status_type #=> String
resp.db_cluster.status_infos[0].normal #=> Boolean
resp.db_cluster.status_infos[0].status #=> String
resp.db_cluster.status_infos[0].message #=> 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.rds_custom_cluster_configuration.interconnect_subnet_id #=> String
resp.db_cluster.rds_custom_cluster_configuration.transit_gateway_multicast_domain_id #=> String
resp.db_cluster.rds_custom_cluster_configuration.replica_mode #=> String, one of "open-read-only", "mounted"
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.domain_memberships[0].ou #=> String
resp.db_cluster.domain_memberships[0].auth_secret_arn #=> String
resp.db_cluster.domain_memberships[0].dns_ips #=> Array
resp.db_cluster.domain_memberships[0].dns_ips[0] #=> 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.rds_custom_cluster_configuration.interconnect_subnet_id #=> String
resp.db_cluster.pending_modified_values.rds_custom_cluster_configuration.transit_gateway_multicast_domain_id #=> String
resp.db_cluster.pending_modified_values.rds_custom_cluster_configuration.replica_mode #=> String, one of "open-read-only", "mounted"
resp.db_cluster.pending_modified_values.iops #=> Integer
resp.db_cluster.pending_modified_values.storage_type #=> String
resp.db_cluster.pending_modified_values.certificate_details.ca_identifier #=> String
resp.db_cluster.pending_modified_values.certificate_details.valid_till #=> Time
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.database_insights_mode #=> String, one of "standard", "advanced"
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.serverless_v2_scaling_configuration.seconds_until_auto_pause #=> Integer
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
resp.db_cluster.io_optimized_next_allowed_modification_time #=> Time
resp.db_cluster.local_write_forwarding_status #=> String, one of "enabled", "disabled", "enabling", "disabling", "requested"
resp.db_cluster.aws_backup_recovery_point_arn #=> String
resp.db_cluster.limitless_database.status #=> String, one of "active", "not-in-use", "enabled", "disabled", "enabling", "disabling", "modifying-max-capacity", "error"
resp.db_cluster.limitless_database.min_required_acu #=> Float
resp.db_cluster.storage_throughput #=> Integer
resp.db_cluster.cluster_scalability_type #=> String, one of "standard", "limitless"
resp.db_cluster.certificate_details.ca_identifier #=> String
resp.db_cluster.certificate_details.valid_till #=> Time
resp.db_cluster.engine_lifecycle_support #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :availability_zones (Array<String>)

    A list of Availability Zones (AZs) where you specifically want to create DB instances in the DB cluster.

    For information on AZs, see Availability Zones in the Amazon Aurora User Guide.

    Valid for Cluster Type: Aurora DB clusters only

    Constraints:

    • Can't specify more than three AZs.

    ^

  • :backup_retention_period (Integer)

    The number of days for which automated backups are retained.

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

    Default: 1

    Constraints:

    • Must be a value from 1 to 35.

    ^

  • :character_set_name (String)

    The name of the character set (CharacterSet) to associate the DB cluster with.

    Valid for Cluster Type: Aurora DB clusters only

  • :database_name (String)

    The name for your database of up to 64 alphanumeric characters. A database named postgres is always created. If this parameter is specified, an additional database with this name is created.

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

  • :db_cluster_identifier (required, String)

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

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

    Constraints:

    • Must contain from 1 to 63 (for Aurora DB clusters) or 1 to 52 (for Multi-AZ DB clusters) letters, numbers, or hyphens.

    • First character must be a letter.

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

    Example: my-cluster1

  • :db_cluster_parameter_group_name (String)

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

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

    Constraints:

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

    ^

  • :vpc_security_group_ids (Array<String>)

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

    Valid for Cluster Type: 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.

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

    Constraints:

    • Must match the name of an existing DB subnet group.

    ^

    Example: mydbsubnetgroup

  • :engine (required, String)

    The database engine to use for this DB cluster.

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

    Valid Values:

    • aurora-mysql

    • aurora-postgresql

    • mysql

    • postgres

    • neptune - For information about using Amazon Neptune, see the Amazon Neptune User Guide .

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

    For information about a specific engine, see the following topics:

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

  • :port (Integer)

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

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

    Valid Values: 1150-65535

    Default:

    • RDS for MySQL and Aurora MySQL - 3306

    • RDS for PostgreSQL and Aurora PostgreSQL - 5432

  • :master_username (String)

    The name of the master user for the DB cluster.

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

    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.

  • :master_user_password (String)

    The password for the master database user.

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

    Constraints:

    • Must contain from 8 to 41 characters.

    • Can contain any printable ASCII character except "/", """, or "@".

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

  • :option_group_name (String)

    The option group to associate the DB cluster with.

    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.

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

    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.

  • :preferred_maintenance_window (String)

    The weekly time range during which system maintenance can occur.

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

    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.

    Constraints:

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

    • Days must be one of Mon | Tue | Wed | Thu | Fri | Sat | Sun.

    • Must be in Universal Coordinated Time (UTC).

    • Must be at least 30 minutes.

  • :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 Cluster Type: Aurora DB clusters and Multi-AZ DB clusters

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

    Tags to assign to the DB cluster.

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

  • :storage_encrypted (Boolean)

    Specifies whether the DB cluster is encrypted.

    Valid for Cluster Type: 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 uses the KMS key used to encrypt the source. Otherwise, Amazon RDS uses your default KMS key.

    • If the StorageEncrypted parameter is enabled and ReplicationSourceIdentifier isn't specified, 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.

    If you create a read replica of an encrypted DB cluster in another Amazon Web Services Region, make sure to 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 Cluster Type: 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.

    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.

    Valid for Cluster Type: Aurora DB clusters only

  • :enable_iam_database_authentication (Boolean)

    Specifies 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 or IAM database authentication for MariaDB, MySQL, and PostgreSQL in the Amazon RDS User Guide.

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

  • :backtrack_window (Integer)

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

    Valid for Cluster Type: Aurora MySQL DB clusters only

    Default: 0

    Constraints:

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

    ^

  • :enable_cloudwatch_logs_exports (Array<String>)

    The list of log types that need to be enabled for exporting to CloudWatch Logs.

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

    The following values are valid for each DB engine:

    • Aurora MySQL - audit | error | general | slowquery

    • Aurora PostgreSQL - postgresql

    • RDS for MySQL - error | general | slowquery

    • RDS for PostgreSQL - postgresql | upgrade

    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.

  • :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. Aurora Serverless v2 DB clusters use the provisioned engine mode.

    For information about limitations and requirements for Serverless DB clusters, see the following sections in the Amazon Aurora User Guide:

    Valid for Cluster Type: Aurora DB clusters only

  • :scaling_configuration (Types::ScalingConfiguration)

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

    Valid for Cluster Type: Aurora DB clusters only

  • :rds_custom_cluster_configuration (Types::RdsCustomClusterConfiguration)

    Reserved for future use.

  • :deletion_protection (Boolean)

    Specifies 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 Cluster Type: 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 Cluster Type: Aurora DB clusters only

  • :enable_http_endpoint (Boolean)

    Specifies whether to enable the HTTP endpoint for the DB cluster. By default, the HTTP endpoint isn't enabled.

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

    RDS Data API is supported with the following DB clusters:

    • Aurora PostgreSQL Serverless v2 and provisioned

    • Aurora PostgreSQL and Aurora MySQL Serverless v1

    For more information, see Using RDS Data API in the Amazon Aurora User Guide.

    Valid for Cluster Type: Aurora DB clusters only

  • :copy_tags_to_snapshot (Boolean)

    Specifies whether to copy all tags from the DB cluster to snapshots of the DB cluster. The default is not to copy them.

    Valid for Cluster Type: 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 Cluster Type: Aurora DB clusters only

  • :domain_iam_role_name (String)

    The name of the IAM role to use when making API calls to the Directory Service.

    Valid for Cluster Type: Aurora DB clusters only

  • :enable_global_write_forwarding (Boolean)

    Specifies whether to enable this DB cluster to forward write operations to the primary cluster of a global cluster (Aurora global database). 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 a global cluster API operation, but it does nothing until then.

    Valid for Cluster Type: 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 Cluster Type: Multi-AZ DB clusters only

  • :allocated_storage (Integer)

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

    Valid for Cluster Type: Multi-AZ DB clusters only

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

  • :storage_type (String)

    The storage type to associate with the DB cluster.

    For information on storage types for Aurora DB clusters, see Storage configurations for Amazon Aurora DB clusters. For information on storage types for Multi-AZ DB clusters, see Settings for creating Multi-AZ DB clusters.

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

    When specified for a Multi-AZ DB cluster, a value for the Iops parameter is required.

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

    Valid Values:

    • Aurora DB clusters - aurora | aurora-iopt1

    • Multi-AZ DB clusters - io1 | io2 | gp3

    Default:

    • Aurora DB clusters - aurora

    • Multi-AZ DB clusters - io1

    When you create an Aurora DB cluster with the storage type set to aurora-iopt1, the storage type is returned in the response. The storage type isn't returned when you set it to aurora.

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

    Valid for Cluster Type: Multi-AZ DB clusters only

    Constraints:

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

    ^

  • :publicly_accessible (Boolean)

    Specifies whether the DB cluster is publicly accessible.

    When the DB cluster is publicly accessible and you connect from outside of the DB cluster's virtual private cloud (VPC), its Domain Name System (DNS) endpoint resolves to the public IP address. When you connect from within the same VPC as the DB cluster, the endpoint resolves to the private IP address. 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.

    Valid for Cluster Type: Multi-AZ DB clusters only

    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.

  • :auto_minor_version_upgrade (Boolean)

    Specifies 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 Cluster Type: 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.

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

    Valid for Cluster Type: Multi-AZ DB clusters only

    Valid Values: 0 | 1 | 5 | 10 | 15 | 30 | 60

    Default: 0

  • :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 Cluster Type: Multi-AZ DB clusters only

  • :database_insights_mode (String)

    Specifies the mode of Database Insights to enable for the cluster.

  • :enable_performance_insights (Boolean)

    Specifies 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 Cluster Type: Multi-AZ DB clusters only

  • :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 Cluster Type: Multi-AZ DB clusters only

  • :performance_insights_retention_period (Integer)

    The number of days to retain Performance Insights data.

    Valid for Cluster Type: Multi-AZ DB clusters only

    Valid Values:

    • 7

    • month * 31, where month is a number of months from 1-23. Examples: 93 (3 months * 31), 341 (11 months * 31), 589 (19 months * 31)

    • 731

    Default: 7 days

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

  • :enable_limitless_database (Boolean)

    Specifies whether to enable Aurora Limitless Database. You must enable Aurora Limitless Database to create a DB shard group.

    Valid for: Aurora DB clusters only

    This setting is no longer used. Instead use the ClusterScalabilityType setting.

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

  • :network_type (String)

    The network type of the DB cluster.

    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 Cluster Type: Aurora DB clusters only

    Valid Values: IPV4 | DUAL

  • :cluster_scalability_type (String)

    Specifies the scalability mode of the Aurora DB cluster. When set to limitless, the cluster operates as an Aurora Limitless Database. When set to standard (the default), the cluster uses normal DB instance creation.

    Valid for: Aurora DB clusters only

    You can't modify this setting after you create the DB cluster.

  • :db_system_id (String)

    Reserved for future use.

  • :manage_master_user_password (Boolean)

    Specifies 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 in the Amazon Aurora User Guide.

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

    Constraints:

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

    ^

  • :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 Cluster Type: Aurora DB clusters and Multi-AZ DB clusters

  • :enable_local_write_forwarding (Boolean)

    Specifies whether read replicas can forward write operations to the writer DB instance in the DB cluster. By default, write operations aren't allowed on reader DB instances.

    Valid for: Aurora DB clusters only

  • :ca_certificate_identifier (String)

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

    For more information, see Using SSL/TLS to encrypt a connection to a DB instance in the Amazon RDS User Guide.

    Valid for Cluster Type: Multi-AZ DB clusters

  • :engine_lifecycle_support (String)

    The life cycle type for this DB cluster.

    By default, this value is set to open-source-rds-extended-support, which enrolls your DB cluster into Amazon RDS Extended Support. At the end of standard support, you can avoid charges for Extended Support by setting the value to open-source-rds-extended-support-disabled. In this case, creating the DB cluster will fail if the DB major version is past its end of standard support date.

    You can use this setting to enroll your DB cluster into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your DB cluster past the end of standard support for that engine version. For more information, see the following sections:

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

    Valid Values: open-source-rds-extended-support | open-source-rds-extended-support-disabled

    Default: open-source-rds-extended-support

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



3932
3933
3934
3935
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 3932

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.

This action applies only to Aurora DB clusters.

Examples:

Example: To create a custom DB cluster endpoint


# The following example creates a custom DB cluster endpoint and associate it with the specified Aurora DB cluster.

resp = client.create_db_cluster_endpoint({
  db_cluster_endpoint_identifier: "mycustomendpoint", 
  db_cluster_identifier: "mydbcluster", 
  endpoint_type: "reader", 
  static_members: [
    "dbinstance1", 
    "dbinstance2", 
  ], 
})

resp.to_h outputs the following:
{
  custom_endpoint_type: "READER", 
  db_cluster_endpoint_arn: "arn:aws:rds:us-east-1:123456789012:cluster-endpoint:mycustomendpoint", 
  db_cluster_endpoint_identifier: "mycustomendpoint", 
  db_cluster_endpoint_resource_identifier: "cluster-endpoint-ANPAJ4AE5446DAEXAMPLE", 
  db_cluster_identifier: "mydbcluster", 
  endpoint: "mycustomendpoint.cluster-custom-cnpexample.us-east-1.rds.amazonaws.com", 
  endpoint_type: "CUSTOM", 
  excluded_members: [
  ], 
  static_members: [
    "dbinstance1", 
    "dbinstance2", 
  ], 
  status: "creating", 
}

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:



4049
4050
4051
4052
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 4049

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.

Examples:

Example: To create a DB cluster parameter group


# The following 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 new cluster parameter group", 
})

resp.to_h outputs the following:
{
  db_cluster_parameter_group: {
    db_cluster_parameter_group_arn: "arn:aws:rds:us-east-1:123456789012:cluster-pg:mydbclusterparametergroup", 
    db_cluster_parameter_group_name: "mydbclusterparametergroup", 
    db_parameter_group_family: "aurora5.6", 
    description: "My new 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.

    ^

    This value is stored as a lowercase string.

  • :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: aurora-mysql5.7, aurora-mysql8.0

    Aurora PostgreSQL

    Example: aurora-postgresql14

    RDS for MySQL

    Example: mysql8.0

    RDS for PostgreSQL

    Example: postgres13

    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

    The output contains duplicates.

    The following are the valid DB engine values:

    • aurora-mysql

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



4220
4221
4222
4223
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 4220

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.

Examples:

Example: To create a DB cluster snapshot


# The following example creates a DB cluster snapshot.

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

resp.to_h outputs the following:
{
  db_cluster_snapshot: {
    allocated_storage: 1, 
    availability_zones: [
      "us-east-1a", 
      "us-east-1b", 
      "us-east-1e", 
    ], 
    cluster_create_time: Time.parse("2019-04-15T14:18:42.785Z"), 
    db_cluster_identifier: "mydbcluster", 
    db_cluster_snapshot_arn: "arn:aws:rds:us-east-1:123456789012:cluster-snapshot:mydbclustersnapshot", 
    db_cluster_snapshot_identifier: "mydbclustersnapshot", 
    engine: "aurora-mysql", 
    engine_version: "5.7.mysql_aurora.2.04.2", 
    iam_database_authentication_enabled: false, 
    kms_key_id: "arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE", 
    license_model: "aurora-mysql", 
    master_username: "myadmin", 
    percent_progress: 0, 
    port: 0, 
    snapshot_create_time: Time.parse("2019-06-18T21:21:00.469Z"), 
    snapshot_type: "manual", 
    status: "creating", 
    storage_encrypted: true, 
    vpc_id: "vpc-6594f31c", 
  }, 
}

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
resp.db_cluster_snapshot.storage_type #=> String
resp.db_cluster_snapshot.db_cluster_resource_id #=> String
resp.db_cluster_snapshot.storage_throughput #=> Integer

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:



4359
4360
4361
4362
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 4359

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.

Examples:

Example: To create a DB instance


# The following example uses the required options to launch a new DB instance.

resp = client.create_db_instance({
  allocated_storage: 20, 
  db_instance_class: "db.t3.micro", 
  db_instance_identifier: "test-mysql-instance", 
  engine: "mysql", 
  master_user_password: "secret99", 
  master_username: "admin", 
})

resp.to_h outputs the following:
{
  db_instance: {
    allocated_storage: 20, 
    associated_roles: [
    ], 
    auto_minor_version_upgrade: true, 
    backup_retention_period: 1, 
    ca_certificate_identifier: "rds-ca-2019", 
    copy_tags_to_snapshot: false, 
    db_instance_arn: "arn:aws:rds:us-west-2:123456789012:db:test-mysql-instance", 
    db_instance_class: "db.t3.micro", 
    db_instance_identifier: "test-mysql-instance", 
    db_instance_status: "creating", 
    db_parameter_groups: [
      {
        db_parameter_group_name: "default.mysql5.7", 
        parameter_apply_status: "in-sync", 
      }, 
    ], 
    db_security_groups: [
    ], 
    db_subnet_group: {
      db_subnet_group_description: "default", 
      db_subnet_group_name: "default", 
      subnet_group_status: "Complete", 
      subnets: [
        {
          subnet_availability_zone: {
            name: "us-west-2c", 
          }, 
          subnet_identifier: "subnet-########", 
          subnet_status: "Active", 
        }, 
        {
          subnet_availability_zone: {
            name: "us-west-2d", 
          }, 
          subnet_identifier: "subnet-########", 
          subnet_status: "Active", 
        }, 
        {
          subnet_availability_zone: {
            name: "us-west-2a", 
          }, 
          subnet_identifier: "subnet-########", 
          subnet_status: "Active", 
        }, 
        {
          subnet_availability_zone: {
            name: "us-west-2b", 
          }, 
          subnet_identifier: "subnet-########", 
          subnet_status: "Active", 
        }, 
      ], 
      vpc_id: "vpc-2ff2ff2f", 
    }, 
    db_instance_port: 0, 
    dbi_resource_id: "db-5555EXAMPLE44444444EXAMPLE", 
    deletion_protection: false, 
    domain_memberships: [
    ], 
    engine: "mysql", 
    engine_version: "5.7.22", 
    iam_database_authentication_enabled: false, 
    license_model: "general-public-license", 
    master_username: "admin", 
    monitoring_interval: 0, 
    multi_az: false, 
    option_group_memberships: [
      {
        option_group_name: "default:mysql-5-7", 
        status: "in-sync", 
      }, 
    ], 
    pending_modified_values: {
      master_user_password: "****", 
    }, 
    performance_insights_enabled: false, 
    preferred_backup_window: "12:55-13:25", 
    preferred_maintenance_window: "sun:08:07-sun:08:37", 
    publicly_accessible: true, 
    read_replica_db_instance_identifiers: [
    ], 
    storage_encrypted: false, 
    storage_type: "gp2", 
    vpc_security_groups: [
      {
        status: "active", 
        vpc_security_group_id: "sg-12345abc", 
      }, 
    ], 
  }, 
}

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",
  domain_fqdn: "String",
  domain_ou: "String",
  domain_auth_secret_arn: "String",
  domain_dns_ips: ["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,
  database_insights_mode: "standard", # accepts standard, advanced
  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",
  db_system_id: "String",
  dedicated_log_volume: false,
  multi_tenant: false,
  engine_lifecycle_support: "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.pending_modified_values.engine #=> String
resp.db_instance.pending_modified_values.dedicated_log_volume #=> Boolean
resp.db_instance.pending_modified_values.multi_tenant #=> Boolean
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.domain_memberships[0].ou #=> String
resp.db_instance.domain_memberships[0].auth_secret_arn #=> String
resp.db_instance.domain_memberships[0].dns_ips #=> Array
resp.db_instance.domain_memberships[0].dns_ips[0] #=> 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.database_insights_mode #=> String, one of "standard", "advanced"
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
resp.db_instance.percent_progress #=> String
resp.db_instance.dedicated_log_volume #=> Boolean
resp.db_instance.is_storage_config_upgrade_available #=> Boolean
resp.db_instance.multi_tenant #=> Boolean
resp.db_instance.engine_lifecycle_support #=> 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.

    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:

    • Must contain 1 to 64 alphanumeric characters.

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

    • 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. A database named postgres is always created. If this parameter is specified, an additional database with this name is created.

    Constraints:

    • It must contain 1 to 63 alphanumeric characters.

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

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

    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 for non-CDBs and RDSCDB for CDBs.

    Default: ORCL

    Constraints:

    • Must contain 1 to 8 alphanumeric characters.

    • Must contain a letter.

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

    Amazon RDS Custom for SQL Server

    Not applicable. Must be null.

    RDS for Db2

    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. In some cases, we recommend that you don't add a database name. For more information, see Additional considerations in the Amazon RDS User Guide.

    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.

    RDS for 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.

    RDS for 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.

    RDS for Oracle

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

    Default: ORCL

    Constraints:

    • Can't be longer than 8 characters.

    ^

    RDS for PostgreSQL

    The name of the database to create when the DB instance is created. A database named postgres is always created. If this parameter is specified, an additional database with this name is created.

    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.

    RDS for SQL Server

    Not applicable. Must be null.

  • :db_instance_identifier (required, String)

    The identifier for this DB instance. 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.

    This setting doesn't apply to Amazon Aurora DB instances. 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, io2): Must be an integer from 40 to 65536 for RDS Custom for Oracle, 16384 for RDS Custom for SQL Server.

    RDS for Db2

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

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

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

    RDS for 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, io2): Must be an integer from 100 to 65536.

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

    RDS for 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, io2): Must be an integer from 100 to 65536.

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

    RDS for 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, io2): Must be an integer from 100 to 65536.

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

    RDS for 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, io2): Must be an integer from 100 to 65536.

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

    RDS for 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

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

    • Provisioned IOPS storage (io1, io2):

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

      • 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

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

  • :engine (required, String)

    The database engine to use for this DB instance.

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

    Valid Values:

    • aurora-mysql (for Aurora MySQL DB instances)

    • aurora-postgresql (for Aurora PostgreSQL DB instances)

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

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

    • custom-oracle-se2 (for RDS Custom for Oracle DB instances)

    • custom-oracle-se2-cdb (for RDS Custom for Oracle DB instances)

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

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

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

    • custom-sqlserver-dev (for RDS Custom for SQL Server DB instances)

    • db2-ae

    • db2-se

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

    This setting doesn't apply to Amazon Aurora DB instances. The name for the master user is managed by the DB cluster.

    This setting is required for RDS DB instances.

    Constraints:

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

    This setting doesn't apply to Amazon Aurora DB instances. The password for the master user is managed by the DB cluster.

    Constraints:

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

    • Can include any printable ASCII character except "/", """, or "@". For RDS for Oracle, can't include the "&" (ampersand) or the "'" (single quotes) character.

    Length Constraints:

    • RDS for Db2 - Must contain from 8 to 255 characters.

    • RDS for MariaDB - Must contain from 8 to 41 characters.

    • RDS for Microsoft SQL Server - Must contain from 8 to 128 characters.

    • RDS for MySQL - Must contain from 8 to 41 characters.

    • RDS for Oracle - Must contain from 8 to 30 characters.

    • RDS for PostgreSQL - 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.

    This setting doesn't apply to Amazon Aurora DB instances. 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.

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

    Constraints:

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

    Example: us-east-1d

  • :db_subnet_group_name (String)

    A DB subnet group to associate with this DB instance.

    Constraints:

    • Must match the name of an existing DB subnet group.

    ^

    Example: mydbsubnetgroup

  • :preferred_maintenance_window (String)

    The time range each week during which system maintenance can occur. For more information, see Amazon RDS Maintenance Window in the Amazon RDS User Guide.

    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.

    Constraints:

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

    • The day values must be mon | tue | wed | thu | fri | sat | sun.

    • Must be in Universal Coordinated Time (UTC).

    • Must not conflict with the preferred backup window.

    • Must be at least 30 minutes.

  • :db_parameter_group_name (String)

    The name of the DB parameter group to associate with this DB instance. If you don't specify a value, then Amazon RDS uses the default DB parameter group for the specified DB engine and version.

    This setting doesn't apply to RDS Custom DB instances.

    Constraints:

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

    • The first character must be a letter.

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

    This setting doesn't apply to Amazon Aurora DB instances. 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.

    This setting doesn't apply to Amazon Aurora DB instances. 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.

  • :port (Integer)

    The port number on which the database accepts connections.

    This setting doesn't apply to Aurora DB instances. The port number is managed by the cluster.

    Valid Values: 1150-65535

    Default:

    • RDS for Db2 - 50000

    • RDS for MariaDB - 3306

    • RDS for Microsoft SQL Server - 1433

    • RDS for MySQL - 3306

    • RDS for Oracle - 1521

    • RDS for PostgreSQL - 5432

    Constraints:

    • For RDS for Microsoft SQL Server, the value can't be 1234, 1434, 3260, 3343, 3389, 47001, or 49152-49156.

    ^

  • :multi_az (Boolean)

    Specifies 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 the following DB instances:

    • Amazon Aurora (DB instance Availability Zones (AZs) are managed by the DB cluster.)

    • RDS Custom

  • :engine_version (String)

    The version number of the database engine to use.

    This setting doesn't apply to Amazon Aurora DB instances. The version number of the database engine the DB instance uses is managed by the DB cluster.

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

    RDS for Db2

    For information, see Db2 on Amazon RDS versions in the Amazon RDS User Guide.

    RDS for MariaDB

    For information, see MariaDB on Amazon RDS versions in the Amazon RDS User Guide.

    RDS for Microsoft SQL Server

    For information, see Microsoft SQL Server versions on Amazon RDS in the Amazon RDS User Guide.

    RDS for MySQL

    For information, see MySQL on Amazon RDS versions in the Amazon RDS User Guide.

    RDS for Oracle

    For information, see Oracle Database Engine release notes in the Amazon RDS User Guide.

    RDS for PostgreSQL

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

  • :auto_minor_version_upgrade (Boolean)

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

    The license model information for this DB instance.

    License models for RDS for Db2 require additional configuration. The Bring Your Own License (BYOL) model requires a custom parameter group and an Amazon Web Services License Manager self-managed license. The Db2 license through Amazon Web Services Marketplace model requires an Amazon Web Services Marketplace subscription. For more information, see Amazon RDS for Db2 licensing options in the Amazon RDS User Guide.

    The default for RDS for Db2 is bring-your-own-license.

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

    Valid Values:

    • RDS for Db2 - bring-your-own-license | marketplace-license

    • RDS for MariaDB - general-public-license

    • RDS for Microsoft SQL Server - license-included

    • RDS for MySQL - general-public-license

    • RDS for Oracle - bring-your-own-license | license-included

    • RDS for PostgreSQL - postgresql-license

  • :iops (Integer)

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

    This setting doesn't apply to Amazon Aurora DB instances. Storage is managed by the DB cluster.

    Constraints:

    • For RDS for Db2, MariaDB, MySQL, Oracle, and PostgreSQL - Must be a multiple between .5 and 50 of the storage amount for the DB instance.

    • For RDS for SQL Server - Must be a multiple between 1 and 50 of the storage amount for the DB instance.

  • :option_group_name (String)

    The option group to associate the DB instance with.

    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 Amazon Aurora or RDS Custom DB instances.

  • :character_set_name (String)

    For supported engines, the character set (CharacterSet) to associate the DB instance with.

    This setting doesn't apply to the following DB instances:

    • Amazon Aurora - The character set is managed by the DB cluster. For more information, see CreateDBCluster.

    • RDS Custom - However, if you need to change the character set, you can change it on the database itself.

  • :nchar_character_set_name (String)

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

    This setting doesn't apply to RDS Custom DB instances.

  • :publicly_accessible (Boolean)

    Specifies whether the DB instance is publicly accessible.

    When the DB instance is publicly accessible and you connect from outside of the DB instance's virtual private cloud (VPC), its Domain Name System (DNS) endpoint resolves to the public IP address. When you connect from within the same VPC as the DB instance, the endpoint resolves to the private IP address. 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 this DB instance will belong to.

    This setting doesn't apply to RDS Custom DB instances.

  • :storage_type (String)

    The storage type to associate with the DB instance.

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

    This setting doesn't apply to Amazon Aurora DB instances. Storage is managed by the DB cluster.

    Valid Values: gp2 | gp3 | io1 | io2 | standard

    Default: io1, if the Iops parameter is specified. Otherwise, gp2.

  • :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 Amazon Aurora or RDS Custom DB instances.

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

  • :storage_encrypted (Boolean)

    Specifes whether the DB instance is encrypted. By default, it isn't encrypted.

    For RDS Custom DB instances, either enable this setting or leave it unset. Otherwise, Amazon RDS reports an error.

    This setting doesn't apply to Amazon Aurora DB instances. 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.

    This setting doesn't apply to Amazon Aurora DB instances. 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.

    For Amazon RDS Custom, a KMS key is required for DB 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, you can create only Db2, MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances in an Active Directory Domain.

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

    This setting doesn't apply to the following DB instances:

    • Amazon Aurora (The domain is managed by the DB cluster.)

    • RDS Custom

  • :domain_fqdn (String)

    The fully qualified domain name (FQDN) of an Active Directory domain.

    Constraints:

    • Can't be longer than 64 characters.

    ^

    Example: mymanagedADtest.mymanagedAD.mydomain

  • :domain_ou (String)

    The Active Directory organizational unit for your DB instance to join.

    Constraints:

    • Must be in the distinguished name format.

    • Can't be longer than 64 characters.

    Example: OU=mymanagedADtestOU,DC=mymanagedADtest,DC=mymanagedAD,DC=mydomain

  • :domain_auth_secret_arn (String)

    The ARN for the Secrets Manager secret with the credentials for the user joining the domain.

    Example: arn:aws:secretsmanager:region:account-number:secret:myselfmanagedADtestsecret-123456

  • :domain_dns_ips (Array<String>)

    The IPv4 DNS IP addresses of your primary and secondary Active Directory domain controllers.

    Constraints:

    • Two IP addresses must be provided. If there isn't a secondary domain controller, use the IP address of the primary domain controller for both entries in the list.

    ^

    Example: 123.124.125.126,234.235.236.237

  • :copy_tags_to_snapshot (Boolean)

    Specifies whether to copy tags from the DB instance to snapshots of the DB instance. By default, tags are not copied.

    This setting doesn't apply to Amazon Aurora DB instances. 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.

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

    This setting doesn't apply to RDS Custom DB instances.

    Valid Values: 0 | 1 | 5 | 10 | 15 | 30 | 60

    Default: 0

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

  • :domain_iam_role_name (String)

    The name of the IAM role to use when making API calls to the Directory Service.

    This setting doesn't apply to the following DB instances:

    • Amazon Aurora (The domain is managed by the DB cluster.)

    • RDS Custom

  • :promotion_tier (Integer)

    The order of priority 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 DB instances.

    Default: 1

    Valid Values: 0 - 15

  • :timezone (String)

    The time zone of the DB instance. The time zone parameter is currently supported only by RDS for Db2 and RDS for SQL Server.

  • :enable_iam_database_authentication (Boolean)

    Specifies 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 the following DB instances:

    • Amazon Aurora (Mapping Amazon Web Services IAM accounts to database accounts is managed by the DB cluster.)

    • RDS Custom

  • :database_insights_mode (String)

    Specifies the mode of Database Insights to enable for the instance.

  • :enable_performance_insights (Boolean)

    Specifies 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 DB instances.

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

    This setting doesn't apply to RDS Custom DB instances.

  • :performance_insights_retention_period (Integer)

    The number of days to retain Performance Insights data.

    This setting doesn't apply to RDS Custom DB instances.

    Valid Values:

    • 7

    • month * 31, where month is a number of months from 1-23. Examples: 93 (3 months * 31), 341 (11 months * 31), 589 (19 months * 31)

    • 731

    Default: 7 days

    If you specify a retention period that isn't valid, such as 94, Amazon RDS returns an error.

  • :enable_cloudwatch_logs_exports (Array<String>)

    The list of log types to enable for exporting to CloudWatch Logs. For more information, see Publishing Database Logs to Amazon CloudWatch Logs in the Amazon RDS User Guide.

    This setting doesn't apply to the following DB instances:

    • Amazon Aurora (CloudWatch Logs exports are managed by the DB cluster.)

    • RDS Custom

    The following values are valid for each DB engine:

    • RDS for Db2 - diag.log | notify.log

    • RDS for MariaDB - audit | error | general | slowquery

    • RDS for Microsoft SQL Server - agent | error

    • RDS for MySQL - audit | error | general | slowquery

    • RDS for Oracle - alert | audit | listener | trace | oemagent

    • RDS for PostgreSQL - postgresql | upgrade

  • :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 Amazon Aurora or RDS Custom DB instances.

  • :deletion_protection (Boolean)

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

    This setting doesn't apply to Amazon Aurora DB instances. 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.

  • :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 the following DB instances:

    • Amazon Aurora (Storage is managed by the DB cluster.)

    • RDS Custom

  • :enable_customer_owned_ip (Boolean)

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

  • :custom_iam_instance_profile (String)

    The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance.

    This setting is required for RDS Custom.

    Constraints:

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

  • :backup_target (String)

    The location for storing automated backups and manual snapshots.

    Valid Values:

    • outposts (Amazon Web Services Outposts)

    • region (Amazon Web Services Region)

    Default: region

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

  • :network_type (String)

    The network type of the DB instance.

    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.

    Valid Values: IPV4 | DUAL

  • :storage_throughput (Integer)

    The storage throughput value for the DB instance.

    This setting applies only to the gp3 storage type.

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

  • :manage_master_user_password (Boolean)

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

    ^

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

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

    This setting doesn't apply to RDS Custom DB instances.

    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.

  • :db_system_id (String)

    The Oracle system identifier (SID), which is the name of the Oracle database instance that manages your database files. In this context, the term "Oracle database instance" refers exclusively to the system global area (SGA) and Oracle background processes. If you don't specify a SID, the value defaults to RDSCDB. The Oracle SID is also the name of your CDB.

  • :dedicated_log_volume (Boolean)

    Indicates whether the DB instance has a dedicated log volume (DLV) enabled.

  • :multi_tenant (Boolean)

    Specifies whether to use the multi-tenant configuration or the single-tenant configuration (default). This parameter only applies to RDS for Oracle container database (CDB) engines.

    Note the following restrictions:

    • The DB engine that you specify in the request must support the multi-tenant configuration. If you attempt to enable the multi-tenant configuration on a DB engine that doesn't support it, the request fails.

    • If you specify the multi-tenant configuration when you create your DB instance, you can't later modify this DB instance to use the single-tenant configuration.

  • :engine_lifecycle_support (String)

    The life cycle type for this DB instance.

    By default, this value is set to open-source-rds-extended-support, which enrolls your DB instance into Amazon RDS Extended Support. At the end of standard support, you can avoid charges for Extended Support by setting the value to open-source-rds-extended-support-disabled. In this case, creating the DB instance will fail if the DB major version is past its end of standard support date.

    This setting applies only to RDS for MySQL and RDS for PostgreSQL. For Amazon Aurora DB instances, the life cycle type is managed by the DB cluster.

    You can use this setting to enroll your DB instance into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your DB instance past the end of standard support for that engine version. For more information, see Using Amazon RDS Extended Support in the Amazon RDS User Guide.

    Valid Values: open-source-rds-extended-support | open-source-rds-extended-support-disabled

    Default: open-source-rds-extended-support

Returns:

See Also:



6045
6046
6047
6048
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 6045

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 Db2, MariaDB, MySQL, 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. To create a DB instance for an Aurora DB cluster, use the CreateDBInstance operation.

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.

Examples:

Example: To create a DB instance read replica


# This example creates a read replica of an existing DB instance named test-instance. The read replica is named
# test-instance-repl.

resp = client.create_db_instance_read_replica({
  db_instance_identifier: "test-instance-repl", 
  source_db_instance_identifier: "test-instance", 
})

resp.to_h outputs the following:
{
  db_instance: {
    db_instance_arn: "arn:aws:rds:us-east-1:123456789012:db:test-instance-repl", 
    db_instance_identifier: "test-instance-repl", 
    iam_database_authentication_enabled: false, 
    monitoring_interval: 0, 
    read_replica_source_db_instance_identifier: "test-instance", 
  }, # Some output ommitted.
}

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,
  database_insights_mode: "standard", # accepts standard, advanced
  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",
  domain_fqdn: "String",
  domain_ou: "String",
  domain_auth_secret_arn: "String",
  domain_dns_ips: ["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",
  dedicated_log_volume: false,
  upgrade_storage_config: false,
  ca_certificate_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.pending_modified_values.engine #=> String
resp.db_instance.pending_modified_values.dedicated_log_volume #=> Boolean
resp.db_instance.pending_modified_values.multi_tenant #=> Boolean
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.domain_memberships[0].ou #=> String
resp.db_instance.domain_memberships[0].auth_secret_arn #=> String
resp.db_instance.domain_memberships[0].dns_ips #=> Array
resp.db_instance.domain_memberships[0].dns_ips[0] #=> 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.database_insights_mode #=> String, one of "standard", "advanced"
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
resp.db_instance.percent_progress #=> String
resp.db_instance.dedicated_log_volume #=> Boolean
resp.db_instance.is_storage_config_upgrade_available #=> Boolean
resp.db_instance.multi_tenant #=> Boolean
resp.db_instance.engine_lifecycle_support #=> 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 Db2, MariaDB, MySQL, 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.

  • :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 the value from the source DB instance.

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

    Valid Values: 1150-65535

    Default: Inherits the value from the source DB instance.

  • :multi_az (Boolean)

    Specifies 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 DB instances.

  • :auto_minor_version_upgrade (Boolean)

    Specifies whether to automatically apply minor engine upgrades to the read replica during the maintenance window.

    This setting doesn't apply to RDS Custom DB instances.

    Default: Inherits the value from the source DB instance.

  • :iops (Integer)

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

  • :option_group_name (String)

    The option group to associate the DB instance with. If not specified, RDS uses the option group associated with the source DB instance or cluster.

    For SQL Server, you must use the option group associated with the source.

    This setting doesn't apply to RDS Custom DB instances.

  • :db_parameter_group_name (String)

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

    For Single-AZ or Multi-AZ DB instance read replica instances, if you don't specify a value for DBParameterGroupName, then Amazon RDS uses the DBParameterGroup of the source DB instance for a same Region read replica, or the default DBParameterGroup for the specified DB engine for a cross-Region read replica.

    For Multi-AZ DB cluster same Region read replica instances, if you don't specify a value for DBParameterGroupName, then Amazon RDS uses the default DBParameterGroup.

    Specifying a parameter group for this operation is only supported for MySQL DB instances for cross-Region read replicas, for Multi-AZ DB cluster read replica instances, and for Oracle DB instances. It isn't supported for MySQL DB instances for same Region read replicas or 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)

    Specifies 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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

  • :db_subnet_group_name (String)

    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:

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

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

      • 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 DB instances.

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

  • :storage_type (String)

    The storage type to associate with the read replica.

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

    Valid Values: gp2 | gp3 | io1 | io2 | standard

    Default: io1 if the Iops parameter is specified. Otherwise, gp2.

  • :copy_tags_to_snapshot (Boolean)

    Specifies whether to copy all tags from the read replica to snapshots of the read replica. By default, tags aren't copied.

  • :monitoring_interval (Integer)

    The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the read replica. 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 DB instances.

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

    Default: 0

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

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

    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.

    This setting doesn't apply to RDS Custom DB instances.

  • :enable_iam_database_authentication (Boolean)

    Specifies 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 DB instances.

  • :database_insights_mode (String)

    Specifies the mode of Database Insights.

  • :enable_performance_insights (Boolean)

    Specifies 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 DB instances.

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

  • :performance_insights_retention_period (Integer)

    The number of days to retain Performance Insights data.

    This setting doesn't apply to RDS Custom DB instances.

    Valid Values:

    • 7

    • month * 31, where month is a number of months from 1-23. Examples: 93 (3 months * 31), 341 (11 months * 31), 589 (19 months * 31)

    • 731

    Default: 7 days

    If you specify a retention period that isn't valid, such as 94, Amazon RDS returns an error.

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

    This setting doesn't apply to RDS Custom DB instances.

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

  • :use_default_processor_features (Boolean)

    Specifies whether the DB instance class of the DB instance uses its default processor features.

    This setting doesn't apply to RDS Custom DB instances.

  • :deletion_protection (Boolean)

    Specifies whether to enable deletion protection for the DB instance. 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.

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

  • :domain_iam_role_name (String)

    The name of the IAM role to use when making API calls to the Directory Service.

    This setting doesn't apply to RDS Custom DB instances.

  • :domain_fqdn (String)

    The fully qualified domain name (FQDN) of an Active Directory domain.

    Constraints:

    • Can't be longer than 64 characters.

    ^

    Example: mymanagedADtest.mymanagedAD.mydomain

  • :domain_ou (String)

    The Active Directory organizational unit for your DB instance to join.

    Constraints:

    • Must be in the distinguished name format.

    • Can't be longer than 64 characters.

    Example: OU=mymanagedADtestOU,DC=mymanagedADtest,DC=mymanagedAD,DC=mydomain

  • :domain_auth_secret_arn (String)

    The ARN for the Secrets Manager secret with the credentials for the user joining the domain.

    Example: arn:aws:secretsmanager:region:account-number:secret:myselfmanagedADtestsecret-123456

  • :domain_dns_ips (Array<String>)

    The IPv4 DNS IP addresses of your primary and secondary Active Directory domain controllers.

    Constraints:

    • Two IP addresses must be provided. If there isn't a secondary domain controller, use the IP address of the primary domain controller for both entries in the list.

    ^

    Example: 123.124.125.126,234.235.236.237

  • :replica_mode (String)

    The open mode of the replica database: mounted or read-only.

    This parameter is only supported for Oracle DB instances.

    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.

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

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

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

  • :storage_throughput (Integer)

    Specifies the storage throughput value for the read replica.

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

  • :enable_customer_owned_ip (Boolean)

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

  • :allocated_storage (Integer)

    The amount of storage (in gibibytes) to allocate initially for the read replica. Follow the allocation rules specified in CreateDBInstance.

    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.

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

  • :dedicated_log_volume (Boolean)

    Indicates whether the DB instance has a dedicated log volume (DLV) enabled.

  • :upgrade_storage_config (Boolean)

    Whether to upgrade the storage file system configuration on the read replica. This option migrates the read replica from the old storage file system layout to the preferred layout.

  • :ca_certificate_identifier (String)

    The CA certificate identifier to use for the read replica's server certificate.

    This setting doesn't apply to RDS Custom DB instances.

    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.

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



6998
6999
7000
7001
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 6998

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.

Examples:

Example: To create a DB parameter group


# The following example creates a DB parameter group.

resp = client.create_db_parameter_group({
  db_parameter_group_family: "MySQL8.0", 
  db_parameter_group_name: "mydbparametergroup", 
  description: "My new parameter group", 
})

resp.to_h outputs the following:
{
  db_parameter_group: {
    db_parameter_group_arn: "arn:aws:rds:us-east-1:123456789012:pg:mydbparametergroup", 
    db_parameter_group_family: "mysql8.0", 
    db_parameter_group_name: "mydbparametergroup", 
    description: "My new 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

    This value is stored as a lowercase string.

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

    The output contains duplicates.

    The following are the valid DB engine values:

    • aurora-mysql

    • aurora-postgresql

    • db2-ae

    • db2-se

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



7156
7157
7158
7159
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 7156

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)

    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)

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



7277
7278
7279
7280
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 7277

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)

    The role of the DB proxy endpoint. The role determines whether the endpoint can be used for read/write or only read 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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

Returns:

See Also:



7363
7364
7365
7366
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 7363

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.

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.

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:



7464
7465
7466
7467
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 7464

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

#create_db_shard_group(params = {}) ⇒ Types::DBShardGroup

Creates a new DB shard group for Aurora Limitless Database. You must enable Aurora Limitless Database to create a DB shard group.

Valid for: Aurora DB clusters only

Examples:

Request syntax with placeholder values


resp = client.create_db_shard_group({
  db_shard_group_identifier: "String", # required
  db_cluster_identifier: "String", # required
  compute_redundancy: 1,
  max_acu: 1.0, # required
  min_acu: 1.0,
  publicly_accessible: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Response structure


resp.db_shard_group_resource_id #=> String
resp.db_shard_group_identifier #=> String
resp.db_cluster_identifier #=> String
resp.max_acu #=> Float
resp.min_acu #=> Float
resp.compute_redundancy #=> Integer
resp.status #=> String
resp.publicly_accessible #=> Boolean
resp.endpoint #=> String
resp.db_shard_group_arn #=> String
resp.tag_list #=> Array
resp.tag_list[0].key #=> String
resp.tag_list[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :db_shard_group_identifier (required, String)

    The name of the DB shard group.

  • :db_cluster_identifier (required, String)

    The name of the primary DB cluster for the DB shard group.

  • :compute_redundancy (Integer)

    Specifies whether to create standby DB shard groups for the DB shard group. Valid values are the following:

    • 0 - Creates a DB shard group without a standby DB shard group. This is the default value.

    • 1 - Creates a DB shard group with a standby DB shard group in a different Availability Zone (AZ).

    • 2 - Creates a DB shard group with two standby DB shard groups in two different AZs.

  • :max_acu (required, Float)

    The maximum capacity of the DB shard group in Aurora capacity units (ACUs).

  • :min_acu (Float)

    The minimum capacity of the DB shard group in Aurora capacity units (ACUs).

  • :publicly_accessible (Boolean)

    Specifies whether the DB shard group is publicly accessible.

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

    When the DB shard group isn't publicly accessible, it is an internal DB shard group 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 shard group is private.

    • If the default VPC in the target Region has an internet gateway attached to it, the DB shard group 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 shard group is private.

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

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

    A list of tags.

    For more information, see Tagging Amazon RDS resources in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

Returns:

See Also:



7599
7600
7601
7602
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 7599

def create_db_shard_group(params = {}, options = {})
  req = build_request(:create_db_shard_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


# The following example creates a DB snapshot.

resp = client.create_db_snapshot({
  db_instance_identifier: "mydbsnapshot", 
  db_snapshot_identifier: "database-mysql", 
})

resp.to_h outputs the following:
{
  db_snapshot: {
    allocated_storage: 100, 
    availability_zone: "us-east-1b", 
    db_instance_identifier: "database-mysql", 
    db_snapshot_arn: "arn:aws:rds:us-east-1:123456789012:snapshot:mydbsnapshot", 
    db_snapshot_identifier: "mydbsnapshot", 
    dbi_resource_id: "db-AKIAIOSFODNN7EXAMPLE", 
    encrypted: true, 
    engine: "mysql", 
    engine_version: "8.0.32", 
    iam_database_authentication_enabled: false, 
    instance_create_time: Time.parse("2019-04-30T15:45:53.663Z"), 
    iops: 1000, 
    kms_key_id: "arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE", 
    license_model: "general-public-license", 
    master_username: "admin", 
    option_group_name: "default:mysql-8-0", 
    percent_progress: 0, 
    port: 3306, 
    processor_features: [
    ], 
    snapshot_type: "manual", 
    status: "creating", 
    storage_type: "io1", 
    vpc_id: "vpc-6594f31c", 
  }, 
}

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
resp.db_snapshot.db_system_id #=> String
resp.db_snapshot.dedicated_log_volume #=> Boolean
resp.db_snapshot.multi_tenant #=> Boolean

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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

Returns:

See Also:



7748
7749
7750
7751
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 7748

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


# The following example creates a DB subnet group called mysubnetgroup using existing subnets.

resp = client.create_db_subnet_group({
  db_subnet_group_description: "test DB subnet group", 
  db_subnet_group_name: "mysubnetgroup", 
  subnet_ids: [
    "subnet-0a1dc4e1a6f123456", 
    "subnet-070dd7ecb3aaaaaaa", 
    "subnet-00f5b198bc0abcdef", 
  ], 
})

resp.to_h outputs the following:
{
  db_subnet_group: {
    db_subnet_group_arn: "arn:aws:rds:us-west-2:0123456789012:subgrp:mysubnetgroup", 
    db_subnet_group_description: "test DB subnet group", 
    db_subnet_group_name: "mysubnetgroup", 
    subnet_group_status: "Complete", 
    subnets: [
      {
        subnet_availability_zone: {
          name: "us-west-2b", 
        }, 
        subnet_identifier: "subnet-070dd7ecb3aaaaaaa", 
        subnet_status: "Active", 
      }, 
      {
        subnet_availability_zone: {
          name: "us-west-2d", 
        }, 
        subnet_identifier: "subnet-00f5b198bc0abcdef", 
        subnet_status: "Active", 
      }, 
      {
        subnet_availability_zone: {
          name: "us-west-2b", 
        }, 
        subnet_identifier: "subnet-0a1dc4e1a6f123456", 
        subnet_status: "Active", 
      }, 
    ], 
    vpc_id: "vpc-0f08e7610a1b2c3d4", 
  }, 
}

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:



7866
7867
7868
7869
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 7866

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.

Examples:

Example: To create an event subscription


# The following example creates a subscription for backup and recovery events for DB instances in the current AWS account.
# Notifications are sent to an Amazon Simple Notification Service topic.

resp = client.create_event_subscription({
  event_categories: [
    "backup", 
    "recovery", 
  ], 
  sns_topic_arn: "arn:aws:sns:us-east-1:123456789012:interesting-events", 
  source_type: "db-instance", 
  subscription_name: "my-instance-events", 
})

resp.to_h outputs the following:
{
  event_subscription: {
    cust_subscription_id: "my-instance-events", 
    customer_aws_id: "123456789012", 
    enabled: true, 
    event_categories_list: [
      "backup", 
      "recovery", 
    ], 
    event_subscription_arn: "arn:aws:rds:us-east-1:123456789012:es:my-instance-events", 
    sns_topic_arn: "arn:aws:sns:us-east-1:123456789012:interesting-events", 
    source_type: "db-instance", 
    status: "creating", 
    subscription_creation_time: "Tue Jul 31 23:22:01 UTC 2018", 
  }, 
}

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. SNS automatically creates the ARN when you create a topic and subscribe to it.

    RDS doesn't support FIFO (first in, first out) topics. For more information, see Message ordering and deduplication (FIFO topics) in the Amazon Simple Notification Service Developer Guide.

  • :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 | zero-etl | custom-engine-version | blue-green-deployment

  • :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 or the Amazon Aurora User Guide . You can also see this list by using the DescribeEventCategories operation.

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

    Specifies 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 or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.

Returns:

See Also:



8073
8074
8075
8076
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/client.rb', line 8073

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 create the primary and secondary DB clusters in the global database. Or you can specify an existing Aurora cluster during the create operation, and this cluster becomes the primary cluster of the global database.

This operation applies only to Aurora DB clusters.

Examples:

Example: To create a global DB cluster


# The following example creates a new Aurora MySQL-compatible global DB cluster.

resp = client.create_global_cluster