azure.mgmt.sql.models module

class azure.mgmt.sql.models.MaxSizeCapability[source]

Bases: msrest.serialization.Model

The maximum size limits for a database.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • limit (long) – The maximum size of the database (see ‘unit’ for the units).
  • unit (str or MaxSizeUnits) – The units that the limit is expressed in. Possible values include: ‘Megabytes’, ‘Gigabytes’, ‘Terabytes’, ‘Petabytes’
  • status (str or CapabilityStatus) – The status of the maximum size capability. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
class azure.mgmt.sql.models.ServiceObjectiveCapability[source]

Bases: msrest.serialization.Model

The service objectives capabilities.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – The service objective name.
  • status (str or CapabilityStatus) – The status of the service objective. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
  • unit (str or PerformanceLevelUnit) – Unit type used to measure service objective performance level. Possible values include: ‘DTU’
  • value (int) – Performance level value.
  • id (str) – The unique ID of the service objective.
  • supported_max_sizes (list of MaxSizeCapability) – The list of supported maximum database sizes for this service objective.
class azure.mgmt.sql.models.EditionCapability[source]

Bases: msrest.serialization.Model

The server edition capabilities.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – The edition name.
  • status (str or CapabilityStatus) – The status of the server edition. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
  • supported_service_level_objectives (list of ServiceObjectiveCapability) – The list of supported service objectives for the edition.
class azure.mgmt.sql.models.ServerVersionCapability[source]

Bases: msrest.serialization.Model

The server capabilities.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – The server version name.
  • status (str or CapabilityStatus) – The status of the server version. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
  • supported_editions (list of EditionCapability) – The list of supported server editions.
class azure.mgmt.sql.models.LocationCapabilities[source]

Bases: msrest.serialization.Model

The capabilities for a location.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – The location name.
  • status (str or CapabilityStatus) – Azure SQL Database’s status for the location. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
  • supported_server_versions (list of ServerVersionCapability) – The list of supported server versions.
class azure.mgmt.sql.models.SubResource[source]

Bases: msrest.serialization.Model

Subresource properties.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Resource name
  • id (str) – The resource ID.
class azure.mgmt.sql.models.FirewallRule(start_ip_address, end_ip_address)[source]

Bases: azure.mgmt.sql.models.sub_resource.SubResource

Represents a server firewall rule.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Resource name
  • id (str) – The resource ID.
  • kind (str) – Kind of server that contains this firewall rule.
  • location (str) – Location of the server that contains this firewall rule.
  • type (str) – Type of resource this is.
Parameters:
  • start_ip_address (str) – The start IP address of the firewall rule. Must be IPv4 format. Use value ‘0.0.0.0’ to represent all Azure-internal IP addresses.
  • end_ip_address (str) – The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value ‘0.0.0.0’ to represent all Azure-internal IP addresses.
class azure.mgmt.sql.models.Resource[source]

Bases: msrest.serialization.Model

ARM resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
class azure.mgmt.sql.models.TrackedResource(location, tags=None)[source]

Bases: azure.mgmt.sql.models.resource.Resource

ARM tracked top level resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
Parameters:
  • tags (dict) – Resource tags.
  • location (str) – Resource location.
class azure.mgmt.sql.models.ProxyResource[source]

Bases: azure.mgmt.sql.models.resource.Resource

ARM proxy resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
class azure.mgmt.sql.models.ImportExtensionRequest(storage_key_type, storage_key, storage_uri, administrator_login, administrator_login_password, name=None, type=None, authentication_type='SQL')[source]

Bases: msrest.serialization.Model

Import database parameters.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters:
  • name (str) – The name of the extension.
  • type (str) – The type of the extension.
  • storage_key_type (str or StorageKeyType) – The type of the storage key to use. Possible values include: ‘StorageAccessKey’, ‘SharedAccessKey’
  • storage_key (str) – The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a ”?.”
  • storage_uri (str) – The storage uri to use.
  • administrator_login (str) – The name of the SQL administrator.
  • administrator_login_password (str) – The password of the SQL administrator.
  • authentication_type (str or AuthenticationType) – The authentication type. Possible values include: ‘SQL’, ‘ADPassword’. Default value: “SQL” .
Variables:

operation_mode (str) – The type of import operation being performed. This is always Import. Default value: “Import” .

operation_mode = 'Import'
class azure.mgmt.sql.models.ImportExportResponse[source]

Bases: azure.mgmt.sql.models.proxy_resource.ProxyResource

