Class: Azure::SQL::Mgmt::V2014_04_01::Models::DatabaseUpdate

Inherits:
Resource
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb

Overview

Represents a database update.

Instance Attribute Summary collapse

Attributes inherited from Resource

#id, #name, #type

Class Method Summary collapse

Instance Attribute Details

#collationString

Default, this value is ignored.

Returns:

  • (String)

    The collation of the database. If createMode is not



20
21
22
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 20

def collation
  @collation
end

#containment_stateInteger

Returns The containment state of the database.

Returns:

  • (Integer)

    The containment state of the database.



26
27
28
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 26

def containment_state
  @containment_state
end

#create_modeCreateMode

Default: regular database creation.

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.

OnlineSecondary/NonReadableSecondary: creates a database as a (readable or nonreadable) secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database’s original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.

Copy, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. Possible values include: ‘Copy’, ‘Default’, ‘NonReadableSecondary’, ‘OnlineSecondary’, ‘PointInTimeRestore’, ‘Recovery’, ‘Restore’, ‘RestoreLongTermRetentionBackup’

Returns:

  • (CreateMode)

    Specifies the mode of database creation.



78
79
80
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 78

def create_mode
  @create_mode
end

#creation_dateDateTime

Returns The creation date of the database (ISO8601 format).

Returns:

  • (DateTime)

    The creation date of the database (ISO8601 format).



23
24
25
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 23

def creation_date
  @creation_date
end

#current_service_objective_idObject

the ID of the service level objective that is currently active.

Returns:

  • The current service level objective ID of the database. This is



30
31
32
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 30

def current_service_objective_id
  @current_service_objective_id
end

#database_idObject

Returns The ID of the database.

Returns:

  • The ID of the database.



33
34
35
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 33

def database_id
  @database_id
end

#default_secondary_locationString

Returns The default secondary region for this database.

Returns:

  • (String)

    The default secondary region for this database.



164
165
166
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 164

def default_secondary_location
  @default_secondary_location
end

#earliest_restore_dateDateTime

restore is available for this database (ISO8601 format).

Returns:

  • (DateTime)

    This records the earliest start date and time that



37
38
39
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 37

def earliest_restore_date
  @earliest_restore_date
end

#editionDatabaseEdition

DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/subscriptionId/providers/Microsoft.Sql/locations/locationID/capabilities) referred to by operationId: “Capabilities_ListByLocation.”. Possible values include: ‘Web’, ‘Business’, ‘Basic’, ‘Standard’, ‘Premium’, ‘Free’, ‘Stretch’, ‘DataWarehouse’, ‘System’, ‘System2’

Returns:



116
117
118
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 116

def edition
  @edition
end

#elastic_pool_nameString

elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition.

Returns:

  • (String)

    The name of the elastic pool the database is in. If



161
162
163
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 161

def elastic_pool_name
  @elastic_pool_name
end

#failover_group_idString

containing this database.

Returns:

  • (String)

    The resource identifier of the failover group



180
181
182
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 180

def failover_group_id
  @failover_group_id
end

#max_size_bytesString

createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/subscriptionId/providers/Microsoft.Sql/locations/locationID/capabilities) referred to by operationId: “Capabilities_ListByLocation.”

Returns:

  • (String)

    The max size of the database expressed in bytes. If



123
124
125
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 123

def max_size_bytes
  @max_size_bytes
end

#read_scaleReadScale

readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. Possible values include: ‘Enabled’, ‘Disabled’

Returns:

  • (ReadScale)

    Conditional. If the database is a geo-secondary,



186
187
188
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 186

def read_scale
  @read_scale
end

database.

Returns:



176
177
178
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 176

def recommended_index
  @recommended_index
end

#recovery_services_recovery_point_resource_idString

RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from.

Returns:

  • (String)

    Conditional. If createMode is



106
107
108
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 106

def recovery_services_recovery_point_resource_id
  @recovery_services_recovery_point_resource_id
end

#requested_service_objective_idObject

is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/subscriptionId/providers/Microsoft.Sql/locations/locationID/capabilities) referred to by operationId: “Capabilities_ListByLocation.”

