azure.mgmt.sql.models module

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.RestorePoint[source]

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

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 RestorePointType) – 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.RecoverableDatabase[source]

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

A recoverable 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.
  • edition (str) – The edition of the database
  • service_level_objective (str) – The service level objective name of the database
  • elastic_pool_name (str) – The elastic pool name of the database
  • last_available_backup_date (datetime) – The last available backup date of the database (ISO8601 format)
class azure.mgmt.sql.models.RestorableDroppedDatabase[source]

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

A restorable dropped 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.
  • location (str) – The geo-location where the resource lives
  • database_name (str) – The name of the database
  • edition (str) – The edition of the database
  • max_size_bytes (str) – The max size in bytes of the database
  • service_level_objective (str) – The service level objective name of the database
  • elastic_pool_name (str) – The elastic pool name of the database
  • creation_date (datetime) – The creation date of the database (ISO8601 format)
  • deletion_date (datetime) – The deletion date of the database (ISO8601 format)
  • earliest_restore_date (datetime) – The earliest restore date of the database (ISO8601 format)
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 capability.

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.
  • included_max_size (MaxSizeCapability) – The included (free) max size for this service level objective.
class azure.mgmt.sql.models.EditionCapability[source]

Bases: msrest.serialization.Model

The database 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 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.ElasticPoolPerDatabaseMinDtuCapability[source]

Bases: msrest.serialization.Model

The minimum per-database DTU capability.

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

Variables:
  • limit (long) – The maximum DTUs per database.
  • status (str or CapabilityStatus) – The status of the capability. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
class azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxDtuCapability[source]

Bases: msrest.serialization.Model

The max per-database DTU capability.

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

Variables:
  • limit (long) – The maximum DTUs per database.
  • status (str or CapabilityStatus) – The status of the capability. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
  • supported_per_database_min_dtus (list of ElasticPoolPerDatabaseMinDtuCapability) – The list of supported min database DTUs.
class azure.mgmt.sql.models.ElasticPoolDtuCapability[source]

Bases: msrest.serialization.Model

The Elastic Pool DTU capability.

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).
  • max_database_count (long) – The maximum number of databases supported.
  • status (str or CapabilityStatus) – The status of the capability. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
  • supported_max_sizes (list of MaxSizeCapability) – The list of supported max sizes.
  • included_max_size (MaxSizeCapability) – The included (free) max size for this service level objective.
  • supported_per_database_max_sizes (list of MaxSizeCapability) – The list of supported max database sizes.
  • supported_per_database_max_dtus (list of ElasticPoolPerDatabaseMaxDtuCapability) – The list of supported max database DTUs.
class azure.mgmt.sql.models.ElasticPoolEditionCapability[source]

Bases: msrest.serialization.Model

The elastic pool edition capabilities.

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

Variables:
  • name (str) – The elastic pool edition name.
  • status (str or CapabilityStatus) – The status of the elastic pool edition. Possible values include: ‘Visible’, ‘Available’, ‘Default’, ‘Disabled’
  • supported_elastic_pool_dtus (list of ElasticPoolDtuCapability) – The list of supported elastic pool DTU levels 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 database editions.
  • supported_elastic_pool_editions (list of ElasticPoolEditionCapability) – The list of supported elastic pool 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.ServerConnectionPolicy(connection_type)[source]

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

A server secure connection 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) – Metadata used for the Azure portal experience.
  • location (str) – Resource location.
Parameters:

connection_type (str or ServerConnectionType) – The server connection type. Possible values include: ‘Default’, ‘Proxy’, ‘Redirect’

class azure.mgmt.sql.models.DataMaskingPolicy(data_masking_state, exempt_principals=None)[source]

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

Represents a database data masking 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.
  • application_principals (str) – The list of the application principals. This is a legacy parameter and is no longer used.
  • masking_level (str) – The masking level. This is a legacy parameter and is no longer used.
  • location (str) – The location of the data masking policy.
  • kind (str) – The kind of data masking policy. Metadata, used for Azure portal.
Parameters:
  • data_masking_state (str or DataMaskingState) – The state of the data masking policy. Possible values include: ‘Disabled’, ‘Enabled’
  • exempt_principals (str) – The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.
class azure.mgmt.sql.models.DataMaskingRule(schema_name, table_name, column_name, masking_function, alias_name=None, rule_state=None, number_from=None, number_to=None, prefix_size=None, suffix_size=None, replacement_string=None)[source]

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

Represents a database data masking rule.

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.
  • data_masking_rule_id (str) – The rule Id.
  • location (str) – The location of the data masking rule.
  • kind (str) – The kind of Data Masking Rule. Metadata, used for Azure portal.