Response for Import/Export Get operation.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • request_type (str) – The request type of the operation.
  • request_id (str) – The request type of the operation.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • status (str) – The status message returned from the server.
  • last_modified_time (str) – The operation status last modified time.
  • queued_time (str) – The operation queued time.
  • blob_uri (str) – The blob uri.
  • error_message (str) – The error message returned from the server.
class azure.mgmt.sql.models.ImportRequest(storage_key_type, storage_key, storage_uri, administrator_login, administrator_login_password, database_name, edition, service_objective_name, max_size_bytes, authentication_type='SQL')[source]

Bases: azure.mgmt.sql.models.export_request.ExportRequest

Import database parameters.

Parameters:
  • storage_key_type (str or StorageKeyType) – The type of the storage key to use. Possible values include: ‘StorageAccessKey’, ‘SharedAccessKey’
  • storage_key (str) – The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a ”?.”
  • storage_uri (str) – The storage uri to use.
  • administrator_login (str) – The name of the SQL administrator.
  • administrator_login_password (str) – The password of the SQL administrator.
  • authentication_type (str or AuthenticationType) – The authentication type. Possible values include: ‘SQL’, ‘ADPassword’. Default value: “SQL” .
  • database_name (str) – The name of the database to import.
  • edition (str or DatabaseEdition) – The edition for the database being created. Possible values include: ‘Web’, ‘Business’, ‘Basic’, ‘Standard’, ‘Premium’, ‘Free’, ‘Stretch’, ‘DataWarehouse’, ‘System’, ‘System2’
  • service_objective_name (str or ServiceObjectiveName) – The name of the service objective to assign to the database. Possible values include: ‘Basic’, ‘S0’, ‘S1’, ‘S2’, ‘S3’, ‘P1’, ‘P2’, ‘P3’, ‘P4’, ‘P6’, ‘P11’, ‘P15’, ‘System’, ‘System2’, ‘ElasticPool’
  • max_size_bytes (str) – The maximum size for the newly imported database.
class azure.mgmt.sql.models.ExportRequest(storage_key_type, storage_key, storage_uri, administrator_login, administrator_login_password, authentication_type='SQL')[source]

Bases: msrest.serialization.Model

Export database parameters.

Parameters:
  • storage_key_type (str or StorageKeyType) – The type of the storage key to use. Possible values include: ‘StorageAccessKey’, ‘SharedAccessKey’
  • storage_key (str) – The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a ”?.”
  • storage_uri (str) – The storage uri to use.
  • administrator_login (str) – The name of the SQL administrator.
  • administrator_login_password (str) – The password of the SQL administrator.
  • authentication_type (str or AuthenticationType) – The authentication type. Possible values include: ‘SQL’, ‘ADPassword’. Default value: “SQL” .

Bases: azure.mgmt.sql.models.sub_resource.SubResource

Represents a database replication link.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Resource name
  • id (str) – The resource ID.
  • location (str) – Location of the server that contains this firewall rule.
  • type (str) – Type of resource this is.
  • is_termination_allowed (bool) – Legacy value indicating whether termination is allowed. Currently always returns true.
  • replication_mode (str) – Replication mode of this replication link.
  • partner_server (str) – The name of the server hosting the partner database.
  • partner_database (str) – The name of the partner database.
  • partner_location (str) – The Azure Region of the partner database.
  • role (str or ReplicationRole) – The role of the database in the replication link. Possible values include: ‘Primary’, ‘Secondary’, ‘NonReadableSecondary’, ‘Source’, ‘Copy’
  • partner_role (str or ReplicationRole) – The role of the partner database in the replication link. Possible values include: ‘Primary’, ‘Secondary’, ‘NonReadableSecondary’, ‘Source’, ‘Copy’
  • start_time (datetime) – The start time for the replication link.
  • percent_complete (int) – The percentage of seeding complete for the replication link.
  • replication_state (str or ReplicationState) – The replication state for the replication link. Possible values include: ‘PENDING’, ‘SEEDING’, ‘CATCH_UP’, ‘SUSPENDED’
class azure.mgmt.sql.models.RecommendedElasticPoolMetric(date_time_property=None, dtu=None, size_gb=None)[source]

Bases: msrest.serialization.Model

Represents recommended elastic pool metric.

Parameters:
class azure.mgmt.sql.models.SloUsageMetric(service_level_objective=None, service_level_objective_id=None, in_range_time_ratio=None)[source]

Bases: msrest.serialization.Model

Represents a Slo Usage Metric.

