Class: OCI::Database::Models::CreateDatabaseDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/create_database_details.rb

Overview

Details for creating a database.

Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.

Constant Summary collapse

DB_WORKLOAD_ENUM =
[
  DB_WORKLOAD_OLTP = 'OLTP'.freeze,
  DB_WORKLOAD_DSS = 'DSS'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateDatabaseDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :db_name (String)

    The value to assign to the #db_name property

  • :db_unique_name (String)

    The value to assign to the #db_unique_name property

  • :database_software_image_id (String)

    The value to assign to the #database_software_image_id property

  • :pdb_name (String)

    The value to assign to the #pdb_name property

  • :admin_password (String)

    The value to assign to the #admin_password property

  • :tde_wallet_password (String)

    The value to assign to the #tde_wallet_password property

  • :character_set (String)

    The value to assign to the #character_set property

  • :ncharacter_set (String)

    The value to assign to the #ncharacter_set property

  • :db_workload (String)

    The value to assign to the #db_workload property

  • :db_backup_config (OCI::Database::Models::DbBackupConfig)

    The value to assign to the #db_backup_config property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags property

  • :kms_key_id (String)

    The value to assign to the #kms_key_id property

  • :kms_key_version_id (String)

    The value to assign to the #kms_key_version_id property

  • :vault_id (String)

    The value to assign to the #vault_id property

  • :sid_prefix (String)

    The value to assign to the #sid_prefix property



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/oci/database/models/create_database_details.rb', line 169

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.db_name = attributes[:'dbName'] if attributes[:'dbName']

  raise 'You cannot provide both :dbName and :db_name' if attributes.key?(:'dbName') && attributes.key?(:'db_name')

  self.db_name = attributes[:'db_name'] if attributes[:'db_name']

  self.db_unique_name = attributes[:'dbUniqueName'] if attributes[:'dbUniqueName']

  raise 'You cannot provide both :dbUniqueName and :db_unique_name' if attributes.key?(:'dbUniqueName') && attributes.key?(:'db_unique_name')

  self.db_unique_name = attributes[:'db_unique_name'] if attributes[:'db_unique_name']

  self.database_software_image_id = attributes[:'databaseSoftwareImageId'] if attributes[:'databaseSoftwareImageId']

  raise 'You cannot provide both :databaseSoftwareImageId and :database_software_image_id' if attributes.key?(:'databaseSoftwareImageId') && attributes.key?(:'database_software_image_id')

  self.database_software_image_id = attributes[:'database_software_image_id'] if attributes[:'database_software_image_id']

  self.pdb_name = attributes[:'pdbName'] if attributes[:'pdbName']

  raise 'You cannot provide both :pdbName and :pdb_name' if attributes.key?(:'pdbName') && attributes.key?(:'pdb_name')

  self.pdb_name = attributes[:'pdb_name'] if attributes[:'pdb_name']

  self.admin_password = attributes[:'adminPassword'] if attributes[:'adminPassword']

  raise 'You cannot provide both :adminPassword and :admin_password' if attributes.key?(:'adminPassword') && attributes.key?(:'admin_password')

  self.admin_password = attributes[:'admin_password'] if attributes[:'admin_password']

  self.tde_wallet_password = attributes[:'tdeWalletPassword'] if attributes[:'tdeWalletPassword']

  raise 'You cannot provide both :tdeWalletPassword and :tde_wallet_password' if attributes.key?(:'tdeWalletPassword') && attributes.key?(:'tde_wallet_password')

  self.tde_wallet_password = attributes[:'tde_wallet_password'] if attributes[:'tde_wallet_password']

  self.character_set = attributes[:'characterSet'] if attributes[:'characterSet']

  raise 'You cannot provide both :characterSet and :character_set' if attributes.key?(:'characterSet') && attributes.key?(:'character_set')

  self.character_set = attributes[:'character_set'] if attributes[:'character_set']

  self.ncharacter_set = attributes[:'ncharacterSet'] if attributes[:'ncharacterSet']

  raise 'You cannot provide both :ncharacterSet and :ncharacter_set' if attributes.key?(:'ncharacterSet') && attributes.key?(:'ncharacter_set')

  self.ncharacter_set = attributes[:'ncharacter_set'] if attributes[:'ncharacter_set']

  self.db_workload = attributes[:'dbWorkload'] if attributes[:'dbWorkload']

  raise 'You cannot provide both :dbWorkload and :db_workload' if attributes.key?(:'dbWorkload') && attributes.key?(:'db_workload')

  self.db_workload = attributes[:'db_workload'] if attributes[:'db_workload']

  self.db_backup_config = attributes[:'dbBackupConfig'] if attributes[:'dbBackupConfig']

  raise 'You cannot provide both :dbBackupConfig and :db_backup_config' if attributes.key?(:'dbBackupConfig') && attributes.key?(:'db_backup_config')

  self.db_backup_config = attributes[:'db_backup_config'] if attributes[:'db_backup_config']

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

  raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')

  self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']

  self.kms_key_id = attributes[:'kmsKeyId'] if attributes[:'kmsKeyId']

  raise 'You cannot provide both :kmsKeyId and :kms_key_id' if attributes.key?(:'kmsKeyId') && attributes.key?(:'kms_key_id')

  self.kms_key_id = attributes[:'kms_key_id'] if attributes[:'kms_key_id']

  self.kms_key_version_id = attributes[:'kmsKeyVersionId'] if attributes[:'kmsKeyVersionId']

  raise 'You cannot provide both :kmsKeyVersionId and :kms_key_version_id' if attributes.key?(:'kmsKeyVersionId') && attributes.key?(:'kms_key_version_id')

  self.kms_key_version_id = attributes[:'kms_key_version_id'] if attributes[:'kms_key_version_id']

  self.vault_id = attributes[:'vaultId'] if attributes[:'vaultId']

  raise 'You cannot provide both :vaultId and :vault_id' if attributes.key?(:'vaultId') && attributes.key?(:'vault_id')

  self.vault_id = attributes[:'vault_id'] if attributes[:'vault_id']

  self.sid_prefix = attributes[:'sidPrefix'] if attributes[:'sidPrefix']

  raise 'You cannot provide both :sidPrefix and :sid_prefix' if attributes.key?(:'sidPrefix') && attributes.key?(:'sid_prefix')

  self.sid_prefix = attributes[:'sid_prefix'] if attributes[:'sid_prefix']
end

Instance Attribute Details

#admin_passwordString

[Required] A strong password for SYS, SYSTEM, and PDB Admin. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numbers, and two special characters. The special characters must be _, #, or -.

Returns:

  • (String)


37
38
39
# File 'lib/oci/database/models/create_database_details.rb', line 37

def admin_password
  @admin_password
end

#character_setString

The character set for the database. The default is AL32UTF8. Allowed values are:

AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS

Returns:

  • (String)


48
49
50
# File 'lib/oci/database/models/create_database_details.rb', line 48

def character_set
  @character_set
end

#database_software_image_idString

The database software image OCID

Returns:

  • (String)


29
30
31
# File 'lib/oci/database/models/create_database_details.rb', line 29

def database_software_image_id
  @database_software_image_id
end

#db_backup_configOCI::Database::Models::DbBackupConfig



65
66
67
# File 'lib/oci/database/models/create_database_details.rb', line 65

def db_backup_config
  @db_backup_config
end

#db_nameString

[Required] The database name. The name must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted.

Returns:

  • (String)


21
22
23
# File 'lib/oci/database/models/create_database_details.rb', line 21

def db_name
  @db_name
end

#db_unique_nameString

The DB_UNIQUE_NAME of the Oracle Database being backed up.

Returns:

  • (String)


25
26
27
# File 'lib/oci/database/models/create_database_details.rb', line 25

def db_unique_name
  @db_unique_name
end

#db_workloadString

Deprecated. The dbWorkload field has been deprecated for Exadata Database Service on Dedicated Infrastructure, Exadata Database Service on Cloud@Customer, and Base Database Service. Support for this attribute will end in November 2023. You may choose to update your custom scripts to exclude the dbWorkload attribute. After November 2023 if you pass a value to the dbWorkload attribute, it will be ignored.

The database workload type.

Returns:

  • (String)


62
63
64
# File 'lib/oci/database/models/create_database_details.rb', line 62

def db_workload
  @db_workload
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Returns:

  • (Hash<String, Hash<String, Object>>)


79
80
81
# File 'lib/oci/database/models/create_database_details.rb', line 79

def defined_tags
  @defined_tags
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


73
74
75
# File 'lib/oci/database/models/create_database_details.rb', line 73

def freeform_tags
  @freeform_tags
end

#kms_key_idString

The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.

Returns:

  • (String)


83
84
85
# File 'lib/oci/database/models/create_database_details.rb', line 83

def kms_key_id
  @kms_key_id
end

#kms_key_version_idString

The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.

Returns:

  • (String)


88
89
90
# File 'lib/oci/database/models/create_database_details.rb', line 88

def kms_key_version_id
  @kms_key_version_id
end

#ncharacter_setString

The national character set for the database. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8.

Returns:

  • (String)


54
55
56
# File 'lib/oci/database/models/create_database_details.rb', line 54

def ncharacter_set
  @ncharacter_set
end

#pdb_nameString

The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.

Returns:

  • (String)


33
34
35
# File 'lib/oci/database/models/create_database_details.rb', line 33

def pdb_name
  @pdb_name
end

#sid_prefixString

Specifies a prefix for the Oracle SID of the database to be created.

Returns:

  • (String)


97
98
99
# File 'lib/oci/database/models/create_database_details.rb', line 97

def sid_prefix
  @sid_prefix
end

#tde_wallet_passwordString

The optional password to open the TDE wallet. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, #, or -.

Returns:

  • (String)


41
42
43
# File 'lib/oci/database/models/create_database_details.rb', line 41

def tde_wallet_password
  @tde_wallet_password
end

#vault_idString

The OCID of the Oracle Cloud Infrastructure vault. This parameter and secretId are required for Customer Managed Keys.

Returns:

  • (String)


92
93
94
# File 'lib/oci/database/models/create_database_details.rb', line 92

def vault_id
  @vault_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/database/models/create_database_details.rb', line 100

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'db_name': :'dbName',
    'db_unique_name': :'dbUniqueName',
    'database_software_image_id': :'databaseSoftwareImageId',
    'pdb_name': :'pdbName',
    'admin_password': :'adminPassword',
    'tde_wallet_password': :'tdeWalletPassword',
    'character_set': :'characterSet',
    'ncharacter_set': :'ncharacterSet',
    'db_workload': :'dbWorkload',
    'db_backup_config': :'dbBackupConfig',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'kms_key_id': :'kmsKeyId',
    'kms_key_version_id': :'kmsKeyVersionId',
    'vault_id': :'vaultId',
    'sid_prefix': :'sidPrefix'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/oci/database/models/create_database_details.rb', line 124

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'db_name': :'String',
    'db_unique_name': :'String',
    'database_software_image_id': :'String',
    'pdb_name': :'String',
    'admin_password': :'String',
    'tde_wallet_password': :'String',
    'character_set': :'String',
    'ncharacter_set': :'String',
    'db_workload': :'String',
    'db_backup_config': :'OCI::Database::Models::DbBackupConfig',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'kms_key_id': :'String',
    'kms_key_version_id': :'String',
    'vault_id': :'String',
    'sid_prefix': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/oci/database/models/create_database_details.rb', line 287

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    db_name == other.db_name &&
    db_unique_name == other.db_unique_name &&
    database_software_image_id == other.database_software_image_id &&
    pdb_name == other.pdb_name &&
    admin_password == other.admin_password &&
    tde_wallet_password == other.tde_wallet_password &&
    character_set == other.character_set &&
    ncharacter_set == other.ncharacter_set &&
    db_workload == other.db_workload &&
    db_backup_config == other.db_backup_config &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    kms_key_id == other.kms_key_id &&
    kms_key_version_id == other.kms_key_version_id &&
    vault_id == other.vault_id &&
    sid_prefix == other.sid_prefix
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/oci/database/models/create_database_details.rb', line 332

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


312
313
314
# File 'lib/oci/database/models/create_database_details.rb', line 312

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



321
322
323
# File 'lib/oci/database/models/create_database_details.rb', line 321

def hash
  [db_name, db_unique_name, database_software_image_id, pdb_name, admin_password, tde_wallet_password, character_set, ncharacter_set, db_workload, db_backup_config, freeform_tags, defined_tags, kms_key_id, kms_key_version_id, vault_id, sid_prefix].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



365
366
367
368
369
370
371
372
373
374
# File 'lib/oci/database/models/create_database_details.rb', line 365

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



359
360
361
# File 'lib/oci/database/models/create_database_details.rb', line 359

def to_s
  to_hash.to_s
end