Parameters:
  • alias_name (str) – The alias name. This is a legacy parameter and is no longer used.
  • rule_state (str or DataMaskingRuleState) – The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn’t already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: ‘Disabled’, ‘Enabled’
  • schema_name (str) – The schema name on which the data masking rule is applied.
  • table_name (str) – The table name on which the data masking rule is applied.
  • column_name (str) – The column name on which the data masking rule is applied.
  • masking_function (str or DataMaskingFunction) – The masking function that is used for the data masking rule. Possible values include: ‘CCN’, ‘Default’, ‘Email’, ‘Number’, ‘SSN’, ‘Text’
  • number_from (str) – The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
  • number_to (str) – The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
  • prefix_size (str) – If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored.
  • suffix_size (str) – If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored.
  • replacement_string (str) – If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored.
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.GeoBackupPolicy(state)[source]

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

A database geo backup 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.
  • storage_type (str) – The storage type of the geo backup policy.
  • kind (str) – Kind of geo backup policy. This is metadata used for the Azure portal experience.
  • location (str) – Backup policy location.
Parameters:

state (str or GeoBackupPolicyState) – The state of the geo backup policy. Possible values include: ‘Disabled’, ‘Enabled’

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” .
class azure.mgmt.sql.models.MetricValue[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.
  • count (float) – The number of values for the metric.
  • average (float) – The average value of the metric.
  • maximum (float) – The max value of the metric.
  • minimum (float) – The min value of the metric.
  • timestamp (datetime) – The metric timestamp (ISO-8601 format).
  • total (float) – The total value of the metric.
class azure.mgmt.sql.models.MetricName[source]

Bases: msrest.serialization.Model

A database metric name.

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

Variables:
  • value (str) – The name of the database metric.
  • localized_value (str) – The friendly name of the database metric.
class azure.mgmt.sql.models.Metric[source]

Bases: msrest.serialization.Model

Database metrics.

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

Variables:
  • start_time (datetime) – The start time for the metric (ISO-8601 format).
  • end_time (datetime) – The end time for the metric (ISO-8601 format).
  • time_grain (str) – The time step to be used to summarize the metric values.
  • unit (str or UnitType) – The unit of the metric. Possible values include: ‘count’, ‘bytes’, ‘seconds’, ‘percent’, ‘countPerSecond’, ‘bytesPerSecond’
  • name (MetricName) – The name information for the metric.
  • metric_values (list of MetricValue) – The metric values for the specified time window and timestep.
class azure.mgmt.sql.models.MetricAvailability[source]

Bases: msrest.serialization.Model

A metric availability value.

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

Variables:
  • retention (str) – The length of retention for the database metric.
  • time_grain (str) – The granularity of the database metric.
class azure.mgmt.sql.models.MetricDefinition[source]

Bases: msrest.serialization.Model

A database metric definition.

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

Variables:
  • name (MetricName) – The name information for the metric.
  • primary_aggregation_type (str or PrimaryAggregationType) – The primary aggregation type defining how metric values are displayed. Possible values include: ‘None’, ‘Average’, ‘Count’, ‘Minimum’, ‘Maximum’, ‘Total’
  • resource_uri (str) – The resource uri of the database.
  • unit (str or UnitDefinitionType) – The unit of the metric. Possible values include: ‘Count’, ‘Bytes’, ‘Seconds’, ‘Percent’, ‘CountPerSecond’, ‘BytesPerSecond’
  • metric_availabilities (list of MetricAvailability) – The list of database metric availabities for the metric.
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.

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.CheckNameAvailabilityRequest(name)[source]

Bases: msrest.serialization.Model

A request to check whether the specified name for a resource is available.

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

Parameters:name (str) – The name whose availability is to be checked.
Variables:type (str) – The type of resource that is used as the scope of the availability check. Default value: “Microsoft.Sql/servers” .
type = 'Microsoft.Sql/servers'
class azure.mgmt.sql.models.CheckNameAvailabilityResponse[source]

Bases: msrest.serialization.Model

A response indicating whether the specified name for a resource is available.

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

Variables:
  • available (bool) – True if the name is available, otherwise false.
  • message (str) – A message explaining why the name is unavailable. Will be null if the name is available.
  • name (str) – The name whose availability was checked.
  • reason (str or CheckNameAvailabilityReason) – The reason code explaining why the name is unavailable. Will be null if the name is available. Possible values include: ‘Invalid’, ‘AlreadyExists’
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[source]

Bases: msrest.serialization.Model

A Slo Usage Metric.

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

Variables:
  • 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

The 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 resource identifier of 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 (str) – 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.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.ServerAzureADAdministrator(login, sid, tenant_id)[source]

Bases: azure.mgmt.sql.models.sql_sub_resource.SqlSubResource

An server Active Directory Administrator.

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

Variables:
Parameters:
  • login (str) – The server administrator login value.
  • sid (str) – The server administrator Sid (Secure ID).
  • tenant_id (str) – The server Active Directory Administrator tenant id.
administrator_type = 'ActiveDirectory'
class azure.mgmt.sql.models.SqlSubResource[source]

Bases: msrest.serialization.Model

Subresource properties.

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

Variables:

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

Server communication link.

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.
  • state (str) – The state.
  • location (str) – Communication link location.
  • kind (str) – Communication link kind. This property is used for Azure Portal metadata.
Parameters:

partner_server (str) – The name of the partner server.

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.BackupLongTermRetentionVault(recovery_services_vault_resource_id)[source]

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

A backup long term retention vault.

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.
  • location (str) – The geo-location where the resource lives
Parameters:

recovery_services_vault_resource_id (str) – The azure recovery services vault resource id

class azure.mgmt.sql.models.BackupLongTermRetentionPolicy(state, recovery_services_backup_policy_resource_id)[source]

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

A backup long term retention 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.
  • location (str) – The geo-location where the resource lives
Parameters:
  • state (str or BackupLongTermRetentionPolicyState) – The status of the backup long term retention policy. Possible values include: ‘Disabled’, ‘Enabled’
  • recovery_services_backup_policy_resource_id (str) – The azure recovery services backup protection policy resource id
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.ServerUsage[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.DatabaseUsage[source]

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

The database usages.

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 usage metric display name.
  • current_value (float) – The current value of the usage metric.
  • limit (float) – The current limit of the usage metric.
  • unit (str) – The units of the usage metric.
  • next_reset_time (datetime) – The next reset time for the usage metric (ISO8601 format).
class azure.mgmt.sql.models.DatabaseBlobAuditingPolicy(state=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

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:
  • 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.FailoverGroupReadWriteEndpoint(failover_policy=None, failover_with_data_loss_grace_period_minutes=None)[source]

Bases: msrest.serialization.Model

Read-write endpoint of the failover group instance.

Parameters:
  • failover_policy (str or ReadWriteEndpointFailoverPolicy) – Failover policy of the read-write endpoint for the failover group. Possible values include: ‘Manual’, ‘Automatic’
  • failover_with_data_loss_grace_period_minutes (int) – Grace period before failover with data loss is attempted for the read-write endpoint.
class azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint(failover_policy=None)[source]

Bases: msrest.serialization.Model

Read-only endpoint of the failover group instance.

Parameters:failover_policy (str or ReadOnlyEndpointFailoverPolicy) – Failover policy of the read-only endpoint for the failover group. Possible values include: ‘Disabled’, ‘Enabled’
class azure.mgmt.sql.models.PartnerInfo(id=None)[source]

Bases: msrest.serialization.Model

Partner server information for the failover group.

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

Parameters:

id (str) – Resource identifier of the partner server.

Variables:
  • location (str) – Geo location of the partner server.
  • replication_role (str or FailoverGroupReplicationRole) – Replication role of the partner server. Possible values include: ‘Primary’, ‘Secondary’
class azure.mgmt.sql.models.FailoverGroup(tags=None, read_write_endpoint=None, read_only_endpoint=None, partner_servers=None, databases=None)[source]

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

A failover group.

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.
  • location (str) – Resource location.
  • replication_role (str or FailoverGroupReplicationRole) – Local replication role of the failover group instance. Possible values include: ‘Primary’, ‘Secondary’
  • replication_state (str) – Replication state of the failover group instance.
Parameters:
  • tags (dict) – Resource tags.
  • read_write_endpoint (FailoverGroupReadWriteEndpoint) – Read-write endpoint of the failover group instance.
  • read_only_endpoint (FailoverGroupReadOnlyEndpoint) – Read-only endpoint of the failover group instance.
  • partner_servers (list of PartnerInfo) – List of partner server information for the failover group.
  • databases (list of str) – List of databases in the failover group.
class azure.mgmt.sql.models.VirtualNetworkRule(virtual_network_subnet_id=None)[source]

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

A virtual network rule.

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

Variables:
Parameters:

virtual_network_subnet_id (str) – The resource ID of the virtual network subnet

class azure.mgmt.sql.models.ResourceIdentity(type=None)[source]

Bases: msrest.serialization.Model

Azure Active Directory identity configuration for a resource.

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

Variables:
  • principal_id (str) – The Azure Active Directory principal id.
  • tenant_id (str) – The Azure Active Directory tenant id.
Parameters:

type (str or IdentityType) – The identity type. Set this to ‘SystemAssigned’ in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: ‘SystemAssigned’

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

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

An Azure SQL Database 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 or enum) – Kind of sql server. This is metadata used for the Azure portal experience. Possible values include: ‘’, ‘v2.0’, ‘v12.0’, ‘user’, ‘system’, ‘datawarehouse’
  • state (str) – The state of the server.
  • fully_qualified_domain_name (str) – The fully qualified domain name of the server.
Parameters:
  • tags (dict) – Resource tags.
  • location (str) – Resource location.
  • identity (ResourceIdentity) – The Azure Active Directory identity of the server.
  • administrator_login (str) – Administrator username for the server. Once created it cannot be changed.
  • administrator_login_password (str) – The administrator login password (required for server creation).
  • version (str) – The version of the server.
class azure.mgmt.sql.models.ServerKey(kind=None, server_key_type=None, uri=None, thumbprint=None, creation_date=None)[source]

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

A server key.

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.
  • location (str) – Resource location.
  • subregion (str) – Subregion of the server key.
Parameters:
  • kind (str or enum) – Kind of encryption protector. This is metadata used for the Azure portal experience. Possible values include: ‘’, ‘azurekeyvault’, ‘servicemanaged’
  • server_key_type (str or ServerKeyType) – The server key type like ‘ServiceManaged’, ‘AzureKeyVault’. Possible values include: ‘ServiceManaged’, ‘AzureKeyVault’
  • uri (str) – The URI of the server key.
  • thumbprint (str) – Thumbprint of the server key.
  • creation_date (datetime) – The server key creation date.
class azure.mgmt.sql.models.EncryptionProtector(kind=None, server_key_name=None, server_key_type=None)[source]

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

The server encryption protector.

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.
  • location (str) – Resource location.
  • subregion (str) – Subregion of the encryption protector.
  • uri (str) – The URI of the server key.
  • thumbprint (str) – Thumbprint of the server key.
Parameters:
  • kind (str or enum) – Kind of encryption protector. This is metadata used for the Azure portal experience. Possible values include: ‘’, ‘azurekeyvault’, ‘servicemanaged’
  • server_key_name (str) – The name of the server key.
  • server_key_type (str or ServerKeyType) – The encryption protector type like ‘ServiceManaged’, ‘AzureKeyVault’. Possible values include: ‘ServiceManaged’, ‘AzureKeyVault’
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.DataMaskingRulePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of DataMaskingRule object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of GeoBackupPolicy object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of Metric object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of MetricDefinition 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.DatabasePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Database 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.DatabaseUsagePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of DatabaseUsage object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of RecoverableDatabase object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of RestorableDroppedDatabase 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.ServerUsagePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ServerUsage 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.EncryptionProtectorPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of EncryptionProtector object

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.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.ServerAzureADAdministratorPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ServerAzureADAdministrator object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of ServerCommunicationLink object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of FailoverGroup object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of VirtualNetworkRule object

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of ServerKey object

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

Bases: enum.Enum

continuous = 'CONTINUOUS'
discrete = 'DISCRETE'
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.ServerConnectionType[source]

Bases: enum.Enum

default = 'Default'
proxy = 'Proxy'
redirect = 'Redirect'
class azure.mgmt.sql.models.DataMaskingState[source]

Bases: enum.Enum

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

Bases: enum.Enum

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

Bases: enum.Enum

ccn = 'CCN'
default = 'Default'
email = 'Email'
number = 'Number'
ssn = 'SSN'
text = 'Text'
class azure.mgmt.sql.models.GeoBackupPolicyState[source]

Bases: enum.Enum

disabled = 'Disabled'
enabled = 'Enabled'
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.UnitType[source]

Bases: enum.Enum

bytes = 'bytes'
bytes_per_second = 'bytesPerSecond'
count = 'count'
count_per_second = 'countPerSecond'
percent = 'percent'
seconds = 'seconds'
class azure.mgmt.sql.models.PrimaryAggregationType[source]

Bases: enum.Enum

average = 'Average'
count = 'Count'
maximum = 'Maximum'
minimum = 'Minimum'
none = 'None'
total = 'Total'
class azure.mgmt.sql.models.UnitDefinitionType[source]

Bases: enum.Enum

bytes = 'Bytes'
bytes_per_second = 'BytesPerSecond'
count = 'Count'
count_per_second = 'CountPerSecond'
percent = 'Percent'
seconds = 'Seconds'
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.CheckNameAvailabilityReason[source]

Bases: enum.Enum

already_exists = 'AlreadyExists'
invalid = 'Invalid'
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.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.BackupLongTermRetentionPolicyState[source]

Bases: enum.Enum

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

Bases: enum.Enum

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

Bases: enum.Enum

automatic = 'Automatic'
manual = 'Manual'
class azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy[source]

Bases: enum.Enum

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

Bases: enum.Enum

primary = 'Primary'
secondary = 'Secondary'
class azure.mgmt.sql.models.IdentityType[source]

Bases: enum.Enum

system_assigned = 'SystemAssigned'
class azure.mgmt.sql.models.ServerKeyType[source]

Bases: enum.Enum

azure_key_vault = 'AzureKeyVault'
service_managed = 'ServiceManaged'