Parameters:
  • service_level_objective (str or ServiceObjectiveName) – The serviceLevelObjective for SLO usage metric. Possible values include: ‘Basic’, ‘S0’, ‘S1’, ‘S2’, ‘S3’, ‘P1’, ‘P2’, ‘P3’, ‘P4’, ‘P6’, ‘P11’, ‘P15’, ‘System’, ‘System2’, ‘ElasticPool’
  • service_level_objective_id (str) – The serviceLevelObjectiveId for SLO usage metric.
  • in_range_time_ratio (float) – Gets or sets inRangeTimeRatio for SLO usage metric.
class azure.mgmt.sql.models.ServiceTierAdvisor[source]

Bases: azure.mgmt.sql.models.sub_resource.SubResource

Represents a Service Tier Advisor.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Resource name
  • id (str) – The resource ID.
  • observation_period_start (datetime) – The observation period start (ISO8601 format).
  • observation_period_end (datetime) – The observation period start (ISO8601 format).
  • active_time_ratio (float) – The activeTimeRatio for service tier advisor.
  • min_dtu (float) – Gets or sets minDtu for service tier advisor.
  • avg_dtu (float) – Gets or sets avgDtu for service tier advisor.
  • max_dtu (float) – Gets or sets maxDtu for service tier advisor.
  • max_size_in_gb (float) – Gets or sets maxSizeInGB for service tier advisor.
  • service_level_objective_usage_metrics (list of SloUsageMetric) – Gets or sets serviceLevelObjectiveUsageMetrics for the service tier advisor.
  • current_service_level_objective (str) – Gets or sets currentServiceLevelObjective for service tier advisor.
  • current_service_level_objective_id (str) – Gets or sets currentServiceLevelObjectiveId for service tier advisor.
  • usage_based_recommendation_service_level_objective (str) – Gets or sets usageBasedRecommendationServiceLevelObjective for service tier advisor.
  • usage_based_recommendation_service_level_objective_id (str) – Gets or sets usageBasedRecommendationServiceLevelObjectiveId for service tier advisor.
  • database_size_based_recommendation_service_level_objective (str) – Gets or sets databaseSizeBasedRecommendationServiceLevelObjective for service tier advisor.
  • database_size_based_recommendation_service_level_objective_id (str) – Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service tier advisor.
  • disaster_plan_based_recommendation_service_level_objective (str) – Gets or sets disasterPlanBasedRecommendationServiceLevelObjective for service tier advisor.
  • disaster_plan_based_recommendation_service_level_objective_id (str) – Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service tier advisor.
  • overall_recommendation_service_level_objective (str) – Gets or sets overallRecommendationServiceLevelObjective for service tier advisor.
  • overall_recommendation_service_level_objective_id (str) – Gets or sets overallRecommendationServiceLevelObjectiveId for service tier advisor.
  • confidence (float) – Gets or sets confidence for service tier advisor.
class azure.mgmt.sql.models.TransparentDataEncryption(status=None)[source]

Bases: azure.mgmt.sql.models.sub_resource.SubResource

Represents a database transparent data encryption .

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Resource name
  • id (str) – The resource ID.
Parameters:

status (str or TransparentDataEncryptionStatus) – The status of the database transparent data encryption. Possible values include: ‘Enabled’, ‘Disabled’

class azure.mgmt.sql.models.OperationImpact[source]

Bases: msrest.serialization.Model

Represents impact of an operation, both in absolute and relative terms.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – The name of the impact dimension.
  • unit (str) – The unit in which estimated impact to dimension is measured.
  • change_value_absolute (float) – The absolute impact to dimension.
  • change_value_relative (float) – The relative impact to dimension (null if not applicable)
class azure.mgmt.sql.models.RecommendedIndex[source]

Bases: azure.mgmt.sql.models.proxy_resource.ProxyResource

