DatabaseUpdate Class

  • java.lang.Object
    • com.microsoft.azure.ProxyResource
      • com.microsoft.azure.management.sql.DatabaseUpdate

public class DatabaseUpdate
extends com.microsoft.azure.ProxyResource

Represents a database update.

Constructor Summary

Constructor Description
DatabaseUpdate()

Method Summary

Modifier and Type Method and Description
java.lang.String collation()

Get the collation of the database.

java.lang.Long containmentState()

Get the containment state of the database.

CreateMode createMode()

Get specifies the mode of database creation.

org.joda.time.DateTime creationDate()

Get the creation date of the database (ISO8601 format).

java.util.UUID currentServiceObjectiveId()

Get the current service level objective ID of the database.

java.util.UUID databaseId()

Get the ID of the database.

java.lang.String defaultSecondaryLocation()

Get the default secondary region for this database.

org.joda.time.DateTime earliestRestoreDate()

Get this records the earliest start date and time that restore is available for this database (ISO8601 format).

DatabaseEdition edition()

Get the edition of the database.

java.lang.String elasticPoolName()

Get the name of the elastic pool the database is in.

java.lang.String failoverGroupId()

Get the resource identifier of the failover group containing this database.

java.lang.String maxSizeBytes()

Get the max size of the database expressed in bytes.

ReadScale readScale()

Get conditional.

java.util.List<RecommendedIndex> recommendedIndex()

Get the recommended indices for this database.

java.lang.String recoveryServicesRecoveryPointResourceId()

Get conditional.

java.util.UUID requestedServiceObjectiveId()

Get the configured service level objective ID of the database.

ServiceObjectiveName requestedServiceObjectiveName()

Get the name of the configured service level objective of the database.

org.joda.time.DateTime restorePointInTime()

Get conditional.

SampleName sampleName()

Get indicates the name of the sample schema to apply when creating this database.

ServiceObjectiveName serviceLevelObjective()

Get the current service level objective of the database.

java.util.List<com.microsoft.azure.management.sql.implementation.ServiceTierAdvisorInner> serviceTierAdvisors()

Get the list of service tier advisors for this database.

org.joda.time.DateTime sourceDatabaseDeletionDate()

Get conditional.

java.lang.String sourceDatabaseId()

Get conditional.

java.lang.String status()

Get the status of the database.

java.util.Map<java.lang.String,java.lang.String> tags()

Get resource tags.

java.util.List<com.microsoft.azure.management.sql.implementation.TransparentDataEncryptionInner> transparentDataEncryption()

Get the transparent data encryption info for this database.

DatabaseUpdate withCollation(String collation)

Set the collation of the database.

DatabaseUpdate withCreateMode(CreateMode createMode)

Set specifies the mode of database creation.

DatabaseUpdate withEdition(DatabaseEdition edition)

Set the edition of the database.

DatabaseUpdate withElasticPoolName(String elasticPoolName)

Set the name of the elastic pool the database is in.

DatabaseUpdate withMaxSizeBytes(String maxSizeBytes)

Set the max size of the database expressed in bytes.

DatabaseUpdate withReadScale(ReadScale readScale)

Set conditional.

DatabaseUpdate withRecoveryServicesRecoveryPointResourceId(String recoveryServicesRecoveryPointResourceId)

Set conditional.

DatabaseUpdate withRequestedServiceObjectiveId(UUID requestedServiceObjectiveId)

Set the configured service level objective ID of the database.

DatabaseUpdate withRequestedServiceObjectiveName(ServiceObjectiveName requestedServiceObjectiveName)

Set the name of the configured service level objective of the database.

DatabaseUpdate withRestorePointInTime(DateTime restorePointInTime)

Set conditional.

DatabaseUpdate withSampleName(SampleName sampleName)

Set indicates the name of the sample schema to apply when creating this database.

DatabaseUpdate withSourceDatabaseDeletionDate(DateTime sourceDatabaseDeletionDate)

Set conditional.

DatabaseUpdate withSourceDatabaseId(String sourceDatabaseId)

Set conditional.

DatabaseUpdate withTags(Map<String,String> tags)

Set resource tags.

