azure.mgmt.sql.operations module

class azure.mgmt.sql.operations.BackupLongTermRetentionPoliciesOperations(client, config, serializer, deserializer)[source]

Bases: object

BackupLongTermRetentionPoliciesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • backup_long_term_retention_policy_name – The name of the backup long term retention policy. Constant value: “Default”.
create_or_update(resource_group_name, server_name, database_name, state, recovery_services_backup_policy_resource_id, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a database backup long term retention policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database
  • 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
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns BackupLongTermRetentionPolicy or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a database backup long term retention policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

BackupLongTermRetentionPolicy or ClientRawResponse if raw=true

Return type:

BackupLongTermRetentionPolicy or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.BackupLongTermRetentionVaultsOperations(client, config, serializer, deserializer)[source]

Bases: object

BackupLongTermRetentionVaultsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • backup_long_term_retention_vault_name – The name of the Azure SQL Server backup LongTermRetention vault. Constant value: “RegisteredVault”.
create_or_update(resource_group_name, server_name, recovery_services_vault_resource_id, custom_headers=None, raw=False, **operation_config)[source]

Updates a server backup long term retention vault.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • recovery_services_vault_resource_id (str) – The azure recovery services vault resource id
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns BackupLongTermRetentionVault or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a server backup long term retention vault.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

BackupLongTermRetentionVault or ClientRawResponse if raw=true

Return type:

BackupLongTermRetentionVault or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.RestorePointsOperations(client, config, serializer, deserializer)[source]

Bases: object

RestorePointsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

list_by_database(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of database restore points.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to get available restore points.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of RestorePoint

Return type:

RestorePointPaged

Raises:

CloudError

class azure.mgmt.sql.operations.RecoverableDatabasesOperations(client, config, serializer, deserializer)[source]

Bases: object

RecoverableDatabasesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

get(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a recoverable database, which is a resource representing a database’s geo backup.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

RecoverableDatabase or ClientRawResponse if raw=true

Return type:

RecoverableDatabase or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of recoverable databases.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of RecoverableDatabase

Return type:

RecoverableDatabasePaged

Raises:

CloudError

class azure.mgmt.sql.operations.RestorableDroppedDatabasesOperations(client, config, serializer, deserializer)[source]

Bases: object

RestorableDroppedDatabasesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

get(resource_group_name, server_name, restorable_droppeded_database_id, custom_headers=None, raw=False, **operation_config)[source]

Gets a deleted database that can be restored.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • restorable_droppeded_database_id (str) – The id of the deleted database in the form of databaseName,deletionTimeInFileTimeFormat
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

RestorableDroppedDatabase or ClientRawResponse if raw=true

Return type:

RestorableDroppedDatabase or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of deleted databases that can be restored.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of RestorableDroppedDatabase

Return type:

RestorableDroppedDatabasePaged

Raises:

CloudError

class azure.mgmt.sql.operations.CapabilitiesOperations(client, config, serializer, deserializer)[source]

Bases: object

CapabilitiesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

list_by_location(location_id, custom_headers=None, raw=False, **operation_config)[source]

Gets the capabilities available for the specified location.

Parameters:
  • location_id (str) – The location id whose capabilities are retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

LocationCapabilities or ClientRawResponse if raw=true

Return type:

LocationCapabilities or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.ServerConnectionPoliciesOperations(client, config, serializer, deserializer)[source]

Bases: object

ServerConnectionPoliciesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • connection_policy_name – The name of the connection policy. Constant value: “default”.
create_or_update(resource_group_name, server_name, connection_type, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates the server’s connection policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • connection_type (str or ServerConnectionType) – The server connection type. Possible values include: ‘Default’, ‘Proxy’, ‘Redirect’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ServerConnectionPolicy or ClientRawResponse if raw=true

Return type:

ServerConnectionPolicy or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets the server’s secure connection policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ServerConnectionPolicy or ClientRawResponse if raw=true

Return type:

ServerConnectionPolicy or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.DatabaseThreatDetectionPoliciesOperations(client, config, serializer, deserializer)[source]

Bases: object

DatabaseThreatDetectionPoliciesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • security_alert_policy_name – The name of the security alert policy. Constant value: “default”.
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a database’s threat detection policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database for which database Threat Detection policy is defined.
  • parameters (DatabaseSecurityAlertPolicy) – The database Threat Detection policy.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

DatabaseSecurityAlertPolicy or ClientRawResponse if raw=true

Return type:

DatabaseSecurityAlertPolicy or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a database’s threat detection policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database for which database Threat Detection policy is defined.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

DatabaseSecurityAlertPolicy or ClientRawResponse if raw=true

Return type:

DatabaseSecurityAlertPolicy or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.DataMaskingPoliciesOperations(client, config, serializer, deserializer)[source]

Bases: object

DataMaskingPoliciesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • data_masking_policy_name – The name of the database for which the data masking rule applies. Constant value: “Default”.
create_or_update(resource_group_name, server_name, database_name, data_masking_state, exempt_principals=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a database data masking policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • 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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

DataMaskingPolicy or ClientRawResponse if raw=true

Return type:

DataMaskingPolicy or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a database data masking policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

DataMaskingPolicy or ClientRawResponse if raw=true

Return type:

DataMaskingPolicy or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.DataMaskingRulesOperations(client, config, serializer, deserializer)[source]

Bases: object

DataMaskingRulesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • data_masking_policy_name – The name of the database for which the data masking rule applies. Constant value: “Default”.
create_or_update(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a database data masking rule.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • data_masking_rule_name (str) – The name of the data masking rule.
  • parameters (DataMaskingRule) – The required parameters for creating or updating a data masking rule.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

DataMaskingRule or ClientRawResponse if raw=true

Return type:

DataMaskingRule or ClientRawResponse

Raises:

CloudError

list_by_database(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of database data masking rules.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of DataMaskingRule

Return type:

DataMaskingRulePaged

Raises:

CloudError

class azure.mgmt.sql.operations.FirewallRulesOperations(client, config, serializer, deserializer)[source]

Bases: object

FirewallRulesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

create_or_update(resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a firewall rule.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • firewall_rule_name (str) – The name of the firewall rule.
  • 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.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

FirewallRule or ClientRawResponse if raw=true

Return type:

FirewallRule or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a firewall rule.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • firewall_rule_name (str) – The name of the firewall rule.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a firewall rule.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • firewall_rule_name (str) – The name of the firewall rule.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

FirewallRule or ClientRawResponse if raw=true

Return type:

FirewallRule or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a list of firewall rules.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of FirewallRule

Return type:

FirewallRulePaged

Raises:

CloudError

class azure.mgmt.sql.operations.GeoBackupPoliciesOperations(client, config, serializer, deserializer)[source]

Bases: object

GeoBackupPoliciesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • geo_backup_policy_name – The name of the geo backup policy. Constant value: “Default”.
create_or_update(resource_group_name, server_name, database_name, state, custom_headers=None, raw=False, **operation_config)[source]

Updates a database geo backup policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • state (str or GeoBackupPolicyState) – The state of the geo backup policy. Possible values include: ‘Disabled’, ‘Enabled’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

GeoBackupPolicy or ClientRawResponse if raw=true

Return type:

GeoBackupPolicy or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a geo backup policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

GeoBackupPolicy or ClientRawResponse if raw=true

Return type:

GeoBackupPolicy or ClientRawResponse

Raises:

CloudError

list_by_database(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a list of geo backup policies.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of GeoBackupPolicy

Return type:

GeoBackupPolicyPaged

Raises:

CloudError

class azure.mgmt.sql.operations.DatabasesOperations(client, config, serializer, deserializer)[source]

Bases: object

DatabasesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • extension_name – The name of the operation to perform. Constant value: “import”.
create_import_operation(resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates an import operation that imports a bacpac into an existing database. The existing database must be empty.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to import into
  • parameters (ImportExtensionRequest) – The required parameters for importing a Bacpac into a database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ImportExportResponse or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates a new database or updates an existing database.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to be operated on (updated or created).
  • parameters (Database) – The required parameters for creating or updating a database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns Database or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a database.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to be deleted.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

export(resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Exports a database to a bacpac.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to be exported.
  • parameters (ExportRequest) – The required parameters for exporting a database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ImportExportResponse or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, expand=None, custom_headers=None, raw=False, **operation_config)[source]

Gets a database.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to be retrieved.
  • expand (str) – A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

Database or ClientRawResponse if raw=true

Return type:

Database or ClientRawResponse

Raises:

CloudError

get_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a database inside of an elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool to be retrieved.
  • database_name (str) – The name of the database to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

Database or ClientRawResponse if raw=true

Return type:

Database or ClientRawResponse

Raises:

CloudError

Gets a database inside of a recommented elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • recommended_elastic_pool_name (str) – The name of the elastic pool to be retrieved.
  • database_name (str) – The name of the database to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

Database or ClientRawResponse if raw=true

Return type:

Database or ClientRawResponse

Raises:

CloudError

import_method(resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Imports a bacpac into a new database. .

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • parameters (ImportRequest) – The required parameters for importing a Bacpac into a database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ImportExportResponse or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a list of databases in an elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of Database

Return type:

DatabasePaged

Raises:

CloudError

Returns a list of databases inside a recommented elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • recommended_elastic_pool_name (str) – The name of the recommended elastic pool to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of Database

Return type:

DatabasePaged

Raises:

CloudError

list_by_server(resource_group_name, server_name, expand=None, filter=None, custom_headers=None, raw=False, **operation_config)[source]

Returns a list of databases in a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • expand (str) – A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption.
  • filter (str) – An OData filter expression that describes a subset of databases to return.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of Database

Return type:

DatabasePaged

Raises:

CloudError

list_metric_definitions(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Returns database metric definitions.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of MetricDefinition

Return type:

MetricDefinitionPaged

Raises:

CloudError

list_metrics(resource_group_name, server_name, database_name, filter, custom_headers=None, raw=False, **operation_config)[source]

Returns database metrics.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • filter (str) – An OData filter expression that describes a subset of metrics to return.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of Metric

Return type:

MetricPaged

Raises:

CloudError

pause(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Pauses a data warehouse.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the data warehouse to pause.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

resume(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Resumes a data warehouse.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the data warehouse to resume.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

update(resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Updates an existing database.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to be updated.
  • parameters (DatabaseUpdate) – The required parameters for updating a database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns Database or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.ElasticPoolsOperations(client, config, serializer, deserializer)[source]

Bases: object

ElasticPoolsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

create_or_update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates a new elastic pool or updates an existing elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool to be operated on (updated or created).
  • parameters (ElasticPool) – The required parameters for creating or updating an elastic pool.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ElasticPool or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes the elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool to be deleted.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config)[source]

Gets an elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ElasticPool or ClientRawResponse if raw=true

Return type:

ElasticPool or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a list of elastic pools in a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ElasticPool

Return type:

ElasticPoolPaged

Raises:

CloudError

list_metric_definitions(resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config)[source]

Returns elastic pool metric definitions.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of MetricDefinition

Return type:

MetricDefinitionPaged

Raises:

CloudError

list_metrics(resource_group_name, server_name, elastic_pool_name, filter, custom_headers=None, raw=False, **operation_config)[source]

Returns elastic pool metrics.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool.
  • filter (str) – An OData filter expression that describes a subset of metrics to return.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of Metric

Return type:

MetricPaged

Raises:

CloudError

update(resource_group_name, server_name, elastic_pool_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Updates an existing elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool to be updated.
  • parameters (ElasticPoolUpdate) – The required parameters for updating an elastic pool.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ElasticPool or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.ReplicationLinksOperations(client, config, serializer, deserializer)[source]

Bases: object

ReplicationLinksOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

delete(resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, **operation_config)[source]

Deletes a database replication link. Cannot be done during failover.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database that has the replication link to be dropped.
  • link_id (str) – The ID of the replication link to be deleted.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

failover(resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, **operation_config)[source]

Sets which replica database is primary by failing over from the current primary replica database.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database that has the replication link to be failed over.
  • link_id (str) – The ID of the replication link to be failed over.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, **operation_config)[source]

Sets which replica database is primary by failing over from the current primary replica database. This operation might result in data loss.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database that has the replication link to be failed over.
  • link_id (str) – The ID of the replication link to be failed over.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, link_id, custom_headers=None, raw=False, **operation_config)[source]

Gets a database replication link.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to get the link for.
  • link_id (str) – The replication link ID to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ReplicationLink or ClientRawResponse if raw=true

Return type:

ReplicationLink or ClientRawResponse

Raises:

CloudError

list_by_database(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Lists a database’s replication links.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database to retrieve links for.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ReplicationLink

Return type:

ReplicationLinkPaged

Raises:

CloudError

class azure.mgmt.sql.operations.ServerAzureADAdministratorsOperations(client, config, serializer, deserializer)[source]

Bases: object

ServerAzureADAdministratorsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • administrator_name – Name of the server administrator resource. Constant value: “activeDirectory”.
create_or_update(resource_group_name, server_name, properties, custom_headers=None, raw=False, **operation_config)[source]

Creates a new Server Active Directory Administrator or updates an existing server Active Directory Administrator.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • properties (ServerAzureADAdministrator) – The required parameters for creating or updating an Active Directory Administrator.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ServerAzureADAdministrator or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes an existing server Active Directory Administrator.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ServerAzureADAdministrator or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Returns an server Administrator.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ServerAzureADAdministrator or ClientRawResponse if raw=true

Return type:

ServerAzureADAdministrator or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a list of server Administrators.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ServerAzureADAdministrator

Return type:

ServerAzureADAdministratorPaged

Raises:

CloudError

class azure.mgmt.sql.operations.ServerCommunicationLinksOperations(client, config, serializer, deserializer)[source]

Bases: object

ServerCommunicationLinksOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

create_or_update(resource_group_name, server_name, communication_link_name, partner_server, custom_headers=None, raw=False, **operation_config)[source]

Creates a server communication link.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • communication_link_name (str) – The name of the server communication link.
  • partner_server (str) – The name of the partner server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ServerCommunicationLink or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, communication_link_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a server communication link.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • communication_link_name (str) – The name of the server communication link.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, communication_link_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a server communication link.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • communication_link_name (str) – The name of the server communication link.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ServerCommunicationLink or ClientRawResponse if raw=true

Return type:

ServerCommunicationLink or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of server communication links.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ServerCommunicationLink

Return type:

ServerCommunicationLinkPaged

Raises:

CloudError

class azure.mgmt.sql.operations.ServiceObjectivesOperations(client, config, serializer, deserializer)[source]

Bases: object

ServiceObjectivesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

get(resource_group_name, server_name, service_objective_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a database service objective.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • service_objective_name (str) – The name of the service objective to retrieve.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ServiceObjective or ClientRawResponse if raw=true

Return type:

ServiceObjective or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Returns database service objectives.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ServiceObjective

Return type:

ServiceObjectivePaged

Raises:

CloudError

class azure.mgmt.sql.operations.ServersOperations(client, config, serializer, deserializer)[source]

Bases: object

ServersOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
check_name_availability(name, custom_headers=None, raw=False, **operation_config)[source]

Determines whether a resource can be created with the specified name.

Parameters:
  • name (str) – The name whose availability is to be checked.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

CheckNameAvailabilityResponse or ClientRawResponse if raw=true

Return type:

CheckNameAvailabilityResponse or ClientRawResponse

Raises:

CloudError

create_or_update(resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • parameters (Server) – The requested server resource state.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns Server or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

Server or ClientRawResponse if raw=true

Return type:

Server or ClientRawResponse

Raises:

CloudError

list(custom_headers=None, raw=False, **operation_config)[source]

Gets a list of all servers in the subscription.

Parameters:
Returns:

An iterator like instance of Server

Return type:

ServerPaged

Raises:

CloudError

list_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of servers in a resource groups.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of Server

Return type:

ServerPaged

Raises:

CloudError

update(resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Updates a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • parameters (ServerUpdate) – The requested server resource state.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns Server or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.ElasticPoolActivitiesOperations(client, config, serializer, deserializer)[source]

Bases: object

ElasticPoolActivitiesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config)[source]

Returns elastic pool activities.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool for which to get the current activity.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ElasticPoolActivity

Return type:

ElasticPoolActivityPaged

Raises:

CloudError

class azure.mgmt.sql.operations.ElasticPoolDatabaseActivitiesOperations(client, config, serializer, deserializer)[source]

Bases: object

ElasticPoolDatabaseActivitiesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config)[source]

Returns activity on databases inside of an elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • elastic_pool_name (str) – The name of the elastic pool.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ElasticPoolDatabaseActivity

Return type:

ElasticPoolDatabaseActivityPaged

Raises:

CloudError

class azure.mgmt.sql.operations.RecommendedElasticPoolsOperations(client, config, serializer, deserializer)[source]

Bases: object

RecommendedElasticPoolsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

get(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a recommented elastic pool.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • recommended_elastic_pool_name (str) – The name of the recommended elastic pool to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

RecommendedElasticPool or ClientRawResponse if raw=true

Return type:

RecommendedElasticPool or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Returns recommended elastic pools.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of RecommendedElasticPool

Return type:

RecommendedElasticPoolPaged

Raises:

CloudError

list_metrics(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers=None, raw=False, **operation_config)[source]

Returns recommented elastic pool metrics.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • recommended_elastic_pool_name (str) – The name of the recommended elastic pool to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of RecommendedElasticPoolMetric

Return type:

RecommendedElasticPoolMetricPaged

Raises:

CloudError

class azure.mgmt.sql.operations.ServiceTierAdvisorsOperations(client, config, serializer, deserializer)[source]

Bases: object

ServiceTierAdvisorsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

get(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a service tier advisor.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of database.
  • service_tier_advisor_name (str) – The name of service tier advisor.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ServiceTierAdvisor or ClientRawResponse if raw=true

Return type:

ServiceTierAdvisor or ClientRawResponse

Raises:

CloudError

list_by_database(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Returns service tier advisors for specified database.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ServiceTierAdvisor

Return type:

ServiceTierAdvisorPaged

Raises:

CloudError

class azure.mgmt.sql.operations.TransparentDataEncryptionsOperations(client, config, serializer, deserializer)[source]

Bases: object

TransparentDataEncryptionsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • transparent_data_encryption_name – The name of the transparent data encryption configuration. Constant value: “current”.
create_or_update(resource_group_name, server_name, database_name, status=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a database’s transparent data encryption configuration.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database for which setting the transparent data encryption applies.
  • status (str or TransparentDataEncryptionStatus) – The status of the database transparent data encryption. Possible values include: ‘Enabled’, ‘Disabled’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

TransparentDataEncryption or ClientRawResponse if raw=true

Return type:

TransparentDataEncryption or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a database’s transparent data encryption configuration.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database for which the transparent data encryption applies.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

TransparentDataEncryption or ClientRawResponse if raw=true

Return type:

TransparentDataEncryption or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.TransparentDataEncryptionActivitiesOperations(client, config, serializer, deserializer)[source]

Bases: object

TransparentDataEncryptionActivitiesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2014-04-01”.
  • transparent_data_encryption_name – The name of the transparent data encryption configuration. Constant value: “current”.
list_by_configuration(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a database’s transparent data encryption operation result.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database for which the transparent data encryption applies.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of TransparentDataEncryptionActivity

Return type:

TransparentDataEncryptionActivityPaged

Raises:

CloudError

class azure.mgmt.sql.operations.ServerUsagesOperations(client, config, serializer, deserializer)[source]

Bases: object

ServerUsagesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Returns server usages.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ServerUsage

Return type:

ServerUsagePaged

Raises:

CloudError

class azure.mgmt.sql.operations.DatabaseUsagesOperations(client, config, serializer, deserializer)[source]

Bases: object

DatabaseUsagesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2014-04-01”.

list_by_database(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Returns database usages.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of DatabaseUsage

Return type:

DatabaseUsagePaged

Raises:

CloudError

class azure.mgmt.sql.operations.DatabaseBlobAuditingPoliciesOperations(client, config, serializer, deserializer)[source]

Bases: object

DatabaseBlobAuditingPoliciesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • blob_auditing_policy_name – The name of the blob auditing policy. Constant value: “default”.
  • api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.
create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a database’s blob auditing policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database for which the blob auditing policy will be defined.
  • parameters (DatabaseBlobAuditingPolicy) – The database blob auditing policy.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

DatabaseBlobAuditingPolicy or ClientRawResponse if raw=true

Return type:

DatabaseBlobAuditingPolicy or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a database’s blob auditing policy.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database for which the blob audit policy is defined.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

DatabaseBlobAuditingPolicy or ClientRawResponse if raw=true

Return type:

DatabaseBlobAuditingPolicy or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.EncryptionProtectorsOperations(client, config, serializer, deserializer)[source]

Bases: object

EncryptionProtectorsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:
  • api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.
  • encryption_protector_name – The name of the encryption protector to be retrieved. Constant value: “current”.
create_or_update(resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Updates an existing encryption protector.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • parameters (EncryptionProtector) – The requested encryption protector resource state.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns EncryptionProtector or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a server encryption protector.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

EncryptionProtector or ClientRawResponse if raw=true

Return type:

EncryptionProtector or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of server encryption protectors.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of EncryptionProtector

Return type:

EncryptionProtectorPaged

Raises:

CloudError

class azure.mgmt.sql.operations.FailoverGroupsOperations(client, config, serializer, deserializer)[source]

Bases: object

FailoverGroupsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.

create_or_update(resource_group_name, server_name, failover_group_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a failover group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server containing the failover group.
  • failover_group_name (str) – The name of the failover group.
  • parameters (FailoverGroup) – The failover group parameters.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns FailoverGroup or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a failover group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server containing the failover group.
  • failover_group_name (str) – The name of the failover group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

failover(resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, **operation_config)[source]

Fails over from the current primary server to this server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server containing the failover group.
  • failover_group_name (str) – The name of the failover group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns FailoverGroup or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

force_failover_allow_data_loss(resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, **operation_config)[source]

Fails over from the current primary server to this server. This operation might result in data loss.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server containing the failover group.
  • failover_group_name (str) – The name of the failover group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns FailoverGroup or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, failover_group_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a failover group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server containing the failover group.
  • failover_group_name (str) – The name of the failover group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

FailoverGroup or ClientRawResponse if raw=true

Return type:

FailoverGroup or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Lists the failover groups in a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server containing the failover group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of FailoverGroup

Return type:

FailoverGroupPaged

Raises:

CloudError

update(resource_group_name, server_name, failover_group_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Updates a failover group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server containing the failover group.
  • failover_group_name (str) – The name of the failover group.
  • parameters (FailoverGroupUpdate) – The failover group parameters.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns FailoverGroup or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.

list(custom_headers=None, raw=False, **operation_config)[source]

Lists all of the available SQL Rest API operations.

Parameters:
Returns:

An iterator like instance of Operation

Return type:

OperationPaged

Raises:

CloudError

class azure.mgmt.sql.operations.ServerKeysOperations(client, config, serializer, deserializer)[source]

Bases: object

ServerKeysOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.

create_or_update(resource_group_name, server_name, key_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a server key.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • key_name (str) – The name of the server key to be operated on (updated or created). The key name is required to be in the format of ‘vault_key_version’. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/01234567890123456789012345678901, then the server key name should be formatted as: YourVaultName_YourKeyName_01234567890123456789012345678901
  • parameters (ServerKey) – The requested server key resource state.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns ServerKey or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, key_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes the server key with the given name.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • key_name (str) – The name of the server key to be deleted.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, key_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a server key.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • key_name (str) – The name of the server key to be retrieved.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

ServerKey or ClientRawResponse if raw=true

Return type:

ServerKey or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of server keys.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of ServerKey

Return type:

ServerKeyPaged

Raises:

CloudError

class azure.mgmt.sql.operations.SyncAgentsOperations(client, config, serializer, deserializer)[source]

Bases: object

SyncAgentsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.

create_or_update(resource_group_name, server_name, sync_agent_name, sync_database_id=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a sync agent.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server on which the sync agent is hosted.
  • sync_agent_name (str) – The name of the sync agent.
  • sync_database_id (str) – ARM resource id of the sync database in the sync agent.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns SyncAgent or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, sync_agent_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a sync agent.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server on which the sync agent is hosted.
  • sync_agent_name (str) – The name of the sync agent.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

generate_key(resource_group_name, server_name, sync_agent_name, custom_headers=None, raw=False, **operation_config)[source]

Generates a sync agent key.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server on which the sync agent is hosted.
  • sync_agent_name (str) – The name of the sync agent.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SyncAgentKeyProperties or ClientRawResponse if raw=true

Return type:

SyncAgentKeyProperties or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, sync_agent_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a sync agent.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server on which the sync agent is hosted.
  • sync_agent_name (str) – The name of the sync agent.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SyncAgent or ClientRawResponse if raw=true

Return type:

SyncAgent or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Lists sync agents in a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server on which the sync agent is hosted.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SyncAgent

Return type:

SyncAgentPaged

Raises:

CloudError

list_linked_databases(resource_group_name, server_name, sync_agent_name, custom_headers=None, raw=False, **operation_config)[source]

Lists databases linked to a sync agent.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server on which the sync agent is hosted.
  • sync_agent_name (str) – The name of the sync agent.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SyncAgentLinkedDatabase

Return type:

SyncAgentLinkedDatabasePaged

Raises:

CloudError

class azure.mgmt.sql.operations.SyncGroupsOperations(client, config, serializer, deserializer)[source]

Bases: object

SyncGroupsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.

cancel_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config)[source]

Cancels a sync group synchronization.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a sync group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • parameters (SyncGroup) – The requested sync group resource state.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns SyncGroup or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a sync group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a sync group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SyncGroup or ClientRawResponse if raw=true

Return type:

SyncGroup or ClientRawResponse

Raises:

CloudError

list_by_database(resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config)[source]

Lists sync groups under a hub database.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SyncGroup

Return type:

SyncGroupPaged

Raises:

CloudError

list_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a collection of hub database schemas.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SyncFullSchemaProperties

Return type:

SyncFullSchemaPropertiesPaged

Raises:

CloudError

list_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token=None, custom_headers=None, raw=False, **operation_config)[source]

Gets a collection of sync group logs.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • start_time (str) – Get logs generated after this time.
  • end_time (str) – Get logs generated before this time.
  • type (str) – The types of logs to retrieve. Possible values include: ‘All’, ‘Error’, ‘Warning’, ‘Success’
  • continuation_token (str) – The continuation token for this operation.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SyncGroupLogProperties

Return type:

SyncGroupLogPropertiesPaged

Raises:

CloudError

list_sync_database_ids(location_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a collection of sync database ids.

Parameters:
  • location_name (str) – The name of the region where the resource is located.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SyncDatabaseIdProperties

Return type:

SyncDatabaseIdPropertiesPaged

Raises:

CloudError

refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config)[source]

Refreshes a hub database schema.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

trigger_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config)[source]

Triggers a sync group synchronization.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

None or ClientRawResponse if raw=true

Return type:

None or ClientRawResponse

Raises:

CloudError

update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Updates a sync group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • parameters (SyncGroup) – The requested sync group resource state.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns SyncGroup or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.SyncMembersOperations(client, config, serializer, deserializer)[source]

Bases: object

SyncMembersOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.

create_or_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a sync member.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group on which the sync member is hosted.
  • sync_member_name (str) – The name of the sync member.
  • parameters (SyncMember) – The requested sync member resource state.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns SyncMember or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a sync member.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group on which the sync member is hosted.
  • sync_member_name (str) – The name of the sync member.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a sync member.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group on which the sync member is hosted.
  • sync_member_name (str) – The name of the sync member.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

SyncMember or ClientRawResponse if raw=true

Return type:

SyncMember or ClientRawResponse

Raises:

CloudError

list_by_sync_group(resource_group_name, server_name, database_name, sync_group_name, custom_headers=None, raw=False, **operation_config)[source]

Lists sync members in the given sync group.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SyncMember

Return type:

SyncMemberPaged

Raises:

CloudError

list_member_schemas(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a sync member database schema.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group on which the sync member is hosted.
  • sync_member_name (str) – The name of the sync member.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of SyncFullSchemaProperties

Return type:

SyncFullSchemaPropertiesPaged

Raises:

CloudError

refresh_member_schema(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers=None, raw=False, **operation_config)[source]

Refreshes a sync member database schema.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group on which the sync member is hosted.
  • sync_member_name (str) – The name of the sync member.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Updates an existing sync member.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • database_name (str) – The name of the database on which the sync group is hosted.
  • sync_group_name (str) – The name of the sync group on which the sync member is hosted.
  • sync_member_name (str) – The name of the sync member.
  • parameters (SyncMember) – The requested sync member resource state.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns SyncMember or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

class azure.mgmt.sql.operations.VirtualNetworkRulesOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualNetworkRulesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – The API version to use for the request. Constant value: “2015-05-01-preview”.

create_or_update(resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates an existing virtual network rule.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • virtual_network_rule_name (str) – The name of the virtual network rule.
  • virtual_network_subnet_id (str) – The ARM resource id of the virtual network subnet.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns VirtualNetworkRule or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

delete(resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes the virtual network rule with the given name.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • virtual_network_rule_name (str) – The name of the virtual network rule.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Returns:

AzureOperationPoller instance that returns None or ClientRawResponse if raw=true

Return type:

AzureOperationPoller or ClientRawResponse

Raises:

CloudError

get(resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a virtual network rule.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • virtual_network_rule_name (str) – The name of the virtual network rule.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

VirtualNetworkRule or ClientRawResponse if raw=true

Return type:

VirtualNetworkRule or ClientRawResponse

Raises:

CloudError

list_by_server(resource_group_name, server_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of virtual network rules in a server.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • server_name (str) – The name of the server.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

An iterator like instance of VirtualNetworkRule

Return type:

VirtualNetworkRulePaged

Raises:

CloudError