Represents a database recommended index.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • action (str or RecommendedIndexAction) – The proposed index action. You can create a missing index, drop an unused index, or rebuild an existing index to improve its performance. Possible values include: ‘Create’, ‘Drop’, ‘Rebuild’
  • state (str or RecommendedIndexState) – The current recommendation state. Possible values include: ‘Active’, ‘Pending’, ‘Executing’, ‘Verifying’, ‘Pending Revert’, ‘Reverting’, ‘Reverted’, ‘Ignored’, ‘Expired’, ‘Blocked’, ‘Success’
  • created (datetime) – The UTC datetime showing when this resource was created (ISO8601 format).
  • last_modified (datetime) – The UTC datetime of when was this resource last changed (ISO8601 format).
  • index_type (str or RecommendedIndexType) – The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, CLUSTERED COLUMNSTORE). Possible values include: ‘CLUSTERED’, ‘NONCLUSTERED’, ‘COLUMNSTORE’, ‘CLUSTERED COLUMNSTORE’
  • schema (str) – The schema where table to build index over resides
  • table (str) – The table on which to build index.
  • columns (list of str) – Columns over which to build index
  • included_columns (list of str) – The list of column names to be included in the index
  • index_script (str) – The full build index script
  • estimated_impact (list of OperationImpact) – The estimated impact of doing recommended index action.
  • reported_impact (list of OperationImpact) – The values reported after index action is complete.
class azure.mgmt.sql.models.Database(location, tags=None, collation=None, create_mode=None, source_database_id=None, source_database_deletion_date=None, restore_point_in_time=None, recovery_services_recovery_point_resource_id=None, edition=None, max_size_bytes=None, requested_service_objective_id=None, requested_service_objective_name=None, elastic_pool_name=None, read_scale=None, sample_name=None)[source]

Bases: azure.mgmt.sql.models.tracked_resource.TrackedResource

Represents a database.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • kind (str) – Kind of database. This is metadata used for the Azure portal experience.
  • creation_date (datetime) – The creation date of the database (ISO8601 format).
  • containment_state (long) – The containment state of the database.
  • current_service_objective_id (str) – The current service level objective ID of the database. This is the ID of the service level objective that is currently active.
  • database_id (str) – The ID of the database.
  • earliest_restore_date (datetime) – This records the earliest start date and time that restore is available for this database (ISO8601 format).
  • service_level_objective (str or ServiceObjectiveName) – The current service level objective of the database. Possible values include: ‘Basic’, ‘S0’, ‘S1’, ‘S2’, ‘S3’, ‘P1’, ‘P2’, ‘P3’, ‘P4’, ‘P6’, ‘P11’, ‘P15’, ‘System’, ‘System2’, ‘ElasticPool’
  • status (str) – The status of the database.
  • default_secondary_location (str) – The default secondary region for this database.
  • service_tier_advisors (list of ServiceTierAdvisor) – The list of service tier advisors for this database. Expanded property
  • transparent_data_encryption (list of TransparentDataEncryption) – The transparent data encryption info for this database.
  • recommended_index (list of RecommendedIndex) – The recommended indices for this database.
  • failover_group_id (str) – The id indicating the failover group containing this database.
Parameters:
  • tags (dict) – Resource tags.
  • location (str) – Resource location.
  • collation (str) – The collation of the database. If createMode is not Default, this value is ignored.
  • create_mode (str or CreateMode) – 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’
  • source_database_id (str) – 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.
  • source_database_deletion_date (datetime) – 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.
  • restore_point_in_time (datetime) – 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.
  • recovery_services_recovery_point_resource_id (datetime) – Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from.
  • edition (str or DatabaseEdition) – The edition of the database. The 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’
  • max_size_bytes (str) – 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.”
  • requested_service_objective_id (str) – 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. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: “Capabilities_ListByLocation.”
  • requested_service_objective_name (str or ServiceObjectiveName) – 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. 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’
  • elastic_pool_name (str) – 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.
  • read_scale (str or ReadScale) – 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’
  • sample_name (str or SampleName) – 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’
class azure.mgmt.sql.models.RecommendedElasticPool(dtu=None, database_dtu_min=None, database_dtu_max=None, storage_mb=None)[source]

Bases: azure.mgmt.sql.models.proxy_resource.ProxyResource

Represents a recommented elastic pool.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • database_edition (str or ElasticPoolEdition) – The edition of the recommended elastic pool. The ElasticPoolEdition enumeration contains all the valid editions. Possible values include: ‘Basic’, ‘Standard’, ‘Premium’
  • observation_period_start (datetime) – The observation period start (ISO8601 format).
  • observation_period_end (datetime) – The observation period start (ISO8601 format).
  • max_observed_dtu (float) – Gets maximum observed DTU.
  • max_observed_storage_mb (float) – Gets maximum observed storage in megabytes.
  • databases (list of Database) – The list of databases in this pool. Expanded property
  • metrics (list of RecommendedElasticPoolMetric) – The list of databases housed in the server. Expanded property
Parameters:
  • dtu (float) – The DTU for the recommended elastic pool.
  • database_dtu_min (float) – The minimum DTU for the database.
  • database_dtu_max (float) – The maximum DTU for the database.
  • storage_mb (float) – Gets storage size in megabytes.
