azure.mgmt.sql.operations module

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.
Return type:

LocationCapabilities

Return type:

ClientRawResponse if raw=true

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.
Return type:

FirewallRule

Return type:

ClientRawResponse if raw=true

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.
Return type:

None

Return type:

ClientRawResponse if raw=true

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.
Return type:

FirewallRule

Return type:

ClientRawResponse if raw=true

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.
Return type:

FirewallRulePaged

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.
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
Return type:

AzureOperationPoller instance that returns ImportExportResponse

Return type:

ClientRawResponse if raw=true

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. Location is a required property in the request body, and it must be the same as the location of the SQL 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.
  • 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
Return type:

AzureOperationPoller instance that returns Database

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

create_or_update_blob_auditing_policy(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 database blob audit 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.
Return type:

DatabaseBlobAuditingPolicy

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

create_or_update_threat_detection_policy(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.
Return type:

DatabaseSecurityAlertPolicy

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

create_or_update_transparent_data_encryption_configuration(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.
Return type:

TransparentDataEncryption

Return type:

ClientRawResponse if raw=true

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.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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.
Return type:

None

Return type:

ClientRawResponse if raw=true

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
Return type:

AzureOperationPoller instance that returns ImportExportResponse

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

Failover the 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 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
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

Force failover the database replication link, which may 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
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

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.
Return type:

Database

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_blob_auditing_policy(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 database 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.
Return type:

DatabaseBlobAuditingPolicy

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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.
Return type:

ReplicationLink

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_service_tier_advisor(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.
Return type:

ServiceTierAdvisor

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_threat_detection_policy(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.
Return type:

DatabaseSecurityAlertPolicy

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_transparent_data_encryption_configuration(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.
Return type:

TransparentDataEncryption

Return type:

ClientRawResponse if raw=true

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
Return type:

AzureOperationPoller instance that returns ImportExportResponse

Return type:

ClientRawResponse if raw=true

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.
Return type:

DatabasePaged

Raises:

CloudError

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.
Return type:

ReplicationLinkPaged

Raises:

CloudError

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

Returns 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 from which to retrieve 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.
Return type:

RestorePointPaged

Raises:

CloudError

list_service_tier_advisors(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.
Return type:

ServiceTierAdvisorPaged

Raises:

CloudError

list_transparent_data_encryption_activity(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.
Return type:

TransparentDataEncryptionActivityPaged

Raises:

CloudError

list_usages(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.
Return type:

DatabaseMetricPaged

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
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

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
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

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

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

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

Creates or updates a new 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 required parameters for creating or updating a 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.
Return type:

Server

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Deletes a SQL 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.
Return type:

None

Return type:

ClientRawResponse if raw=true

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.
Return type:

Server

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_service_objective(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.
Return type:

ServiceObjective

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Returns a list of servers.

Parameters:
Return type:

ServerPaged

Raises:

CloudError

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

Returns a list of servers in a resource 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.
  • 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.
Return type:

ServerPaged

Raises:

CloudError

list_service_objectives(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.
Return type:

ServiceObjectivePaged

Raises:

CloudError

list_usages(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.
Return type:

ServerMetricPaged

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
Return type:

AzureOperationPoller instance that returns ElasticPool

Return type:

ClientRawResponse if raw=true

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.
Return type:

None

Return type:

ClientRawResponse if raw=true

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.
Return type:

ElasticPool

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_database(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.
Return type:

Database

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list_activity(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.
Return type:

ElasticPoolActivityPaged

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.
Return type:

ElasticPoolPaged

Raises:

CloudError

list_database_activity(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.
Return type:

ElasticPoolDatabaseActivityPaged

Raises:

CloudError

list_databases(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.
Return type:

DatabasePaged

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.
Return type:

RecommendedElasticPool

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

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.
Return type:

Database

Return type:

ClientRawResponse if raw=true

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.
Return type:

RecommendedElasticPoolPaged

Raises:

CloudError

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

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.
Return type:

DatabasePaged

Raises:

CloudError

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

Returns a 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.
Return type:

RecommendedElasticPoolMetricPaged

Raises:

CloudError