DatabaseUpdate withZoneRedundant(Boolean zoneRedundant)

Set whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

java.lang.Boolean zoneRedundant()

Get whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

Methods inherited from com.microsoft.azure.ProxyResource

com.microsoft.azure.ProxyResource.id com.microsoft.azure.ProxyResource.name com.microsoft.azure.ProxyResource.type

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

DatabaseUpdate

public DatabaseUpdate()

Method Details

collation

public String collation()

Get the collation of the database. If createMode is not Default, this value is ignored.

Returns:

the collation value

containmentState

public Long containmentState()

Get the containment state of the database.

Returns:

the containmentState value

createMode

public CreateMode createMode()

Get specifies the mode of database creation. 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:

the createMode value

creationDate

public DateTime creationDate()

Get the creation date of the database (ISO8601 format).

Returns:

the creationDate value

currentServiceObjectiveId

public UUID currentServiceObjectiveId()

Get the current service level objective ID of the database. This is the ID of the service level objective that is currently active.

Returns:

the currentServiceObjectiveId value

databaseId

public UUID databaseId()

Get the ID of the database.

Returns:

the databaseId value

defaultSecondaryLocation

public String defaultSecondaryLocation()

Get the default secondary region for this database.

Returns:

the defaultSecondaryLocation value

earliestRestoreDate

public DateTime earliestRestoreDate()

Get this records the earliest start date and time that restore is available for this database (ISO8601 format).

Returns:

the earliestRestoreDate value

edition

public DatabaseEdition edition()

Get the edition of the database. The 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 -o table ```` ```powershell Get-AzSqlServerServiceObjective -Location ```` . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'.

Returns:

the edition value

elasticPoolName

public String elasticPoolName()

Get the name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition.

Returns:

the elasticPoolName value

failoverGroupId

public String failoverGroupId()

Get the resource identifier of the failover group containing this database.

Returns:

the failoverGroupId value

maxSizeBytes

public String maxSizeBytes()

Get the max size of the database expressed in bytes. If 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:

the maxSizeBytes value

readScale

public ReadScale readScale()

Get conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. Possible values include: 'Enabled', 'Disabled'.

Returns:

the readScale value

recommendedIndex

public List recommendedIndex()

Get the recommended indices for this database.

Returns:

the recommendedIndex value

recoveryServicesRecoveryPointResourceId

public String recoveryServicesRecoveryPointResourceId()

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

Returns:

the recoveryServicesRecoveryPointResourceId value

requestedServiceObjectiveId

public UUID requestedServiceObjectiveId()

Get the configured service level objective ID 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 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 requestedServiceObjectiveId value

requestedServiceObjectiveName

public ServiceObjectiveName requestedServiceObjectiveName()

Get the name of the configured service level 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 -o table ```` ```powershell Get-AzSqlServerServiceObjective -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:

the requestedServiceObjectiveName value

restorePointInTime

public DateTime restorePointInTime()

Get conditional. If createMode is PointInTimeRestore, 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:

the restorePointInTime value

sampleName

public SampleName sampleName()

Get indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition. Possible values include: 'AdventureWorksLT'.

Returns:

the sampleName value

serviceLevelObjective

public ServiceObjectiveName serviceLevelObjective()

Get the current service level objective of 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:

the serviceLevelObjective value

serviceTierAdvisors

public List serviceTierAdvisors()

Get the list of service tier advisors for this database. Expanded property.

Returns:

the serviceTierAdvisors value

sourceDatabaseDeletionDate

public DateTime sourceDatabaseDeletionDate()

Get conditional. If createMode is Restore and 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:

the sourceDatabaseDeletionDate value

sourceDatabaseId

public String sourceDatabaseId()

Get conditional. If createMode is Copy, 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:

the sourceDatabaseId value

status

public String status()

Get the status of the database.

Returns:

the status value

tags

public Map tags()

Get resource tags.

Returns:

the tags value

transparentDataEncryption

public List transparentDataEncryption()

Get the transparent data encryption info for this database.

Returns:

the transparentDataEncryption value

withCollation

public DatabaseUpdate withCollation(String collation)

Set the collation of the database. If createMode is not Default, this value is ignored.

Parameters:

