Microsoft Azure SQL Management Client Library for Python
Project description
Microsoft Azure SDK for Python
This is the Microsoft Azure SQL Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM).
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
For the older Azure Service Management (ASM) libraries, see azure-servicemanagement-legacy library.
For a more complete set of Azure libraries, see the azure bundle package.
Compatibility
IMPORTANT: If you have an earlier version of the azure package (version < 1.0), you should uninstall it before installing this package.
You can check the version using pip:
pip freeze
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
pip uninstall azure
Usage
For code examples, see SQL Management on docs.microsoft.com.
Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.
Release History
0.9.1 (2018-05-24)
Features
Managed instances, databases, and failover groups
Vulnerability assessments
Backup short term retention policies
Elastic Jobs
0.9.0 (2018-04-25)
General Breaking changes
This version uses a next-generation code generator that might introduce breaking changes.
Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the “*” syntax for keyword-only arguments.
Enum types now use the “str” mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. While this is not a breaking change, the distinctions are important, and are documented here: https://docs.python.org/3/library/enum.html#others At a glance:
“is” should not be used at all.
“format” will return the string value, where “%s” string formatting will return NameOfEnum.stringvalue. Format syntax should be prefered.
New Long Running Operation:
Return type changes from msrestazure.azure_operation.AzureOperationPoller to msrest.polling.LROPoller. External API is the same.
Return type is now always a msrest.polling.LROPoller, regardless of the optional parameters used.
The behavior has changed when using raw=True. Instead of returning the initial call result as ClientRawResponse, without polling, now this returns an LROPoller. After polling, the final resource will be returned as a ClientRawResponse.
New polling parameter. The default behavior is Polling=True which will poll using ARM algorithm. When Polling=False, the response of the initial call will be returned without polling.
polling parameter accepts instances of subclasses of msrest.polling.PollingMethod.
add_done_callback will no longer raise if called after polling is finished, but will instead execute the callback right away.
SQL Breaking changes
- Database and ElasticPool now use Sku property for scale and tier-related properties. We have made this change in order to allow future support of autoscale, and to allow for new vCore-based editions.
Database.sku has replaced Database.requested_service_objective_name and Database.edition. Database scale can be set by setting Sku.name to the requested service objective name (e.g. S0, P1, or GP_Gen4_1), or by setting Sku.name to the sku name (e.g. Standard, Premium, or GP_Gen4) and set Sku.capacity to the scale measured in DTU or vCores.
Database.current_sku has replaced Database.service_level_objetive.
Database.current_service_objective_id and Database.requested_service_objective_id have been removed.
ElasticPool.sku has replaced ElasticPool.dtu. Elastic pool scale can be set by setting Sku.name to the requested sku name (e.g. StandardPool, PremiumPool, or GP_Gen4) and setting Sku.capacity to the scale measured in DTU or vCores.
ElasticPool.per_database_settings has replaced ElasticPool.database_dtu_min and ElasticPool.database_dtu_max.
Database.max_size_bytes is now an integer instead of string.
LocationCapabilities tree has been changed in order to support capabilities of new vCore-based database and elastic pool editions.
Features
Added support for List and Cancel operation on Azure database and elastic pool REST API
Added Long Term Retention V2 commands, including getting backups, deleting backups, setting the V2 policies, and getting the V2 policies
Removed support for managing Vaults used for Long Term Retention V1
Changed BackupLongTermRetentionPolicy class, removing the Long Term Retention V1 properties and adding the Long Term Retention V2 properties
Removed BackupLongTermRetentionPolicyState
0.8.6 (2018-03-22)
Features
Added support for List and Cancel operation on Azure database and elastic pool REST API
Added support for Auto-tuning REST API
0.8.5 (2018-01-18)
Features
Added support for renaming databases
Added missing database editions and service objectives
Added ability to list long term retention vaults & policies
0.8.4 (2017-11-14)
Features
Added support for subscription usages
0.8.3 (2017-10-24)
Features
Added support for database zone redundant property
Added support for server dns aliases
0.8.2 (2017-10-18)
Features
Added support for state and migration flag properties for SQL Vnet rules
0.8.1 (2017-10-04)
Features
Add database.cancel operation
Add database.list_by_database
0.8.0 (2017-09-07)
Disclaimer
We were using a slightly unorthodox convention for some operation ids. Some resource operations were “nested” inside others, e.g. blob auditing policies was nested inside databases as in client.databases.get_blob_auditing_policies(..) instead of the flattened ARM standard client.database_blob_auditing_policies.get(…).
This convention has lead to some inconsistencies, makes some APIs difficult to find, and is at odds with future APIs. For example if we wanted to implement listing db audit policies by server, continuing the current convention would be client.databases.list_blob_auditing_policies_by_server(..) which makes much less sense than the ARM standard which would beclient.database_blob_auditing_policies.list_by_server(…)`.
In order to resolve this and provide a good path moving forward, we have renamed the inconsistent operations to follow the ARM standard. This is an unfortunate breaking change, but it’s best to do now while the SDK is still in preview and since most of these operations were only recently added.
Breaking changes
client.database.get_backup_long_term_retention_policy -> client.backup_long_term_retention_policies.get
client.database.create_or_update_backup_long_term_retention_policy -> client.backup_long_term_retention_policies.create_or_update
client.servers.create_backup_long_term_retention_vault -> client.backup_long_term_retention_vaults.create_or_update
client.servers.get_backup_long_term_retention_vault -> client.backup_long_term_retention_vaults.get
client.database.list_restore_points -> client.restore_points.list_by_database
client.servers.create_or_update_connection_policy -> client.server_connection_policies.create_or_update
client.servers.get_connection_policy -> client.server_connection_policies.get
client.databases.create_or_update_data_masking_policy -> client.data_masking_policies.create_or_update
client.databases.get_data_masking_policy -> client.data_masking_policies.get
client.databases.create_or_update_data_masking_rule -> client.data_masking_rules.create_or_update
client.databases.get_data_masking_rule -> client.data_masking_rules.get
client.databases.list_data_masking_rules -> client.data_masking_rules.list_by_database
client.databases.get_threat_detection_policy -> client.database_threat_detection_policies.get
client.databases.create_or_update_threat_detection_policy -> client.database_threat_detection_policies.create_or_update
client.databases.create_or_update_geo_backup_policy -> client.geo_backup_policies.create_or_update
client.databases.get_geo_backup_policy -> client.geo_backup_policies.get
client.databases.list_geo_backup_policies -> client.geo_backup_policies.list_by_database
client.databases.delete_replication_link -> client.replication_links.delete
client.databases.get_replication_link -> client.replication_links.get
client.databases.failover_replication_link -> client.replication_links.failover
client.databases.failover_replication_link_allow_data_loss -> client.replication_links.failover_allow_data_loss
client.databases.list_replication_links -> client.replication_links.list_by_database
client.server_azure_ad_administrators.list -> client.server_azure_ad_administrators.list_by_server
client.servers.get_service_objective -> client.service_objectives.get
client.servers.list_service_objectives -> client.service_objectives.list_by_server
client.elastic_pools.list_activity -> client.elastic_pool_activities.list_by_elastic_pool
client.elastic_pools.list_database_activity -> client.elastic_pool_database_activities.list_by_elastic_pool
client.elastic_pools.get_database -> client.databases.get_by_elastic_pool
client.elastic_pools.list_databases -> client.databases.list_by_elastic_pool
client.recommended_elastic_pools.get_databases -> client.databases.get_by_recommended_elastic_pool
client.recommended_elastic_pools.list_databases -> client.databases.list_by_recommended_elastic_pool
client.databases.get_service_tier_advisor -> client.service_tier_advisors.get
client.databases.list_service_tier_advisors -> client.service_tier_advisors.list_by_database
client.databases.create_or_update_transparent_data_encryption_configuration -> client.transparent_data_encryptions.create_or_update
client.databases.get_transparent_data_encryption_configuration -> client.transparent_data_encryptions.get
client.databases.list_transparent_data_encryption_activity -> client.transparent_data_encryption_activities.list_by_configuration
client.servers.list_usages -> client.server_usages.list_by_server
client.databases.list_usages -> client.database_usages.list_by_database
client.databases.get_blob_auditing_policy -> client.database_blob_auditing_policies.get
client.databases.create_or_update_blob_auditing_policy -> client.database_blob_auditing_policies.create_or_update
client.servers.list_encryption_protectors, -> client.encryption_protectors.list_by_server
client.servers.get_encryption_protector -> client.encryption_protectors.get
client.servers.create_or_update_encryption_protector -> client.encryption_protectors.create_or_update
Database blob auditing policy state is required
Failover group resource now has required properties defined
Features
Add SQL DB, server, and pool PATCH operations
client.operations.list now returnes a full list of operations and not a limited subset (2014-04-01 to 2015-05-01-preview)
Fixed bugs
Fixed KeyError in server_azure_ad_administrators_operations.get
0.7.1 (2017-06-30)
Added support for server connection policies
Fixed error in databases_operations.create_or_update_threat_detection_policy
0.7.0 (2017-06-28)
Features
Backup/Restore related: RecoverableDatabase, RestorableDroppedDatabase, BackupLongTermRetentionVault, BackupLongTermRetentionPolicy, and GeoBackupPolicy
Data Masking rules and policies
Server communication links
Breaking changes
Renamed enum RestorePointTypes to RestorePointType
Renamed VnetFirewallRule and related operations to VirtualNetworkRule
0.6.0 (2017-06-13)
Updated Servers api version from 2014-04-01 to 2015-05-01-preview, which is SDK compatible and includes support for server managed identity
Added support for server keys and encryption protectors
Added support for check server name availability
Added support for virtual network firewall rules
Updated server azure ad admin from swagger
Minor nonfunctional updates to database blob auditing
Breaking changes DatabaseMetrics and ServerMetrics renamed to DatabaseUsage and ServerUsage. These were misleadingly named because metrics is a different API.
Added database metrics and elastic pool metrics
0.5.3 (2017-06-01)
Update minimal dependency to msrestazure 0.4.8
0.5.2 (2017-05-31)
Features
Added support for server active directory administrator, failover groups, and virtual network rules
Minor changes to database auditing support
0.5.1 (2017-04-28)
Bugfixes
Fix return exception in import/export
0.5.0 (2017-04-19)
Breaking changes
SqlManagementClient.list_operations is now SqlManagementClient.operations.list
New features
Added elastic pool capabilities to capabilities API.
Notes
This wheel package is now built with the azure wheel extension
0.4.0 (2017-03-22)
Capabilities and security policy features.
Also renamed several types and operations for improved clarify and consistency.
Additions:
BlobAuditingPolicy APIs (e.g. databases.create_or_update_blob_auditing_policy)
ThreatDetectionPolicy APIs (e.g. databases.create_or_update_threat_detection_policy)
databases.list_by_server now supports $expand parameter
Capabilities APIs (e.g. capabilities.list_by_location)
Classes and enums renamed:
ServerFirewallRule -> FirewallRule
DatabaseEditions -> DatabaseEdition
ElasticPoolEditions -> ElasticPoolEdition
ImportRequestParameters -> ImportRequest
ExportRequestParameters -> ExportRequest
ImportExportOperationResponse -> ImportExportResponse
OperationMode -> ImportOperationMode
TransparentDataEncryptionStates -> TransparentDataEncryptionStatus
Classes removed:
Unused types: UpgradeHint, Schema, Table, Column
Operations renamed:
servers.get_by_resource_group -> servers.get
servers.create_or_update_firewall_rule -> firewall_rules.create_or_update, and similar for get, list, and delete
databases.import -> databases.create_import_operation
servers.import -> databases.import
databases.pause_data_warehouse -> databases.pause
databases.resume_data_warehouse -> databases.resume
recommended_elastic_pools.list -> recommended_elastic_pools.list_by_server
Operations removed:
Removed ImportExport operation results APIs since these are handled automatically by Azure async pattern.
0.3.3 (2017-03-14)
Add database blob auditing and threat detection operations
0.3.2 (2017-03-08)
Add import/export operations
Expanded documentation of create modes
0.3.1 (2017-03-01)
Added ‘filter’ param to list databases
0.3.0 (2017-02-27)
Breaking changes
Enums:
createMode renamed to CreateMode
Added ReadScale, SampleName, ServerState
Added missing Database properties (failover_group_id, restore_point_in_time, read_scale, sample_name)
Added missing ElasticPoolActivity properties (requested_*)
Added missing ReplicationLink properties (is_termination_allowed, replication_mode)
Added missing Server properties (external_administrator_*, state)
Added operations APIs
Removed unused Database.upgrade_hint property
Removed unused RecommendedDatabaseProperties class
Renamed incorrect RecommendedElasticPool.databases_property to databases
Made firewall rule start/end ip address required
Added missing kind property to many resources
Many doc clarifications
0.2.0 (2016-12-12)
Breaking changes
Parameters re-ordering (list_database_activity)
Flatten create_or_update_firewall_rule from “parameters” to “start_ip_address” and “end_ip_address”
0.1.0 (2016-11-02)
Initial Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file azure-mgmt-sql-0.9.1.zip
.
File metadata
- Download URL: azure-mgmt-sql-0.9.1.zip
- Upload date:
- Size: 500.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5da488a56d5265757b45747cf5fd22413eb089e606658d6e6d84fe3e9b07e4fa |
|
MD5 | dae0c0337276f44e56b47934335a48ae |
|
BLAKE2b-256 | 9e68d7df2ec227c9082454981f4043f4994e0f1b8aa92beca0cf21c25cf1cfbe |
File details
Details for the file azure_mgmt_sql-0.9.1-py2.py3-none-any.whl
.
File metadata
- Download URL: azure_mgmt_sql-0.9.1-py2.py3-none-any.whl
- Upload date:
- Size: 485.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43668705f17bd3532e2e489d368937eb19e7d0515638146c156982ace76e0743 |
|
MD5 | 079a6936f9cfb03489a7b8d246d9ad18 |
|
BLAKE2b-256 | c5bb219c76af961e9e6d1f5055d70c3cc06889b91375727a04367149c3aad640 |