class azure.mgmt.sql.models.ElasticPool(location, tags=None, edition=None, dtu=None, database_dtu_max=None, database_dtu_min=None, storage_mb=None)[source]

Bases: azure.mgmt.sql.models.tracked_resource.TrackedResource

Represents a database elastic pool.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • creation_date (datetime) – The creation date of the elastic pool (ISO8601 format).
  • state (str or ElasticPoolState) – The state of the elastic pool. Possible values include: ‘Creating’, ‘Ready’, ‘Disabled’
  • kind (str) – Kind of elastic pool. This is metadata used for the Azure portal experience.
Parameters:
  • tags (dict) – Resource tags.
  • location (str) – Resource location.
  • edition (str or ElasticPoolEdition) – The edition of the elastic pool. Possible values include: ‘Basic’, ‘Standard’, ‘Premium’
  • dtu (int) – The total shared DTU for the database elastic pool.
  • database_dtu_max (int) – The maximum DTU any one database can consume.
  • database_dtu_min (int) – The minimum DTU all databases are guaranteed.
  • storage_mb (int) – Gets storage limit for the database elastic pool in MB.
class azure.mgmt.sql.models.ElasticPoolActivity(location=None)[source]

Bases: azure.mgmt.sql.models.proxy_resource.ProxyResource

Represents the activity on an elastic pool.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • end_time (datetime) – The time the operation finished (ISO8601 format).
  • error_code (int) – The error code if available.
  • error_message (str) – The error message if available.
  • error_severity (int) – The error severity if available.
  • operation (str) – The operation name.
  • operation_id (str) – The unique operation ID.
  • percent_complete (int) – The percentage complete if available.
  • requested_database_dtu_max (int) – The requested max DTU per database if available.
  • requested_database_dtu_min (int) – The requested min DTU per database if available.
  • requested_dtu (int) – The requested DTU for the pool if available.
  • requested_elastic_pool_name (str) – The requested name for the elastic pool if available.
  • requested_storage_limit_in_gb (long) – The requested storage limit for the pool in GB if available.
  • elastic_pool_name (str) – The name of the elastic pool.
  • server_name (str) – The name of the server the elastic pool is in.
  • start_time (datetime) – The time the operation started (ISO8601 format).
  • state (str) – The current state of the operation.
  • requested_storage_limit_in_mb (int) – The requested storage limit in MB.
  • requested_database_dtu_guarantee (int) – The requested per database DTU guarantee.
  • requested_database_dtu_cap (int) – The requested per database DTU cap.
  • requested_dtu_guarantee (int) – The requested DTU guarantee.
Parameters:

location (str) – The geo-location where the resource lives

class azure.mgmt.sql.models.ElasticPoolDatabaseActivity(location=None)[source]

Bases: azure.mgmt.sql.models.proxy_resource.ProxyResource

Represents the activity on an elastic pool.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • database_name (str) – The database name.
  • end_time (datetime) – The time the operation finished (ISO8601 format).
  • error_code (int) – The error code if available.
  • error_message (str) – The error message if available.
  • error_severity (int) – The error severity if available.
  • operation (str) – The operation name.
  • operation_id (str) – The unique operation ID.
  • percent_complete (int) – The percentage complete if available.
  • requested_elastic_pool_name (str) – The name for the elastic pool the database is moving into if available.
  • current_elastic_pool_name (str) – The name of the current elastic pool the database is in if available.
  • current_service_objective (str) – The name of the current service objective if available.
  • requested_service_objective (str) – The name of the requested service objective if available.
  • server_name (str) – The name of the server the elastic pool is in.
  • start_time (datetime) – The time the operation started (ISO8601 format).
  • state (str) – The current state of the operation.
Parameters:

location (str) – The geo-location where the resource lives

class azure.mgmt.sql.models.Server(location, tags=None, version=None, administrator_login=None, administrator_login_password=None)[source]

Bases: azure.mgmt.sql.models.tracked_resource.TrackedResource

Represents a server.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • kind (str) – Kind of sql server. This is metadata used for the Azure portal experience.
  • fully_qualified_domain_name (str) – The fully qualified domain name of the server.
  • external_administrator_sid (str) – The ID of the Active Azure Directory object with admin permissions on this server. Legacy parameter, always null. To check for Active Directory admin, query .../servers/{serverName}/administrators.
  • external_administrator_login (str) – The display name of the Azure Active Directory object with admin permissions on this server. Legacy parameter, always null. To check for Active Directory admin, query .../servers/{serverName}/administrators
  • state (str or ServerState) – The state of the server. Possible values include: ‘Ready’, ‘Disabled’