collation - the collation value to set

Returns:

the DatabaseUpdate object itself.

withCreateMode

public DatabaseUpdate withCreateMode(CreateMode createMode)

Set specifies the mode of database creation. 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'.

Parameters:

createMode - the createMode value to set

Returns:

the DatabaseUpdate object itself.

withEdition

public DatabaseUpdate withEdition(DatabaseEdition edition)

Set the edition of the database. The 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 -o table ```` ```powershell Get-AzSqlServerServiceObjective -Location ```` . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'.

Parameters:

edition - the edition value to set

Returns:

the DatabaseUpdate object itself.

withElasticPoolName

public DatabaseUpdate withElasticPoolName(String elasticPoolName)

Set the name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition.

Parameters:

elasticPoolName - the elasticPoolName value to set

Returns:

the DatabaseUpdate object itself.

withMaxSizeBytes

public DatabaseUpdate withMaxSizeBytes(String maxSizeBytes)

Set the max size of the database expressed in bytes. If 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.".

Parameters:

maxSizeBytes - the maxSizeBytes value to set

Returns:

the DatabaseUpdate object itself.

withReadScale

public DatabaseUpdate withReadScale(ReadScale readScale)

Set conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. Possible values include: 'Enabled', 'Disabled'.

Parameters:

readScale - the readScale value to set

Returns:

the DatabaseUpdate object itself.

withRecoveryServicesRecoveryPointResourceId

public DatabaseUpdate withRecoveryServicesRecoveryPointResourceId(String recoveryServicesRecoveryPointResourceId)

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

Parameters:

recoveryServicesRecoveryPointResourceId - the recoveryServicesRecoveryPointResourceId value to set

Returns:

the DatabaseUpdate object itself.

withRequestedServiceObjectiveId

public DatabaseUpdate withRequestedServiceObjectiveId(UUID requestedServiceObjectiveId)

Set the configured service level objective ID 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 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.

Parameters:

requestedServiceObjectiveId - the requestedServiceObjectiveId value to set

Returns:

the DatabaseUpdate object itself.

withRequestedServiceObjectiveName

public DatabaseUpdate withRequestedServiceObjectiveName(ServiceObjectiveName requestedServiceObjectiveName)

Set the name of the configured service level 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 -o table ```` ```powershell Get-AzSqlServerServiceObjective -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'.

Parameters:

requestedServiceObjectiveName - the requestedServiceObjectiveName value to set

Returns:

the DatabaseUpdate object itself.

withRestorePointInTime

public DatabaseUpdate withRestorePointInTime(DateTime restorePointInTime)

Set conditional. If createMode is PointInTimeRestore, 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.

Parameters:

restorePointInTime - the restorePointInTime value to set

Returns:

the DatabaseUpdate object itself.

withSampleName

public DatabaseUpdate withSampleName(SampleName sampleName)

Set indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition. Possible values include: 'AdventureWorksLT'.

Parameters:

sampleName - the sampleName value to set

Returns:

the DatabaseUpdate object itself.

withSourceDatabaseDeletionDate

public DatabaseUpdate withSourceDatabaseDeletionDate(DateTime sourceDatabaseDeletionDate)

Set conditional. If createMode is Restore and 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.

Parameters:

sourceDatabaseDeletionDate - the sourceDatabaseDeletionDate value to set

Returns:

the DatabaseUpdate object itself.

withSourceDatabaseId

public DatabaseUpdate withSourceDatabaseId(String sourceDatabaseId)

Set conditional. If createMode is Copy, 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.

Parameters:

sourceDatabaseId - the sourceDatabaseId value to set

Returns:

the DatabaseUpdate object itself.

withTags

public DatabaseUpdate withTags(Map tags)

Set resource tags.

Parameters:

tags - the tags value to set

Returns:

the DatabaseUpdate object itself.

withZoneRedundant

public DatabaseUpdate withZoneRedundant(Boolean zoneRedundant)

Set whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

Parameters:

zoneRedundant - the zoneRedundant value to set

Returns:

the DatabaseUpdate object itself.

zoneRedundant

public Boolean zoneRedundant()

Get whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

Returns:

the zoneRedundant value

Applies to