Returns:

  • The configured service level objective ID of the database. This



135
136
137
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 135

def requested_service_objective_id
  @requested_service_objective_id
end

#requested_service_objective_nameServiceObjectiveName

objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/subscriptionId/providers/Microsoft.Sql/locations/locationID/capabilities) referred to by operationId: “Capabilities_ListByLocation.”. Possible values include: ‘Basic’, ‘S0’, ‘S1’, ‘S2’, ‘S3’, ‘P1’, ‘P2’, ‘P3’, ‘P4’, ‘P6’, ‘P11’, ‘P15’, ‘System’, ‘System2’, ‘ElasticPool’

Returns:



146
147
148
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 146

def requested_service_objective_name
  @requested_service_objective_name
end

#restore_point_in_timeDateTime

this value is required. If createMode is Restore, this value is optional. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. Must be greater than or equal to the source database’s earliestRestoreDate value.

Returns:

  • (DateTime)

    Conditional. If createMode is PointInTimeRestore,



101
102
103
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 101

def restore_point_in_time
  @restore_point_in_time
end

#sample_nameSampleName

when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition. Possible values include: ‘AdventureWorksLT’

Returns:

  • (SampleName)

    Indicates the name of the sample schema to apply



192
193
194
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 192

def sample_name
  @sample_name
end

#service_level_objectiveServiceObjectiveName

the database. Possible values include: ‘Basic’, ‘S0’, ‘S1’, ‘S2’, ‘S3’, ‘P1’, ‘P2’, ‘P3’, ‘P4’, ‘P6’, ‘P11’, ‘P15’, ‘System’, ‘System2’, ‘ElasticPool’

Returns:



152
153
154
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 152

def service_level_objective
  @service_level_objective
end

#service_tier_advisorsArray<ServiceTierAdvisor>

for this database. Expanded property

Returns:



168
169
170
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 168

def service_tier_advisors
  @service_tier_advisors
end

#source_database_deletion_dateDateTime

sourceDatabaseId is the deleted database’s original resource id when it existed (as opposed to its current restorable dropped database id), then this value is required. Specifies the time that the database was deleted.

Returns:

  • (DateTime)

    Conditional. If createMode is Restore and



93
94
95
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 93

def source_database_deletion_date
  @source_database_deletion_date
end

#source_database_idString

NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, or Restore, then this value is required. Specifies the resource ID of the source database. If createMode is NonReadableSecondary or OnlineSecondary, the name of the source database must be the same as the new database being created.

Returns:

  • (String)

    Conditional. If createMode is Copy,



86
87
88
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 86

def source_database_id
  @source_database_id
end

#statusString

Returns The status of the database.

Returns:

  • (String)

    The status of the database.



155
156
157
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 155

def status
  @status
end

#tagsHash{String => String}

Returns Resource tags.

Returns:

  • (Hash{String => String})

    Resource tags.



16
17
18
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 16

def tags
  @tags
end

#transparent_data_encryptionArray<TransparentDataEncryption>

encryption info for this database.

Returns:



172
173
174
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 172

def transparent_data_encryption
  @transparent_data_encryption
end

Class Method Details

.mapperObject

Mapper for DatabaseUpdate class as Ruby Hash. This will be used for serialization/deserialization.



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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb', line 199