Parameters:
  • tags (dict) – Resource tags.
  • location (str) – Resource location.
  • version (str or ServerVersion) – The version of the server. Possible values include: ‘2.0’, ‘12.0’
  • administrator_login (str) – Administrator username for the server. Can only be specified when the server is being created (and is required for creation).
  • administrator_login_password (str) – The administrator login password (required for server creation).
class azure.mgmt.sql.models.RestorePoint[source]

Bases: azure.mgmt.sql.models.proxy_resource.ProxyResource

Represents a database restore point.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • restore_point_type (str or RestorePointTypes) – The restore point type of the database restore point. Possible values include: ‘DISCRETE’, ‘CONTINUOUS’
  • restore_point_creation_date (datetime) – Restore point creation time (ISO8601 format). Populated when restorePointType = CONTINUOUS. Null otherwise.
  • earliest_restore_date (datetime) – Earliest restore time (ISO8601 format). Populated when restorePointType = DISCRETE. Null otherwise.
class azure.mgmt.sql.models.DatabaseMetric[source]

Bases: azure.mgmt.sql.models.sub_resource.SubResource

Represents database metrics.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Resource name
  • id (str) – The resource ID.
  • resource_name (str) – The name of the resource.
  • display_name (str) – The metric display name.
  • current_value (float) – The current value of the metric.
  • limit (float) – The current limit of the metric.
  • unit (str) – The units of the metric.
  • next_reset_time (datetime) – The next reset time for the metric (ISO8601 format).
class azure.mgmt.sql.models.ServerMetric[source]

Bases: msrest.serialization.Model

Represents server metrics.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Name of the server usage metric.
  • resource_name (str) – The name of the resource.
  • display_name (str) – The metric display name.
  • current_value (float) – The current value of the metric.
  • limit (float) – The current limit of the metric.
  • unit (str) – The units of the metric.
  • next_reset_time (datetime) – The next reset time for the metric (ISO8601 format).
class azure.mgmt.sql.models.ServiceObjective[source]

Bases: azure.mgmt.sql.models.sub_resource.SubResource

Represents a database service objective.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Resource name
  • id (str) – The resource ID.
  • service_objective_name (str) – The name for the service objective.
  • is_default (bool) – Gets whether the service level objective is the default service objective.
  • is_system (bool) – Gets whether the service level objective is a system service objective.
  • description (str) – The description for the service level objective.
  • enabled (bool) – Gets whether the service level objective is enabled.
class azure.mgmt.sql.models.TransparentDataEncryptionActivity[source]

Bases: azure.mgmt.sql.models.sub_resource.SubResource

Represents a database transparent data encryption Scan.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – Resource name
  • id (str) – The resource ID.
  • status (str or TransparentDataEncryptionActivityStatus) – The status of the database. Possible values include: ‘Encrypting’, ‘Decrypting’
  • percent_complete (float) – The percent complete of the transparent data encryption scan for a database.
class azure.mgmt.sql.models.OperationDisplay(provider=None, resource=None, operation=None)[source]

Bases: msrest.serialization.Model

Display metadata associated with the operation.

Parameters:
  • provider (str) – Service provider: Microsoft SQL Database.
  • resource (str) – Resource on which the operation is performed: Server, Database, etc.
  • operation (str) – Type of operation: get, read, delete, etc.
class azure.mgmt.sql.models.Operation(name=None, display=None)[source]

Bases: msrest.serialization.Model

SQL REST API operation definition.

Parameters:
  • name (str) – Operation name: {provider}/{resource}/{operation}
  • display (OperationDisplay) – Display metadata associated with the operation.
class azure.mgmt.sql.models.OperationListResult(value=None, next_link=None)[source]

Bases: msrest.serialization.Model

Result of the request to list SQL operations. It contains a list of operations and a URL link to get the next set of results.

Parameters:
  • value (list of Operation) – List of SQL operations supported by the SQL resource provider.
  • next_link (str) – URL to get the next set of operation list results if there are any.
class azure.mgmt.sql.models.DatabaseSecurityAlertPolicy(state, location=None, disabled_alerts=None, email_addresses=None, email_account_admins=None, storage_endpoint=None, storage_account_access_key=None, retention_days=None, use_server_default=None)[source]

Bases: azure.mgmt.sql.models.proxy_resource.ProxyResource

