Class: Azure::SQL::Mgmt::V2014_04_01::Models::Database

Inherits:
TrackedResource show all
Includes:
MsRestAzure
Defined in:
lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb

Overview

Represents a database.

Instance Attribute Summary collapse

Attributes inherited from TrackedResource

#location, #tags

Attributes inherited from Resource

#id, #name, #type

Class Method Summary collapse

Methods inherited from Resource

#resource_group

Instance Attribute Details

#collationString

Default, this value is ignored.

Returns:

  • (String)

    The collation of the database. If createMode is not



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

def collation
  @collation
end

#containment_stateInteger

Returns The containment state of the database.

Returns:

  • (Integer)

    The containment state of the database.



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

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.



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

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



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

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



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

def current_service_objective_id
  @current_service_objective_id
end

#database_idObject

Returns The ID of the database.

Returns:

  • The ID of the database.



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

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.



205
206
207
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 205

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



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

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.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the ‘Capabilities_ListByLocation` REST API or one of the following commands:

“‘azurecli az sql db list-editions -l <location> -o table ““

“‘powershell Get-AzSqlServerServiceObjective -Location <location> ““ . Possible values include: ’Web’, ‘Business’, ‘Basic’, ‘Standard’, ‘Premium’, ‘PremiumRS’, ‘Free’, ‘Stretch’, ‘DataWarehouse’, ‘System’, ‘System2’, ‘GeneralPurpose’, ‘BusinessCritical’, ‘Hyperscale’

Returns:



130
131
132
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 130

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



202
203
204
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 202

def elastic_pool_name
  @elastic_pool_name
end

#failover_group_idString

containing this database.

Returns:

  • (String)

    The resource identifier of the failover group



221
222
223
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 221

def failover_group_id
  @failover_group_id
end

#kindString

portal experience.

Returns:

  • (String)

    Kind of database. This is metadata used for the Azure



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

def kind
  @kind
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



137
138
139
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 137

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,



227
228
229
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 227

def read_scale
  @read_scale
end

database.

Returns:



217
218
219
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 217

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



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

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.

The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the ‘Capabilities_ListByLocation` REST API.

Returns:

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



150
151
152
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 150

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.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the ‘Capabilities_ListByLocation` REST API or one of the following commands:

“‘azurecli az sql db list-editions -l <location> -o table ““

“‘powershell Get-AzSqlServerServiceObjective -Location <location> ““ . Possible values include: ’System’, ‘System0’, ‘System1’, ‘System2’, ‘System3’, ‘System4’, ‘System2L’, ‘System3L’, ‘System4L’, ‘Free’, ‘Basic’, ‘S0’, ‘S1’, ‘S2’, ‘S3’, ‘S4’, ‘S6’, ‘S7’, ‘S9’, ‘S12’, ‘P1’, ‘P2’, ‘P3’, ‘P4’, ‘P6’, ‘P11’, ‘P15’, ‘PRS1’, ‘PRS2’, ‘PRS4’, ‘PRS6’, ‘DW100’, ‘DW200’, ‘DW300’, ‘DW400’, ‘DW500’, ‘DW600’, ‘DW1000’, ‘DW1200’, ‘DW1000c’, ‘DW1500’, ‘DW1500c’, ‘DW2000’, ‘DW2000c’, ‘DW3000’, ‘DW2500c’, ‘DW3000c’, ‘DW6000’, ‘DW5000c’, ‘DW6000c’, ‘DW7500c’, ‘DW10000c’, ‘DW15000c’, ‘DW30000c’, ‘DS100’, ‘DS200’, ‘DS300’, ‘DS400’, ‘DS500’, ‘DS600’, ‘DS1000’, ‘DS1200’, ‘DS1500’, ‘DS2000’, ‘ElasticPool’

Returns:



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

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,



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

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



233
234
235
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 233

def sample_name
  @sample_name
end

#service_level_objectiveServiceObjectiveName

the database. Possible values include: ‘System’, ‘System0’, ‘System1’, ‘System2’, ‘System3’, ‘System4’, ‘System2L’, ‘System3L’, ‘System4L’, ‘Free’, ‘Basic’, ‘S0’, ‘S1’, ‘S2’, ‘S3’, ‘S4’, ‘S6’, ‘S7’, ‘S9’, ‘S12’, ‘P1’, ‘P2’, ‘P3’, ‘P4’, ‘P6’, ‘P11’, ‘P15’, ‘PRS1’, ‘PRS2’, ‘PRS4’, ‘PRS6’, ‘DW100’, ‘DW200’, ‘DW300’, ‘DW400’, ‘DW500’, ‘DW600’, ‘DW1000’, ‘DW1200’, ‘DW1000c’, ‘DW1500’, ‘DW1500c’, ‘DW2000’, ‘DW2000c’, ‘DW3000’, ‘DW2500c’, ‘DW3000c’, ‘DW6000’, ‘DW5000c’, ‘DW6000c’, ‘DW7500c’, ‘DW10000c’, ‘DW15000c’, ‘DW30000c’, ‘DS100’, ‘DS200’, ‘DS300’, ‘DS400’, ‘DS500’, ‘DS600’, ‘DS1000’, ‘DS1200’, ‘DS1500’, ‘DS2000’, ‘ElasticPool’

Returns:



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

def service_level_objective
  @service_level_objective
end

#service_tier_advisorsArray<ServiceTierAdvisor>

for this database. Expanded property

Returns:



209
210
211
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 209

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



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

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,



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

def source_database_id
  @source_database_id
end

#statusString

Returns The status of the database.

Returns:

  • (String)

    The status of the database.



196
197
198
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 196

def status
  @status
end

#transparent_data_encryptionArray<TransparentDataEncryption>

encryption info for this database.

Returns:



213
214
215
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 213

def transparent_data_encryption
  @transparent_data_encryption
end

#zone_redundantBoolean

means the replicas of this database will be spread across multiple availability zones.

Returns:

  • (Boolean)

    Whether or not this database is zone redundant, which



238
239
240
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 238

def zone_redundant
  @zone_redundant
end

Class Method Details

.mapperObject

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



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
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb', line 245

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