aws-sdk-rds 1.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/aws-sdk-rds.rb +73 -0
- data/lib/aws-sdk-rds/account_quota.rb +100 -0
- data/lib/aws-sdk-rds/certificate.rb +123 -0
- data/lib/aws-sdk-rds/client.rb +9214 -0
- data/lib/aws-sdk-rds/client_api.rb +3027 -0
- data/lib/aws-sdk-rds/customizations.rb +7 -0
- data/lib/aws-sdk-rds/db_cluster.rb +1074 -0
- data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +230 -0
- data/lib/aws-sdk-rds/db_cluster_snapshot.rb +478 -0
- data/lib/aws-sdk-rds/db_engine.rb +241 -0
- data/lib/aws-sdk-rds/db_engine_version.rb +263 -0
- data/lib/aws-sdk-rds/db_instance.rb +2680 -0
- data/lib/aws-sdk-rds/db_log_file.rb +170 -0
- data/lib/aws-sdk-rds/db_parameter_group.rb +455 -0
- data/lib/aws-sdk-rds/db_parameter_group_family.rb +167 -0
- data/lib/aws-sdk-rds/db_security_group.rb +358 -0
- data/lib/aws-sdk-rds/db_snapshot.rb +714 -0
- data/lib/aws-sdk-rds/db_snapshot_attribute.rb +160 -0
- data/lib/aws-sdk-rds/db_subnet_group.rb +188 -0
- data/lib/aws-sdk-rds/errors.rb +23 -0
- data/lib/aws-sdk-rds/event.rb +134 -0
- data/lib/aws-sdk-rds/event_category_map.rb +98 -0
- data/lib/aws-sdk-rds/event_subscription.rb +352 -0
- data/lib/aws-sdk-rds/option_group.rb +283 -0
- data/lib/aws-sdk-rds/option_group_option.rb +166 -0
- data/lib/aws-sdk-rds/parameter.rb +144 -0
- data/lib/aws-sdk-rds/pending_maintenance_action.rb +211 -0
- data/lib/aws-sdk-rds/reserved_db_instance.rb +191 -0
- data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +183 -0
- data/lib/aws-sdk-rds/resource.rb +2384 -0
- data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +111 -0
- data/lib/aws-sdk-rds/types.rb +10965 -0
- data/lib/aws-sdk-rds/waiters.rb +149 -0
- metadata +106 -0
@@ -0,0 +1,2680 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module RDS
|
10
|
+
class DBInstance
|
11
|
+
|
12
|
+
extend Aws::Deprecations
|
13
|
+
|
14
|
+
# @overload def initialize(id, options = {})
|
15
|
+
# @param [String] id
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :id
|
19
|
+
# @option options [Client] :client
|
20
|
+
def initialize(*args)
|
21
|
+
options = Hash === args.last ? args.pop.dup : {}
|
22
|
+
@id = extract_id(args, options)
|
23
|
+
@data = options.delete(:data)
|
24
|
+
@client = options.delete(:client) || Client.new(options)
|
25
|
+
end
|
26
|
+
|
27
|
+
# @!group Read-Only Attributes
|
28
|
+
|
29
|
+
# @return [String]
|
30
|
+
def id
|
31
|
+
@id
|
32
|
+
end
|
33
|
+
alias :db_instance_identifier :id
|
34
|
+
|
35
|
+
# Contains the name of the compute and memory capacity class of the DB
|
36
|
+
# instance.
|
37
|
+
# @return [String]
|
38
|
+
def db_instance_class
|
39
|
+
data.db_instance_class
|
40
|
+
end
|
41
|
+
|
42
|
+
# Provides the name of the database engine to be used for this DB
|
43
|
+
# instance.
|
44
|
+
# @return [String]
|
45
|
+
def engine
|
46
|
+
data.engine
|
47
|
+
end
|
48
|
+
|
49
|
+
# Specifies the current state of this database.
|
50
|
+
# @return [String]
|
51
|
+
def db_instance_status
|
52
|
+
data.db_instance_status
|
53
|
+
end
|
54
|
+
|
55
|
+
# Contains the master username for the DB instance.
|
56
|
+
# @return [String]
|
57
|
+
def master_username
|
58
|
+
data.master_username
|
59
|
+
end
|
60
|
+
|
61
|
+
# The meaning of this parameter differs according to the database engine
|
62
|
+
# you use. For example, this value returns MySQL, MariaDB, or PostgreSQL
|
63
|
+
# information when returning values from CreateDBInstanceReadReplica
|
64
|
+
# since Read Replicas are only supported for these engines.
|
65
|
+
#
|
66
|
+
# **MySQL, MariaDB, SQL Server, PostgreSQL, Amazon Aurora**
|
67
|
+
#
|
68
|
+
# Contains the name of the initial database of this instance that was
|
69
|
+
# provided at create time, if one was specified when the DB instance was
|
70
|
+
# created. This same name is returned for the life of the DB instance.
|
71
|
+
#
|
72
|
+
# Type: String
|
73
|
+
#
|
74
|
+
# **Oracle**
|
75
|
+
#
|
76
|
+
# Contains the Oracle System ID (SID) of the created DB instance. Not
|
77
|
+
# shown when the returned parameters do not apply to an Oracle DB
|
78
|
+
# instance.
|
79
|
+
# @return [String]
|
80
|
+
def db_name
|
81
|
+
data.db_name
|
82
|
+
end
|
83
|
+
|
84
|
+
# Specifies the connection endpoint.
|
85
|
+
# @return [Types::Endpoint]
|
86
|
+
def endpoint
|
87
|
+
data.endpoint
|
88
|
+
end
|
89
|
+
|
90
|
+
# Specifies the allocated storage size specified in gigabytes.
|
91
|
+
# @return [Integer]
|
92
|
+
def allocated_storage
|
93
|
+
data.allocated_storage
|
94
|
+
end
|
95
|
+
|
96
|
+
# Provides the date and time the DB instance was created.
|
97
|
+
# @return [Time]
|
98
|
+
def instance_create_time
|
99
|
+
data.instance_create_time
|
100
|
+
end
|
101
|
+
|
102
|
+
# Specifies the daily time range during which automated backups are
|
103
|
+
# created if automated backups are enabled, as determined by the
|
104
|
+
# `BackupRetentionPeriod`.
|
105
|
+
# @return [String]
|
106
|
+
def preferred_backup_window
|
107
|
+
data.preferred_backup_window
|
108
|
+
end
|
109
|
+
|
110
|
+
# Specifies the number of days for which automatic DB snapshots are
|
111
|
+
# retained.
|
112
|
+
# @return [Integer]
|
113
|
+
def backup_retention_period
|
114
|
+
data.backup_retention_period
|
115
|
+
end
|
116
|
+
|
117
|
+
# Provides List of DB security group elements containing only
|
118
|
+
# `DBSecurityGroup.Name` and `DBSecurityGroup.Status` subelements.
|
119
|
+
# @return [Array<Types::DBSecurityGroupMembership>]
|
120
|
+
def db_security_groups
|
121
|
+
data.db_security_groups
|
122
|
+
end
|
123
|
+
|
124
|
+
# Provides a list of VPC security group elements that the DB instance
|
125
|
+
# belongs to.
|
126
|
+
# @return [Array<Types::VpcSecurityGroupMembership>]
|
127
|
+
def vpc_security_groups
|
128
|
+
data.vpc_security_groups
|
129
|
+
end
|
130
|
+
|
131
|
+
# Provides the list of DB parameter groups applied to this DB instance.
|
132
|
+
# @return [Array<Types::DBParameterGroupStatus>]
|
133
|
+
def db_parameter_groups
|
134
|
+
data.db_parameter_groups
|
135
|
+
end
|
136
|
+
|
137
|
+
# Specifies the name of the Availability Zone the DB instance is located
|
138
|
+
# in.
|
139
|
+
# @return [String]
|
140
|
+
def availability_zone
|
141
|
+
data.availability_zone
|
142
|
+
end
|
143
|
+
|
144
|
+
# Specifies information on the subnet group associated with the DB
|
145
|
+
# instance, including the name, description, and subnets in the subnet
|
146
|
+
# group.
|
147
|
+
# @return [Types::DBSubnetGroup]
|
148
|
+
def db_subnet_group
|
149
|
+
data.db_subnet_group
|
150
|
+
end
|
151
|
+
|
152
|
+
# Specifies the weekly time range during which system maintenance can
|
153
|
+
# occur, in Universal Coordinated Time (UTC).
|
154
|
+
# @return [String]
|
155
|
+
def preferred_maintenance_window
|
156
|
+
data.preferred_maintenance_window
|
157
|
+
end
|
158
|
+
|
159
|
+
# Specifies that changes to the DB instance are pending. This element is
|
160
|
+
# only included when changes are pending. Specific changes are
|
161
|
+
# identified by subelements.
|
162
|
+
# @return [Types::PendingModifiedValues]
|
163
|
+
def pending_modified_values
|
164
|
+
data.pending_modified_values
|
165
|
+
end
|
166
|
+
|
167
|
+
# Specifies the latest time to which a database can be restored with
|
168
|
+
# point-in-time restore.
|
169
|
+
# @return [Time]
|
170
|
+
def latest_restorable_time
|
171
|
+
data.latest_restorable_time
|
172
|
+
end
|
173
|
+
|
174
|
+
# Specifies if the DB instance is a Multi-AZ deployment.
|
175
|
+
# @return [Boolean]
|
176
|
+
def multi_az
|
177
|
+
data.multi_az
|
178
|
+
end
|
179
|
+
|
180
|
+
# Indicates the database engine version.
|
181
|
+
# @return [String]
|
182
|
+
def engine_version
|
183
|
+
data.engine_version
|
184
|
+
end
|
185
|
+
|
186
|
+
# Indicates that minor version patches are applied automatically.
|
187
|
+
# @return [Boolean]
|
188
|
+
def auto_minor_version_upgrade
|
189
|
+
data.auto_minor_version_upgrade
|
190
|
+
end
|
191
|
+
|
192
|
+
# Contains the identifier of the source DB instance if this DB instance
|
193
|
+
# is a Read Replica.
|
194
|
+
# @return [String]
|
195
|
+
def read_replica_source_db_instance_identifier
|
196
|
+
data.read_replica_source_db_instance_identifier
|
197
|
+
end
|
198
|
+
|
199
|
+
# Contains one or more identifiers of the Read Replicas associated with
|
200
|
+
# this DB instance.
|
201
|
+
# @return [Array<String>]
|
202
|
+
def read_replica_db_instance_identifiers
|
203
|
+
data.read_replica_db_instance_identifiers
|
204
|
+
end
|
205
|
+
|
206
|
+
# License model information for this DB instance.
|
207
|
+
# @return [String]
|
208
|
+
def license_model
|
209
|
+
data.license_model
|
210
|
+
end
|
211
|
+
|
212
|
+
# Specifies the Provisioned IOPS (I/O operations per second) value.
|
213
|
+
# @return [Integer]
|
214
|
+
def iops
|
215
|
+
data.iops
|
216
|
+
end
|
217
|
+
|
218
|
+
# Provides the list of option group memberships for this DB instance.
|
219
|
+
# @return [Array<Types::OptionGroupMembership>]
|
220
|
+
def option_group_memberships
|
221
|
+
data.option_group_memberships
|
222
|
+
end
|
223
|
+
|
224
|
+
# If present, specifies the name of the character set that this instance
|
225
|
+
# is associated with.
|
226
|
+
# @return [String]
|
227
|
+
def character_set_name
|
228
|
+
data.character_set_name
|
229
|
+
end
|
230
|
+
|
231
|
+
# If present, specifies the name of the secondary Availability Zone for
|
232
|
+
# a DB instance with multi-AZ support.
|
233
|
+
# @return [String]
|
234
|
+
def secondary_availability_zone
|
235
|
+
data.secondary_availability_zone
|
236
|
+
end
|
237
|
+
|
238
|
+
# Specifies the accessibility options for the DB instance. A value of
|
239
|
+
# true specifies an Internet-facing instance with a publicly resolvable
|
240
|
+
# DNS name, which resolves to a public IP address. A value of false
|
241
|
+
# specifies an internal instance with a DNS name that resolves to a
|
242
|
+
# private IP address.
|
243
|
+
#
|
244
|
+
# Default: The default behavior varies depending on whether a VPC has
|
245
|
+
# been requested or not. The following list shows the default behavior
|
246
|
+
# in each case.
|
247
|
+
#
|
248
|
+
# * **Default VPC:**true
|
249
|
+
#
|
250
|
+
# * **VPC:**false
|
251
|
+
#
|
252
|
+
# If no DB subnet group has been specified as part of the request and
|
253
|
+
# the PubliclyAccessible value has not been set, the DB instance will be
|
254
|
+
# publicly accessible. If a specific DB subnet group has been specified
|
255
|
+
# as part of the request and the PubliclyAccessible value has not been
|
256
|
+
# set, the DB instance will be private.
|
257
|
+
# @return [Boolean]
|
258
|
+
def publicly_accessible
|
259
|
+
data.publicly_accessible
|
260
|
+
end
|
261
|
+
|
262
|
+
# The status of a Read Replica. If the instance is not a Read Replica,
|
263
|
+
# this will be blank.
|
264
|
+
# @return [Array<Types::DBInstanceStatusInfo>]
|
265
|
+
def status_infos
|
266
|
+
data.status_infos
|
267
|
+
end
|
268
|
+
|
269
|
+
# Specifies the storage type associated with DB instance.
|
270
|
+
# @return [String]
|
271
|
+
def storage_type
|
272
|
+
data.storage_type
|
273
|
+
end
|
274
|
+
|
275
|
+
# The ARN from the key store with which the instance is associated for
|
276
|
+
# TDE encryption.
|
277
|
+
# @return [String]
|
278
|
+
def tde_credential_arn
|
279
|
+
data.tde_credential_arn
|
280
|
+
end
|
281
|
+
|
282
|
+
# Specifies the port that the DB instance listens on. If the DB instance
|
283
|
+
# is part of a DB cluster, this can be a different port than the DB
|
284
|
+
# cluster port.
|
285
|
+
# @return [Integer]
|
286
|
+
def db_instance_port
|
287
|
+
data.db_instance_port
|
288
|
+
end
|
289
|
+
|
290
|
+
# If the DB instance is a member of a DB cluster, contains the name of
|
291
|
+
# the DB cluster that the DB instance is a member of.
|
292
|
+
# @return [String]
|
293
|
+
def db_cluster_identifier
|
294
|
+
data.db_cluster_identifier
|
295
|
+
end
|
296
|
+
|
297
|
+
# Specifies whether the DB instance is encrypted.
|
298
|
+
# @return [Boolean]
|
299
|
+
def storage_encrypted
|
300
|
+
data.storage_encrypted
|
301
|
+
end
|
302
|
+
|
303
|
+
# If `StorageEncrypted` is true, the KMS key identifier for the
|
304
|
+
# encrypted DB instance.
|
305
|
+
# @return [String]
|
306
|
+
def kms_key_id
|
307
|
+
data.kms_key_id
|
308
|
+
end
|
309
|
+
|
310
|
+
# The region-unique, immutable identifier for the DB instance. This
|
311
|
+
# identifier is found in AWS CloudTrail log entries whenever the KMS key
|
312
|
+
# for the DB instance is accessed.
|
313
|
+
# @return [String]
|
314
|
+
def dbi_resource_id
|
315
|
+
data.dbi_resource_id
|
316
|
+
end
|
317
|
+
|
318
|
+
# The identifier of the CA certificate for this DB instance.
|
319
|
+
# @return [String]
|
320
|
+
def ca_certificate_identifier
|
321
|
+
data.ca_certificate_identifier
|
322
|
+
end
|
323
|
+
|
324
|
+
# The Active Directory Domain membership records associated with the DB
|
325
|
+
# instance.
|
326
|
+
# @return [Array<Types::DomainMembership>]
|
327
|
+
def domain_memberships
|
328
|
+
data.domain_memberships
|
329
|
+
end
|
330
|
+
|
331
|
+
# Specifies whether tags are copied from the DB instance to snapshots of
|
332
|
+
# the DB instance.
|
333
|
+
# @return [Boolean]
|
334
|
+
def copy_tags_to_snapshot
|
335
|
+
data.copy_tags_to_snapshot
|
336
|
+
end
|
337
|
+
|
338
|
+
# The interval, in seconds, between points when Enhanced Monitoring
|
339
|
+
# metrics are collected for the DB instance.
|
340
|
+
# @return [Integer]
|
341
|
+
def monitoring_interval
|
342
|
+
data.monitoring_interval
|
343
|
+
end
|
344
|
+
|
345
|
+
# The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log
|
346
|
+
# stream that receives the Enhanced Monitoring metrics data for the DB
|
347
|
+
# instance.
|
348
|
+
# @return [String]
|
349
|
+
def enhanced_monitoring_resource_arn
|
350
|
+
data.enhanced_monitoring_resource_arn
|
351
|
+
end
|
352
|
+
|
353
|
+
# The ARN for the IAM role that permits RDS to send Enhanced Monitoring
|
354
|
+
# metrics to CloudWatch Logs.
|
355
|
+
# @return [String]
|
356
|
+
def monitoring_role_arn
|
357
|
+
data.monitoring_role_arn
|
358
|
+
end
|
359
|
+
|
360
|
+
# A value that specifies the order in which an Aurora Replica is
|
361
|
+
# promoted to the primary instance after a failure of the existing
|
362
|
+
# primary instance. For more information, see [ Fault Tolerance for an
|
363
|
+
# Aurora DB Cluster][1].
|
364
|
+
#
|
365
|
+
#
|
366
|
+
#
|
367
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance
|
368
|
+
# @return [Integer]
|
369
|
+
def promotion_tier
|
370
|
+
data.promotion_tier
|
371
|
+
end
|
372
|
+
|
373
|
+
# The Amazon Resource Name (ARN) for the DB instance.
|
374
|
+
# @return [String]
|
375
|
+
def db_instance_arn
|
376
|
+
data.db_instance_arn
|
377
|
+
end
|
378
|
+
|
379
|
+
# The time zone of the DB instance. In most cases, the `Timezone`
|
380
|
+
# element is empty. `Timezone` content appears only for Microsoft SQL
|
381
|
+
# Server DB instances that were created with a time zone specified.
|
382
|
+
# @return [String]
|
383
|
+
def timezone
|
384
|
+
data.timezone
|
385
|
+
end
|
386
|
+
|
387
|
+
# @!endgroup
|
388
|
+
|
389
|
+
# @return [Client]
|
390
|
+
def client
|
391
|
+
@client
|
392
|
+
end
|
393
|
+
|
394
|
+
# Loads, or reloads {#data} for the current {DBInstance}.
|
395
|
+
# Returns `self` making it possible to chain methods.
|
396
|
+
#
|
397
|
+
# db_instance.reload.data
|
398
|
+
#
|
399
|
+
# @return [self]
|
400
|
+
def load
|
401
|
+
resp = @client.describe_db_instances(db_instance_identifier: @id)
|
402
|
+
@data = resp.dbinstances[0]
|
403
|
+
self
|
404
|
+
end
|
405
|
+
alias :reload :load
|
406
|
+
|
407
|
+
# @return [Types::DBInstance]
|
408
|
+
# Returns the data for this {DBInstance}. Calls
|
409
|
+
# {Client#describe_db_instances} if {#data_loaded?} is `false`.
|
410
|
+
def data
|
411
|
+
load unless @data
|
412
|
+
@data
|
413
|
+
end
|
414
|
+
|
415
|
+
# @return [Boolean]
|
416
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
417
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
418
|
+
def data_loaded?
|
419
|
+
!!@data
|
420
|
+
end
|
421
|
+
|
422
|
+
# @!group Actions
|
423
|
+
|
424
|
+
# @example Request syntax with placeholder values
|
425
|
+
#
|
426
|
+
# dbinstance = db_instance.create({
|
427
|
+
# db_name: "String",
|
428
|
+
# allocated_storage: 1,
|
429
|
+
# db_instance_class: "String", # required
|
430
|
+
# engine: "String", # required
|
431
|
+
# master_username: "String",
|
432
|
+
# master_user_password: "String",
|
433
|
+
# db_security_groups: ["String"],
|
434
|
+
# vpc_security_group_ids: ["String"],
|
435
|
+
# availability_zone: "String",
|
436
|
+
# db_subnet_group_name: "String",
|
437
|
+
# preferred_maintenance_window: "String",
|
438
|
+
# db_parameter_group_name: "String",
|
439
|
+
# backup_retention_period: 1,
|
440
|
+
# preferred_backup_window: "String",
|
441
|
+
# port: 1,
|
442
|
+
# multi_az: false,
|
443
|
+
# engine_version: "String",
|
444
|
+
# auto_minor_version_upgrade: false,
|
445
|
+
# license_model: "String",
|
446
|
+
# iops: 1,
|
447
|
+
# option_group_name: "String",
|
448
|
+
# character_set_name: "String",
|
449
|
+
# publicly_accessible: false,
|
450
|
+
# tags: [
|
451
|
+
# {
|
452
|
+
# key: "String",
|
453
|
+
# value: "String",
|
454
|
+
# },
|
455
|
+
# ],
|
456
|
+
# db_cluster_identifier: "String",
|
457
|
+
# storage_type: "String",
|
458
|
+
# tde_credential_arn: "String",
|
459
|
+
# tde_credential_password: "String",
|
460
|
+
# storage_encrypted: false,
|
461
|
+
# kms_key_id: "String",
|
462
|
+
# domain: "String",
|
463
|
+
# copy_tags_to_snapshot: false,
|
464
|
+
# monitoring_interval: 1,
|
465
|
+
# monitoring_role_arn: "String",
|
466
|
+
# domain_iam_role_name: "String",
|
467
|
+
# promotion_tier: 1,
|
468
|
+
# timezone: "String",
|
469
|
+
# })
|
470
|
+
# @param [Hash] options ({})
|
471
|
+
# @option options [String] :db_name
|
472
|
+
# The meaning of this parameter differs according to the database engine
|
473
|
+
# you use.
|
474
|
+
#
|
475
|
+
# Type: String
|
476
|
+
#
|
477
|
+
# **MySQL**
|
478
|
+
#
|
479
|
+
# The name of the database to create when the DB instance is created. If
|
480
|
+
# this parameter is not specified, no database is created in the DB
|
481
|
+
# instance.
|
482
|
+
#
|
483
|
+
# Constraints:
|
484
|
+
#
|
485
|
+
# * Must contain 1 to 64 alphanumeric characters
|
486
|
+
#
|
487
|
+
# * Cannot be a word reserved by the specified database engine
|
488
|
+
#
|
489
|
+
# **MariaDB**
|
490
|
+
#
|
491
|
+
# The name of the database to create when the DB instance is created. If
|
492
|
+
# this parameter is not specified, no database is created in the DB
|
493
|
+
# instance.
|
494
|
+
#
|
495
|
+
# Constraints:
|
496
|
+
#
|
497
|
+
# * Must contain 1 to 64 alphanumeric characters
|
498
|
+
#
|
499
|
+
# * Cannot be a word reserved by the specified database engine
|
500
|
+
#
|
501
|
+
# **PostgreSQL**
|
502
|
+
#
|
503
|
+
# The name of the database to create when the DB instance is created. If
|
504
|
+
# this parameter is not specified, the default "postgres" database is
|
505
|
+
# created in the DB instance.
|
506
|
+
#
|
507
|
+
# Constraints:
|
508
|
+
#
|
509
|
+
# * Must contain 1 to 63 alphanumeric characters
|
510
|
+
#
|
511
|
+
# * Must begin with a letter or an underscore. Subsequent characters can
|
512
|
+
# be letters, underscores, or digits (0-9).
|
513
|
+
#
|
514
|
+
# * Cannot be a word reserved by the specified database engine
|
515
|
+
#
|
516
|
+
# **Oracle**
|
517
|
+
#
|
518
|
+
# The Oracle System ID (SID) of the created DB instance.
|
519
|
+
#
|
520
|
+
# Default: `ORCL`
|
521
|
+
#
|
522
|
+
# Constraints:
|
523
|
+
#
|
524
|
+
# * Cannot be longer than 8 characters
|
525
|
+
#
|
526
|
+
# ^
|
527
|
+
#
|
528
|
+
# **SQL Server**
|
529
|
+
#
|
530
|
+
# Not applicable. Must be null.
|
531
|
+
#
|
532
|
+
# **Amazon Aurora**
|
533
|
+
#
|
534
|
+
# The name of the database to create when the primary instance of the DB
|
535
|
+
# cluster is created. If this parameter is not specified, no database is
|
536
|
+
# created in the DB instance.
|
537
|
+
#
|
538
|
+
# Constraints:
|
539
|
+
#
|
540
|
+
# * Must contain 1 to 64 alphanumeric characters
|
541
|
+
#
|
542
|
+
# * Cannot be a word reserved by the specified database engine
|
543
|
+
# @option options [Integer] :allocated_storage
|
544
|
+
# The amount of storage (in gigabytes) to be initially allocated for the
|
545
|
+
# database instance.
|
546
|
+
#
|
547
|
+
# Type: Integer
|
548
|
+
#
|
549
|
+
# **MySQL**
|
550
|
+
#
|
551
|
+
# Constraints: Must be an integer from 5 to 6144.
|
552
|
+
#
|
553
|
+
# **MariaDB**
|
554
|
+
#
|
555
|
+
# Constraints: Must be an integer from 5 to 6144.
|
556
|
+
#
|
557
|
+
# **PostgreSQL**
|
558
|
+
#
|
559
|
+
# Constraints: Must be an integer from 5 to 6144.
|
560
|
+
#
|
561
|
+
# **Oracle**
|
562
|
+
#
|
563
|
+
# Constraints: Must be an integer from 10 to 6144.
|
564
|
+
#
|
565
|
+
# **SQL Server**
|
566
|
+
#
|
567
|
+
# Constraints: Must be an integer from 200 to 4096 (Standard Edition and
|
568
|
+
# Enterprise Edition) or from 20 to 4096 (Express Edition and Web
|
569
|
+
# Edition)
|
570
|
+
# @option options [required, String] :db_instance_class
|
571
|
+
# The compute and memory capacity of the DB instance.
|
572
|
+
#
|
573
|
+
# Valid Values: `db.t1.micro | db.m1.small | db.m1.medium | db.m1.large
|
574
|
+
# | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge |
|
575
|
+
# db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge |
|
576
|
+
# db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge |
|
577
|
+
# db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge |
|
578
|
+
# db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small |
|
579
|
+
# db.t2.medium | db.t2.large`
|
580
|
+
# @option options [required, String] :engine
|
581
|
+
# The name of the database engine to be used for this instance.
|
582
|
+
#
|
583
|
+
# Valid Values: `mysql` \| `mariadb` \| `oracle-se1` \| `oracle-se2` \|
|
584
|
+
# `oracle-se` \| `oracle-ee` \| `sqlserver-ee` \| `sqlserver-se` \|
|
585
|
+
# `sqlserver-ex` \| `sqlserver-web` \| `postgres` \| `aurora`
|
586
|
+
#
|
587
|
+
# Not every database engine is available for every AWS region.
|
588
|
+
# @option options [String] :master_username
|
589
|
+
# The name of master user for the client DB instance.
|
590
|
+
#
|
591
|
+
# **MySQL**
|
592
|
+
#
|
593
|
+
# Constraints:
|
594
|
+
#
|
595
|
+
# * Must be 1 to 16 alphanumeric characters.
|
596
|
+
#
|
597
|
+
# * First character must be a letter.
|
598
|
+
#
|
599
|
+
# * Cannot be a reserved word for the chosen database engine.
|
600
|
+
#
|
601
|
+
# **MariaDB**
|
602
|
+
#
|
603
|
+
# Constraints:
|
604
|
+
#
|
605
|
+
# * Must be 1 to 16 alphanumeric characters.
|
606
|
+
#
|
607
|
+
# * Cannot be a reserved word for the chosen database engine.
|
608
|
+
#
|
609
|
+
# Type: String
|
610
|
+
#
|
611
|
+
# **Oracle**
|
612
|
+
#
|
613
|
+
# Constraints:
|
614
|
+
#
|
615
|
+
# * Must be 1 to 30 alphanumeric characters.
|
616
|
+
#
|
617
|
+
# * First character must be a letter.
|
618
|
+
#
|
619
|
+
# * Cannot be a reserved word for the chosen database engine.
|
620
|
+
#
|
621
|
+
# **SQL Server**
|
622
|
+
#
|
623
|
+
# Constraints:
|
624
|
+
#
|
625
|
+
# * Must be 1 to 128 alphanumeric characters.
|
626
|
+
#
|
627
|
+
# * First character must be a letter.
|
628
|
+
#
|
629
|
+
# * Cannot be a reserved word for the chosen database engine.
|
630
|
+
#
|
631
|
+
# **PostgreSQL**
|
632
|
+
#
|
633
|
+
# Constraints:
|
634
|
+
#
|
635
|
+
# * Must be 1 to 63 alphanumeric characters.
|
636
|
+
#
|
637
|
+
# * First character must be a letter.
|
638
|
+
#
|
639
|
+
# * Cannot be a reserved word for the chosen database engine.
|
640
|
+
# @option options [String] :master_user_password
|
641
|
+
# The password for the master database user. Can be any printable ASCII
|
642
|
+
# character except "/", """, or "@".
|
643
|
+
#
|
644
|
+
# Type: String
|
645
|
+
#
|
646
|
+
# **MySQL**
|
647
|
+
#
|
648
|
+
# Constraints: Must contain from 8 to 41 characters.
|
649
|
+
#
|
650
|
+
# **MariaDB**
|
651
|
+
#
|
652
|
+
# Constraints: Must contain from 8 to 41 characters.
|
653
|
+
#
|
654
|
+
# **Oracle**
|
655
|
+
#
|
656
|
+
# Constraints: Must contain from 8 to 30 characters.
|
657
|
+
#
|
658
|
+
# **SQL Server**
|
659
|
+
#
|
660
|
+
# Constraints: Must contain from 8 to 128 characters.
|
661
|
+
#
|
662
|
+
# **PostgreSQL**
|
663
|
+
#
|
664
|
+
# Constraints: Must contain from 8 to 128 characters.
|
665
|
+
#
|
666
|
+
# **Amazon Aurora**
|
667
|
+
#
|
668
|
+
# Constraints: Must contain from 8 to 41 characters.
|
669
|
+
# @option options [Array<String>] :db_security_groups
|
670
|
+
# A list of DB security groups to associate with this DB instance.
|
671
|
+
#
|
672
|
+
# Default: The default DB security group for the database engine.
|
673
|
+
# @option options [Array<String>] :vpc_security_group_ids
|
674
|
+
# A list of EC2 VPC security groups to associate with this DB instance.
|
675
|
+
#
|
676
|
+
# Default: The default EC2 VPC security group for the DB subnet group's
|
677
|
+
# VPC.
|
678
|
+
# @option options [String] :availability_zone
|
679
|
+
# The EC2 Availability Zone that the database instance will be created
|
680
|
+
# in. For information on regions and Availability Zones, see [Regions
|
681
|
+
# and Availability Zones][1].
|
682
|
+
#
|
683
|
+
# Default: A random, system-chosen Availability Zone in the endpoint's
|
684
|
+
# region.
|
685
|
+
#
|
686
|
+
# Example: `us-east-1d`
|
687
|
+
#
|
688
|
+
# Constraint: The AvailabilityZone parameter cannot be specified if the
|
689
|
+
# MultiAZ parameter is set to `true`. The specified Availability Zone
|
690
|
+
# must be in the same region as the current endpoint.
|
691
|
+
#
|
692
|
+
#
|
693
|
+
#
|
694
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
|
695
|
+
# @option options [String] :db_subnet_group_name
|
696
|
+
# A DB subnet group to associate with this DB instance.
|
697
|
+
#
|
698
|
+
# If there is no DB subnet group, then it is a non-VPC DB instance.
|
699
|
+
# @option options [String] :preferred_maintenance_window
|
700
|
+
# The weekly time range during which system maintenance can occur, in
|
701
|
+
# Universal Coordinated Time (UTC). For more information, see [DB
|
702
|
+
# Instance Maintenance][1].
|
703
|
+
#
|
704
|
+
# Format: `ddd:hh24:mi-ddd:hh24:mi`
|
705
|
+
#
|
706
|
+
# Default: A 30-minute window selected at random from an 8-hour block of
|
707
|
+
# time per region, occurring on a random day of the week. To see the
|
708
|
+
# time blocks available, see [ Adjusting the Preferred Maintenance
|
709
|
+
# Window][2] in the *Amazon RDS User Guide.*
|
710
|
+
#
|
711
|
+
# Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
|
712
|
+
#
|
713
|
+
# Constraints: Minimum 30-minute window.
|
714
|
+
#
|
715
|
+
#
|
716
|
+
#
|
717
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBMaintenance.html
|
718
|
+
# [2]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html
|
719
|
+
# @option options [String] :db_parameter_group_name
|
720
|
+
# The name of the DB parameter group to associate with this DB instance.
|
721
|
+
# If this argument is omitted, the default DBParameterGroup for the
|
722
|
+
# specified engine will be used.
|
723
|
+
#
|
724
|
+
# Constraints:
|
725
|
+
#
|
726
|
+
# * Must be 1 to 255 alphanumeric characters
|
727
|
+
#
|
728
|
+
# * First character must be a letter
|
729
|
+
#
|
730
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens
|
731
|
+
# @option options [Integer] :backup_retention_period
|
732
|
+
# The number of days for which automated backups are retained. Setting
|
733
|
+
# this parameter to a positive number enables backups. Setting this
|
734
|
+
# parameter to 0 disables automated backups.
|
735
|
+
#
|
736
|
+
# Default: 1
|
737
|
+
#
|
738
|
+
# Constraints:
|
739
|
+
#
|
740
|
+
# * Must be a value from 0 to 35
|
741
|
+
#
|
742
|
+
# * Cannot be set to 0 if the DB instance is a source to Read Replicas
|
743
|
+
# @option options [String] :preferred_backup_window
|
744
|
+
# The daily time range during which automated backups are created if
|
745
|
+
# automated backups are enabled, using the `BackupRetentionPeriod`
|
746
|
+
# parameter. For more information, see [DB Instance Backups][1].
|
747
|
+
#
|
748
|
+
# Default: A 30-minute window selected at random from an 8-hour block of
|
749
|
+
# time per region. To see the time blocks available, see [ Adjusting the
|
750
|
+
# Preferred Maintenance Window][2] in the *Amazon RDS User Guide.*
|
751
|
+
#
|
752
|
+
# Constraints:
|
753
|
+
#
|
754
|
+
# * Must be in the format `hh24:mi-hh24:mi`.
|
755
|
+
#
|
756
|
+
# * Times should be in Universal Coordinated Time (UTC).
|
757
|
+
#
|
758
|
+
# * Must not conflict with the preferred maintenance window.
|
759
|
+
#
|
760
|
+
# * Must be at least 30 minutes.
|
761
|
+
#
|
762
|
+
#
|
763
|
+
#
|
764
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.BackingUpAndRestoringAmazonRDSInstances.html
|
765
|
+
# [2]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html
|
766
|
+
# @option options [Integer] :port
|
767
|
+
# The port number on which the database accepts connections.
|
768
|
+
#
|
769
|
+
# **MySQL**
|
770
|
+
#
|
771
|
+
# Default: `3306`
|
772
|
+
#
|
773
|
+
# Valid Values: `1150-65535`
|
774
|
+
#
|
775
|
+
# Type: Integer
|
776
|
+
#
|
777
|
+
# **MariaDB**
|
778
|
+
#
|
779
|
+
# Default: `3306`
|
780
|
+
#
|
781
|
+
# Valid Values: `1150-65535`
|
782
|
+
#
|
783
|
+
# Type: Integer
|
784
|
+
#
|
785
|
+
# **PostgreSQL**
|
786
|
+
#
|
787
|
+
# Default: `5432`
|
788
|
+
#
|
789
|
+
# Valid Values: `1150-65535`
|
790
|
+
#
|
791
|
+
# Type: Integer
|
792
|
+
#
|
793
|
+
# **Oracle**
|
794
|
+
#
|
795
|
+
# Default: `1521`
|
796
|
+
#
|
797
|
+
# Valid Values: `1150-65535`
|
798
|
+
#
|
799
|
+
# **SQL Server**
|
800
|
+
#
|
801
|
+
# Default: `1433`
|
802
|
+
#
|
803
|
+
# Valid Values: `1150-65535` except for `1434`, `3389`, `47001`,
|
804
|
+
# `49152`, and `49152` through `49156`.
|
805
|
+
#
|
806
|
+
# **Amazon Aurora**
|
807
|
+
#
|
808
|
+
# Default: `3306`
|
809
|
+
#
|
810
|
+
# Valid Values: `1150-65535`
|
811
|
+
#
|
812
|
+
# Type: Integer
|
813
|
+
# @option options [Boolean] :multi_az
|
814
|
+
# Specifies if the DB instance is a Multi-AZ deployment. You cannot set
|
815
|
+
# the AvailabilityZone parameter if the MultiAZ parameter is set to
|
816
|
+
# true.
|
817
|
+
# @option options [String] :engine_version
|
818
|
+
# The version number of the database engine to use.
|
819
|
+
#
|
820
|
+
# The following are the database engines and major and minor versions
|
821
|
+
# that are available with Amazon RDS. Not every database engine is
|
822
|
+
# available for every AWS region.
|
823
|
+
#
|
824
|
+
# **Amazon Aurora**
|
825
|
+
#
|
826
|
+
# * **Version 5.6 (available in these AWS regions: ap-northeast-1,
|
827
|
+
# ap-northeast-2, ap-south-1, ap-southeast-2, eu-west-1, us-east-1,
|
828
|
+
# us-west-2):** ` 5.6.10a`
|
829
|
+
#
|
830
|
+
# ^
|
831
|
+
#
|
832
|
+
# **MariaDB**
|
833
|
+
#
|
834
|
+
# * **Version 10.1 (available in these AWS regions: ap-northeast-1,
|
835
|
+
# ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2,
|
836
|
+
# eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1,
|
837
|
+
# us-west-2):** ` 10.1.14`
|
838
|
+
#
|
839
|
+
# * **Version 10.0 (available in all AWS regions):** ` 10.0.17 |
|
840
|
+
# 10.0.24`
|
841
|
+
#
|
842
|
+
# **MySQL**
|
843
|
+
#
|
844
|
+
# * **Version 5.7 (available in all AWS regions):** ` 5.7.10 | 5.7.11`
|
845
|
+
#
|
846
|
+
# * **Version 5.6 (available in all AWS regions):** ` 5.6.27 | 5.6.29`
|
847
|
+
#
|
848
|
+
# * **Version 5.6 (available in these AWS regions: ap-northeast-1,
|
849
|
+
# ap-northeast-2, ap-southeast-1, ap-southeast-2, eu-central-1,
|
850
|
+
# eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1,
|
851
|
+
# us-west-2):** ` 5.6.23`
|
852
|
+
#
|
853
|
+
# * **Version 5.6 (available in these AWS regions: ap-northeast-1,
|
854
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
855
|
+
# us-east-1, us-gov-west-1, us-west-1, us-west-2):** ` 5.6.19a |
|
856
|
+
# 5.6.19b | 5.6.21 | 5.6.21b | 5.6.22`
|
857
|
+
#
|
858
|
+
# * **Version 5.5 (available in all AWS regions):** ` 5.5.46`
|
859
|
+
#
|
860
|
+
# * **Version 5.5 (available in these AWS regions: ap-northeast-1,
|
861
|
+
# ap-northeast-2, ap-southeast-1, ap-southeast-2, eu-central-1,
|
862
|
+
# eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1,
|
863
|
+
# us-west-2):** ` 5.5.42`
|
864
|
+
#
|
865
|
+
# * **Version 5.5 (available in these AWS regions: ap-northeast-1,
|
866
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
867
|
+
# us-east-1, us-gov-west-1, us-west-1, us-west-2):** ` 5.5.40b |
|
868
|
+
# 5.5.41`
|
869
|
+
#
|
870
|
+
# * **Version 5.5 (available in these AWS regions: ap-northeast-1,
|
871
|
+
# ap-southeast-1, ap-southeast-2, eu-west-1, sa-east-1, us-east-1,
|
872
|
+
# us-gov-west-1, us-west-1, us-west-2):** ` 5.5.40 | 5.5.40a`
|
873
|
+
#
|
874
|
+
# **Oracle Database Enterprise Edition (oracle-ee)**
|
875
|
+
#
|
876
|
+
# * **Version 12.1.0.2 (available in these AWS regions: ap-northeast-1,
|
877
|
+
# ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2,
|
878
|
+
# eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1,
|
879
|
+
# us-west-2):** ` 12.1.0.2.v5`
|
880
|
+
#
|
881
|
+
# * **Version 12.1.0.2 (available in all AWS regions):** ` 12.1.0.2.v1 |
|
882
|
+
# 12.1.0.2.v2 | 12.1.0.2.v3 | 12.1.0.2.v4`
|
883
|
+
#
|
884
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
885
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
886
|
+
# us-east-1, us-west-1, us-west-2):** ` 12.1.0.1.v6`
|
887
|
+
#
|
888
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
889
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
890
|
+
# us-east-1, us-gov-west-1, us-west-1, us-west-2):** ` 12.1.0.1.v3 |
|
891
|
+
# 12.1.0.1.v4 | 12.1.0.1.v5`
|
892
|
+
#
|
893
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
894
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
895
|
+
# us-east-1, us-gov-west-1, us-gov-west-1, us-west-1, us-west-2):** `
|
896
|
+
# 12.1.0.1.v1 | 12.1.0.1.v2`
|
897
|
+
#
|
898
|
+
# * **Version 11.2.0.4 (available in these AWS regions: ap-northeast-1,
|
899
|
+
# ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2,
|
900
|
+
# eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1,
|
901
|
+
# us-west-2):** ` 11.2.0.4.v6 | 11.2.0.4.v9`
|
902
|
+
#
|
903
|
+
# * **Version 11.2.0.4 (available in all AWS regions):** ` 11.2.0.4.v1 |
|
904
|
+
# 11.2.0.4.v3 | 11.2.0.4.v4 | 11.2.0.4.v5 | 11.2.0.4.v7 | 11.2.0.4.v8`
|
905
|
+
#
|
906
|
+
# **Oracle Database Standard Edition Two (oracle-se2)**
|
907
|
+
#
|
908
|
+
# * **Version 12.1.0.2 (available in these AWS regions: ap-northeast-1,
|
909
|
+
# ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2,
|
910
|
+
# eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1,
|
911
|
+
# us-west-2):** ` 12.1.0.2.v5`
|
912
|
+
#
|
913
|
+
# * **Version 12.1.0.2 (available in all AWS regions):** ` 12.1.0.2.v2 |
|
914
|
+
# 12.1.0.2.v3 | 12.1.0.2.v4`
|
915
|
+
#
|
916
|
+
# **Oracle Database Standard Edition One (oracle-se1)**
|
917
|
+
#
|
918
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
919
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
920
|
+
# us-east-1, us-west-1, us-west-2):** ` 12.1.0.1.v6`
|
921
|
+
#
|
922
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
923
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
924
|
+
# us-east-1, us-gov-west-1, us-west-1, us-west-2):** ` 12.1.0.1.v3 |
|
925
|
+
# 12.1.0.1.v4 | 12.1.0.1.v5`
|
926
|
+
#
|
927
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
928
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
929
|
+
# us-east-1, us-gov-west-1, us-gov-west-1, us-west-1, us-west-2):** `
|
930
|
+
# 12.1.0.1.v1 | 12.1.0.1.v2`
|
931
|
+
#
|
932
|
+
# * **Version 11.2.0.4 (available in these AWS regions: ap-northeast-1,
|
933
|
+
# ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2,
|
934
|
+
# eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1,
|
935
|
+
# us-west-2):** ` 11.2.0.4.v6 | 11.2.0.4.v9`
|
936
|
+
#
|
937
|
+
# * **Version 11.2.0.4 (available in all AWS regions):** ` 11.2.0.4.v1 |
|
938
|
+
# 11.2.0.4.v3 | 11.2.0.4.v4 | 11.2.0.4.v5 | 11.2.0.4.v7 | 11.2.0.4.v8`
|
939
|
+
#
|
940
|
+
# **Oracle Database Standard Edition (oracle-se)**
|
941
|
+
#
|
942
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
943
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
944
|
+
# us-east-1, us-west-1, us-west-2):** ` 12.1.0.1.v6`
|
945
|
+
#
|
946
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
947
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
948
|
+
# us-east-1, us-gov-west-1, us-west-1, us-west-2):** ` 12.1.0.1.v3 |
|
949
|
+
# 12.1.0.1.v4 | 12.1.0.1.v5`
|
950
|
+
#
|
951
|
+
# * **Version 12.1.0.1 (available in these AWS regions: ap-northeast-1,
|
952
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
953
|
+
# us-east-1, us-gov-west-1, us-gov-west-1, us-west-1, us-west-2):** `
|
954
|
+
# 12.1.0.1.v1 | 12.1.0.1.v2`
|
955
|
+
#
|
956
|
+
# * **Version 11.2.0.4 (available in these AWS regions: ap-northeast-1,
|
957
|
+
# ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2,
|
958
|
+
# eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1,
|
959
|
+
# us-west-2):** ` 11.2.0.4.v6 | 11.2.0.4.v9`
|
960
|
+
#
|
961
|
+
# * **Version 11.2.0.4 (available in all AWS regions):** ` 11.2.0.4.v1 |
|
962
|
+
# 11.2.0.4.v3 | 11.2.0.4.v4 | 11.2.0.4.v5 | 11.2.0.4.v7 | 11.2.0.4.v8`
|
963
|
+
#
|
964
|
+
# **PostgreSQL**
|
965
|
+
#
|
966
|
+
# * **Version 9.5 (available in these AWS regions: ap-northeast-1,
|
967
|
+
# ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2,
|
968
|
+
# eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1,
|
969
|
+
# us-west-2):** ` 9.5.2 | 9.5.4`
|
970
|
+
#
|
971
|
+
# * **Version 9.4 (available in these AWS regions: ap-northeast-1,
|
972
|
+
# ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2,
|
973
|
+
# eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1,
|
974
|
+
# us-west-2):** ` 9.4.7 | 9.4.9`
|
975
|
+
#
|
976
|
+
# * **Version 9.4 (available in all AWS regions):** ` 9.4.5`
|
977
|
+
#
|
978
|
+
# * **Version 9.4 (available in these AWS regions: ap-northeast-1,
|
979
|
+
# ap-northeast-2, ap-southeast-1, ap-southeast-2, eu-central-1,
|
980
|
+
# eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1,
|
981
|
+
# us-west-2):** ` 9.4.1 | 9.4.4`
|
982
|
+
#
|
983
|
+
# * **Version 9.3 (available in these AWS regions: ap-northeast-1,
|
984
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
985
|
+
# us-east-1, us-gov-west-1, us-west-1, us-west-2):** ` 9.3.10 | 9.3.3
|
986
|
+
# | 9.3.5 | 9.3.6 | 9.3.9`
|
987
|
+
#
|
988
|
+
# * **Version 9.3 (available in these AWS regions: ap-northeast-1,
|
989
|
+
# ap-southeast-1, ap-southeast-2, eu-west-1, sa-east-1, us-east-1,
|
990
|
+
# us-gov-west-1, us-west-1, us-west-2):** ` 9.3.1 | 9.3.2`
|
991
|
+
#
|
992
|
+
# * **Version 9.3 (available in these AWS regions: ap-northeast-1,
|
993
|
+
# ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1,
|
994
|
+
# us-east-1, us-west-1, us-west-2):** ` 9.3.12 | 9.3.14`
|
995
|
+
#
|
996
|
+
# **Microsoft SQL Server Enterprise Edition (sqlserver-ee)**
|
997
|
+
#
|
998
|
+
# * **Version 11.00 (available in all AWS regions):** ` 11.00.2100.60.v1
|
999
|
+
# | 11.00.5058.0.v1 | 11.00.6020.0.v1`
|
1000
|
+
#
|
1001
|
+
# * **Version 10.50 (available in all AWS regions):** ` 10.50.2789.0.v1
|
1002
|
+
# | 10.50.6000.34.v1 | 10.50.6529.0.v1`
|
1003
|
+
#
|
1004
|
+
# **Microsoft SQL Server Express Edition (sqlserver-ex)**
|
1005
|
+
#
|
1006
|
+
# * **Version 12.00 (available in all AWS regions):** ` 12.00.4422.0.v1`
|
1007
|
+
#
|
1008
|
+
# * **Version 11.00 (available in all AWS regions):** ` 11.00.2100.60.v1
|
1009
|
+
# | 11.00.5058.0.v1 | 11.00.6020.0.v1`
|
1010
|
+
#
|
1011
|
+
# * **Version 10.50 (available in all AWS regions):** ` 10.50.2789.0.v1
|
1012
|
+
# | 10.50.6000.34.v1 | 10.50.6529.0.v1`
|
1013
|
+
#
|
1014
|
+
# **Microsoft SQL Server Standard Edition (sqlserver-se)**
|
1015
|
+
#
|
1016
|
+
# * **Version 12.00 (available in all AWS regions):** ` 12.00.4422.0.v1`
|
1017
|
+
#
|
1018
|
+
# * **Version 11.00 (available in all AWS regions):** ` 11.00.2100.60.v1
|
1019
|
+
# | 11.00.5058.0.v1 | 11.00.6020.0.v1`
|
1020
|
+
#
|
1021
|
+
# * **Version 10.50 (available in all AWS regions):** ` 10.50.2789.0.v1
|
1022
|
+
# | 10.50.6000.34.v1 | 10.50.6529.0.v1`
|
1023
|
+
#
|
1024
|
+
# **Microsoft SQL Server Web Edition (sqlserver-web)**
|
1025
|
+
#
|
1026
|
+
# * **Version 12.00 (available in all AWS regions):** ` 12.00.4422.0.v1`
|
1027
|
+
#
|
1028
|
+
# * **Version 11.00 (available in all AWS regions):** ` 11.00.2100.60.v1
|
1029
|
+
# | 11.00.5058.0.v1 | 11.00.6020.0.v1`
|
1030
|
+
#
|
1031
|
+
# * **Version 10.50 (available in all AWS regions):** ` 10.50.2789.0.v1
|
1032
|
+
# | 10.50.6000.34.v1 | 10.50.6529.0.v1`
|
1033
|
+
# @option options [Boolean] :auto_minor_version_upgrade
|
1034
|
+
# Indicates that minor engine upgrades will be applied automatically to
|
1035
|
+
# the DB instance during the maintenance window.
|
1036
|
+
#
|
1037
|
+
# Default: `true`
|
1038
|
+
# @option options [String] :license_model
|
1039
|
+
# License model information for this DB instance.
|
1040
|
+
#
|
1041
|
+
# Valid values: `license-included` \| `bring-your-own-license` \|
|
1042
|
+
# `general-public-license`
|
1043
|
+
# @option options [Integer] :iops
|
1044
|
+
# The amount of Provisioned IOPS (input/output operations per second) to
|
1045
|
+
# be initially allocated for the DB instance.
|
1046
|
+
#
|
1047
|
+
# Constraints: Must be a multiple between 3 and 10 of the storage amount
|
1048
|
+
# for the DB instance. Must also be an integer multiple of 1000. For
|
1049
|
+
# example, if the size of your DB instance is 500 GB, then your `Iops`
|
1050
|
+
# value can be 2000, 3000, 4000, or 5000.
|
1051
|
+
# @option options [String] :option_group_name
|
1052
|
+
# Indicates that the DB instance should be associated with the specified
|
1053
|
+
# option group.
|
1054
|
+
#
|
1055
|
+
# Permanent options, such as the TDE option for Oracle Advanced Security
|
1056
|
+
# TDE, cannot be removed from an option group, and that option group
|
1057
|
+
# cannot be removed from a DB instance once it is associated with a DB
|
1058
|
+
# instance
|
1059
|
+
# @option options [String] :character_set_name
|
1060
|
+
# For supported engines, indicates that the DB instance should be
|
1061
|
+
# associated with the specified CharacterSet.
|
1062
|
+
# @option options [Boolean] :publicly_accessible
|
1063
|
+
# Specifies the accessibility options for the DB instance. A value of
|
1064
|
+
# true specifies an Internet-facing instance with a publicly resolvable
|
1065
|
+
# DNS name, which resolves to a public IP address. A value of false
|
1066
|
+
# specifies an internal instance with a DNS name that resolves to a
|
1067
|
+
# private IP address.
|
1068
|
+
#
|
1069
|
+
# Default: The default behavior varies depending on whether a VPC has
|
1070
|
+
# been requested or not. The following list shows the default behavior
|
1071
|
+
# in each case.
|
1072
|
+
#
|
1073
|
+
# * **Default VPC:** true
|
1074
|
+
#
|
1075
|
+
# * **VPC:** false
|
1076
|
+
#
|
1077
|
+
# If no DB subnet group has been specified as part of the request and
|
1078
|
+
# the PubliclyAccessible value has not been set, the DB instance will be
|
1079
|
+
# publicly accessible. If a specific DB subnet group has been specified
|
1080
|
+
# as part of the request and the PubliclyAccessible value has not been
|
1081
|
+
# set, the DB instance will be private.
|
1082
|
+
# @option options [Array<Types::Tag>] :tags
|
1083
|
+
# A list of tags.
|
1084
|
+
# @option options [String] :db_cluster_identifier
|
1085
|
+
# The identifier of the DB cluster that the instance will belong to.
|
1086
|
+
#
|
1087
|
+
# For information on creating a DB cluster, see CreateDBCluster.
|
1088
|
+
#
|
1089
|
+
# Type: String
|
1090
|
+
# @option options [String] :storage_type
|
1091
|
+
# Specifies the storage type to be associated with the DB instance.
|
1092
|
+
#
|
1093
|
+
# Valid values: `standard | gp2 | io1`
|
1094
|
+
#
|
1095
|
+
# If you specify `io1`, you must also include a value for the `Iops`
|
1096
|
+
# parameter.
|
1097
|
+
#
|
1098
|
+
# Default: `io1` if the `Iops` parameter is specified; otherwise
|
1099
|
+
# `standard`
|
1100
|
+
# @option options [String] :tde_credential_arn
|
1101
|
+
# The ARN from the Key Store with which to associate the instance for
|
1102
|
+
# TDE encryption.
|
1103
|
+
# @option options [String] :tde_credential_password
|
1104
|
+
# The password for the given ARN from the Key Store in order to access
|
1105
|
+
# the device.
|
1106
|
+
# @option options [Boolean] :storage_encrypted
|
1107
|
+
# Specifies whether the DB instance is encrypted.
|
1108
|
+
#
|
1109
|
+
# Default: false
|
1110
|
+
# @option options [String] :kms_key_id
|
1111
|
+
# The KMS key identifier for an encrypted DB instance.
|
1112
|
+
#
|
1113
|
+
# The KMS key identifier is the Amazon Resource Name (ARN) for the KMS
|
1114
|
+
# encryption key. If you are creating a DB instance with the same AWS
|
1115
|
+
# account that owns the KMS encryption key used to encrypt the new DB
|
1116
|
+
# instance, then you can use the KMS key alias instead of the ARN for
|
1117
|
+
# the KM encryption key.
|
1118
|
+
#
|
1119
|
+
# If the `StorageEncrypted` parameter is true, and you do not specify a
|
1120
|
+
# value for the `KmsKeyId` parameter, then Amazon RDS will use your
|
1121
|
+
# default encryption key. AWS KMS creates the default encryption key for
|
1122
|
+
# your AWS account. Your AWS account has a different default encryption
|
1123
|
+
# key for each AWS region.
|
1124
|
+
# @option options [String] :domain
|
1125
|
+
# Specify the Active Directory Domain to create the instance in.
|
1126
|
+
# @option options [Boolean] :copy_tags_to_snapshot
|
1127
|
+
# True to copy all tags from the DB instance to snapshots of the DB
|
1128
|
+
# instance; otherwise false. The default is false.
|
1129
|
+
# @option options [Integer] :monitoring_interval
|
1130
|
+
# The interval, in seconds, between points when Enhanced Monitoring
|
1131
|
+
# metrics are collected for the DB instance. To disable collecting
|
1132
|
+
# Enhanced Monitoring metrics, specify 0. The default is 0.
|
1133
|
+
#
|
1134
|
+
# If `MonitoringRoleArn` is specified, then you must also set
|
1135
|
+
# `MonitoringInterval` to a value other than 0.
|
1136
|
+
#
|
1137
|
+
# Valid Values: `0, 1, 5, 10, 15, 30, 60`
|
1138
|
+
# @option options [String] :monitoring_role_arn
|
1139
|
+
# The ARN for the IAM role that permits RDS to send enhanced monitoring
|
1140
|
+
# metrics to CloudWatch Logs. For example,
|
1141
|
+
# `arn:aws:iam:123456789012:role/emaccess`. For information on creating
|
1142
|
+
# a monitoring role, go to [To create an IAM role for Amazon RDS
|
1143
|
+
# Enhanced Monitoring][1].
|
1144
|
+
#
|
1145
|
+
# If `MonitoringInterval` is set to a value other than 0, then you must
|
1146
|
+
# supply a `MonitoringRoleArn` value.
|
1147
|
+
#
|
1148
|
+
#
|
1149
|
+
#
|
1150
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole
|
1151
|
+
# @option options [String] :domain_iam_role_name
|
1152
|
+
# Specify the name of the IAM role to be used when making API calls to
|
1153
|
+
# the Directory Service.
|
1154
|
+
# @option options [Integer] :promotion_tier
|
1155
|
+
# A value that specifies the order in which an Aurora Replica is
|
1156
|
+
# promoted to the primary instance after a failure of the existing
|
1157
|
+
# primary instance. For more information, see [ Fault Tolerance for an
|
1158
|
+
# Aurora DB Cluster][1].
|
1159
|
+
#
|
1160
|
+
# Default: 1
|
1161
|
+
#
|
1162
|
+
# Valid Values: 0 - 15
|
1163
|
+
#
|
1164
|
+
#
|
1165
|
+
#
|
1166
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance
|
1167
|
+
# @option options [String] :timezone
|
1168
|
+
# The time zone of the DB instance. The time zone parameter is currently
|
1169
|
+
# supported only by [Microsoft SQL Server][1].
|
1170
|
+
#
|
1171
|
+
#
|
1172
|
+
#
|
1173
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone
|
1174
|
+
# @return [DBInstance]
|
1175
|
+
def create(options = {})
|
1176
|
+
options = options.merge(db_instance_identifier: @id)
|
1177
|
+
resp = @client.create_db_instance(options)
|
1178
|
+
DBInstance.new(
|
1179
|
+
id: resp.data.db_instance.db_instance_identifier,
|
1180
|
+
data: resp.data.db_instance,
|
1181
|
+
client: @client
|
1182
|
+
)
|
1183
|
+
end
|
1184
|
+
|
1185
|
+
# @example Request syntax with placeholder values
|
1186
|
+
#
|
1187
|
+
# dbinstance = db_instance.create_read_replica({
|
1188
|
+
# db_instance_identifier: "String", # required
|
1189
|
+
# db_instance_class: "String",
|
1190
|
+
# availability_zone: "String",
|
1191
|
+
# port: 1,
|
1192
|
+
# auto_minor_version_upgrade: false,
|
1193
|
+
# iops: 1,
|
1194
|
+
# option_group_name: "String",
|
1195
|
+
# publicly_accessible: false,
|
1196
|
+
# tags: [
|
1197
|
+
# {
|
1198
|
+
# key: "String",
|
1199
|
+
# value: "String",
|
1200
|
+
# },
|
1201
|
+
# ],
|
1202
|
+
# db_subnet_group_name: "String",
|
1203
|
+
# storage_type: "String",
|
1204
|
+
# copy_tags_to_snapshot: false,
|
1205
|
+
# monitoring_interval: 1,
|
1206
|
+
# monitoring_role_arn: "String",
|
1207
|
+
# })
|
1208
|
+
# @param [Hash] options ({})
|
1209
|
+
# @option options [required, String] :db_instance_identifier
|
1210
|
+
# The DB instance identifier of the Read Replica. This identifier is the
|
1211
|
+
# unique key that identifies a DB instance. This parameter is stored as
|
1212
|
+
# a lowercase string.
|
1213
|
+
# @option options [String] :db_instance_class
|
1214
|
+
# The compute and memory capacity of the Read Replica.
|
1215
|
+
#
|
1216
|
+
# Valid Values: `db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge
|
1217
|
+
# | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge | db.m3.medium |
|
1218
|
+
# db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large |
|
1219
|
+
# db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge |
|
1220
|
+
# db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge |
|
1221
|
+
# db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium |
|
1222
|
+
# db.t2.large`
|
1223
|
+
#
|
1224
|
+
# Default: Inherits from the source DB instance.
|
1225
|
+
# @option options [String] :availability_zone
|
1226
|
+
# The Amazon EC2 Availability Zone that the Read Replica will be created
|
1227
|
+
# in.
|
1228
|
+
#
|
1229
|
+
# Default: A random, system-chosen Availability Zone in the endpoint's
|
1230
|
+
# region.
|
1231
|
+
#
|
1232
|
+
# Example: `us-east-1d`
|
1233
|
+
# @option options [Integer] :port
|
1234
|
+
# The port number that the DB instance uses for connections.
|
1235
|
+
#
|
1236
|
+
# Default: Inherits from the source DB instance
|
1237
|
+
#
|
1238
|
+
# Valid Values: `1150-65535`
|
1239
|
+
# @option options [Boolean] :auto_minor_version_upgrade
|
1240
|
+
# Indicates that minor engine upgrades will be applied automatically to
|
1241
|
+
# the Read Replica during the maintenance window.
|
1242
|
+
#
|
1243
|
+
# Default: Inherits from the source DB instance
|
1244
|
+
# @option options [Integer] :iops
|
1245
|
+
# The amount of Provisioned IOPS (input/output operations per second) to
|
1246
|
+
# be initially allocated for the DB instance.
|
1247
|
+
# @option options [String] :option_group_name
|
1248
|
+
# The option group the DB instance will be associated with. If omitted,
|
1249
|
+
# the default option group for the engine specified will be used.
|
1250
|
+
# @option options [Boolean] :publicly_accessible
|
1251
|
+
# Specifies the accessibility options for the DB instance. A value of
|
1252
|
+
# true specifies an Internet-facing instance with a publicly resolvable
|
1253
|
+
# DNS name, which resolves to a public IP address. A value of false
|
1254
|
+
# specifies an internal instance with a DNS name that resolves to a
|
1255
|
+
# private IP address.
|
1256
|
+
#
|
1257
|
+
# Default: The default behavior varies depending on whether a VPC has
|
1258
|
+
# been requested or not. The following list shows the default behavior
|
1259
|
+
# in each case.
|
1260
|
+
#
|
1261
|
+
# * **Default VPC:**true
|
1262
|
+
#
|
1263
|
+
# * **VPC:**false
|
1264
|
+
#
|
1265
|
+
# If no DB subnet group has been specified as part of the request and
|
1266
|
+
# the PubliclyAccessible value has not been set, the DB instance will be
|
1267
|
+
# publicly accessible. If a specific DB subnet group has been specified
|
1268
|
+
# as part of the request and the PubliclyAccessible value has not been
|
1269
|
+
# set, the DB instance will be private.
|
1270
|
+
# @option options [Array<Types::Tag>] :tags
|
1271
|
+
# A list of tags.
|
1272
|
+
# @option options [String] :db_subnet_group_name
|
1273
|
+
# Specifies a DB subnet group for the DB instance. The new DB instance
|
1274
|
+
# will be created in the VPC associated with the DB subnet group. If no
|
1275
|
+
# DB subnet group is specified, then the new DB instance is not created
|
1276
|
+
# in a VPC.
|
1277
|
+
#
|
1278
|
+
# Constraints:
|
1279
|
+
#
|
1280
|
+
# * Can only be specified if the source DB instance identifier specifies
|
1281
|
+
# a DB instance in another region.
|
1282
|
+
#
|
1283
|
+
# * The specified DB subnet group must be in the same region in which
|
1284
|
+
# the operation is running.
|
1285
|
+
#
|
1286
|
+
# * All Read Replicas in one region that are created from the same
|
1287
|
+
# source DB instance must either:>
|
1288
|
+
#
|
1289
|
+
# * Specify DB subnet groups from the same VPC. All these Read
|
1290
|
+
# Replicas will be created in the same VPC.
|
1291
|
+
#
|
1292
|
+
# * Not specify a DB subnet group. All these Read Replicas will be
|
1293
|
+
# created outside of any VPC.
|
1294
|
+
#
|
1295
|
+
# Constraints: Must contain no more than 255 alphanumeric characters,
|
1296
|
+
# periods, underscores, spaces, or hyphens. Must not be default.
|
1297
|
+
#
|
1298
|
+
# Example: `mySubnetgroup`
|
1299
|
+
# @option options [String] :storage_type
|
1300
|
+
# Specifies the storage type to be associated with the Read Replica.
|
1301
|
+
#
|
1302
|
+
# Valid values: `standard | gp2 | io1`
|
1303
|
+
#
|
1304
|
+
# If you specify `io1`, you must also include a value for the `Iops`
|
1305
|
+
# parameter.
|
1306
|
+
#
|
1307
|
+
# Default: `io1` if the `Iops` parameter is specified; otherwise
|
1308
|
+
# `standard`
|
1309
|
+
# @option options [Boolean] :copy_tags_to_snapshot
|
1310
|
+
# True to copy all tags from the Read Replica to snapshots of the Read
|
1311
|
+
# Replica; otherwise false. The default is false.
|
1312
|
+
# @option options [Integer] :monitoring_interval
|
1313
|
+
# The interval, in seconds, between points when Enhanced Monitoring
|
1314
|
+
# metrics are collected for the Read Replica. To disable collecting
|
1315
|
+
# Enhanced Monitoring metrics, specify 0. The default is 0.
|
1316
|
+
#
|
1317
|
+
# If `MonitoringRoleArn` is specified, then you must also set
|
1318
|
+
# `MonitoringInterval` to a value other than 0.
|
1319
|
+
#
|
1320
|
+
# Valid Values: `0, 1, 5, 10, 15, 30, 60`
|
1321
|
+
# @option options [String] :monitoring_role_arn
|
1322
|
+
# The ARN for the IAM role that permits RDS to send enhanced monitoring
|
1323
|
+
# metrics to CloudWatch Logs. For example,
|
1324
|
+
# `arn:aws:iam:123456789012:role/emaccess`. For information on creating
|
1325
|
+
# a monitoring role, go to [To create an IAM role for Amazon RDS
|
1326
|
+
# Enhanced Monitoring][1].
|
1327
|
+
#
|
1328
|
+
# If `MonitoringInterval` is set to a value other than 0, then you must
|
1329
|
+
# supply a `MonitoringRoleArn` value.
|
1330
|
+
#
|
1331
|
+
#
|
1332
|
+
#
|
1333
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole
|
1334
|
+
# @return [DBInstance]
|
1335
|
+
def create_read_replica(options = {})
|
1336
|
+
options = options.merge(source_db_instance_identifier: @id)
|
1337
|
+
resp = @client.create_db_instance_read_replica(options)
|
1338
|
+
DBInstance.new(
|
1339
|
+
id: resp.data.db_instance.db_instance_identifier,
|
1340
|
+
data: resp.data.db_instance,
|
1341
|
+
client: @client
|
1342
|
+
)
|
1343
|
+
end
|
1344
|
+
|
1345
|
+
# @example Request syntax with placeholder values
|
1346
|
+
#
|
1347
|
+
# dbsnapshot = db_instance.create_snapshot({
|
1348
|
+
# db_snapshot_identifier: "String", # required
|
1349
|
+
# tags: [
|
1350
|
+
# {
|
1351
|
+
# key: "String",
|
1352
|
+
# value: "String",
|
1353
|
+
# },
|
1354
|
+
# ],
|
1355
|
+
# })
|
1356
|
+
# @param [Hash] options ({})
|
1357
|
+
# @option options [required, String] :db_snapshot_identifier
|
1358
|
+
# The identifier for the DB snapshot.
|
1359
|
+
#
|
1360
|
+
# Constraints:
|
1361
|
+
#
|
1362
|
+
# * Cannot be null, empty, or blank
|
1363
|
+
#
|
1364
|
+
# * Must contain from 1 to 255 alphanumeric characters or hyphens
|
1365
|
+
#
|
1366
|
+
# * First character must be a letter
|
1367
|
+
#
|
1368
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens
|
1369
|
+
#
|
1370
|
+
# Example: `my-snapshot-id`
|
1371
|
+
# @option options [Array<Types::Tag>] :tags
|
1372
|
+
# A list of tags.
|
1373
|
+
# @return [DBSnapshot]
|
1374
|
+
def create_snapshot(options = {})
|
1375
|
+
options = options.merge(db_instance_identifier: @id)
|
1376
|
+
resp = @client.create_db_snapshot(options)
|
1377
|
+
DBSnapshot.new(
|
1378
|
+
instance_id: resp.data.db_snapshot.db_instance_identifier,
|
1379
|
+
snapshot_id: resp.data.db_snapshot.db_snapshot_identifier,
|
1380
|
+
data: resp.data.db_snapshot,
|
1381
|
+
client: @client
|
1382
|
+
)
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
# @example Request syntax with placeholder values
|
1386
|
+
#
|
1387
|
+
# dbinstance = db_instance.delete({
|
1388
|
+
# skip_final_snapshot: false,
|
1389
|
+
# final_db_snapshot_identifier: "String",
|
1390
|
+
# })
|
1391
|
+
# @param [Hash] options ({})
|
1392
|
+
# @option options [Boolean] :skip_final_snapshot
|
1393
|
+
# Determines whether a final DB snapshot is created before the DB
|
1394
|
+
# instance is deleted. If `true` is specified, no DBSnapshot is created.
|
1395
|
+
# If `false` is specified, a DB snapshot is created before the DB
|
1396
|
+
# instance is deleted.
|
1397
|
+
#
|
1398
|
+
# Note that when a DB instance is in a failure state and has a status of
|
1399
|
+
# 'failed', 'incompatible-restore', or 'incompatible-network', it
|
1400
|
+
# can only be deleted when the SkipFinalSnapshot parameter is set to
|
1401
|
+
# "true".
|
1402
|
+
#
|
1403
|
+
# Specify `true` when deleting a Read Replica.
|
1404
|
+
#
|
1405
|
+
# <note markdown="1"> The FinalDBSnapshotIdentifier parameter must be specified if
|
1406
|
+
# SkipFinalSnapshot is `false`.
|
1407
|
+
#
|
1408
|
+
# </note>
|
1409
|
+
#
|
1410
|
+
# Default: `false`
|
1411
|
+
# @option options [String] :final_db_snapshot_identifier
|
1412
|
+
# The DBSnapshotIdentifier of the new DBSnapshot created when
|
1413
|
+
# SkipFinalSnapshot is set to `false`.
|
1414
|
+
#
|
1415
|
+
# <note markdown="1"> Specifying this parameter and also setting the SkipFinalShapshot
|
1416
|
+
# parameter to true results in an error.
|
1417
|
+
#
|
1418
|
+
# </note>
|
1419
|
+
#
|
1420
|
+
# Constraints:
|
1421
|
+
#
|
1422
|
+
# * Must be 1 to 255 alphanumeric characters
|
1423
|
+
#
|
1424
|
+
# * First character must be a letter
|
1425
|
+
#
|
1426
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens
|
1427
|
+
#
|
1428
|
+
# * Cannot be specified when deleting a Read Replica.
|
1429
|
+
# @return [DBInstance]
|
1430
|
+
def delete(options = {})
|
1431
|
+
options = options.merge(db_instance_identifier: @id)
|
1432
|
+
resp = @client.delete_db_instance(options)
|
1433
|
+
DBInstance.new(
|
1434
|
+
id: resp.data.db_instance.db_instance_identifier,
|
1435
|
+
data: resp.data.db_instance,
|
1436
|
+
client: @client
|
1437
|
+
)
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
# @example Request syntax with placeholder values
|
1441
|
+
#
|
1442
|
+
# dbinstance = db_instance.modify({
|
1443
|
+
# allocated_storage: 1,
|
1444
|
+
# db_instance_class: "String",
|
1445
|
+
# db_subnet_group_name: "String",
|
1446
|
+
# db_security_groups: ["String"],
|
1447
|
+
# vpc_security_group_ids: ["String"],
|
1448
|
+
# apply_immediately: false,
|
1449
|
+
# master_user_password: "String",
|
1450
|
+
# db_parameter_group_name: "String",
|
1451
|
+
# backup_retention_period: 1,
|
1452
|
+
# preferred_backup_window: "String",
|
1453
|
+
# preferred_maintenance_window: "String",
|
1454
|
+
# multi_az: false,
|
1455
|
+
# engine_version: "String",
|
1456
|
+
# allow_major_version_upgrade: false,
|
1457
|
+
# auto_minor_version_upgrade: false,
|
1458
|
+
# license_model: "String",
|
1459
|
+
# iops: 1,
|
1460
|
+
# option_group_name: "String",
|
1461
|
+
# new_db_instance_identifier: "String",
|
1462
|
+
# storage_type: "String",
|
1463
|
+
# tde_credential_arn: "String",
|
1464
|
+
# tde_credential_password: "String",
|
1465
|
+
# ca_certificate_identifier: "String",
|
1466
|
+
# domain: "String",
|
1467
|
+
# copy_tags_to_snapshot: false,
|
1468
|
+
# monitoring_interval: 1,
|
1469
|
+
# db_port_number: 1,
|
1470
|
+
# publicly_accessible: false,
|
1471
|
+
# monitoring_role_arn: "String",
|
1472
|
+
# domain_iam_role_name: "String",
|
1473
|
+
# promotion_tier: 1,
|
1474
|
+
# })
|
1475
|
+
# @param [Hash] options ({})
|
1476
|
+
# @option options [Integer] :allocated_storage
|
1477
|
+
# The new storage capacity of the RDS instance. Changing this setting
|
1478
|
+
# does not result in an outage and the change is applied during the next
|
1479
|
+
# maintenance window unless `ApplyImmediately` is set to `true` for this
|
1480
|
+
# request.
|
1481
|
+
#
|
1482
|
+
# **MySQL**
|
1483
|
+
#
|
1484
|
+
# Default: Uses existing setting
|
1485
|
+
#
|
1486
|
+
# Valid Values: 5-6144
|
1487
|
+
#
|
1488
|
+
# Constraints: Value supplied must be at least 10% greater than the
|
1489
|
+
# current value. Values that are not at least 10% greater than the
|
1490
|
+
# existing value are rounded up so that they are 10% greater than the
|
1491
|
+
# current value.
|
1492
|
+
#
|
1493
|
+
# Type: Integer
|
1494
|
+
#
|
1495
|
+
# **MariaDB**
|
1496
|
+
#
|
1497
|
+
# Default: Uses existing setting
|
1498
|
+
#
|
1499
|
+
# Valid Values: 5-6144
|
1500
|
+
#
|
1501
|
+
# Constraints: Value supplied must be at least 10% greater than the
|
1502
|
+
# current value. Values that are not at least 10% greater than the
|
1503
|
+
# existing value are rounded up so that they are 10% greater than the
|
1504
|
+
# current value.
|
1505
|
+
#
|
1506
|
+
# Type: Integer
|
1507
|
+
#
|
1508
|
+
# **PostgreSQL**
|
1509
|
+
#
|
1510
|
+
# Default: Uses existing setting
|
1511
|
+
#
|
1512
|
+
# Valid Values: 5-6144
|
1513
|
+
#
|
1514
|
+
# Constraints: Value supplied must be at least 10% greater than the
|
1515
|
+
# current value. Values that are not at least 10% greater than the
|
1516
|
+
# existing value are rounded up so that they are 10% greater than the
|
1517
|
+
# current value.
|
1518
|
+
#
|
1519
|
+
# Type: Integer
|
1520
|
+
#
|
1521
|
+
# **Oracle**
|
1522
|
+
#
|
1523
|
+
# Default: Uses existing setting
|
1524
|
+
#
|
1525
|
+
# Valid Values: 10-6144
|
1526
|
+
#
|
1527
|
+
# Constraints: Value supplied must be at least 10% greater than the
|
1528
|
+
# current value. Values that are not at least 10% greater than the
|
1529
|
+
# existing value are rounded up so that they are 10% greater than the
|
1530
|
+
# current value.
|
1531
|
+
#
|
1532
|
+
# **SQL Server**
|
1533
|
+
#
|
1534
|
+
# Cannot be modified.
|
1535
|
+
#
|
1536
|
+
# If you choose to migrate your DB instance from using standard storage
|
1537
|
+
# to using Provisioned IOPS, or from using Provisioned IOPS to using
|
1538
|
+
# standard storage, the process can take time. The duration of the
|
1539
|
+
# migration depends on several factors such as database load, storage
|
1540
|
+
# size, storage type (standard or Provisioned IOPS), amount of IOPS
|
1541
|
+
# provisioned (if any), and the number of prior scale storage
|
1542
|
+
# operations. Typical migration times are under 24 hours, but the
|
1543
|
+
# process can take up to several days in some cases. During the
|
1544
|
+
# migration, the DB instance will be available for use, but might
|
1545
|
+
# experience performance degradation. While the migration takes place,
|
1546
|
+
# nightly backups for the instance will be suspended. No other Amazon
|
1547
|
+
# RDS operations can take place for the instance, including modifying
|
1548
|
+
# the instance, rebooting the instance, deleting the instance, creating
|
1549
|
+
# a Read Replica for the instance, and creating a DB snapshot of the
|
1550
|
+
# instance.
|
1551
|
+
# @option options [String] :db_instance_class
|
1552
|
+
# The new compute and memory capacity of the DB instance. To determine
|
1553
|
+
# the instance classes that are available for a particular DB engine,
|
1554
|
+
# use the DescribeOrderableDBInstanceOptions action.
|
1555
|
+
#
|
1556
|
+
# Passing a value for this setting causes an outage during the change
|
1557
|
+
# and is applied during the next maintenance window, unless
|
1558
|
+
# `ApplyImmediately` is specified as `true` for this request.
|
1559
|
+
#
|
1560
|
+
# Default: Uses existing setting
|
1561
|
+
#
|
1562
|
+
# Valid Values: `db.t1.micro | db.m1.small | db.m1.medium | db.m1.large
|
1563
|
+
# | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge |
|
1564
|
+
# db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge |
|
1565
|
+
# db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge |
|
1566
|
+
# db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge |
|
1567
|
+
# db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small |
|
1568
|
+
# db.t2.medium | db.t2.large`
|
1569
|
+
# @option options [String] :db_subnet_group_name
|
1570
|
+
# The new DB subnet group for the DB instance. You can use this
|
1571
|
+
# parameter to move your DB instance to a different VPC. If your DB
|
1572
|
+
# instance is not in a VPC, you can also use this parameter to move your
|
1573
|
+
# DB instance into a VPC. For more information, see [Updating the VPC
|
1574
|
+
# for a DB Instance][1].
|
1575
|
+
#
|
1576
|
+
# Changing the subnet group causes an outage during the change. The
|
1577
|
+
# change is applied during the next maintenance window, unless you
|
1578
|
+
# specify `true` for the `ApplyImmediately` parameter.
|
1579
|
+
#
|
1580
|
+
# Constraints: Must contain no more than 255 alphanumeric characters,
|
1581
|
+
# periods, underscores, spaces, or hyphens.
|
1582
|
+
#
|
1583
|
+
# Example: `mySubnetGroup`
|
1584
|
+
#
|
1585
|
+
#
|
1586
|
+
#
|
1587
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Non-VPC2VPC
|
1588
|
+
# @option options [Array<String>] :db_security_groups
|
1589
|
+
# A list of DB security groups to authorize on this DB instance.
|
1590
|
+
# Changing this setting does not result in an outage and the change is
|
1591
|
+
# asynchronously applied as soon as possible.
|
1592
|
+
#
|
1593
|
+
# Constraints:
|
1594
|
+
#
|
1595
|
+
# * Must be 1 to 255 alphanumeric characters
|
1596
|
+
#
|
1597
|
+
# * First character must be a letter
|
1598
|
+
#
|
1599
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens
|
1600
|
+
# @option options [Array<String>] :vpc_security_group_ids
|
1601
|
+
# A list of EC2 VPC security groups to authorize on this DB instance.
|
1602
|
+
# This change is asynchronously applied as soon as possible.
|
1603
|
+
#
|
1604
|
+
# Constraints:
|
1605
|
+
#
|
1606
|
+
# * Must be 1 to 255 alphanumeric characters
|
1607
|
+
#
|
1608
|
+
# * First character must be a letter
|
1609
|
+
#
|
1610
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens
|
1611
|
+
# @option options [Boolean] :apply_immediately
|
1612
|
+
# Specifies whether the modifications in this request and any pending
|
1613
|
+
# modifications are asynchronously applied as soon as possible,
|
1614
|
+
# regardless of the `PreferredMaintenanceWindow` setting for the DB
|
1615
|
+
# instance.
|
1616
|
+
#
|
1617
|
+
# If this parameter is set to `false`, changes to the DB instance are
|
1618
|
+
# applied during the next maintenance window. Some parameter changes can
|
1619
|
+
# cause an outage and will be applied on the next call to
|
1620
|
+
# RebootDBInstance, or the next failure reboot. Review the table of
|
1621
|
+
# parameters in [Modifying a DB Instance and Using the Apply Immediately
|
1622
|
+
# Parameter][1] to see the impact that setting `ApplyImmediately` to
|
1623
|
+
# `true` or `false` has for each modified parameter and to determine
|
1624
|
+
# when the changes will be applied.
|
1625
|
+
#
|
1626
|
+
# Default: `false`
|
1627
|
+
#
|
1628
|
+
#
|
1629
|
+
#
|
1630
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html
|
1631
|
+
# @option options [String] :master_user_password
|
1632
|
+
# The new password for the DB instance master user. Can be any printable
|
1633
|
+
# ASCII character except "/", """, or "@".
|
1634
|
+
#
|
1635
|
+
# Changing this parameter does not result in an outage and the change is
|
1636
|
+
# asynchronously applied as soon as possible. Between the time of the
|
1637
|
+
# request and the completion of the request, the `MasterUserPassword`
|
1638
|
+
# element exists in the `PendingModifiedValues` element of the operation
|
1639
|
+
# response.
|
1640
|
+
#
|
1641
|
+
# Default: Uses existing setting
|
1642
|
+
#
|
1643
|
+
# Constraints: Must be 8 to 41 alphanumeric characters (MySQL, MariaDB,
|
1644
|
+
# and Amazon Aurora), 8 to 30 alphanumeric characters (Oracle), or 8 to
|
1645
|
+
# 128 alphanumeric characters (SQL Server).
|
1646
|
+
#
|
1647
|
+
# <note markdown="1"> Amazon RDS API actions never return the password, so this action
|
1648
|
+
# provides a way to regain access to a primary instance user if the
|
1649
|
+
# password is lost. This includes restoring privileges that might have
|
1650
|
+
# been accidentally revoked.
|
1651
|
+
#
|
1652
|
+
# </note>
|
1653
|
+
# @option options [String] :db_parameter_group_name
|
1654
|
+
# The name of the DB parameter group to apply to the DB instance.
|
1655
|
+
# Changing this setting does not result in an outage. The parameter
|
1656
|
+
# group name itself is changed immediately, but the actual parameter
|
1657
|
+
# changes are not applied until you reboot the instance without
|
1658
|
+
# failover. The db instance will NOT be rebooted automatically and the
|
1659
|
+
# parameter changes will NOT be applied during the next maintenance
|
1660
|
+
# window.
|
1661
|
+
#
|
1662
|
+
# Default: Uses existing setting
|
1663
|
+
#
|
1664
|
+
# Constraints: The DB parameter group must be in the same DB parameter
|
1665
|
+
# group family as this DB instance.
|
1666
|
+
# @option options [Integer] :backup_retention_period
|
1667
|
+
# The number of days to retain automated backups. Setting this parameter
|
1668
|
+
# to a positive number enables backups. Setting this parameter to 0
|
1669
|
+
# disables automated backups.
|
1670
|
+
#
|
1671
|
+
# Changing this parameter can result in an outage if you change from 0
|
1672
|
+
# to a non-zero value or from a non-zero value to 0. These changes are
|
1673
|
+
# applied during the next maintenance window unless the
|
1674
|
+
# `ApplyImmediately` parameter is set to `true` for this request. If you
|
1675
|
+
# change the parameter from one non-zero value to another non-zero
|
1676
|
+
# value, the change is asynchronously applied as soon as possible.
|
1677
|
+
#
|
1678
|
+
# Default: Uses existing setting
|
1679
|
+
#
|
1680
|
+
# Constraints:
|
1681
|
+
#
|
1682
|
+
# * Must be a value from 0 to 35
|
1683
|
+
#
|
1684
|
+
# * Can be specified for a MySQL Read Replica only if the source is
|
1685
|
+
# running MySQL 5.6
|
1686
|
+
#
|
1687
|
+
# * Can be specified for a PostgreSQL Read Replica only if the source is
|
1688
|
+
# running PostgreSQL 9.3.5
|
1689
|
+
#
|
1690
|
+
# * Cannot be set to 0 if the DB instance is a source to Read Replicas
|
1691
|
+
# @option options [String] :preferred_backup_window
|
1692
|
+
# The daily time range during which automated backups are created if
|
1693
|
+
# automated backups are enabled, as determined by the
|
1694
|
+
# `BackupRetentionPeriod` parameter. Changing this parameter does not
|
1695
|
+
# result in an outage and the change is asynchronously applied as soon
|
1696
|
+
# as possible.
|
1697
|
+
#
|
1698
|
+
# Constraints:
|
1699
|
+
#
|
1700
|
+
# * Must be in the format hh24:mi-hh24:mi
|
1701
|
+
#
|
1702
|
+
# * Times should be in Universal Time Coordinated (UTC)
|
1703
|
+
#
|
1704
|
+
# * Must not conflict with the preferred maintenance window
|
1705
|
+
#
|
1706
|
+
# * Must be at least 30 minutes
|
1707
|
+
# @option options [String] :preferred_maintenance_window
|
1708
|
+
# The weekly time range (in UTC) during which system maintenance can
|
1709
|
+
# occur, which might result in an outage. Changing this parameter does
|
1710
|
+
# not result in an outage, except in the following situation, and the
|
1711
|
+
# change is asynchronously applied as soon as possible. If there are
|
1712
|
+
# pending actions that cause a reboot, and the maintenance window is
|
1713
|
+
# changed to include the current time, then changing this parameter will
|
1714
|
+
# cause a reboot of the DB instance. If moving this window to the
|
1715
|
+
# current time, there must be at least 30 minutes between the current
|
1716
|
+
# time and end of the window to ensure pending changes are applied.
|
1717
|
+
#
|
1718
|
+
# Default: Uses existing setting
|
1719
|
+
#
|
1720
|
+
# Format: ddd:hh24:mi-ddd:hh24:mi
|
1721
|
+
#
|
1722
|
+
# Valid Days: Mon \| Tue \| Wed \| Thu \| Fri \| Sat \| Sun
|
1723
|
+
#
|
1724
|
+
# Constraints: Must be at least 30 minutes
|
1725
|
+
# @option options [Boolean] :multi_az
|
1726
|
+
# Specifies if the DB instance is a Multi-AZ deployment. Changing this
|
1727
|
+
# parameter does not result in an outage and the change is applied
|
1728
|
+
# during the next maintenance window unless the `ApplyImmediately`
|
1729
|
+
# parameter is set to `true` for this request.
|
1730
|
+
#
|
1731
|
+
# Constraints: Cannot be specified if the DB instance is a Read Replica.
|
1732
|
+
# @option options [String] :engine_version
|
1733
|
+
# The version number of the database engine to upgrade to. Changing this
|
1734
|
+
# parameter results in an outage and the change is applied during the
|
1735
|
+
# next maintenance window unless the `ApplyImmediately` parameter is set
|
1736
|
+
# to `true` for this request.
|
1737
|
+
#
|
1738
|
+
# For major version upgrades, if a non-default DB parameter group is
|
1739
|
+
# currently in use, a new DB parameter group in the DB parameter group
|
1740
|
+
# family for the new engine version must be specified. The new DB
|
1741
|
+
# parameter group can be the default for that DB parameter group family.
|
1742
|
+
#
|
1743
|
+
# For a list of valid engine versions, see CreateDBInstance.
|
1744
|
+
# @option options [Boolean] :allow_major_version_upgrade
|
1745
|
+
# Indicates that major version upgrades are allowed. Changing this
|
1746
|
+
# parameter does not result in an outage and the change is
|
1747
|
+
# asynchronously applied as soon as possible.
|
1748
|
+
#
|
1749
|
+
# Constraints: This parameter must be set to true when specifying a
|
1750
|
+
# value for the EngineVersion parameter that is a different major
|
1751
|
+
# version than the DB instance's current version.
|
1752
|
+
# @option options [Boolean] :auto_minor_version_upgrade
|
1753
|
+
# Indicates that minor version upgrades will be applied automatically to
|
1754
|
+
# the DB instance during the maintenance window. Changing this parameter
|
1755
|
+
# does not result in an outage except in the following case and the
|
1756
|
+
# change is asynchronously applied as soon as possible. An outage will
|
1757
|
+
# result if this parameter is set to `true` during the maintenance
|
1758
|
+
# window, and a newer minor version is available, and RDS has enabled
|
1759
|
+
# auto patching for that engine version.
|
1760
|
+
# @option options [String] :license_model
|
1761
|
+
# The license model for the DB instance.
|
1762
|
+
#
|
1763
|
+
# Valid values: `license-included` \| `bring-your-own-license` \|
|
1764
|
+
# `general-public-license`
|
1765
|
+
# @option options [Integer] :iops
|
1766
|
+
# The new Provisioned IOPS (I/O operations per second) value for the RDS
|
1767
|
+
# instance. Changing this setting does not result in an outage and the
|
1768
|
+
# change is applied during the next maintenance window unless the
|
1769
|
+
# `ApplyImmediately` parameter is set to `true` for this request.
|
1770
|
+
#
|
1771
|
+
# Default: Uses existing setting
|
1772
|
+
#
|
1773
|
+
# Constraints: Value supplied must be at least 10% greater than the
|
1774
|
+
# current value. Values that are not at least 10% greater than the
|
1775
|
+
# existing value are rounded up so that they are 10% greater than the
|
1776
|
+
# current value. If you are migrating from Provisioned IOPS to standard
|
1777
|
+
# storage, set this value to 0. The DB instance will require a reboot
|
1778
|
+
# for the change in storage type to take effect.
|
1779
|
+
#
|
1780
|
+
# **SQL Server**
|
1781
|
+
#
|
1782
|
+
# Setting the IOPS value for the SQL Server database engine is not
|
1783
|
+
# supported.
|
1784
|
+
#
|
1785
|
+
# Type: Integer
|
1786
|
+
#
|
1787
|
+
# If you choose to migrate your DB instance from using standard storage
|
1788
|
+
# to using Provisioned IOPS, or from using Provisioned IOPS to using
|
1789
|
+
# standard storage, the process can take time. The duration of the
|
1790
|
+
# migration depends on several factors such as database load, storage
|
1791
|
+
# size, storage type (standard or Provisioned IOPS), amount of IOPS
|
1792
|
+
# provisioned (if any), and the number of prior scale storage
|
1793
|
+
# operations. Typical migration times are under 24 hours, but the
|
1794
|
+
# process can take up to several days in some cases. During the
|
1795
|
+
# migration, the DB instance will be available for use, but might
|
1796
|
+
# experience performance degradation. While the migration takes place,
|
1797
|
+
# nightly backups for the instance will be suspended. No other Amazon
|
1798
|
+
# RDS operations can take place for the instance, including modifying
|
1799
|
+
# the instance, rebooting the instance, deleting the instance, creating
|
1800
|
+
# a Read Replica for the instance, and creating a DB snapshot of the
|
1801
|
+
# instance.
|
1802
|
+
# @option options [String] :option_group_name
|
1803
|
+
# Indicates that the DB instance should be associated with the specified
|
1804
|
+
# option group. Changing this parameter does not result in an outage
|
1805
|
+
# except in the following case and the change is applied during the next
|
1806
|
+
# maintenance window unless the `ApplyImmediately` parameter is set to
|
1807
|
+
# `true` for this request. If the parameter change results in an option
|
1808
|
+
# group that enables OEM, this change can cause a brief (sub-second)
|
1809
|
+
# period during which new connections are rejected but existing
|
1810
|
+
# connections are not interrupted.
|
1811
|
+
#
|
1812
|
+
# Permanent options, such as the TDE option for Oracle Advanced Security
|
1813
|
+
# TDE, cannot be removed from an option group, and that option group
|
1814
|
+
# cannot be removed from a DB instance once it is associated with a DB
|
1815
|
+
# instance
|
1816
|
+
# @option options [String] :new_db_instance_identifier
|
1817
|
+
# The new DB instance identifier for the DB instance when renaming a DB
|
1818
|
+
# instance. When you change the DB instance identifier, an instance
|
1819
|
+
# reboot will occur immediately if you set `Apply Immediately` to true,
|
1820
|
+
# or will occur during the next maintenance window if `Apply
|
1821
|
+
# Immediately` to false. This value is stored as a lowercase string.
|
1822
|
+
#
|
1823
|
+
# Constraints:
|
1824
|
+
#
|
1825
|
+
# * Must contain from 1 to 63 alphanumeric characters or hyphens
|
1826
|
+
#
|
1827
|
+
# * First character must be a letter
|
1828
|
+
#
|
1829
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens
|
1830
|
+
# @option options [String] :storage_type
|
1831
|
+
# Specifies the storage type to be associated with the DB instance.
|
1832
|
+
#
|
1833
|
+
# Valid values: `standard | gp2 | io1`
|
1834
|
+
#
|
1835
|
+
# If you specify `io1`, you must also include a value for the `Iops`
|
1836
|
+
# parameter.
|
1837
|
+
#
|
1838
|
+
# Default: `io1` if the `Iops` parameter is specified; otherwise
|
1839
|
+
# `standard`
|
1840
|
+
# @option options [String] :tde_credential_arn
|
1841
|
+
# The ARN from the Key Store with which to associate the instance for
|
1842
|
+
# TDE encryption.
|
1843
|
+
# @option options [String] :tde_credential_password
|
1844
|
+
# The password for the given ARN from the Key Store in order to access
|
1845
|
+
# the device.
|
1846
|
+
# @option options [String] :ca_certificate_identifier
|
1847
|
+
# Indicates the certificate that needs to be associated with the
|
1848
|
+
# instance.
|
1849
|
+
# @option options [String] :domain
|
1850
|
+
# The Active Directory Domain to move the instance to. Specify `none` to
|
1851
|
+
# remove the instance from its current domain. The domain must be
|
1852
|
+
# created prior to this operation. Currently only a Microsoft SQL Server
|
1853
|
+
# instance can be created in a Active Directory Domain.
|
1854
|
+
# @option options [Boolean] :copy_tags_to_snapshot
|
1855
|
+
# True to copy all tags from the DB instance to snapshots of the DB
|
1856
|
+
# instance; otherwise false. The default is false.
|
1857
|
+
# @option options [Integer] :monitoring_interval
|
1858
|
+
# The interval, in seconds, between points when Enhanced Monitoring
|
1859
|
+
# metrics are collected for the DB instance. To disable collecting
|
1860
|
+
# Enhanced Monitoring metrics, specify 0. The default is 0.
|
1861
|
+
#
|
1862
|
+
# If `MonitoringRoleArn` is specified, then you must also set
|
1863
|
+
# `MonitoringInterval` to a value other than 0.
|
1864
|
+
#
|
1865
|
+
# Valid Values: `0, 1, 5, 10, 15, 30, 60`
|
1866
|
+
# @option options [Integer] :db_port_number
|
1867
|
+
# The port number on which the database accepts connections.
|
1868
|
+
#
|
1869
|
+
# The value of the `DBPortNumber` parameter must not match any of the
|
1870
|
+
# port values specified for options in the option group for the DB
|
1871
|
+
# instance.
|
1872
|
+
#
|
1873
|
+
# Your database will restart when you change the `DBPortNumber` value
|
1874
|
+
# regardless of the value of the `ApplyImmediately` parameter.
|
1875
|
+
#
|
1876
|
+
# **MySQL**
|
1877
|
+
#
|
1878
|
+
# Default: `3306`
|
1879
|
+
#
|
1880
|
+
# Valid Values: `1150-65535`
|
1881
|
+
#
|
1882
|
+
# **MariaDB**
|
1883
|
+
#
|
1884
|
+
# Default: `3306`
|
1885
|
+
#
|
1886
|
+
# Valid Values: `1150-65535`
|
1887
|
+
#
|
1888
|
+
# **PostgreSQL**
|
1889
|
+
#
|
1890
|
+
# Default: `5432`
|
1891
|
+
#
|
1892
|
+
# Valid Values: `1150-65535`
|
1893
|
+
#
|
1894
|
+
# Type: Integer
|
1895
|
+
#
|
1896
|
+
# **Oracle**
|
1897
|
+
#
|
1898
|
+
# Default: `1521`
|
1899
|
+
#
|
1900
|
+
# Valid Values: `1150-65535`
|
1901
|
+
#
|
1902
|
+
# **SQL Server**
|
1903
|
+
#
|
1904
|
+
# Default: `1433`
|
1905
|
+
#
|
1906
|
+
# Valid Values: `1150-65535` except for `1434`, `3389`, `47001`,
|
1907
|
+
# `49152`, and `49152` through `49156`.
|
1908
|
+
#
|
1909
|
+
# **Amazon Aurora**
|
1910
|
+
#
|
1911
|
+
# Default: `3306`
|
1912
|
+
#
|
1913
|
+
# Valid Values: `1150-65535`
|
1914
|
+
# @option options [Boolean] :publicly_accessible
|
1915
|
+
# Boolean value that indicates if the DB instance has a publicly
|
1916
|
+
# resolvable DNS name. Set to `True` to make the DB instance
|
1917
|
+
# Internet-facing with a publicly resolvable DNS name, which resolves to
|
1918
|
+
# a public IP address. Set to `False` to make the DB instance internal
|
1919
|
+
# with a DNS name that resolves to a private IP address.
|
1920
|
+
#
|
1921
|
+
# `PubliclyAccessible` only applies to DB instances in a VPC. The DB
|
1922
|
+
# instance must be part of a public subnet and `PubliclyAccessible` must
|
1923
|
+
# be true in order for it to be publicly accessible.
|
1924
|
+
#
|
1925
|
+
# Changes to the `PubliclyAccessible` parameter are applied immediately
|
1926
|
+
# regardless of the value of the `ApplyImmediately` parameter.
|
1927
|
+
#
|
1928
|
+
# Default: false
|
1929
|
+
# @option options [String] :monitoring_role_arn
|
1930
|
+
# The ARN for the IAM role that permits RDS to send enhanced monitoring
|
1931
|
+
# metrics to CloudWatch Logs. For example,
|
1932
|
+
# `arn:aws:iam:123456789012:role/emaccess`. For information on creating
|
1933
|
+
# a monitoring role, go to [To create an IAM role for Amazon RDS
|
1934
|
+
# Enhanced Monitoring][1].
|
1935
|
+
#
|
1936
|
+
# If `MonitoringInterval` is set to a value other than 0, then you must
|
1937
|
+
# supply a `MonitoringRoleArn` value.
|
1938
|
+
#
|
1939
|
+
#
|
1940
|
+
#
|
1941
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole
|
1942
|
+
# @option options [String] :domain_iam_role_name
|
1943
|
+
# The name of the IAM role to use when making API calls to the Directory
|
1944
|
+
# Service.
|
1945
|
+
# @option options [Integer] :promotion_tier
|
1946
|
+
# A value that specifies the order in which an Aurora Replica is
|
1947
|
+
# promoted to the primary instance after a failure of the existing
|
1948
|
+
# primary instance. For more information, see [ Fault Tolerance for an
|
1949
|
+
# Aurora DB Cluster][1].
|
1950
|
+
#
|
1951
|
+
# Default: 1
|
1952
|
+
#
|
1953
|
+
# Valid Values: 0 - 15
|
1954
|
+
#
|
1955
|
+
#
|
1956
|
+
#
|
1957
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance
|
1958
|
+
# @return [DBInstance]
|
1959
|
+
def modify(options = {})
|
1960
|
+
options = options.merge(db_instance_identifier: @id)
|
1961
|
+
resp = @client.modify_db_instance(options)
|
1962
|
+
DBInstance.new(
|
1963
|
+
id: resp.data.db_instance.db_instance_identifier,
|
1964
|
+
data: resp.data.db_instance,
|
1965
|
+
client: @client
|
1966
|
+
)
|
1967
|
+
end
|
1968
|
+
|
1969
|
+
# @example Request syntax with placeholder values
|
1970
|
+
#
|
1971
|
+
# dbinstance = db_instance.promote({
|
1972
|
+
# backup_retention_period: 1,
|
1973
|
+
# preferred_backup_window: "String",
|
1974
|
+
# })
|
1975
|
+
# @param [Hash] options ({})
|
1976
|
+
# @option options [Integer] :backup_retention_period
|
1977
|
+
# The number of days to retain automated backups. Setting this parameter
|
1978
|
+
# to a positive number enables backups. Setting this parameter to 0
|
1979
|
+
# disables automated backups.
|
1980
|
+
#
|
1981
|
+
# Default: 1
|
1982
|
+
#
|
1983
|
+
# Constraints:
|
1984
|
+
#
|
1985
|
+
# * Must be a value from 0 to 8
|
1986
|
+
#
|
1987
|
+
# ^
|
1988
|
+
# @option options [String] :preferred_backup_window
|
1989
|
+
# The daily time range during which automated backups are created if
|
1990
|
+
# automated backups are enabled, using the `BackupRetentionPeriod`
|
1991
|
+
# parameter.
|
1992
|
+
#
|
1993
|
+
# Default: A 30-minute window selected at random from an 8-hour block of
|
1994
|
+
# time per region. To see the time blocks available, see [ Adjusting the
|
1995
|
+
# Preferred Maintenance Window][1] in the *Amazon RDS User Guide.*
|
1996
|
+
#
|
1997
|
+
# Constraints:
|
1998
|
+
#
|
1999
|
+
# * Must be in the format `hh24:mi-hh24:mi`.
|
2000
|
+
#
|
2001
|
+
# * Times should be in Universal Coordinated Time (UTC).
|
2002
|
+
#
|
2003
|
+
# * Must not conflict with the preferred maintenance window.
|
2004
|
+
#
|
2005
|
+
# * Must be at least 30 minutes.
|
2006
|
+
#
|
2007
|
+
#
|
2008
|
+
#
|
2009
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html
|
2010
|
+
# @return [DBInstance]
|
2011
|
+
def promote(options = {})
|
2012
|
+
options = options.merge(db_instance_identifier: @id)
|
2013
|
+
resp = @client.promote_read_replica(options)
|
2014
|
+
DBInstance.new(
|
2015
|
+
id: resp.data.db_instance.db_instance_identifier,
|
2016
|
+
data: resp.data.db_instance,
|
2017
|
+
client: @client
|
2018
|
+
)
|
2019
|
+
end
|
2020
|
+
|
2021
|
+
# @example Request syntax with placeholder values
|
2022
|
+
#
|
2023
|
+
# dbinstance = db_instance.reboot({
|
2024
|
+
# force_failover: false,
|
2025
|
+
# })
|
2026
|
+
# @param [Hash] options ({})
|
2027
|
+
# @option options [Boolean] :force_failover
|
2028
|
+
# When `true`, the reboot will be conducted through a MultiAZ failover.
|
2029
|
+
#
|
2030
|
+
# Constraint: You cannot specify `true` if the instance is not
|
2031
|
+
# configured for MultiAZ.
|
2032
|
+
# @return [DBInstance]
|
2033
|
+
def reboot(options = {})
|
2034
|
+
options = options.merge(db_instance_identifier: @id)
|
2035
|
+
resp = @client.reboot_db_instance(options)
|
2036
|
+
DBInstance.new(
|
2037
|
+
id: resp.data.db_instance.db_instance_identifier,
|
2038
|
+
data: resp.data.db_instance,
|
2039
|
+
client: @client
|
2040
|
+
)
|
2041
|
+
end
|
2042
|
+
|
2043
|
+
# @example Request syntax with placeholder values
|
2044
|
+
#
|
2045
|
+
# dbinstance = db_instance.restore({
|
2046
|
+
# target_db_instance_identifier: "String", # required
|
2047
|
+
# restore_time: Time.now,
|
2048
|
+
# use_latest_restorable_time: false,
|
2049
|
+
# db_instance_class: "String",
|
2050
|
+
# port: 1,
|
2051
|
+
# availability_zone: "String",
|
2052
|
+
# db_subnet_group_name: "String",
|
2053
|
+
# multi_az: false,
|
2054
|
+
# publicly_accessible: false,
|
2055
|
+
# auto_minor_version_upgrade: false,
|
2056
|
+
# license_model: "String",
|
2057
|
+
# db_name: "String",
|
2058
|
+
# engine: "String",
|
2059
|
+
# iops: 1,
|
2060
|
+
# option_group_name: "String",
|
2061
|
+
# copy_tags_to_snapshot: false,
|
2062
|
+
# tags: [
|
2063
|
+
# {
|
2064
|
+
# key: "String",
|
2065
|
+
# value: "String",
|
2066
|
+
# },
|
2067
|
+
# ],
|
2068
|
+
# storage_type: "String",
|
2069
|
+
# tde_credential_arn: "String",
|
2070
|
+
# tde_credential_password: "String",
|
2071
|
+
# domain: "String",
|
2072
|
+
# domain_iam_role_name: "String",
|
2073
|
+
# })
|
2074
|
+
# @param [Hash] options ({})
|
2075
|
+
# @option options [required, String] :target_db_instance_identifier
|
2076
|
+
# The name of the new database instance to be created.
|
2077
|
+
#
|
2078
|
+
# Constraints:
|
2079
|
+
#
|
2080
|
+
# * Must contain from 1 to 63 alphanumeric characters or hyphens
|
2081
|
+
#
|
2082
|
+
# * First character must be a letter
|
2083
|
+
#
|
2084
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens
|
2085
|
+
# @option options [Time,DateTime,Date,Integer,String] :restore_time
|
2086
|
+
# The date and time to restore from.
|
2087
|
+
#
|
2088
|
+
# Valid Values: Value must be a time in Universal Coordinated Time (UTC)
|
2089
|
+
# format
|
2090
|
+
#
|
2091
|
+
# Constraints:
|
2092
|
+
#
|
2093
|
+
# * Must be before the latest restorable time for the DB instance
|
2094
|
+
#
|
2095
|
+
# * Cannot be specified if UseLatestRestorableTime parameter is true
|
2096
|
+
#
|
2097
|
+
# Example: `2009-09-07T23:45:00Z`
|
2098
|
+
# @option options [Boolean] :use_latest_restorable_time
|
2099
|
+
# Specifies whether (`true`) or not (`false`) the DB instance is
|
2100
|
+
# restored from the latest backup time.
|
2101
|
+
#
|
2102
|
+
# Default: `false`
|
2103
|
+
#
|
2104
|
+
# Constraints: Cannot be specified if RestoreTime parameter is provided.
|
2105
|
+
# @option options [String] :db_instance_class
|
2106
|
+
# The compute and memory capacity of the Amazon RDS DB instance.
|
2107
|
+
#
|
2108
|
+
# Valid Values: `db.t1.micro | db.m1.small | db.m1.medium | db.m1.large
|
2109
|
+
# | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium |
|
2110
|
+
# db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large |
|
2111
|
+
# db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge |
|
2112
|
+
# db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge |
|
2113
|
+
# db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium |
|
2114
|
+
# db.t2.large`
|
2115
|
+
#
|
2116
|
+
# Default: The same DBInstanceClass as the original DB instance.
|
2117
|
+
# @option options [Integer] :port
|
2118
|
+
# The port number on which the database accepts connections.
|
2119
|
+
#
|
2120
|
+
# Constraints: Value must be `1150-65535`
|
2121
|
+
#
|
2122
|
+
# Default: The same port as the original DB instance.
|
2123
|
+
# @option options [String] :availability_zone
|
2124
|
+
# The EC2 Availability Zone that the database instance will be created
|
2125
|
+
# in.
|
2126
|
+
#
|
2127
|
+
# Default: A random, system-chosen Availability Zone.
|
2128
|
+
#
|
2129
|
+
# Constraint: You cannot specify the AvailabilityZone parameter if the
|
2130
|
+
# MultiAZ parameter is set to true.
|
2131
|
+
#
|
2132
|
+
# Example: `us-east-1a`
|
2133
|
+
# @option options [String] :db_subnet_group_name
|
2134
|
+
# The DB subnet group name to use for the new instance.
|
2135
|
+
#
|
2136
|
+
# Constraints: Must contain no more than 255 alphanumeric characters,
|
2137
|
+
# periods, underscores, spaces, or hyphens. Must not be default.
|
2138
|
+
#
|
2139
|
+
# Example: `mySubnetgroup`
|
2140
|
+
# @option options [Boolean] :multi_az
|
2141
|
+
# Specifies if the DB instance is a Multi-AZ deployment.
|
2142
|
+
#
|
2143
|
+
# Constraint: You cannot specify the AvailabilityZone parameter if the
|
2144
|
+
# MultiAZ parameter is set to `true`.
|
2145
|
+
# @option options [Boolean] :publicly_accessible
|
2146
|
+
# Specifies the accessibility options for the DB instance. A value of
|
2147
|
+
# true specifies an Internet-facing instance with a publicly resolvable
|
2148
|
+
# DNS name, which resolves to a public IP address. A value of false
|
2149
|
+
# specifies an internal instance with a DNS name that resolves to a
|
2150
|
+
# private IP address.
|
2151
|
+
#
|
2152
|
+
# Default: The default behavior varies depending on whether a VPC has
|
2153
|
+
# been requested or not. The following list shows the default behavior
|
2154
|
+
# in each case.
|
2155
|
+
#
|
2156
|
+
# * **Default VPC:**true
|
2157
|
+
#
|
2158
|
+
# * **VPC:**false
|
2159
|
+
#
|
2160
|
+
# If no DB subnet group has been specified as part of the request and
|
2161
|
+
# the PubliclyAccessible value has not been set, the DB instance will be
|
2162
|
+
# publicly accessible. If a specific DB subnet group has been specified
|
2163
|
+
# as part of the request and the PubliclyAccessible value has not been
|
2164
|
+
# set, the DB instance will be private.
|
2165
|
+
# @option options [Boolean] :auto_minor_version_upgrade
|
2166
|
+
# Indicates that minor version upgrades will be applied automatically to
|
2167
|
+
# the DB instance during the maintenance window.
|
2168
|
+
# @option options [String] :license_model
|
2169
|
+
# License model information for the restored DB instance.
|
2170
|
+
#
|
2171
|
+
# Default: Same as source.
|
2172
|
+
#
|
2173
|
+
# Valid values: `license-included` \| `bring-your-own-license` \|
|
2174
|
+
# `general-public-license`
|
2175
|
+
# @option options [String] :db_name
|
2176
|
+
# The database name for the restored DB instance.
|
2177
|
+
#
|
2178
|
+
# <note markdown="1"> This parameter is not used for the MySQL or MariaDB engines.
|
2179
|
+
#
|
2180
|
+
# </note>
|
2181
|
+
# @option options [String] :engine
|
2182
|
+
# The database engine to use for the new instance.
|
2183
|
+
#
|
2184
|
+
# Default: The same as source
|
2185
|
+
#
|
2186
|
+
# Constraint: Must be compatible with the engine of the source
|
2187
|
+
#
|
2188
|
+
# Valid Values: `MySQL` \| `mariadb` \| `oracle-se1` \| `oracle-se` \|
|
2189
|
+
# `oracle-ee` \| `sqlserver-ee` \| `sqlserver-se` \| `sqlserver-ex` \|
|
2190
|
+
# `sqlserver-web` \| `postgres` \| `aurora`
|
2191
|
+
# @option options [Integer] :iops
|
2192
|
+
# The amount of Provisioned IOPS (input/output operations per second) to
|
2193
|
+
# be initially allocated for the DB instance.
|
2194
|
+
#
|
2195
|
+
# Constraints: Must be an integer greater than 1000.
|
2196
|
+
#
|
2197
|
+
# **SQL Server**
|
2198
|
+
#
|
2199
|
+
# Setting the IOPS value for the SQL Server database engine is not
|
2200
|
+
# supported.
|
2201
|
+
# @option options [String] :option_group_name
|
2202
|
+
# The name of the option group to be used for the restored DB instance.
|
2203
|
+
#
|
2204
|
+
# Permanent options, such as the TDE option for Oracle Advanced Security
|
2205
|
+
# TDE, cannot be removed from an option group, and that option group
|
2206
|
+
# cannot be removed from a DB instance once it is associated with a DB
|
2207
|
+
# instance
|
2208
|
+
# @option options [Boolean] :copy_tags_to_snapshot
|
2209
|
+
# True to copy all tags from the restored DB instance to snapshots of
|
2210
|
+
# the DB instance; otherwise false. The default is false.
|
2211
|
+
# @option options [Array<Types::Tag>] :tags
|
2212
|
+
# A list of tags.
|
2213
|
+
# @option options [String] :storage_type
|
2214
|
+
# Specifies the storage type to be associated with the DB instance.
|
2215
|
+
#
|
2216
|
+
# Valid values: `standard | gp2 | io1`
|
2217
|
+
#
|
2218
|
+
# If you specify `io1`, you must also include a value for the `Iops`
|
2219
|
+
# parameter.
|
2220
|
+
#
|
2221
|
+
# Default: `io1` if the `Iops` parameter is specified; otherwise
|
2222
|
+
# `standard`
|
2223
|
+
# @option options [String] :tde_credential_arn
|
2224
|
+
# The ARN from the Key Store with which to associate the instance for
|
2225
|
+
# TDE encryption.
|
2226
|
+
# @option options [String] :tde_credential_password
|
2227
|
+
# The password for the given ARN from the Key Store in order to access
|
2228
|
+
# the device.
|
2229
|
+
# @option options [String] :domain
|
2230
|
+
# Specify the Active Directory Domain to restore the instance in.
|
2231
|
+
# @option options [String] :domain_iam_role_name
|
2232
|
+
# Specify the name of the IAM role to be used when making API calls to
|
2233
|
+
# the Directory Service.
|
2234
|
+
# @return [DBInstance]
|
2235
|
+
def restore(options = {})
|
2236
|
+
options = options.merge(source_db_instance_identifier: @id)
|
2237
|
+
resp = @client.restore_db_instance_to_point_in_time(options)
|
2238
|
+
DBInstance.new(
|
2239
|
+
id: resp.data.db_instance.db_instance_identifier,
|
2240
|
+
data: resp.data.db_instance,
|
2241
|
+
client: @client
|
2242
|
+
)
|
2243
|
+
end
|
2244
|
+
|
2245
|
+
# @example Request syntax with placeholder values
|
2246
|
+
#
|
2247
|
+
# eventsubscription = db_instance.subscribe_to({
|
2248
|
+
# subscription_name: "String", # required
|
2249
|
+
# })
|
2250
|
+
# @param [Hash] options ({})
|
2251
|
+
# @option options [required, String] :subscription_name
|
2252
|
+
# The name of the RDS event notification subscription you want to add a
|
2253
|
+
# source identifier to.
|
2254
|
+
# @return [EventSubscription]
|
2255
|
+
def subscribe_to(options = {})
|
2256
|
+
options = options.merge(source_identifier: @id)
|
2257
|
+
resp = @client.add_source_identifier_to_subscription(options)
|
2258
|
+
EventSubscription.new(
|
2259
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
2260
|
+
data: resp.data.event_subscription,
|
2261
|
+
client: @client
|
2262
|
+
)
|
2263
|
+
end
|
2264
|
+
|
2265
|
+
# @example Request syntax with placeholder values
|
2266
|
+
#
|
2267
|
+
# eventsubscription = db_instance.unsubscribe_from({
|
2268
|
+
# subscription_name: "String", # required
|
2269
|
+
# })
|
2270
|
+
# @param [Hash] options ({})
|
2271
|
+
# @option options [required, String] :subscription_name
|
2272
|
+
# The name of the RDS event notification subscription you want to remove
|
2273
|
+
# a source identifier from.
|
2274
|
+
# @return [EventSubscription]
|
2275
|
+
def unsubscribe_from(options = {})
|
2276
|
+
options = options.merge(source_identifier: @id)
|
2277
|
+
resp = @client.remove_source_identifier_from_subscription(options)
|
2278
|
+
EventSubscription.new(
|
2279
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
2280
|
+
data: resp.data.event_subscription,
|
2281
|
+
client: @client
|
2282
|
+
)
|
2283
|
+
end
|
2284
|
+
|
2285
|
+
# @!group Associations
|
2286
|
+
|
2287
|
+
# @return [Certificate, nil]
|
2288
|
+
def certificate
|
2289
|
+
if data.ca_certificate_identifier
|
2290
|
+
Certificate.new(
|
2291
|
+
id: data.ca_certificate_identifier,
|
2292
|
+
client: @client
|
2293
|
+
)
|
2294
|
+
else
|
2295
|
+
nil
|
2296
|
+
end
|
2297
|
+
end
|
2298
|
+
|
2299
|
+
# @return [DBCluster, nil]
|
2300
|
+
def cluster
|
2301
|
+
if data.db_cluster_identifier
|
2302
|
+
DBCluster.new(
|
2303
|
+
id: data.db_cluster_identifier,
|
2304
|
+
client: @client
|
2305
|
+
)
|
2306
|
+
else
|
2307
|
+
nil
|
2308
|
+
end
|
2309
|
+
end
|
2310
|
+
|
2311
|
+
# @example Request syntax with placeholder values
|
2312
|
+
#
|
2313
|
+
# events = db_instance.events({
|
2314
|
+
# start_time: Time.now,
|
2315
|
+
# end_time: Time.now,
|
2316
|
+
# duration: 1,
|
2317
|
+
# event_categories: ["String"],
|
2318
|
+
# filters: [
|
2319
|
+
# {
|
2320
|
+
# name: "String", # required
|
2321
|
+
# values: ["String"], # required
|
2322
|
+
# },
|
2323
|
+
# ],
|
2324
|
+
# })
|
2325
|
+
# @param [Hash] options ({})
|
2326
|
+
# @option options [Time,DateTime,Date,Integer,String] :start_time
|
2327
|
+
# The beginning of the time interval to retrieve events for, specified
|
2328
|
+
# in ISO 8601 format. For more information about ISO 8601, go to the
|
2329
|
+
# [ISO8601 Wikipedia page.][1]
|
2330
|
+
#
|
2331
|
+
# Example: 2009-07-08T18:00Z
|
2332
|
+
#
|
2333
|
+
#
|
2334
|
+
#
|
2335
|
+
# [1]: http://en.wikipedia.org/wiki/ISO_8601
|
2336
|
+
# @option options [Time,DateTime,Date,Integer,String] :end_time
|
2337
|
+
# The end of the time interval for which to retrieve events, specified
|
2338
|
+
# in ISO 8601 format. For more information about ISO 8601, go to the
|
2339
|
+
# [ISO8601 Wikipedia page.][1]
|
2340
|
+
#
|
2341
|
+
# Example: 2009-07-08T18:00Z
|
2342
|
+
#
|
2343
|
+
#
|
2344
|
+
#
|
2345
|
+
# [1]: http://en.wikipedia.org/wiki/ISO_8601
|
2346
|
+
# @option options [Integer] :duration
|
2347
|
+
# The number of minutes to retrieve events for.
|
2348
|
+
#
|
2349
|
+
# Default: 60
|
2350
|
+
# @option options [Array<String>] :event_categories
|
2351
|
+
# A list of event categories that trigger notifications for a event
|
2352
|
+
# notification subscription.
|
2353
|
+
# @option options [Array<Types::Filter>] :filters
|
2354
|
+
# This parameter is not currently supported.
|
2355
|
+
# @return [Event::Collection]
|
2356
|
+
def events(options = {})
|
2357
|
+
batches = Enumerator.new do |y|
|
2358
|
+
options = options.merge(
|
2359
|
+
source_type: "db-instance",
|
2360
|
+
source_identifier: @id
|
2361
|
+
)
|
2362
|
+
resp = @client.describe_events(options)
|
2363
|
+
resp.each_page do |page|
|
2364
|
+
batch = []
|
2365
|
+
page.data.events.each do |e|
|
2366
|
+
batch << Event.new(
|
2367
|
+
source_id: e.source_identifier,
|
2368
|
+
date: e.date,
|
2369
|
+
data: e,
|
2370
|
+
client: @client
|
2371
|
+
)
|
2372
|
+
end
|
2373
|
+
y.yield(batch)
|
2374
|
+
end
|
2375
|
+
end
|
2376
|
+
Event::Collection.new(batches)
|
2377
|
+
end
|
2378
|
+
|
2379
|
+
# @example Request syntax with placeholder values
|
2380
|
+
#
|
2381
|
+
# logfiles = db_instance.log_files({
|
2382
|
+
# filename_contains: "String",
|
2383
|
+
# file_last_written: 1,
|
2384
|
+
# file_size: 1,
|
2385
|
+
# filters: [
|
2386
|
+
# {
|
2387
|
+
# name: "String", # required
|
2388
|
+
# values: ["String"], # required
|
2389
|
+
# },
|
2390
|
+
# ],
|
2391
|
+
# })
|
2392
|
+
# @param [Hash] options ({})
|
2393
|
+
# @option options [String] :filename_contains
|
2394
|
+
# Filters the available log files for log file names that contain the
|
2395
|
+
# specified string.
|
2396
|
+
# @option options [Integer] :file_last_written
|
2397
|
+
# Filters the available log files for files written since the specified
|
2398
|
+
# date, in POSIX timestamp format with milliseconds.
|
2399
|
+
# @option options [Integer] :file_size
|
2400
|
+
# Filters the available log files for files larger than the specified
|
2401
|
+
# size.
|
2402
|
+
# @option options [Array<Types::Filter>] :filters
|
2403
|
+
# This parameter is not currently supported.
|
2404
|
+
# @return [DBLogFile::Collection]
|
2405
|
+
def log_files(options = {})
|
2406
|
+
batches = Enumerator.new do |y|
|
2407
|
+
options = options.merge(db_instance_identifier: @id)
|
2408
|
+
resp = @client.describe_db_log_files(options)
|
2409
|
+
resp.each_page do |page|
|
2410
|
+
batch = []
|
2411
|
+
page.data.describe_db_log_files.each do |d|
|
2412
|
+
batch << DBLogFile.new(
|
2413
|
+
instance_id: @id,
|
2414
|
+
name: d.log_file_name,
|
2415
|
+
data: d,
|
2416
|
+
client: @client
|
2417
|
+
)
|
2418
|
+
end
|
2419
|
+
y.yield(batch)
|
2420
|
+
end
|
2421
|
+
end
|
2422
|
+
DBLogFile::Collection.new(batches)
|
2423
|
+
end
|
2424
|
+
|
2425
|
+
# @return [OptionGroup::Collection]
|
2426
|
+
def option_groups
|
2427
|
+
batch = []
|
2428
|
+
data.option_group_memberships.each do |o|
|
2429
|
+
batch << OptionGroup.new(
|
2430
|
+
name: o.option_group_name,
|
2431
|
+
client: @client
|
2432
|
+
)
|
2433
|
+
end
|
2434
|
+
OptionGroup::Collection.new([batch], size: batch.size)
|
2435
|
+
end
|
2436
|
+
|
2437
|
+
# @return [DBParameterGroup::Collection]
|
2438
|
+
def parameter_groups
|
2439
|
+
batch = []
|
2440
|
+
data.db_parameter_groups.each do |d|
|
2441
|
+
batch << DBParameterGroup.new(
|
2442
|
+
name: d.db_parameter_group_name,
|
2443
|
+
client: @client
|
2444
|
+
)
|
2445
|
+
end
|
2446
|
+
DBParameterGroup::Collection.new([batch], size: batch.size)
|
2447
|
+
end
|
2448
|
+
|
2449
|
+
# @example Request syntax with placeholder values
|
2450
|
+
#
|
2451
|
+
# pendingmaintenanceactions = db_instance.pending_maintenance_actions({
|
2452
|
+
# resource_identifier: "String",
|
2453
|
+
# filters: [
|
2454
|
+
# {
|
2455
|
+
# name: "String", # required
|
2456
|
+
# values: ["String"], # required
|
2457
|
+
# },
|
2458
|
+
# ],
|
2459
|
+
# marker: "String",
|
2460
|
+
# max_records: 1,
|
2461
|
+
# })
|
2462
|
+
# @param [Hash] options ({})
|
2463
|
+
# @option options [String] :resource_identifier
|
2464
|
+
# The ARN of a resource to return pending maintenance actions for.
|
2465
|
+
# @option options [Array<Types::Filter>] :filters
|
2466
|
+
# A filter that specifies one or more resources to return pending
|
2467
|
+
# maintenance actions for.
|
2468
|
+
#
|
2469
|
+
# Supported filters:
|
2470
|
+
#
|
2471
|
+
# * `db-instance-id` - Accepts DB instance identifiers and DB instance
|
2472
|
+
# Amazon Resource Names (ARNs). The results list will only include
|
2473
|
+
# pending maintenance actions for the DB instances identified by these
|
2474
|
+
# ARNs.
|
2475
|
+
#
|
2476
|
+
# ^
|
2477
|
+
# @option options [String] :marker
|
2478
|
+
# An optional pagination token provided by a previous
|
2479
|
+
# `DescribePendingMaintenanceActions` request. If this parameter is
|
2480
|
+
# specified, the response includes only records beyond the marker, up to
|
2481
|
+
# a number of records specified by `MaxRecords`.
|
2482
|
+
# @option options [Integer] :max_records
|
2483
|
+
# The maximum number of records to include in the response. If more
|
2484
|
+
# records exist than the specified `MaxRecords` value, a pagination
|
2485
|
+
# token called a marker is included in the response so that the
|
2486
|
+
# remaining results can be retrieved.
|
2487
|
+
#
|
2488
|
+
# Default: 100
|
2489
|
+
#
|
2490
|
+
# Constraints: Minimum 20, maximum 100.
|
2491
|
+
# @return [PendingMaintenanceAction::Collection]
|
2492
|
+
def pending_maintenance_actions(options = {})
|
2493
|
+
batches = Enumerator.new do |y|
|
2494
|
+
batch = []
|
2495
|
+
options = Aws::Util.deep_merge(options, filters: [{
|
2496
|
+
name: "db-instance-id",
|
2497
|
+
values: [@id]
|
2498
|
+
}])
|
2499
|
+
resp = @client.describe_pending_maintenance_actions(options)
|
2500
|
+
resp.data.pending_maintenance_actions_0.pending_maintenance_action_details.each do |p|
|
2501
|
+
batch << PendingMaintenanceAction.new(
|
2502
|
+
target_arn: resp.data.pending_maintenance_actions[0].resource_identifier,
|
2503
|
+
name: p.action,
|
2504
|
+
data: p,
|
2505
|
+
client: @client
|
2506
|
+
)
|
2507
|
+
end
|
2508
|
+
y.yield(batch)
|
2509
|
+
end
|
2510
|
+
PendingMaintenanceAction::Collection.new(batches)
|
2511
|
+
end
|
2512
|
+
|
2513
|
+
# @return [DBInstance::Collection]
|
2514
|
+
def read_replicas
|
2515
|
+
batch = []
|
2516
|
+
data.read_replica_db_instance_identifiers.each do |r|
|
2517
|
+
batch << DBInstance.new(
|
2518
|
+
id: r,
|
2519
|
+
client: @client
|
2520
|
+
)
|
2521
|
+
end
|
2522
|
+
DBInstance::Collection.new([batch], size: batch.size)
|
2523
|
+
end
|
2524
|
+
|
2525
|
+
# @return [DBSecurityGroup::Collection]
|
2526
|
+
def security_groups
|
2527
|
+
batch = []
|
2528
|
+
data.db_security_groups.each do |d|
|
2529
|
+
batch << DBSecurityGroup.new(
|
2530
|
+
name: d.db_security_group_name,
|
2531
|
+
client: @client
|
2532
|
+
)
|
2533
|
+
end
|
2534
|
+
DBSecurityGroup::Collection.new([batch], size: batch.size)
|
2535
|
+
end
|
2536
|
+
|
2537
|
+
# @example Request syntax with placeholder values
|
2538
|
+
#
|
2539
|
+
# snapshots = db_instance.snapshots({
|
2540
|
+
# db_snapshot_identifier: "String",
|
2541
|
+
# snapshot_type: "String",
|
2542
|
+
# filters: [
|
2543
|
+
# {
|
2544
|
+
# name: "String", # required
|
2545
|
+
# values: ["String"], # required
|
2546
|
+
# },
|
2547
|
+
# ],
|
2548
|
+
# include_shared: false,
|
2549
|
+
# include_public: false,
|
2550
|
+
# })
|
2551
|
+
# @param [Hash] options ({})
|
2552
|
+
# @option options [String] :db_snapshot_identifier
|
2553
|
+
# A specific DB snapshot identifier to describe. This parameter cannot
|
2554
|
+
# be used in conjunction with `DBInstanceIdentifier`. This value is
|
2555
|
+
# stored as a lowercase string.
|
2556
|
+
#
|
2557
|
+
# Constraints:
|
2558
|
+
#
|
2559
|
+
# * Must be 1 to 255 alphanumeric characters.
|
2560
|
+
#
|
2561
|
+
# * First character must be a letter.
|
2562
|
+
#
|
2563
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens.
|
2564
|
+
#
|
2565
|
+
# * If this identifier is for an automated snapshot, the `SnapshotType`
|
2566
|
+
# parameter must also be specified.
|
2567
|
+
# @option options [String] :snapshot_type
|
2568
|
+
# The type of snapshots to be returned. You can specify one of the
|
2569
|
+
# following values:
|
2570
|
+
#
|
2571
|
+
# * `automated` - Return all DB snapshots that have been automatically
|
2572
|
+
# taken by Amazon RDS for my AWS account.
|
2573
|
+
#
|
2574
|
+
# * `manual` - Return all DB snapshots that have been taken by my AWS
|
2575
|
+
# account.
|
2576
|
+
#
|
2577
|
+
# * `shared` - Return all manual DB snapshots that have been shared to
|
2578
|
+
# my AWS account.
|
2579
|
+
#
|
2580
|
+
# * `public` - Return all DB snapshots that have been marked as public.
|
2581
|
+
#
|
2582
|
+
# If you don't specify a `SnapshotType` value, then both automated and
|
2583
|
+
# manual snapshots are returned. Shared and public DB snapshots are not
|
2584
|
+
# included in the returned results by default. You can include shared
|
2585
|
+
# snapshots with these results by setting the `IncludeShared` parameter
|
2586
|
+
# to `true`. You can include public snapshots with these results by
|
2587
|
+
# setting the `IncludePublic` parameter to `true`.
|
2588
|
+
#
|
2589
|
+
# The `IncludeShared` and `IncludePublic` parameters don't apply for
|
2590
|
+
# `SnapshotType` values of `manual` or `automated`. The `IncludePublic`
|
2591
|
+
# parameter doesn't apply when `SnapshotType` is set to `shared`. The
|
2592
|
+
# `IncludeShared` parameter doesn't apply when `SnapshotType` is set to
|
2593
|
+
# `public`.
|
2594
|
+
# @option options [Array<Types::Filter>] :filters
|
2595
|
+
# This parameter is not currently supported.
|
2596
|
+
# @option options [Boolean] :include_shared
|
2597
|
+
# Set this value to `true` to include shared manual DB snapshots from
|
2598
|
+
# other AWS accounts that this AWS account has been given permission to
|
2599
|
+
# copy or restore, otherwise set this value to `false`. The default is
|
2600
|
+
# `false`.
|
2601
|
+
#
|
2602
|
+
# You can give an AWS account permission to restore a manual DB snapshot
|
2603
|
+
# from another AWS account by using the ModifyDBSnapshotAttribute API
|
2604
|
+
# action.
|
2605
|
+
# @option options [Boolean] :include_public
|
2606
|
+
# Set this value to `true` to include manual DB snapshots that are
|
2607
|
+
# public and can be copied or restored by any AWS account, otherwise set
|
2608
|
+
# this value to `false`. The default is `false`.
|
2609
|
+
#
|
2610
|
+
# You can share a manual DB snapshot as public by using the
|
2611
|
+
# ModifyDBSnapshotAttribute API.
|
2612
|
+
# @return [DBSnapshot::Collection]
|
2613
|
+
def snapshots(options = {})
|
2614
|
+
batches = Enumerator.new do |y|
|
2615
|
+
options = options.merge(db_instance_identifier: @id)
|
2616
|
+
resp = @client.describe_db_snapshots(options)
|
2617
|
+
resp.each_page do |page|
|
2618
|
+
batch = []
|
2619
|
+
page.data.db_snapshots.each do |d|
|
2620
|
+
batch << DBSnapshot.new(
|
2621
|
+
instance_id: options[:db_instance_identifier],
|
2622
|
+
snapshot_id: d.db_snapshot_identifier,
|
2623
|
+
data: d,
|
2624
|
+
client: @client
|
2625
|
+
)
|
2626
|
+
end
|
2627
|
+
y.yield(batch)
|
2628
|
+
end
|
2629
|
+
end
|
2630
|
+
DBSnapshot::Collection.new(batches)
|
2631
|
+
end
|
2632
|
+
|
2633
|
+
# @return [DBInstance, nil]
|
2634
|
+
def source
|
2635
|
+
if data.read_replica_source_db_instance_identifier
|
2636
|
+
DBInstance.new(
|
2637
|
+
id: data.read_replica_source_db_instance_identifier,
|
2638
|
+
client: @client
|
2639
|
+
)
|
2640
|
+
else
|
2641
|
+
nil
|
2642
|
+
end
|
2643
|
+
end
|
2644
|
+
|
2645
|
+
# @return [DBSubnetGroup, nil]
|
2646
|
+
def subnet_group
|
2647
|
+
if data.db_subnet_group.db_subnet_group_name
|
2648
|
+
DBSubnetGroup.new(
|
2649
|
+
name: data.db_subnet_group.db_subnet_group_name,
|
2650
|
+
client: @client
|
2651
|
+
)
|
2652
|
+
else
|
2653
|
+
nil
|
2654
|
+
end
|
2655
|
+
end
|
2656
|
+
|
2657
|
+
# @deprecated
|
2658
|
+
# @api private
|
2659
|
+
def identifiers
|
2660
|
+
{ id: @id }
|
2661
|
+
end
|
2662
|
+
deprecated(:identifiers)
|
2663
|
+
|
2664
|
+
private
|
2665
|
+
|
2666
|
+
def extract_id(args, options)
|
2667
|
+
value = args[0] || options.delete(:id)
|
2668
|
+
case value
|
2669
|
+
when String then value
|
2670
|
+
when nil then raise ArgumentError, "missing required option :id"
|
2671
|
+
else
|
2672
|
+
msg = "expected :id to be a String, got #{value.class}"
|
2673
|
+
raise ArgumentError, msg
|
2674
|
+
end
|
2675
|
+
end
|
2676
|
+
|
2677
|
+
class Collection < Aws::Resources::Collection; end
|
2678
|
+
end
|
2679
|
+
end
|
2680
|
+
end
|