Contains information about a database Threat Detection policy.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • kind (str) – Resource kind.
Parameters:
  • location (str) – The geo-location where the resource lives
  • state (str or SecurityAlertPolicyState) – Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. Possible values include: ‘New’, ‘Enabled’, ‘Disabled’
  • disabled_alerts (str) – Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Usage_Anomaly.
  • email_addresses (str) – Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
  • email_account_admins (str or SecurityAlertPolicyEmailAccountAdmins) – Specifies that the alert is sent to the account administrators. Possible values include: ‘Enabled’, ‘Disabled’
  • storage_endpoint (str) – Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.
  • storage_account_access_key (str) – Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
  • retention_days (int) – Specifies the number of days to keep in the Threat Detection audit logs.
  • use_server_default (str or SecurityAlertPolicyUseServerDefault) – Specifies whether to use the default server policy. Possible values include: ‘Enabled’, ‘Disabled’
class azure.mgmt.sql.models.DatabaseBlobAuditingPolicy(state, location=None, storage_endpoint=None, storage_account_access_key=None, retention_days=None, audit_actions_and_groups=None, storage_account_subscription_id=None, is_storage_secondary_key_in_use=None)[source]

Bases: azure.mgmt.sql.models.proxy_resource.ProxyResource

Contains information about a database Blob Auditing policy.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – Resource ID.
  • name (str) – Resource name.
  • type (str) – Resource type.
  • kind (str) – Resource kind.
Parameters:
  • location (str) – The geo-location where the resource lives
  • state (str or BlobAuditingPolicyState) – Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. Possible values include: ‘Enabled’, ‘Disabled’
  • storage_endpoint (str) – Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
  • storage_account_access_key (str) – Specifies the identifier key of the auditing storage account. If state is Enabled, storageAccountAccessKey is required.
  • retention_days (int) – Specifies the number of days to keep in the audit logs.
  • audit_actions_and_groups (list of str) – Specifies the Actions and Actions-Groups to audit.
  • storage_account_subscription_id (str) – Specifies the blob storage subscription Id.
  • is_storage_secondary_key_in_use (bool) – Specifies whether storageAccountAccessKey value is the storage’s secondary key.
class azure.mgmt.sql.models.FirewallRulePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of FirewallRule object

class azure.mgmt.sql.models.ReplicationLinkPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ReplicationLink object

class azure.mgmt.sql.models.RestorePointPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of RestorePoint object

class azure.mgmt.sql.models.DatabasePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Database object

class azure.mgmt.sql.models.DatabaseMetricPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of DatabaseMetric object

class azure.mgmt.sql.models.ServiceTierAdvisorPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ServiceTierAdvisor object

class azure.mgmt.sql.models.TransparentDataEncryptionActivityPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of TransparentDataEncryptionActivity object

class azure.mgmt.sql.models.ServerPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Server object

class azure.mgmt.sql.models.ServerMetricPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ServerMetric object

class azure.mgmt.sql.models.ServiceObjectivePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ServiceObjective object

class azure.mgmt.sql.models.ElasticPoolPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ElasticPool object

class azure.mgmt.sql.models.ElasticPoolActivityPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ElasticPoolActivity object

class azure.mgmt.sql.models.ElasticPoolDatabaseActivityPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ElasticPoolDatabaseActivity object

class azure.mgmt.sql.models.RecommendedElasticPoolPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of RecommendedElasticPool object

class azure.mgmt.sql.models.RecommendedElasticPoolMetricPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of RecommendedElasticPoolMetric object

class azure.mgmt.sql.models.CapabilityStatus[source]

Bases: enum.Enum

available = 'Available'
default = 'Default'
disabled = 'Disabled'
visible = 'Visible'
class azure.mgmt.sql.models.MaxSizeUnits[source]

Bases: enum.Enum

gigabytes = 'Gigabytes'
megabytes = 'Megabytes'
petabytes = 'Petabytes'
terabytes = 'Terabytes'
class azure.mgmt.sql.models.PerformanceLevelUnit[source]

Bases: enum.Enum

dtu = 'DTU'
class azure.mgmt.sql.models.DatabaseEdition[source]

Bases: enum.Enum

basic = 'Basic'
business = 'Business'
data_warehouse = 'DataWarehouse'
free = 'Free'
premium = 'Premium'
standard = 'Standard'
stretch = 'Stretch'
system = 'System'
system2 = 'System2'
web = 'Web'
class azure.mgmt.sql.models.ServiceObjectiveName[source]