def self.mapper()
  {
    required: false,
    serialized_name: 'DatabaseUpdate',
    type: {
      name: 'Composite',
      class_name: 'DatabaseUpdate',
      model_properties: {
        id: {
          required: false,
          read_only: true,
          serialized_name: 'id',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          read_only: true,
          serialized_name: 'name',
          type: {
            name: 'String'
          }
        },
        type: {
          required: false,
          read_only: true,
          serialized_name: 'type',
          type: {
            name: 'String'
          }
        },
        tags: {
          required: false,
          serialized_name: 'tags',
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serialized_name: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        collation: {
          required: false,
          serialized_name: 'properties.collation',
          type: {
            name: 'String'
          }
        },
        creation_date: {
          required: false,
          read_only: true,
          serialized_name: 'properties.creationDate',
          type: {
            name: 'DateTime'
          }
        },
        containment_state: {
          required: false,
          read_only: true,
          serialized_name: 'properties.containmentState',
          type: {
            name: 'Number'
          }
        },
        current_service_objective_id: {
          required: false,
          read_only: true,
          serialized_name: 'properties.currentServiceObjectiveId',
          type: {
            name: 'String'
          }
        },
        database_id: {
          required: false,
          read_only: true,
          serialized_name: 'properties.databaseId',
          type: {
            name: 'String'
          }
        },
        earliest_restore_date: {
          required: false,
          read_only: true,
          serialized_name: 'properties.earliestRestoreDate',
          type: {
            name: 'DateTime'
          }
        },
        create_mode: {
          required: false,
          serialized_name: 'properties.createMode',
          type: {
            name: 'String'
          }
        },
        source_database_id: {
          required: false,
          serialized_name: 'properties.sourceDatabaseId',
          type: {
            name: 'String'
          }
        },
        source_database_deletion_date: {
          required: false,
          serialized_name: 'properties.sourceDatabaseDeletionDate',
          type: {
            name: 'DateTime'
          }
        },
        restore_point_in_time: {
          required: false,
          serialized_name: 'properties.restorePointInTime',
          type: {
            name: 'DateTime'
          }
        },
        recovery_services_recovery_point_resource_id: {
          required: false,
          serialized_name: 'properties.recoveryServicesRecoveryPointResourceId',
          type: {
            name: 'String'
          }
        },
        edition: {
          required: false,
          serialized_name: 'properties.edition',
          type: {
            name: 'String'
          }
        },
        max_size_bytes: {
          required: false,
          serialized_name: 'properties.maxSizeBytes',
          type: {
            name: 'String'
          }
        },
        requested_service_objective_id: {
          required: false,
          serialized_name: 'properties.requestedServiceObjectiveId',
          type: {
            name: 'String'
          }
        },
        requested_service_objective_name: {
          required: false,
          serialized_name: 'properties.requestedServiceObjectiveName',
          type: {
            name: 'String'
          }
        },
        service_level_objective: {
          required: false,
          read_only: true,
          serialized_name: 'properties.serviceLevelObjective',
          type: {
            name: 'String'
          }
        },
        status: {
          required: false,
          read_only: true,
          serialized_name: 'properties.status',
          type: {
            name: 'String'
          }
        },
        elastic_pool_name: {
          required: false,
          serialized_name: 'properties.elasticPoolName',
          type: {
            name: 'String'
          }
        },
        default_secondary_location: {
          required: false,
          read_only: true,
          serialized_name: 'properties.defaultSecondaryLocation',
          type: {
            name: 'String'
          }
        },
        service_tier_advisors: {
          required: false,
          read_only: true,
          serialized_name: 'properties.serviceTierAdvisors',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'ServiceTierAdvisorElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ServiceTierAdvisor'
                }
            }
          }
        },
        transparent_data_encryption: {
          required: false,
          read_only: true,
          serialized_name: 'properties.transparentDataEncryption',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'TransparentDataEncryptionElementType',
                type: {
                  name: 'Composite',
                  class_name: 'TransparentDataEncryption'
                }
            }
          }
        },
        recommended_index: {
          required: false,
          read_only: true,
          serialized_name: 'properties.recommendedIndex',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'RecommendedIndexElementType',
                type: {
                  name: 'Composite',
                  class_name: 'RecommendedIndex'
                }
            }
          }
        },
        failover_group_id: {
          required: false,
          read_only: true,
          serialized_name: 'properties.failoverGroupId',
          type: {
            name: 'String'
          }
        },
        read_scale: {
          required: false,
          serialized_name: 'properties.readScale',
          type: {
            name: 'Enum',
            module: 'ReadScale'
          }
        },
        sample_name: {
          required: false,
          serialized_name: 'properties.sampleName',
          type: {
            name: 'String'
          }
        }
      }
    }
  }
end