Bases: enum.Enum

basic = 'Basic'
elastic_pool = 'ElasticPool'
p1 = 'P1'
p11 = 'P11'
p15 = 'P15'
p2 = 'P2'
p3 = 'P3'
p4 = 'P4'
p6 = 'P6'
s0 = 'S0'
s1 = 'S1'
s2 = 'S2'
s3 = 'S3'
system = 'System'
system2 = 'System2'
class azure.mgmt.sql.models.StorageKeyType[source]

Bases: enum.Enum

shared_access_key = 'SharedAccessKey'
storage_access_key = 'StorageAccessKey'
class azure.mgmt.sql.models.AuthenticationType[source]

Bases: enum.Enum

ad_password = 'ADPassword'
sql = 'SQL'
class azure.mgmt.sql.models.ReplicationRole[source]

Bases: enum.Enum

copy = 'Copy'
non_readable_secondary = 'NonReadableSecondary'
primary = 'Primary'
secondary = 'Secondary'
source = 'Source'
class azure.mgmt.sql.models.ReplicationState[source]

Bases: enum.Enum

catch_up = 'CATCH_UP'
pending = 'PENDING'
seeding = 'SEEDING'
suspended = 'SUSPENDED'
class azure.mgmt.sql.models.ElasticPoolEdition[source]

Bases: enum.Enum

basic = 'Basic'
premium = 'Premium'
standard = 'Standard'
class azure.mgmt.sql.models.CreateMode[source]

Bases: enum.Enum

copy = 'Copy'
default = 'Default'
non_readable_secondary = 'NonReadableSecondary'
online_secondary = 'OnlineSecondary'
point_in_time_restore = 'PointInTimeRestore'
recovery = 'Recovery'
restore = 'Restore'
restore_long_term_retention_backup = 'RestoreLongTermRetentionBackup'
class azure.mgmt.sql.models.TransparentDataEncryptionStatus[source]

Bases: enum.Enum

disabled = 'Disabled'
enabled = 'Enabled'
class azure.mgmt.sql.models.RecommendedIndexAction[source]

Bases: enum.Enum

create = 'Create'
drop = 'Drop'
rebuild = 'Rebuild'
class azure.mgmt.sql.models.RecommendedIndexState[source]

Bases: enum.Enum

active = 'Active'
blocked = 'Blocked'
executing = 'Executing'
expired = 'Expired'
ignored = 'Ignored'
pending = 'Pending'
pending_revert = 'Pending Revert'
reverted = 'Reverted'
reverting = 'Reverting'
success = 'Success'
verifying = 'Verifying'
class azure.mgmt.sql.models.RecommendedIndexType[source]

Bases: enum.Enum

clustered = 'CLUSTERED'
clusteredcolumnstore = 'CLUSTERED COLUMNSTORE'
columnstore = 'COLUMNSTORE'
nonclustered = 'NONCLUSTERED'
class azure.mgmt.sql.models.ReadScale[source]

Bases: enum.Enum

disabled = 'Disabled'
enabled = 'Enabled'
class azure.mgmt.sql.models.SampleName[source]

Bases: enum.Enum

adventure_works_lt = 'AdventureWorksLT'
class azure.mgmt.sql.models.ElasticPoolState[source]

Bases: enum.Enum

creating = 'Creating'
disabled = 'Disabled'
ready = 'Ready'
class azure.mgmt.sql.models.ServerVersion[source]

Bases: enum.Enum

one_two_full_stop_zero = '12.0'
two_full_stop_zero = '2.0'
class azure.mgmt.sql.models.ServerState[source]

Bases: enum.Enum

disabled = 'Disabled'
ready = 'Ready'
class azure.mgmt.sql.models.RestorePointTypes[source]

Bases: enum.Enum

continuous = 'CONTINUOUS'
discrete = 'DISCRETE'
class azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus[source]

Bases: enum.Enum

decrypting = 'Decrypting'
encrypting = 'Encrypting'
class azure.mgmt.sql.models.SecurityAlertPolicyState[source]

Bases: enum.Enum

disabled = 'Disabled'
enabled = 'Enabled'
new = 'New'
class azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins[source]

Bases: enum.Enum

disabled = 'Disabled'
enabled = 'Enabled'
class azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault[source]

Bases: enum.Enum

disabled = 'Disabled'
enabled = 'Enabled'
class azure.mgmt.sql.models.BlobAuditingPolicyState[source]

Bases: enum.Enum

disabled = 'Disabled'
enabled = 'Enabled'