From 45c8d684b756d2c853a777f0a8df3607bb1a7950 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 3 Sep 2020 01:08:48 +0000 Subject: [PATCH 1/3] Generated from ba10ad3eff472aea928c189c4f9293702cd7dad7 Merge branch 'master' into dev/ayang/backupStorageRedundancy --- .../azure/mgmt/sql/_sql_management_client.py | 45 +- .../azure/mgmt/sql/models/__init__.py | 103 +-- .../azure/mgmt/sql/models/_models.py | 575 +++++++++++------ .../azure/mgmt/sql/models/_models_py3.py | 589 ++++++++++++------ .../azure/mgmt/sql/models/_paged_models.py | 94 ++- .../models/_sql_management_client_enums.py | 335 +++++----- .../azure/mgmt/sql/operations/__init__.py | 18 +- ...hort_term_retention_policies_operations.py | 28 +- .../sql/operations/_databases_operations.py | 533 ++++++---------- .../operations/_import_export_operations.py | 150 +++++ ...zure_ad_only_authentications_operations.py | 379 +++++++++++ .../_managed_instances_operations.py | 302 ++++----- ...rver_azure_ad_administrators_operations.py | 100 +-- ...zure_ad_only_authentications_operations.py | 376 +++++++++++ .../sql/operations/_servers_operations.py | 135 +++- sdk/sql/azure-mgmt-sql/setup.py | 2 +- 16 files changed, 2499 insertions(+), 1265 deletions(-) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_import_export_operations.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_azure_ad_only_authentications_operations.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_only_authentications_operations.py diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py index 67c64ba79636..1222dc3d01be 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py @@ -78,7 +78,6 @@ from .operations import ManagedDatabaseVulnerabilityAssessmentScansOperations from .operations import ManagedDatabaseVulnerabilityAssessmentsOperations from .operations import InstanceFailoverGroupsOperations -from .operations import BackupShortTermRetentionPoliciesOperations from .operations import TdeCertificatesOperations from .operations import ManagedInstanceTdeCertificatesOperations from .operations import ManagedInstanceKeysOperations @@ -89,7 +88,6 @@ from .operations import ManagedDatabaseSensitivityLabelsOperations from .operations import InstancePoolsOperations from .operations import UsagesOperations -from .operations import ManagedInstancesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations from .operations import ServersOperations @@ -98,12 +96,17 @@ from .operations import ManagedInstanceLongTermRetentionPoliciesOperations from .operations import WorkloadGroupsOperations from .operations import WorkloadClassifiersOperations -from .operations import ServerAzureADAdministratorsOperations from .operations import ManagedInstanceOperations +from .operations import ServerAzureADAdministratorsOperations from .operations import SyncGroupsOperations from .operations import SyncMembersOperations +from .operations import ManagedInstancesOperations +from .operations import BackupShortTermRetentionPoliciesOperations from .operations import ManagedDatabaseRestoreDetailsOperations from .operations import ManagedDatabasesOperations +from .operations import ServerAzureADOnlyAuthenticationsOperations +from .operations import ImportExportOperations +from .operations import ManagedInstanceAzureADOnlyAuthenticationsOperations from . import models @@ -243,8 +246,6 @@ class SqlManagementClient(SDKClient): :vartype managed_database_vulnerability_assessments: azure.mgmt.sql.operations.ManagedDatabaseVulnerabilityAssessmentsOperations :ivar instance_failover_groups: InstanceFailoverGroups operations :vartype instance_failover_groups: azure.mgmt.sql.operations.InstanceFailoverGroupsOperations - :ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations - :vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations :ivar tde_certificates: TdeCertificates operations :vartype tde_certificates: azure.mgmt.sql.operations.TdeCertificatesOperations :ivar managed_instance_tde_certificates: ManagedInstanceTdeCertificates operations @@ -265,8 +266,6 @@ class SqlManagementClient(SDKClient): :vartype instance_pools: azure.mgmt.sql.operations.InstancePoolsOperations :ivar usages: Usages operations :vartype usages: azure.mgmt.sql.operations.UsagesOperations - :ivar managed_instances: ManagedInstances operations - :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :ivar private_endpoint_connections: PrivateEndpointConnections operations :vartype private_endpoint_connections: azure.mgmt.sql.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResources operations @@ -283,18 +282,28 @@ class SqlManagementClient(SDKClient): :vartype workload_groups: azure.mgmt.sql.operations.WorkloadGroupsOperations :ivar workload_classifiers: WorkloadClassifiers operations :vartype workload_classifiers: azure.mgmt.sql.operations.WorkloadClassifiersOperations - :ivar server_azure_ad_administrators: ServerAzureADAdministrators operations - :vartype server_azure_ad_administrators: azure.mgmt.sql.operations.ServerAzureADAdministratorsOperations :ivar managed_instance_operations: ManagedInstanceOperations operations :vartype managed_instance_operations: azure.mgmt.sql.operations.ManagedInstanceOperations + :ivar server_azure_ad_administrators: ServerAzureADAdministrators operations + :vartype server_azure_ad_administrators: azure.mgmt.sql.operations.ServerAzureADAdministratorsOperations :ivar sync_groups: SyncGroups operations :vartype sync_groups: azure.mgmt.sql.operations.SyncGroupsOperations :ivar sync_members: SyncMembers operations :vartype sync_members: azure.mgmt.sql.operations.SyncMembersOperations + :ivar managed_instances: ManagedInstances operations + :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations + :ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations + :vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations :ivar managed_database_restore_details: ManagedDatabaseRestoreDetails operations :vartype managed_database_restore_details: azure.mgmt.sql.operations.ManagedDatabaseRestoreDetailsOperations :ivar managed_databases: ManagedDatabases operations :vartype managed_databases: azure.mgmt.sql.operations.ManagedDatabasesOperations + :ivar server_azure_ad_only_authentications: ServerAzureADOnlyAuthentications operations + :vartype server_azure_ad_only_authentications: azure.mgmt.sql.operations.ServerAzureADOnlyAuthenticationsOperations + :ivar import_export: ImportExport operations + :vartype import_export: azure.mgmt.sql.operations.ImportExportOperations + :ivar managed_instance_azure_ad_only_authentications: ManagedInstanceAzureADOnlyAuthentications operations + :vartype managed_instance_azure_ad_only_authentications: azure.mgmt.sql.operations.ManagedInstanceAzureADOnlyAuthenticationsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -445,8 +454,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.instance_failover_groups = InstanceFailoverGroupsOperations( self._client, self.config, self._serialize, self._deserialize) - self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) self.tde_certificates = TdeCertificatesOperations( self._client, self.config, self._serialize, self._deserialize) self.managed_instance_tde_certificates = ManagedInstanceTdeCertificatesOperations( @@ -467,8 +474,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.usages = UsagesOperations( self._client, self.config, self._serialize, self._deserialize) - self.managed_instances = ManagedInstancesOperations( - self._client, self.config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self.config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( @@ -485,15 +490,25 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workload_classifiers = WorkloadClassifiersOperations( self._client, self.config, self._serialize, self._deserialize) - self.server_azure_ad_administrators = ServerAzureADAdministratorsOperations( - self._client, self.config, self._serialize, self._deserialize) self.managed_instance_operations = ManagedInstanceOperations( self._client, self.config, self._serialize, self._deserialize) + self.server_azure_ad_administrators = ServerAzureADAdministratorsOperations( + self._client, self.config, self._serialize, self._deserialize) self.sync_groups = SyncGroupsOperations( self._client, self.config, self._serialize, self._deserialize) self.sync_members = SyncMembersOperations( self._client, self.config, self._serialize, self._deserialize) + self.managed_instances = ManagedInstancesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) self.managed_database_restore_details = ManagedDatabaseRestoreDetailsOperations( self._client, self.config, self._serialize, self._deserialize) self.managed_databases = ManagedDatabasesOperations( self._client, self.config, self._serialize, self._deserialize) + self.server_azure_ad_only_authentications = ServerAzureADOnlyAuthenticationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.import_export = ImportExportOperations( + self._client, self.config, self._serialize, self._deserialize) + self.managed_instance_azure_ad_only_authentications = ManagedInstanceAzureADOnlyAuthenticationsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 74be0f46025c..e00e5a2c9407 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -44,7 +44,7 @@ from ._models_py3 import ElasticPoolPerformanceLevelCapability from ._models_py3 import ElasticPoolUpdate from ._models_py3 import EncryptionProtector - from ._models_py3 import ExportRequest + from ._models_py3 import ExportDatabaseDefinition from ._models_py3 import ExtendedDatabaseBlobAuditingPolicy from ._models_py3 import ExtendedServerBlobAuditingPolicy from ._models_py3 import FailoverGroup @@ -53,9 +53,9 @@ from ._models_py3 import FailoverGroupUpdate from ._models_py3 import FirewallRule from ._models_py3 import GeoBackupPolicy - from ._models_py3 import ImportExportResponse - from ._models_py3 import ImportExtensionRequest - from ._models_py3 import ImportRequest + from ._models_py3 import ImportExistingDatabaseDefinition + from ._models_py3 import ImportExportOperationResult + from ._models_py3 import ImportNewDatabaseDefinition from ._models_py3 import InstanceFailoverGroup from ._models_py3 import InstanceFailoverGroupReadOnlyEndpoint from ._models_py3 import InstanceFailoverGroupReadWriteEndpoint @@ -89,6 +89,7 @@ from ._models_py3 import ManagedDatabaseUpdate from ._models_py3 import ManagedInstance from ._models_py3 import ManagedInstanceAdministrator + from ._models_py3 import ManagedInstanceAzureADOnlyAuthentication from ._models_py3 import ManagedInstanceEditionCapability from ._models_py3 import ManagedInstanceEncryptionProtector from ._models_py3 import ManagedInstanceFamilyCapability @@ -99,6 +100,7 @@ from ._models_py3 import ManagedInstanceOperationParametersPair from ._models_py3 import ManagedInstanceOperationSteps from ._models_py3 import ManagedInstancePairInfo + from ._models_py3 import ManagedInstancePrivateLinkServiceConnectionStateProperty from ._models_py3 import ManagedInstanceUpdate from ._models_py3 import ManagedInstanceVcoresCapability from ._models_py3 import ManagedInstanceVersionCapability @@ -113,6 +115,7 @@ from ._models_py3 import MetricValue from ._models_py3 import MinCapacityCapability from ._models_py3 import Name + from ._models_py3 import NetworkIsolationSettings from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationImpact @@ -121,6 +124,7 @@ from ._models_py3 import PerformanceLevelCapability from ._models_py3 import PrivateEndpointConnection from ._models_py3 import PrivateEndpointConnectionProperties + from ._models_py3 import PrivateEndpointConnectionRequestStatus from ._models_py3 import PrivateEndpointProperty from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkResourceProperties @@ -143,6 +147,7 @@ from ._models_py3 import Server from ._models_py3 import ServerAutomaticTuning from ._models_py3 import ServerAzureADAdministrator + from ._models_py3 import ServerAzureADOnlyAuthentication from ._models_py3 import ServerBlobAuditingPolicy from ._models_py3 import ServerCommunicationLink from ._models_py3 import ServerConnectionPolicy @@ -226,7 +231,7 @@ from ._models import ElasticPoolPerformanceLevelCapability from ._models import ElasticPoolUpdate from ._models import EncryptionProtector - from ._models import ExportRequest + from ._models import ExportDatabaseDefinition from ._models import ExtendedDatabaseBlobAuditingPolicy from ._models import ExtendedServerBlobAuditingPolicy from ._models import FailoverGroup @@ -235,9 +240,9 @@ from ._models import FailoverGroupUpdate from ._models import FirewallRule from ._models import GeoBackupPolicy - from ._models import ImportExportResponse - from ._models import ImportExtensionRequest - from ._models import ImportRequest + from ._models import ImportExistingDatabaseDefinition + from ._models import ImportExportOperationResult + from ._models import ImportNewDatabaseDefinition from ._models import InstanceFailoverGroup from ._models import InstanceFailoverGroupReadOnlyEndpoint from ._models import InstanceFailoverGroupReadWriteEndpoint @@ -271,6 +276,7 @@ from ._models import ManagedDatabaseUpdate from ._models import ManagedInstance from ._models import ManagedInstanceAdministrator + from ._models import ManagedInstanceAzureADOnlyAuthentication from ._models import ManagedInstanceEditionCapability from ._models import ManagedInstanceEncryptionProtector from ._models import ManagedInstanceFamilyCapability @@ -281,6 +287,7 @@ from ._models import ManagedInstanceOperationParametersPair from ._models import ManagedInstanceOperationSteps from ._models import ManagedInstancePairInfo + from ._models import ManagedInstancePrivateLinkServiceConnectionStateProperty from ._models import ManagedInstanceUpdate from ._models import ManagedInstanceVcoresCapability from ._models import ManagedInstanceVersionCapability @@ -295,6 +302,7 @@ from ._models import MetricValue from ._models import MinCapacityCapability from ._models import Name + from ._models import NetworkIsolationSettings from ._models import Operation from ._models import OperationDisplay from ._models import OperationImpact @@ -303,6 +311,7 @@ from ._models import PerformanceLevelCapability from ._models import PrivateEndpointConnection from ._models import PrivateEndpointConnectionProperties + from ._models import PrivateEndpointConnectionRequestStatus from ._models import PrivateEndpointProperty from ._models import PrivateLinkResource from ._models import PrivateLinkResourceProperties @@ -325,6 +334,7 @@ from ._models import Server from ._models import ServerAutomaticTuning from ._models import ServerAzureADAdministrator + from ._models import ServerAzureADOnlyAuthentication from ._models import ServerBlobAuditingPolicy from ._models import ServerCommunicationLink from ._models import ServerConnectionPolicy @@ -404,6 +414,7 @@ from ._paged_models import ManagedDatabasePaged from ._paged_models import ManagedDatabaseSecurityAlertPolicyPaged from ._paged_models import ManagedInstanceAdministratorPaged +from ._paged_models import ManagedInstanceAzureADOnlyAuthenticationPaged from ._paged_models import ManagedInstanceEncryptionProtectorPaged from ._paged_models import ManagedInstanceKeyPaged from ._paged_models import ManagedInstanceLongTermRetentionBackupPaged @@ -427,6 +438,7 @@ from ._paged_models import RestorePointPaged from ._paged_models import SensitivityLabelPaged from ._paged_models import ServerAzureADAdministratorPaged +from ._paged_models import ServerAzureADOnlyAuthenticationPaged from ._paged_models import ServerBlobAuditingPolicyPaged from ._paged_models import ServerCommunicationLinkPaged from ._paged_models import ServerDnsAliasPaged @@ -461,10 +473,6 @@ DataMaskingRuleState, DataMaskingFunction, GeoBackupPolicyState, - DatabaseEdition, - ServiceObjectiveName, - StorageKeyType, - AuthenticationType, UnitType, PrimaryAggregationType, UnitDefinitionType, @@ -475,6 +483,7 @@ RecommendedIndexState, RecommendedIndexType, TransparentDataEncryptionStatus, + ServiceObjectiveName, TransparentDataEncryptionActivityStatus, AutomaticTuningMode, AutomaticTuningOptionModeDesired, @@ -503,25 +512,23 @@ RestorePointType, SensitivityLabelRank, ManagementOperationState, - CreateMode, - SampleName, - DatabaseStatus, - CatalogCollationType, - DatabaseLicenseType, - DatabaseReadScale, ElasticPoolState, ElasticPoolLicenseType, VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, InstanceFailoverGroupReplicationRole, InstancePoolLicenseType, - IdentityType, - ManagedServerCreateMode, - ManagedInstanceLicenseType, - ManagedInstanceProxyOverride, PrivateLinkServiceConnectionStateStatus, PrivateLinkServiceConnectionStateActionsRequire, PrivateEndpointProvisioningState, + CreateMode, + SampleName, + DatabaseStatus, + CatalogCollationType, + DatabaseLicenseType, + DatabaseReadScale, + StorageAccountType, + IdentityType, ServerPublicNetworkAccess, CheckNameAvailabilityReason, MaxSizeUnit, @@ -536,6 +543,10 @@ SyncMemberState, ManagedDatabaseStatus, ManagedDatabaseCreateMode, + ManagedServerCreateMode, + ManagedInstanceLicenseType, + ManagedInstanceProxyOverride, + StorageKeyType, LongTermRetentionDatabaseState, VulnerabilityAssessmentPolicyBaselineName, SensitivityLabelSource, @@ -584,7 +595,7 @@ 'ElasticPoolPerformanceLevelCapability', 'ElasticPoolUpdate', 'EncryptionProtector', - 'ExportRequest', + 'ExportDatabaseDefinition', 'ExtendedDatabaseBlobAuditingPolicy', 'ExtendedServerBlobAuditingPolicy', 'FailoverGroup', @@ -593,9 +604,9 @@ 'FailoverGroupUpdate', 'FirewallRule', 'GeoBackupPolicy', - 'ImportExportResponse', - 'ImportExtensionRequest', - 'ImportRequest', + 'ImportExistingDatabaseDefinition', + 'ImportExportOperationResult', + 'ImportNewDatabaseDefinition', 'InstanceFailoverGroup', 'InstanceFailoverGroupReadOnlyEndpoint', 'InstanceFailoverGroupReadWriteEndpoint', @@ -629,6 +640,7 @@ 'ManagedDatabaseUpdate', 'ManagedInstance', 'ManagedInstanceAdministrator', + 'ManagedInstanceAzureADOnlyAuthentication', 'ManagedInstanceEditionCapability', 'ManagedInstanceEncryptionProtector', 'ManagedInstanceFamilyCapability', @@ -639,6 +651,7 @@ 'ManagedInstanceOperationParametersPair', 'ManagedInstanceOperationSteps', 'ManagedInstancePairInfo', + 'ManagedInstancePrivateLinkServiceConnectionStateProperty', 'ManagedInstanceUpdate', 'ManagedInstanceVcoresCapability', 'ManagedInstanceVersionCapability', @@ -653,6 +666,7 @@ 'MetricValue', 'MinCapacityCapability', 'Name', + 'NetworkIsolationSettings', 'Operation', 'OperationDisplay', 'OperationImpact', @@ -661,6 +675,7 @@ 'PerformanceLevelCapability', 'PrivateEndpointConnection', 'PrivateEndpointConnectionProperties', + 'PrivateEndpointConnectionRequestStatus', 'PrivateEndpointProperty', 'PrivateLinkResource', 'PrivateLinkResourceProperties', @@ -683,6 +698,7 @@ 'Server', 'ServerAutomaticTuning', 'ServerAzureADAdministrator', + 'ServerAzureADOnlyAuthentication', 'ServerBlobAuditingPolicy', 'ServerCommunicationLink', 'ServerConnectionPolicy', @@ -786,7 +802,6 @@ 'ElasticPoolOperationPaged', 'VulnerabilityAssessmentScanRecordPaged', 'InstanceFailoverGroupPaged', - 'BackupShortTermRetentionPolicyPaged', 'ManagedInstanceKeyPaged', 'ManagedInstanceEncryptionProtectorPaged', 'RecoverableManagedDatabasePaged', @@ -794,7 +809,6 @@ 'ServerVulnerabilityAssessmentPaged', 'InstancePoolPaged', 'UsagePaged', - 'ManagedInstancePaged', 'PrivateEndpointConnectionPaged', 'PrivateLinkResourcePaged', 'ServerPaged', @@ -802,14 +816,18 @@ 'ManagedInstanceLongTermRetentionPolicyPaged', 'WorkloadGroupPaged', 'WorkloadClassifierPaged', - 'ServerAzureADAdministratorPaged', 'ManagedInstanceOperationPaged', + 'ServerAzureADAdministratorPaged', 'SyncDatabaseIdPropertiesPaged', 'SyncFullSchemaPropertiesPaged', 'SyncGroupLogPropertiesPaged', 'SyncGroupPaged', 'SyncMemberPaged', + 'ManagedInstancePaged', + 'BackupShortTermRetentionPolicyPaged', 'ManagedDatabasePaged', + 'ServerAzureADOnlyAuthenticationPaged', + 'ManagedInstanceAzureADOnlyAuthenticationPaged', 'ServerConnectionType', 'SecurityAlertPolicyState', 'SecurityAlertPolicyEmailAccountAdmins', @@ -818,10 +836,6 @@ 'DataMaskingRuleState', 'DataMaskingFunction', 'GeoBackupPolicyState', - 'DatabaseEdition', - 'ServiceObjectiveName', - 'StorageKeyType', - 'AuthenticationType', 'UnitType', 'PrimaryAggregationType', 'UnitDefinitionType', @@ -832,6 +846,7 @@ 'RecommendedIndexState', 'RecommendedIndexType', 'TransparentDataEncryptionStatus', + 'ServiceObjectiveName', 'TransparentDataEncryptionActivityStatus', 'AutomaticTuningMode', 'AutomaticTuningOptionModeDesired', @@ -860,25 +875,23 @@ 'RestorePointType', 'SensitivityLabelRank', 'ManagementOperationState', - 'CreateMode', - 'SampleName', - 'DatabaseStatus', - 'CatalogCollationType', - 'DatabaseLicenseType', - 'DatabaseReadScale', 'ElasticPoolState', 'ElasticPoolLicenseType', 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', 'InstanceFailoverGroupReplicationRole', 'InstancePoolLicenseType', - 'IdentityType', - 'ManagedServerCreateMode', - 'ManagedInstanceLicenseType', - 'ManagedInstanceProxyOverride', 'PrivateLinkServiceConnectionStateStatus', 'PrivateLinkServiceConnectionStateActionsRequire', 'PrivateEndpointProvisioningState', + 'CreateMode', + 'SampleName', + 'DatabaseStatus', + 'CatalogCollationType', + 'DatabaseLicenseType', + 'DatabaseReadScale', + 'StorageAccountType', + 'IdentityType', 'ServerPublicNetworkAccess', 'CheckNameAvailabilityReason', 'MaxSizeUnit', @@ -893,6 +906,10 @@ 'SyncMemberState', 'ManagedDatabaseStatus', 'ManagedDatabaseCreateMode', + 'ManagedServerCreateMode', + 'ManagedInstanceLicenseType', + 'ManagedInstanceProxyOverride', + 'StorageKeyType', 'LongTermRetentionDatabaseState', 'VulnerabilityAssessmentPolicyBaselineName', 'SensitivityLabelSource', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py index 0afc5b980357..80f16fb02777 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -280,6 +280,11 @@ class BackupShortTermRetentionPolicy(ProxyResource): :param retention_days: The backup retention period in days. This is how many days Point-in-Time Restore will be supported. :type retention_days: int + :param diff_backup_interval_in_hours: The differential backup interval in + hours. This is how many interval hours between each differential backup + will be supported. This is only applicable to live databases but not + dropped databases. + :type diff_backup_interval_in_hours: int """ _validation = { @@ -293,11 +298,13 @@ class BackupShortTermRetentionPolicy(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'diff_backup_interval_in_hours': {'key': 'properties.diffBackupIntervalInHours', 'type': 'int'}, } def __init__(self, **kwargs): super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) self.retention_days = kwargs.get('retention_days', None) + self.diff_backup_interval_in_hours = kwargs.get('diff_backup_interval_in_hours', None) class CheckNameAvailabilityRequest(Model): @@ -607,26 +614,29 @@ class Database(TrackedResource): :ivar earliest_restore_date: This records the earliest start date and time that restore is available for this database (ISO8601 format). :vartype earliest_restore_date: datetime - :param read_scale: If enabled, connections that have application intent - set to readonly in their connection string may be routed to a readonly - secondary replica. This property is only settable for Premium and Business - Critical databases. Possible values include: 'Enabled', 'Disabled' + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale :param read_replica_count: The number of readonly secondary replicas - associated with the database to which readonly application intent - connections may be routed. This property is only settable for Hyperscale - edition databases. + associated with the database. :type read_replica_count: int :ivar current_sku: The name and tier of the SKU. :vartype current_sku: ~azure.mgmt.sql.models.Sku :param auto_pause_delay: Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled :type auto_pause_delay: int + :param storage_account_type: The storage account type used to store + backups for this database. Currently the only supported option is GRS + (GeoRedundantStorage). Possible values include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.sql.models.StorageAccountType :param min_capacity: Minimal capacity that database will always have allocated, if not paused :type min_capacity: float :ivar paused_date: The date when database was paused by user configuration - or action (ISO8601 format). Null if the database is ready. + or action(ISO8601 format). Null if the database is ready. :vartype paused_date: datetime :ivar resumed_date: The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. @@ -691,6 +701,7 @@ class Database(TrackedResource): 'read_replica_count': {'key': 'properties.readReplicaCount', 'type': 'int'}, 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, 'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'}, 'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'}, @@ -729,6 +740,7 @@ def __init__(self, **kwargs): self.read_replica_count = kwargs.get('read_replica_count', None) self.current_sku = None self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.storage_account_type = kwargs.get('storage_account_type', None) self.min_capacity = kwargs.get('min_capacity', None) self.paused_date = None self.resumed_date = None @@ -1254,26 +1266,29 @@ class DatabaseUpdate(Model): :ivar earliest_restore_date: This records the earliest start date and time that restore is available for this database (ISO8601 format). :vartype earliest_restore_date: datetime - :param read_scale: If enabled, connections that have application intent - set to readonly in their connection string may be routed to a readonly - secondary replica. This property is only settable for Premium and Business - Critical databases. Possible values include: 'Enabled', 'Disabled' + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale :param read_replica_count: The number of readonly secondary replicas - associated with the database to which readonly application intent - connections may be routed. This property is only settable for Hyperscale - edition databases. + associated with the database. :type read_replica_count: int :ivar current_sku: The name and tier of the SKU. :vartype current_sku: ~azure.mgmt.sql.models.Sku :param auto_pause_delay: Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled :type auto_pause_delay: int + :param storage_account_type: The storage account type used to store + backups for this database. Currently the only supported option is GRS + (GeoRedundantStorage). Possible values include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.sql.models.StorageAccountType :param min_capacity: Minimal capacity that database will always have allocated, if not paused :type min_capacity: float :ivar paused_date: The date when database was paused by user configuration - or action (ISO8601 format). Null if the database is ready. + or action(ISO8601 format). Null if the database is ready. :vartype paused_date: datetime :ivar resumed_date: The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. @@ -1327,6 +1342,7 @@ class DatabaseUpdate(Model): 'read_replica_count': {'key': 'properties.readReplicaCount', 'type': 'int'}, 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, 'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'}, 'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'}, @@ -1364,6 +1380,7 @@ def __init__(self, **kwargs): self.read_replica_count = kwargs.get('read_replica_count', None) self.current_sku = None self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.storage_account_type = kwargs.get('storage_account_type', None) self.min_capacity = kwargs.get('min_capacity', None) self.paused_date = None self.resumed_date = None @@ -2607,28 +2624,28 @@ def __init__(self, **kwargs): self.thumbprint = None -class ExportRequest(Model): - """Export database parameters. +class ExportDatabaseDefinition(Model): + """Contains the information necessary to perform export database operation. All required parameters must be populated in order to send to Azure. - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :param storage_key_type: Required. Storage key type. Possible values + include: 'SharedAccessKey', 'StorageAccessKey' :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." + :param storage_key: Required. Storage key. :type storage_key: str - :param storage_uri: Required. The storage uri to use. + :param storage_uri: Required. Storage Uri. :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. + :param administrator_login: Required. Administrator login name. :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. + :param administrator_login_password: Required. Administrator login + password. :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType + :param authentication_type: Authentication type. + :type authentication_type: str + :param network_isolation: Optional resource information to enable network + isolation for request. + :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings """ _validation = { @@ -2640,22 +2657,24 @@ class ExportRequest(Model): } _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, 'storage_key': {'key': 'storageKey', 'type': 'str'}, 'storage_uri': {'key': 'storageUri', 'type': 'str'}, 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, } def __init__(self, **kwargs): - super(ExportRequest, self).__init__(**kwargs) + super(ExportDatabaseDefinition, self).__init__(**kwargs) self.storage_key_type = kwargs.get('storage_key_type', None) self.storage_key = kwargs.get('storage_key', None) self.storage_uri = kwargs.get('storage_uri', None) self.administrator_login = kwargs.get('administrator_login', None) self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") + self.authentication_type = kwargs.get('authentication_type', None) + self.network_isolation = kwargs.get('network_isolation', None) class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): @@ -3265,8 +3284,62 @@ def __init__(self, **kwargs): self.location = None -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. +class ImportExistingDatabaseDefinition(Model): + """Contains the information necessary to perform import operation for existing + database. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. Storage key type. Possible values + include: 'SharedAccessKey', 'StorageAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. Storage key. + :type storage_key: str + :param storage_uri: Required. Storage Uri. + :type storage_uri: str + :param administrator_login: Required. Administrator login name. + :type administrator_login: str + :param administrator_login_password: Required. Administrator login + password. + :type administrator_login_password: str + :param authentication_type: Authentication type. + :type authentication_type: str + :param network_isolation: Optional resource information to enable network + isolation for request. + :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, + } + + def __init__(self, **kwargs): + super(ImportExistingDatabaseDefinition, self).__init__(**kwargs) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.network_isolation = kwargs.get('network_isolation', None) + + +class ImportExportOperationResult(ProxyResource): + """An ImportExport operation result resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -3277,192 +3350,108 @@ class ImportExportResponse(ProxyResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. + :ivar request_id: Request Id. :vartype request_id: str - :ivar server_name: The name of the server. + :ivar request_type: Request type. + :vartype request_type: str + :ivar queued_time: Queued time. + :vartype queued_time: str + :ivar last_modified_time: Last modified time. + :vartype last_modified_time: str + :ivar blob_uri: Blob Uri. + :vartype blob_uri: str + :ivar server_name: Server name. :vartype server_name: str - :ivar database_name: The name of the database. + :ivar database_name: Database name. :vartype database_name: str - :ivar status: The status message returned from the server. + :ivar status: Operation status. :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. + :ivar error_message: Error message. :vartype error_message: str + :ivar private_endpoint_connections: Gets the status of private endpoints + associated with this request. + :vartype private_endpoint_connections: + list[~azure.mgmt.sql.models.PrivateEndpointConnectionRequestStatus] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'request_type': {'readonly': True}, 'request_id': {'readonly': True}, + 'request_type': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, 'server_name': {'readonly': True}, 'database_name': {'readonly': True}, 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, 'error_message': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnectionRequestStatus]'}, } def __init__(self, **kwargs): - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None + super(ImportExportOperationResult, self).__init__(**kwargs) self.request_id = None + self.request_type = None + self.queued_time = None + self.last_modified_time = None + self.blob_uri = None self.server_name = None self.database_name = None self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None self.error_message = None + self.private_endpoint_connections = None -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, **kwargs): - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") - - -class ImportRequest(ExportRequest): - """Import database parameters. +class ImportNewDatabaseDefinition(Model): + """Contains the information necessary to perform import operation for new + database. All required parameters must be populated in order to send to Azure. - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :param database_name: Name of the import database. + :type database_name: str + :param edition: Edition of the import database. + :type edition: str + :param service_objective_name: Service level objective name of the import + database. + :type service_objective_name: str + :param max_size_bytes: Max size in bytes for the import database. + :type max_size_bytes: str + :param storage_key_type: Required. Storage key type. Possible values + include: 'SharedAccessKey', 'StorageAccessKey' :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." + :param storage_key: Required. Storage key. :type storage_key: str - :param storage_uri: Required. The storage uri to use. + :param storage_uri: Required. Storage Uri. :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. + :param administrator_login: Required. Administrator login name. :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. + :param administrator_login_password: Required. Administrator login + password. :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - The list of SKUs may vary by region and support offer. To determine the - SKUs (including the SKU name, tier/edition, family, and capacity) that are - available to your subscription in an Azure region, use the - `Capabilities_ListByLocation` REST API or one of the following commands: - ```azurecli - az sql db list-editions -l -o table - ```` - ```powershell - Get-AzSqlServerServiceObjective -Location - ```` - . Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str + :param authentication_type: Authentication type. + :type authentication_type: str + :param network_isolation: Optional resource information to enable network + isolation for request. + :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings """ _validation = { @@ -3471,31 +3460,35 @@ class ImportRequest(ExportRequest): 'storage_uri': {'required': True}, 'administrator_login': {'required': True}, 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, } _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, 'database_name': {'key': 'databaseName', 'type': 'str'}, 'edition': {'key': 'edition', 'type': 'str'}, 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, } def __init__(self, **kwargs): - super(ImportRequest, self).__init__(**kwargs) + super(ImportNewDatabaseDefinition, self).__init__(**kwargs) self.database_name = kwargs.get('database_name', None) self.edition = kwargs.get('edition', None) self.service_objective_name = kwargs.get('service_objective_name', None) self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.network_isolation = kwargs.get('network_isolation', None) class InstanceFailoverGroup(ProxyResource): @@ -5110,6 +5103,9 @@ class ManagedInstance(TrackedResource): :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5 :type sku: ~azure.mgmt.sql.models.Sku + :ivar provisioning_state: Possible values include: 'Creating', 'Deleting', + 'Updating', 'Unknown', 'Succeeded', 'Failed' + :vartype provisioning_state: str or ~azure.mgmt.sql.models.enum :param managed_instance_create_mode: Specifies the mode of database creation. Default: Regular instance creation. @@ -5186,6 +5182,12 @@ class ManagedInstance(TrackedResource): :param minimal_tls_version: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' :type minimal_tls_version: str + :param storage_account_type: The storage account type used to store + backups for this instance. The options are LRS (LocallyRedundantStorage), + ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage). Possible values + include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.sql.models.StorageAccountType """ _validation = { @@ -5193,6 +5195,7 @@ class ManagedInstance(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, 'fully_qualified_domain_name': {'readonly': True}, 'state': {'readonly': True}, 'dns_zone': {'readonly': True}, @@ -5206,6 +5209,7 @@ class ManagedInstance(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, @@ -5226,12 +5230,14 @@ class ManagedInstance(TrackedResource): 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, } def __init__(self, **kwargs): super(ManagedInstance, self).__init__(**kwargs) self.identity = kwargs.get('identity', None) self.sku = kwargs.get('sku', None) + self.provisioning_state = None self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) self.fully_qualified_domain_name = None self.administrator_login = kwargs.get('administrator_login', None) @@ -5252,6 +5258,7 @@ def __init__(self, **kwargs): self.instance_pool_id = kwargs.get('instance_pool_id', None) self.maintenance_configuration_id = kwargs.get('maintenance_configuration_id', None) self.minimal_tls_version = kwargs.get('minimal_tls_version', None) + self.storage_account_type = kwargs.get('storage_account_type', None) class ManagedInstanceAdministrator(ProxyResource): @@ -5308,6 +5315,44 @@ def __init__(self, **kwargs): self.tenant_id = kwargs.get('tenant_id', None) +class ManagedInstanceAzureADOnlyAuthentication(ProxyResource): + """Azure Active Directory only authentication. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param azure_ad_only_authentication: Required. Azure Active Directory only + Authentication enabled. + :type azure_ad_only_authentication: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_ad_only_authentication': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_ad_only_authentication': {'key': 'properties.azureADOnlyAuthentication', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceAzureADOnlyAuthentication, self).__init__(**kwargs) + self.azure_ad_only_authentication = kwargs.get('azure_ad_only_authentication', None) + + class ManagedInstanceEditionCapability(Model): """The managed server capability. @@ -5824,6 +5869,42 @@ def __init__(self, **kwargs): self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) +class ManagedInstancePrivateLinkServiceConnectionStateProperty(Model): + """ManagedInstancePrivateLinkServiceConnectionStateProperty. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. The private link service connection status. + :type status: str + :param description: Required. The private link service connection + description. + :type description: str + :ivar actions_required: The private link service connection description. + :vartype actions_required: str + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstancePrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = None + + class ManagedInstanceUpdate(Model): """An update request for an Azure SQL Database managed instance. @@ -5832,6 +5913,9 @@ class ManagedInstanceUpdate(Model): :param sku: Managed instance sku :type sku: ~azure.mgmt.sql.models.Sku + :ivar provisioning_state: Possible values include: 'Creating', 'Deleting', + 'Updating', 'Unknown', 'Succeeded', 'Failed' + :vartype provisioning_state: str or ~azure.mgmt.sql.models.enum :param managed_instance_create_mode: Specifies the mode of database creation. Default: Regular instance creation. @@ -5908,11 +5992,18 @@ class ManagedInstanceUpdate(Model): :param minimal_tls_version: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' :type minimal_tls_version: str + :param storage_account_type: The storage account type used to store + backups for this instance. The options are LRS (LocallyRedundantStorage), + ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage). Possible values + include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.sql.models.StorageAccountType :param tags: Resource tags. :type tags: dict[str, str] """ _validation = { + 'provisioning_state': {'readonly': True}, 'fully_qualified_domain_name': {'readonly': True}, 'state': {'readonly': True}, 'dns_zone': {'readonly': True}, @@ -5920,6 +6011,7 @@ class ManagedInstanceUpdate(Model): _attribute_map = { 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, @@ -5940,12 +6032,14 @@ class ManagedInstanceUpdate(Model): 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, **kwargs): super(ManagedInstanceUpdate, self).__init__(**kwargs) self.sku = kwargs.get('sku', None) + self.provisioning_state = None self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) self.fully_qualified_domain_name = None self.administrator_login = kwargs.get('administrator_login', None) @@ -5966,6 +6060,7 @@ def __init__(self, **kwargs): self.instance_pool_id = kwargs.get('instance_pool_id', None) self.maintenance_configuration_id = kwargs.get('maintenance_configuration_id', None) self.minimal_tls_version = kwargs.get('minimal_tls_version', None) + self.storage_account_type = kwargs.get('storage_account_type', None) self.tags = kwargs.get('tags', None) @@ -6544,6 +6639,32 @@ def __init__(self, **kwargs): self.localized_value = kwargs.get('localized_value', None) +class NetworkIsolationSettings(Model): + """Contains the ARM resources for which to create private endpoint connection. + + :param storage_account_resource_id: The resource id for the storage + account used to store BACPAC file. If set, private endpoint connection + will be created for the storage account. Must match storage account used + for StorageUri parameter. + :type storage_account_resource_id: str + :param sql_server_resource_id: The resource id for the SQL server which is + the target of this request. If set, private endpoint connection will be + created for the SQL server. Must match server which is target of the + operation. + :type sql_server_resource_id: str + """ + + _attribute_map = { + 'storage_account_resource_id': {'key': 'storageAccountResourceId', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'sqlServerResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkIsolationSettings, self).__init__(**kwargs) + self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) + self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) + + class Operation(Model): """SQL REST API operation definition. @@ -6842,6 +6963,41 @@ def __init__(self, **kwargs): self.provisioning_state = None +class PrivateEndpointConnectionRequestStatus(Model): + """Contains the private endpoint connection requests status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar private_link_service_id: Resource id for which the private endpoint + is created. + :vartype private_link_service_id: str + :ivar private_endpoint_connection_name: The connection name for the + private endpoint. + :vartype private_endpoint_connection_name: str + :ivar status: Status of this private endpoint connection. + :vartype status: str + """ + + _validation = { + 'private_link_service_id': {'readonly': True}, + 'private_endpoint_connection_name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'private_link_service_id': {'key': 'privateLinkServiceId', 'type': 'str'}, + 'private_endpoint_connection_name': {'key': 'privateEndpointConnectionName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionRequestStatus, self).__init__(**kwargs) + self.private_link_service_id = None + self.private_endpoint_connection_name = None + self.status = None + + class PrivateEndpointProperty(Model): """PrivateEndpointProperty. @@ -7861,9 +8017,9 @@ class ServerAzureADAdministrator(ProxyResource): :type sid: str :param tenant_id: Tenant ID of the administrator. :type tenant_id: str - :param azure_ad_only_authentication: Azure Active Directory only + :ivar azure_ad_only_authentication: Azure Active Directory only Authentication enabled. - :type azure_ad_only_authentication: bool + :vartype azure_ad_only_authentication: bool """ _validation = { @@ -7873,6 +8029,7 @@ class ServerAzureADAdministrator(ProxyResource): 'administrator_type': {'required': True, 'constant': True}, 'login': {'required': True}, 'sid': {'required': True}, + 'azure_ad_only_authentication': {'readonly': True}, } _attribute_map = { @@ -7893,6 +8050,44 @@ def __init__(self, **kwargs): self.login = kwargs.get('login', None) self.sid = kwargs.get('sid', None) self.tenant_id = kwargs.get('tenant_id', None) + self.azure_ad_only_authentication = None + + +class ServerAzureADOnlyAuthentication(ProxyResource): + """Azure Active Directory only authentication. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param azure_ad_only_authentication: Required. Azure Active Directory only + Authentication enabled. + :type azure_ad_only_authentication: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_ad_only_authentication': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_ad_only_authentication': {'key': 'properties.azureADOnlyAuthentication', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServerAzureADOnlyAuthentication, self).__init__(**kwargs) self.azure_ad_only_authentication = kwargs.get('azure_ad_only_authentication', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py index 2145cfc94924..4def9e609867 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -280,6 +280,11 @@ class BackupShortTermRetentionPolicy(ProxyResource): :param retention_days: The backup retention period in days. This is how many days Point-in-Time Restore will be supported. :type retention_days: int + :param diff_backup_interval_in_hours: The differential backup interval in + hours. This is how many interval hours between each differential backup + will be supported. This is only applicable to live databases but not + dropped databases. + :type diff_backup_interval_in_hours: int """ _validation = { @@ -293,11 +298,13 @@ class BackupShortTermRetentionPolicy(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'diff_backup_interval_in_hours': {'key': 'properties.diffBackupIntervalInHours', 'type': 'int'}, } - def __init__(self, *, retention_days: int=None, **kwargs) -> None: + def __init__(self, *, retention_days: int=None, diff_backup_interval_in_hours: int=None, **kwargs) -> None: super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) self.retention_days = retention_days + self.diff_backup_interval_in_hours = diff_backup_interval_in_hours class CheckNameAvailabilityRequest(Model): @@ -607,26 +614,29 @@ class Database(TrackedResource): :ivar earliest_restore_date: This records the earliest start date and time that restore is available for this database (ISO8601 format). :vartype earliest_restore_date: datetime - :param read_scale: If enabled, connections that have application intent - set to readonly in their connection string may be routed to a readonly - secondary replica. This property is only settable for Premium and Business - Critical databases. Possible values include: 'Enabled', 'Disabled' + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale :param read_replica_count: The number of readonly secondary replicas - associated with the database to which readonly application intent - connections may be routed. This property is only settable for Hyperscale - edition databases. + associated with the database. :type read_replica_count: int :ivar current_sku: The name and tier of the SKU. :vartype current_sku: ~azure.mgmt.sql.models.Sku :param auto_pause_delay: Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled :type auto_pause_delay: int + :param storage_account_type: The storage account type used to store + backups for this database. Currently the only supported option is GRS + (GeoRedundantStorage). Possible values include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.sql.models.StorageAccountType :param min_capacity: Minimal capacity that database will always have allocated, if not paused :type min_capacity: float :ivar paused_date: The date when database was paused by user configuration - or action (ISO8601 format). Null if the database is ready. + or action(ISO8601 format). Null if the database is ready. :vartype paused_date: datetime :ivar resumed_date: The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. @@ -691,12 +701,13 @@ class Database(TrackedResource): 'read_replica_count': {'key': 'properties.readReplicaCount', 'type': 'int'}, 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, 'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'}, 'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'}, } - def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, read_replica_count: int=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, read_replica_count: int=None, auto_pause_delay: int=None, storage_account_type=None, min_capacity: float=None, **kwargs) -> None: super(Database, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.kind = None @@ -729,6 +740,7 @@ def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, coll self.read_replica_count = read_replica_count self.current_sku = None self.auto_pause_delay = auto_pause_delay + self.storage_account_type = storage_account_type self.min_capacity = min_capacity self.paused_date = None self.resumed_date = None @@ -1254,26 +1266,29 @@ class DatabaseUpdate(Model): :ivar earliest_restore_date: This records the earliest start date and time that restore is available for this database (ISO8601 format). :vartype earliest_restore_date: datetime - :param read_scale: If enabled, connections that have application intent - set to readonly in their connection string may be routed to a readonly - secondary replica. This property is only settable for Premium and Business - Critical databases. Possible values include: 'Enabled', 'Disabled' + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale :param read_replica_count: The number of readonly secondary replicas - associated with the database to which readonly application intent - connections may be routed. This property is only settable for Hyperscale - edition databases. + associated with the database. :type read_replica_count: int :ivar current_sku: The name and tier of the SKU. :vartype current_sku: ~azure.mgmt.sql.models.Sku :param auto_pause_delay: Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled :type auto_pause_delay: int + :param storage_account_type: The storage account type used to store + backups for this database. Currently the only supported option is GRS + (GeoRedundantStorage). Possible values include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.sql.models.StorageAccountType :param min_capacity: Minimal capacity that database will always have allocated, if not paused :type min_capacity: float :ivar paused_date: The date when database was paused by user configuration - or action (ISO8601 format). Null if the database is ready. + or action(ISO8601 format). Null if the database is ready. :vartype paused_date: datetime :ivar resumed_date: The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. @@ -1327,13 +1342,14 @@ class DatabaseUpdate(Model): 'read_replica_count': {'key': 'properties.readReplicaCount', 'type': 'int'}, 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, 'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'}, 'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, read_replica_count: int=None, auto_pause_delay: int=None, min_capacity: float=None, tags=None, **kwargs) -> None: + def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, read_replica_count: int=None, auto_pause_delay: int=None, storage_account_type=None, min_capacity: float=None, tags=None, **kwargs) -> None: super(DatabaseUpdate, self).__init__(**kwargs) self.sku = sku self.create_mode = create_mode @@ -1364,6 +1380,7 @@ def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_ self.read_replica_count = read_replica_count self.current_sku = None self.auto_pause_delay = auto_pause_delay + self.storage_account_type = storage_account_type self.min_capacity = min_capacity self.paused_date = None self.resumed_date = None @@ -2607,28 +2624,28 @@ def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> N self.thumbprint = None -class ExportRequest(Model): - """Export database parameters. +class ExportDatabaseDefinition(Model): + """Contains the information necessary to perform export database operation. All required parameters must be populated in order to send to Azure. - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :param storage_key_type: Required. Storage key type. Possible values + include: 'SharedAccessKey', 'StorageAccessKey' :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." + :param storage_key: Required. Storage key. :type storage_key: str - :param storage_uri: Required. The storage uri to use. + :param storage_uri: Required. Storage Uri. :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. + :param administrator_login: Required. Administrator login name. :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. + :param administrator_login_password: Required. Administrator login + password. :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType + :param authentication_type: Authentication type. + :type authentication_type: str + :param network_isolation: Optional resource information to enable network + isolation for request. + :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings """ _validation = { @@ -2640,22 +2657,24 @@ class ExportRequest(Model): } _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, 'storage_key': {'key': 'storageKey', 'type': 'str'}, 'storage_uri': {'key': 'storageUri', 'type': 'str'}, 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, } - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: - super(ExportRequest, self).__init__(**kwargs) + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type: str=None, network_isolation=None, **kwargs) -> None: + super(ExportDatabaseDefinition, self).__init__(**kwargs) self.storage_key_type = storage_key_type self.storage_key = storage_key self.storage_uri = storage_uri self.administrator_login = administrator_login self.administrator_login_password = administrator_login_password self.authentication_type = authentication_type + self.network_isolation = network_isolation class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): @@ -3265,8 +3284,62 @@ def __init__(self, *, state, **kwargs) -> None: self.location = None -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. +class ImportExistingDatabaseDefinition(Model): + """Contains the information necessary to perform import operation for existing + database. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. Storage key type. Possible values + include: 'SharedAccessKey', 'StorageAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. Storage key. + :type storage_key: str + :param storage_uri: Required. Storage Uri. + :type storage_uri: str + :param administrator_login: Required. Administrator login name. + :type administrator_login: str + :param administrator_login_password: Required. Administrator login + password. + :type administrator_login_password: str + :param authentication_type: Authentication type. + :type authentication_type: str + :param network_isolation: Optional resource information to enable network + isolation for request. + :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type: str=None, network_isolation=None, **kwargs) -> None: + super(ImportExistingDatabaseDefinition, self).__init__(**kwargs) + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + self.network_isolation = network_isolation + + +class ImportExportOperationResult(ProxyResource): + """An ImportExport operation result resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -3277,192 +3350,108 @@ class ImportExportResponse(ProxyResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. + :ivar request_id: Request Id. :vartype request_id: str - :ivar server_name: The name of the server. + :ivar request_type: Request type. + :vartype request_type: str + :ivar queued_time: Queued time. + :vartype queued_time: str + :ivar last_modified_time: Last modified time. + :vartype last_modified_time: str + :ivar blob_uri: Blob Uri. + :vartype blob_uri: str + :ivar server_name: Server name. :vartype server_name: str - :ivar database_name: The name of the database. + :ivar database_name: Database name. :vartype database_name: str - :ivar status: The status message returned from the server. + :ivar status: Operation status. :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. + :ivar error_message: Error message. :vartype error_message: str + :ivar private_endpoint_connections: Gets the status of private endpoints + associated with this request. + :vartype private_endpoint_connections: + list[~azure.mgmt.sql.models.PrivateEndpointConnectionRequestStatus] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'request_type': {'readonly': True}, 'request_id': {'readonly': True}, + 'request_type': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, 'server_name': {'readonly': True}, 'database_name': {'readonly': True}, 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, 'error_message': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnectionRequestStatus]'}, } def __init__(self, **kwargs) -> None: - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None + super(ImportExportOperationResult, self).__init__(**kwargs) self.request_id = None + self.request_type = None + self.queued_time = None + self.last_modified_time = None + self.blob_uri = None self.server_name = None self.database_name = None self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None self.error_message = None + self.private_endpoint_connections = None -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type - - -class ImportRequest(ExportRequest): - """Import database parameters. +class ImportNewDatabaseDefinition(Model): + """Contains the information necessary to perform import operation for new + database. All required parameters must be populated in order to send to Azure. - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :param database_name: Name of the import database. + :type database_name: str + :param edition: Edition of the import database. + :type edition: str + :param service_objective_name: Service level objective name of the import + database. + :type service_objective_name: str + :param max_size_bytes: Max size in bytes for the import database. + :type max_size_bytes: str + :param storage_key_type: Required. Storage key type. Possible values + include: 'SharedAccessKey', 'StorageAccessKey' :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." + :param storage_key: Required. Storage key. :type storage_key: str - :param storage_uri: Required. The storage uri to use. + :param storage_uri: Required. Storage Uri. :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. + :param administrator_login: Required. Administrator login name. :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. + :param administrator_login_password: Required. Administrator login + password. :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - The list of SKUs may vary by region and support offer. To determine the - SKUs (including the SKU name, tier/edition, family, and capacity) that are - available to your subscription in an Azure region, use the - `Capabilities_ListByLocation` REST API or one of the following commands: - ```azurecli - az sql db list-editions -l -o table - ```` - ```powershell - Get-AzSqlServerServiceObjective -Location - ```` - . Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str + :param authentication_type: Authentication type. + :type authentication_type: str + :param network_isolation: Optional resource information to enable network + isolation for request. + :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings """ _validation = { @@ -3471,31 +3460,35 @@ class ImportRequest(ExportRequest): 'storage_uri': {'required': True}, 'administrator_login': {'required': True}, 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, } _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, 'database_name': {'key': 'databaseName', 'type': 'str'}, 'edition': {'key': 'edition', 'type': 'str'}, 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, } - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: - super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str=None, edition: str=None, service_objective_name: str=None, max_size_bytes: str=None, authentication_type: str=None, network_isolation=None, **kwargs) -> None: + super(ImportNewDatabaseDefinition, self).__init__(**kwargs) self.database_name = database_name self.edition = edition self.service_objective_name = service_objective_name self.max_size_bytes = max_size_bytes + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + self.network_isolation = network_isolation class InstanceFailoverGroup(ProxyResource): @@ -5110,6 +5103,9 @@ class ManagedInstance(TrackedResource): :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5 :type sku: ~azure.mgmt.sql.models.Sku + :ivar provisioning_state: Possible values include: 'Creating', 'Deleting', + 'Updating', 'Unknown', 'Succeeded', 'Failed' + :vartype provisioning_state: str or ~azure.mgmt.sql.models.enum :param managed_instance_create_mode: Specifies the mode of database creation. Default: Regular instance creation. @@ -5186,6 +5182,12 @@ class ManagedInstance(TrackedResource): :param minimal_tls_version: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' :type minimal_tls_version: str + :param storage_account_type: The storage account type used to store + backups for this instance. The options are LRS (LocallyRedundantStorage), + ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage). Possible values + include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.sql.models.StorageAccountType """ _validation = { @@ -5193,6 +5195,7 @@ class ManagedInstance(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, 'fully_qualified_domain_name': {'readonly': True}, 'state': {'readonly': True}, 'dns_zone': {'readonly': True}, @@ -5206,6 +5209,7 @@ class ManagedInstance(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, @@ -5226,12 +5230,14 @@ class ManagedInstance(TrackedResource): 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, } - def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, maintenance_configuration_id: str=None, minimal_tls_version: str=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, maintenance_configuration_id: str=None, minimal_tls_version: str=None, storage_account_type=None, **kwargs) -> None: super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) self.identity = identity self.sku = sku + self.provisioning_state = None self.managed_instance_create_mode = managed_instance_create_mode self.fully_qualified_domain_name = None self.administrator_login = administrator_login @@ -5252,6 +5258,7 @@ def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed self.instance_pool_id = instance_pool_id self.maintenance_configuration_id = maintenance_configuration_id self.minimal_tls_version = minimal_tls_version + self.storage_account_type = storage_account_type class ManagedInstanceAdministrator(ProxyResource): @@ -5308,6 +5315,44 @@ def __init__(self, *, login: str, sid: str, tenant_id: str=None, **kwargs) -> No self.tenant_id = tenant_id +class ManagedInstanceAzureADOnlyAuthentication(ProxyResource): + """Azure Active Directory only authentication. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param azure_ad_only_authentication: Required. Azure Active Directory only + Authentication enabled. + :type azure_ad_only_authentication: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_ad_only_authentication': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_ad_only_authentication': {'key': 'properties.azureADOnlyAuthentication', 'type': 'bool'}, + } + + def __init__(self, *, azure_ad_only_authentication: bool, **kwargs) -> None: + super(ManagedInstanceAzureADOnlyAuthentication, self).__init__(**kwargs) + self.azure_ad_only_authentication = azure_ad_only_authentication + + class ManagedInstanceEditionCapability(Model): """The managed server capability. @@ -5824,6 +5869,42 @@ def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_ins self.partner_managed_instance_id = partner_managed_instance_id +class ManagedInstancePrivateLinkServiceConnectionStateProperty(Model): + """ManagedInstancePrivateLinkServiceConnectionStateProperty. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. The private link service connection status. + :type status: str + :param description: Required. The private link service connection + description. + :type description: str + :ivar actions_required: The private link service connection description. + :vartype actions_required: str + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, *, status: str, description: str, **kwargs) -> None: + super(ManagedInstancePrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = None + + class ManagedInstanceUpdate(Model): """An update request for an Azure SQL Database managed instance. @@ -5832,6 +5913,9 @@ class ManagedInstanceUpdate(Model): :param sku: Managed instance sku :type sku: ~azure.mgmt.sql.models.Sku + :ivar provisioning_state: Possible values include: 'Creating', 'Deleting', + 'Updating', 'Unknown', 'Succeeded', 'Failed' + :vartype provisioning_state: str or ~azure.mgmt.sql.models.enum :param managed_instance_create_mode: Specifies the mode of database creation. Default: Regular instance creation. @@ -5908,11 +5992,18 @@ class ManagedInstanceUpdate(Model): :param minimal_tls_version: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' :type minimal_tls_version: str + :param storage_account_type: The storage account type used to store + backups for this instance. The options are LRS (LocallyRedundantStorage), + ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage). Possible values + include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.sql.models.StorageAccountType :param tags: Resource tags. :type tags: dict[str, str] """ _validation = { + 'provisioning_state': {'readonly': True}, 'fully_qualified_domain_name': {'readonly': True}, 'state': {'readonly': True}, 'dns_zone': {'readonly': True}, @@ -5920,6 +6011,7 @@ class ManagedInstanceUpdate(Model): _attribute_map = { 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, @@ -5940,12 +6032,14 @@ class ManagedInstanceUpdate(Model): 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, maintenance_configuration_id: str=None, minimal_tls_version: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, maintenance_configuration_id: str=None, minimal_tls_version: str=None, storage_account_type=None, tags=None, **kwargs) -> None: super(ManagedInstanceUpdate, self).__init__(**kwargs) self.sku = sku + self.provisioning_state = None self.managed_instance_create_mode = managed_instance_create_mode self.fully_qualified_domain_name = None self.administrator_login = administrator_login @@ -5966,6 +6060,7 @@ def __init__(self, *, sku=None, managed_instance_create_mode=None, administrator self.instance_pool_id = instance_pool_id self.maintenance_configuration_id = maintenance_configuration_id self.minimal_tls_version = minimal_tls_version + self.storage_account_type = storage_account_type self.tags = tags @@ -6544,6 +6639,32 @@ def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> N self.localized_value = localized_value +class NetworkIsolationSettings(Model): + """Contains the ARM resources for which to create private endpoint connection. + + :param storage_account_resource_id: The resource id for the storage + account used to store BACPAC file. If set, private endpoint connection + will be created for the storage account. Must match storage account used + for StorageUri parameter. + :type storage_account_resource_id: str + :param sql_server_resource_id: The resource id for the SQL server which is + the target of this request. If set, private endpoint connection will be + created for the SQL server. Must match server which is target of the + operation. + :type sql_server_resource_id: str + """ + + _attribute_map = { + 'storage_account_resource_id': {'key': 'storageAccountResourceId', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'sqlServerResourceId', 'type': 'str'}, + } + + def __init__(self, *, storage_account_resource_id: str=None, sql_server_resource_id: str=None, **kwargs) -> None: + super(NetworkIsolationSettings, self).__init__(**kwargs) + self.storage_account_resource_id = storage_account_resource_id + self.sql_server_resource_id = sql_server_resource_id + + class Operation(Model): """SQL REST API operation definition. @@ -6842,6 +6963,41 @@ def __init__(self, *, private_endpoint=None, private_link_service_connection_sta self.provisioning_state = None +class PrivateEndpointConnectionRequestStatus(Model): + """Contains the private endpoint connection requests status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar private_link_service_id: Resource id for which the private endpoint + is created. + :vartype private_link_service_id: str + :ivar private_endpoint_connection_name: The connection name for the + private endpoint. + :vartype private_endpoint_connection_name: str + :ivar status: Status of this private endpoint connection. + :vartype status: str + """ + + _validation = { + 'private_link_service_id': {'readonly': True}, + 'private_endpoint_connection_name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'private_link_service_id': {'key': 'privateLinkServiceId', 'type': 'str'}, + 'private_endpoint_connection_name': {'key': 'privateEndpointConnectionName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateEndpointConnectionRequestStatus, self).__init__(**kwargs) + self.private_link_service_id = None + self.private_endpoint_connection_name = None + self.status = None + + class PrivateEndpointProperty(Model): """PrivateEndpointProperty. @@ -7861,9 +8017,9 @@ class ServerAzureADAdministrator(ProxyResource): :type sid: str :param tenant_id: Tenant ID of the administrator. :type tenant_id: str - :param azure_ad_only_authentication: Azure Active Directory only + :ivar azure_ad_only_authentication: Azure Active Directory only Authentication enabled. - :type azure_ad_only_authentication: bool + :vartype azure_ad_only_authentication: bool """ _validation = { @@ -7873,6 +8029,7 @@ class ServerAzureADAdministrator(ProxyResource): 'administrator_type': {'required': True, 'constant': True}, 'login': {'required': True}, 'sid': {'required': True}, + 'azure_ad_only_authentication': {'readonly': True}, } _attribute_map = { @@ -7888,11 +8045,49 @@ class ServerAzureADAdministrator(ProxyResource): administrator_type = "ActiveDirectory" - def __init__(self, *, login: str, sid: str, tenant_id: str=None, azure_ad_only_authentication: bool=None, **kwargs) -> None: + def __init__(self, *, login: str, sid: str, tenant_id: str=None, **kwargs) -> None: super(ServerAzureADAdministrator, self).__init__(**kwargs) self.login = login self.sid = sid self.tenant_id = tenant_id + self.azure_ad_only_authentication = None + + +class ServerAzureADOnlyAuthentication(ProxyResource): + """Azure Active Directory only authentication. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param azure_ad_only_authentication: Required. Azure Active Directory only + Authentication enabled. + :type azure_ad_only_authentication: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_ad_only_authentication': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_ad_only_authentication': {'key': 'properties.azureADOnlyAuthentication', 'type': 'bool'}, + } + + def __init__(self, *, azure_ad_only_authentication: bool, **kwargs) -> None: + super(ServerAzureADOnlyAuthentication, self).__init__(**kwargs) self.azure_ad_only_authentication = azure_ad_only_authentication diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py index 4c70305b679c..0987c5643fa5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py @@ -727,19 +727,6 @@ class InstanceFailoverGroupPaged(Paged): def __init__(self, *args, **kwargs): super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) -class BackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) class ManagedInstanceKeyPaged(Paged): """ A paging container for iterating over a list of :class:`ManagedInstanceKey ` object @@ -831,19 +818,6 @@ class UsagePaged(Paged): def __init__(self, *args, **kwargs): super(UsagePaged, self).__init__(*args, **kwargs) -class ManagedInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstancePaged, self).__init__(*args, **kwargs) class PrivateEndpointConnectionPaged(Paged): """ A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object @@ -935,32 +909,32 @@ class WorkloadClassifierPaged(Paged): def __init__(self, *args, **kwargs): super(WorkloadClassifierPaged, self).__init__(*args, **kwargs) -class ServerAzureADAdministratorPaged(Paged): +class ManagedInstanceOperationPaged(Paged): """ - A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object + A paging container for iterating over a list of :class:`ManagedInstanceOperation ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} + 'current_page': {'key': 'value', 'type': '[ManagedInstanceOperation]'} } def __init__(self, *args, **kwargs): - super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) -class ManagedInstanceOperationPaged(Paged): + super(ManagedInstanceOperationPaged, self).__init__(*args, **kwargs) +class ServerAzureADAdministratorPaged(Paged): """ - A paging container for iterating over a list of :class:`ManagedInstanceOperation ` object + A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceOperation]'} + 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} } def __init__(self, *args, **kwargs): - super(ManagedInstanceOperationPaged, self).__init__(*args, **kwargs) + super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) class SyncDatabaseIdPropertiesPaged(Paged): """ A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object @@ -1026,6 +1000,32 @@ class SyncMemberPaged(Paged): def __init__(self, *args, **kwargs): super(SyncMemberPaged, self).__init__(*args, **kwargs) +class ManagedInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstancePaged, self).__init__(*args, **kwargs) +class BackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) class ManagedDatabasePaged(Paged): """ A paging container for iterating over a list of :class:`ManagedDatabase ` object @@ -1039,3 +1039,29 @@ class ManagedDatabasePaged(Paged): def __init__(self, *args, **kwargs): super(ManagedDatabasePaged, self).__init__(*args, **kwargs) +class ServerAzureADOnlyAuthenticationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerAzureADOnlyAuthentication ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerAzureADOnlyAuthentication]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerAzureADOnlyAuthenticationPaged, self).__init__(*args, **kwargs) +class ManagedInstanceAzureADOnlyAuthenticationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceAzureADOnlyAuthentication ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceAzureADOnlyAuthentication]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceAzureADOnlyAuthenticationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index b8275e2d4df1..0551ac2a58a4 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -66,105 +66,6 @@ class GeoBackupPolicyState(str, Enum): enabled = "Enabled" -class DatabaseEdition(str, Enum): - - web = "Web" - business = "Business" - basic = "Basic" - standard = "Standard" - premium = "Premium" - premium_rs = "PremiumRS" - free = "Free" - stretch = "Stretch" - data_warehouse = "DataWarehouse" - system = "System" - system2 = "System2" - general_purpose = "GeneralPurpose" - business_critical = "BusinessCritical" - hyperscale = "Hyperscale" - - -class ServiceObjectiveName(str, Enum): - - system = "System" - system0 = "System0" - system1 = "System1" - system2 = "System2" - system3 = "System3" - system4 = "System4" - system2_l = "System2L" - system3_l = "System3L" - system4_l = "System4L" - free = "Free" - basic = "Basic" - s0 = "S0" - s1 = "S1" - s2 = "S2" - s3 = "S3" - s4 = "S4" - s6 = "S6" - s7 = "S7" - s9 = "S9" - s12 = "S12" - p1 = "P1" - p2 = "P2" - p3 = "P3" - p4 = "P4" - p6 = "P6" - p11 = "P11" - p15 = "P15" - prs1 = "PRS1" - prs2 = "PRS2" - prs4 = "PRS4" - prs6 = "PRS6" - dw100 = "DW100" - dw200 = "DW200" - dw300 = "DW300" - dw400 = "DW400" - dw500 = "DW500" - dw600 = "DW600" - dw1000 = "DW1000" - dw1200 = "DW1200" - dw1000c = "DW1000c" - dw1500 = "DW1500" - dw1500c = "DW1500c" - dw2000 = "DW2000" - dw2000c = "DW2000c" - dw3000 = "DW3000" - dw2500c = "DW2500c" - dw3000c = "DW3000c" - dw6000 = "DW6000" - dw5000c = "DW5000c" - dw6000c = "DW6000c" - dw7500c = "DW7500c" - dw10000c = "DW10000c" - dw15000c = "DW15000c" - dw30000c = "DW30000c" - ds100 = "DS100" - ds200 = "DS200" - ds300 = "DS300" - ds400 = "DS400" - ds500 = "DS500" - ds600 = "DS600" - ds1000 = "DS1000" - ds1200 = "DS1200" - ds1500 = "DS1500" - ds2000 = "DS2000" - elastic_pool = "ElasticPool" - - -class StorageKeyType(str, Enum): - - storage_access_key = "StorageAccessKey" - shared_access_key = "SharedAccessKey" - - -class AuthenticationType(str, Enum): - - sql = "SQL" - ad_password = "ADPassword" - - class UnitType(str, Enum): count = "count" @@ -257,6 +158,75 @@ class TransparentDataEncryptionStatus(str, Enum): disabled = "Disabled" +class ServiceObjectiveName(str, Enum): + + system = "System" + system0 = "System0" + system1 = "System1" + system2 = "System2" + system3 = "System3" + system4 = "System4" + system2_l = "System2L" + system3_l = "System3L" + system4_l = "System4L" + free = "Free" + basic = "Basic" + s0 = "S0" + s1 = "S1" + s2 = "S2" + s3 = "S3" + s4 = "S4" + s6 = "S6" + s7 = "S7" + s9 = "S9" + s12 = "S12" + p1 = "P1" + p2 = "P2" + p3 = "P3" + p4 = "P4" + p6 = "P6" + p11 = "P11" + p15 = "P15" + prs1 = "PRS1" + prs2 = "PRS2" + prs4 = "PRS4" + prs6 = "PRS6" + dw100 = "DW100" + dw200 = "DW200" + dw300 = "DW300" + dw400 = "DW400" + dw500 = "DW500" + dw600 = "DW600" + dw1000 = "DW1000" + dw1200 = "DW1200" + dw1000c = "DW1000c" + dw1500 = "DW1500" + dw1500c = "DW1500c" + dw2000 = "DW2000" + dw2000c = "DW2000c" + dw3000 = "DW3000" + dw2500c = "DW2500c" + dw3000c = "DW3000c" + dw6000 = "DW6000" + dw5000c = "DW5000c" + dw6000c = "DW6000c" + dw7500c = "DW7500c" + dw10000c = "DW10000c" + dw15000c = "DW15000c" + dw30000c = "DW30000c" + ds100 = "DS100" + ds200 = "DS200" + ds300 = "DS300" + ds400 = "DS400" + ds500 = "DS500" + ds600 = "DS600" + ds1000 = "DS1000" + ds1200 = "DS1200" + ds1500 = "DS1500" + ds2000 = "DS2000" + elastic_pool = "ElasticPool" + + class TransparentDataEncryptionActivityStatus(str, Enum): encrypting = "Encrypting" @@ -460,6 +430,67 @@ class ManagementOperationState(str, Enum): cancelled = "Cancelled" +class ElasticPoolState(str, Enum): + + creating = "Creating" + ready = "Ready" + disabled = "Disabled" + + +class ElasticPoolLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class VulnerabilityAssessmentScanTriggerType(str, Enum): + + on_demand = "OnDemand" + recurring = "Recurring" + + +class VulnerabilityAssessmentScanState(str, Enum): + + passed = "Passed" + failed = "Failed" + failed_to_run = "FailedToRun" + in_progress = "InProgress" + + +class InstanceFailoverGroupReplicationRole(str, Enum): + + primary = "Primary" + secondary = "Secondary" + + +class InstancePoolLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class PrivateLinkServiceConnectionStateStatus(str, Enum): + + approved = "Approved" + pending = "Pending" + rejected = "Rejected" + disconnected = "Disconnected" + + +class PrivateLinkServiceConnectionStateActionsRequire(str, Enum): + + none = "None" + + +class PrivateEndpointProvisioningState(str, Enum): + + approving = "Approving" + ready = "Ready" + dropping = "Dropping" + failed = "Failed" + rejecting = "Rejecting" + + class CreateMode(str, Enum): default = "Default" @@ -524,43 +555,11 @@ class DatabaseReadScale(str, Enum): disabled = "Disabled" -class ElasticPoolState(str, Enum): - - creating = "Creating" - ready = "Ready" - disabled = "Disabled" - - -class ElasticPoolLicenseType(str, Enum): - - license_included = "LicenseIncluded" - base_price = "BasePrice" - - -class VulnerabilityAssessmentScanTriggerType(str, Enum): - - on_demand = "OnDemand" - recurring = "Recurring" - - -class VulnerabilityAssessmentScanState(str, Enum): - - passed = "Passed" - failed = "Failed" - failed_to_run = "FailedToRun" - in_progress = "InProgress" - - -class InstanceFailoverGroupReplicationRole(str, Enum): - - primary = "Primary" - secondary = "Secondary" - +class StorageAccountType(str, Enum): -class InstancePoolLicenseType(str, Enum): - - license_included = "LicenseIncluded" - base_price = "BasePrice" + grs = "GRS" + lrs = "LRS" + zrs = "ZRS" class IdentityType(str, Enum): @@ -568,47 +567,6 @@ class IdentityType(str, Enum): system_assigned = "SystemAssigned" -class ManagedServerCreateMode(str, Enum): - - default = "Default" - point_in_time_restore = "PointInTimeRestore" - - -class ManagedInstanceLicenseType(str, Enum): - - license_included = "LicenseIncluded" - base_price = "BasePrice" - - -class ManagedInstanceProxyOverride(str, Enum): - - proxy = "Proxy" - redirect = "Redirect" - default = "Default" - - -class PrivateLinkServiceConnectionStateStatus(str, Enum): - - approved = "Approved" - pending = "Pending" - rejected = "Rejected" - disconnected = "Disconnected" - - -class PrivateLinkServiceConnectionStateActionsRequire(str, Enum): - - none = "None" - - -class PrivateEndpointProvisioningState(str, Enum): - - approving = "Approving" - ready = "Ready" - dropping = "Dropping" - failed = "Failed" - rejecting = "Rejecting" - - class ServerPublicNetworkAccess(str, Enum): enabled = "Enabled" @@ -729,6 +687,31 @@ class ManagedDatabaseCreateMode(str, Enum): restore_long_term_retention_backup = "RestoreLongTermRetentionBackup" +class ManagedServerCreateMode(str, Enum): + + default = "Default" + point_in_time_restore = "PointInTimeRestore" + + +class ManagedInstanceLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedInstanceProxyOverride(str, Enum): + + proxy = "Proxy" + redirect = "Redirect" + default = "Default" + + +class StorageKeyType(str, Enum): + + shared_access_key = "SharedAccessKey" + storage_access_key = "StorageAccessKey" + + class LongTermRetentionDatabaseState(str, Enum): all = "All" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index 9ab7784a088f..e9cb64531c69 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -74,7 +74,6 @@ from ._managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations from ._managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations from ._instance_failover_groups_operations import InstanceFailoverGroupsOperations -from ._backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations from ._tde_certificates_operations import TdeCertificatesOperations from ._managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations from ._managed_instance_keys_operations import ManagedInstanceKeysOperations @@ -85,7 +84,6 @@ from ._managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations from ._instance_pools_operations import InstancePoolsOperations from ._usages_operations import UsagesOperations -from ._managed_instances_operations import ManagedInstancesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._servers_operations import ServersOperations @@ -94,12 +92,17 @@ from ._managed_instance_long_term_retention_policies_operations import ManagedInstanceLongTermRetentionPoliciesOperations from ._workload_groups_operations import WorkloadGroupsOperations from ._workload_classifiers_operations import WorkloadClassifiersOperations -from ._server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations from ._managed_instance_operations import ManagedInstanceOperations +from ._server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations from ._sync_groups_operations import SyncGroupsOperations from ._sync_members_operations import SyncMembersOperations +from ._managed_instances_operations import ManagedInstancesOperations +from ._backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations from ._managed_database_restore_details_operations import ManagedDatabaseRestoreDetailsOperations from ._managed_databases_operations import ManagedDatabasesOperations +from ._server_azure_ad_only_authentications_operations import ServerAzureADOnlyAuthenticationsOperations +from ._import_export_operations import ImportExportOperations +from ._managed_instance_azure_ad_only_authentications_operations import ManagedInstanceAzureADOnlyAuthenticationsOperations __all__ = [ 'RecoverableDatabasesOperations', @@ -167,7 +170,6 @@ 'ManagedDatabaseVulnerabilityAssessmentScansOperations', 'ManagedDatabaseVulnerabilityAssessmentsOperations', 'InstanceFailoverGroupsOperations', - 'BackupShortTermRetentionPoliciesOperations', 'TdeCertificatesOperations', 'ManagedInstanceTdeCertificatesOperations', 'ManagedInstanceKeysOperations', @@ -178,7 +180,6 @@ 'ManagedDatabaseSensitivityLabelsOperations', 'InstancePoolsOperations', 'UsagesOperations', - 'ManagedInstancesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', 'ServersOperations', @@ -187,10 +188,15 @@ 'ManagedInstanceLongTermRetentionPoliciesOperations', 'WorkloadGroupsOperations', 'WorkloadClassifiersOperations', - 'ServerAzureADAdministratorsOperations', 'ManagedInstanceOperations', + 'ServerAzureADAdministratorsOperations', 'SyncGroupsOperations', 'SyncMembersOperations', + 'ManagedInstancesOperations', + 'BackupShortTermRetentionPoliciesOperations', 'ManagedDatabaseRestoreDetailsOperations', 'ManagedDatabasesOperations', + 'ServerAzureADOnlyAuthenticationsOperations', + 'ImportExportOperations', + 'ManagedInstanceAzureADOnlyAuthenticationsOperations', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py index 1fab2366624f..eba12c423aed 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py @@ -28,7 +28,7 @@ class BackupShortTermRetentionPoliciesOperations(object): :param serializer: An object model serializer. :param deserializer: An object model deserializer. :ivar policy_name: The policy name. Should always be "default". Constant value: "default". - :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2020-02-02-preview". """ models = models @@ -39,7 +39,7 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.policy_name = "default" - self.api_version = "2017-10-01-preview" + self.api_version = "2020-02-02-preview" self.config = config @@ -113,8 +113,8 @@ def get( def _create_or_update_initial( - self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): - parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days) + self, resource_group_name, server_name, database_name, retention_days=None, diff_backup_interval_in_hours=None, custom_headers=None, raw=False, **operation_config): + parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days, diff_backup_interval_in_hours=diff_backup_interval_in_hours) # Construct URL url = self.create_or_update.metadata['url'] @@ -166,7 +166,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, server_name, database_name, retention_days=None, diff_backup_interval_in_hours=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a database's short term retention policy. :param resource_group_name: The name of the resource group that @@ -180,6 +180,11 @@ def create_or_update( :param retention_days: The backup retention period in days. This is how many days Point-in-Time Restore will be supported. :type retention_days: int + :param diff_backup_interval_in_hours: The differential backup interval + in hours. This is how many interval hours between each differential + backup will be supported. This is only applicable to live databases + but not dropped databases. + :type diff_backup_interval_in_hours: int :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -199,6 +204,7 @@ def create_or_update( server_name=server_name, database_name=database_name, retention_days=retention_days, + diff_backup_interval_in_hours=diff_backup_interval_in_hours, custom_headers=custom_headers, raw=True, **operation_config @@ -224,8 +230,8 @@ def get_long_running_output(response): def _update_initial( - self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): - parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days) + self, resource_group_name, server_name, database_name, retention_days=None, diff_backup_interval_in_hours=None, custom_headers=None, raw=False, **operation_config): + parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days, diff_backup_interval_in_hours=diff_backup_interval_in_hours) # Construct URL url = self.update.metadata['url'] @@ -277,7 +283,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, server_name, database_name, retention_days=None, diff_backup_interval_in_hours=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a database's short term retention policy. :param resource_group_name: The name of the resource group that @@ -291,6 +297,11 @@ def update( :param retention_days: The backup retention period in days. This is how many days Point-in-Time Restore will be supported. :type retention_days: int + :param diff_backup_interval_in_hours: The differential backup interval + in hours. This is how many interval hours between each differential + backup will be supported. This is only applicable to live databases + but not dropped databases. + :type diff_backup_interval_in_hours: int :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -310,6 +321,7 @@ def update( server_name=server_name, database_name=database_name, retention_days=retention_days, + diff_backup_interval_in_hours=diff_backup_interval_in_hours, custom_headers=custom_headers, raw=True, **operation_config diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py index e0aa41fadadd..9a2ede8bd103 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py @@ -27,7 +27,6 @@ class DatabasesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar extension_name: The name of the operation to perform. Constant value: "import". """ models = models @@ -37,334 +36,9 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.extension_name = "import" self.config = config - - def _import_method_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2014-04-01" - - # Construct URL - url = self.import_method.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ImportRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def import_method( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Imports a bacpac into a new database. . - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for importing a Bacpac into - a database. - :type parameters: ~azure.mgmt.sql.models.ImportRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ImportExportResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._import_method_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - import_method.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import'} - - - def _create_import_operation_initial( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2014-04-01" - - # Construct URL - url = self.create_import_operation.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'extensionName': self._serialize.url("self.extension_name", self.extension_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ImportExtensionRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_import_operation( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates an import operation that imports a bacpac into an existing - database. The existing database must be empty. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database to import into - :type database_name: str - :param parameters: The required parameters for importing a Bacpac into - a database. - :type parameters: ~azure.mgmt.sql.models.ImportExtensionRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ImportExportResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._create_import_operation_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_import_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}'} - - - def _export_initial( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2014-04-01" - - # Construct URL - url = self.export.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ExportRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def export( - self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Exports a database to a bacpac. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database to be exported. - :type database_name: str - :param parameters: The required parameters for exporting a database. - :type parameters: ~azure.mgmt.sql.models.ExportRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ImportExportResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._export_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ImportExportResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export'} - def list_metrics( self, resource_group_name, server_name, database_name, filter, custom_headers=None, raw=False, **operation_config): """Returns database metrics. @@ -547,7 +221,7 @@ def list_by_server( ~azure.mgmt.sql.models.DatabasePaged[~azure.mgmt.sql.models.Database] :raises: :class:`CloudError` """ - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" def prepare_request(next_link=None): if not next_link: @@ -625,7 +299,7 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.get.metadata['url'] @@ -674,7 +348,7 @@ def get( def _create_or_update_initial( self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.create_or_update.metadata['url'] @@ -784,7 +458,7 @@ def get_long_running_output(response): def _delete_initial( self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.delete.metadata['url'] @@ -871,7 +545,7 @@ def get_long_running_output(response): def _update_initial( self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.update.metadata['url'] @@ -998,7 +672,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.DatabasePaged[~azure.mgmt.sql.models.Database] :raises: :class:`CloudError` """ - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" def prepare_request(next_link=None): if not next_link: @@ -1058,7 +732,7 @@ def internal_paging(next_link=None): def _pause_initial( self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.pause.metadata['url'] @@ -1159,7 +833,7 @@ def get_long_running_output(response): def _resume_initial( self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.resume.metadata['url'] @@ -1260,7 +934,7 @@ def get_long_running_output(response): def _upgrade_data_warehouse_initial( self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.upgrade_data_warehouse.metadata['url'] @@ -1369,7 +1043,7 @@ def rename( """ parameters = models.ResourceMoveDefinition(id=id) - api_version = "2017-10-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.rename.metadata['url'] @@ -1412,10 +1086,86 @@ def rename( return client_raw_response rename.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move'} + def list_inaccessible_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of inaccessible databases in a logical server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Database + :rtype: + ~azure.mgmt.sql.models.DatabasePaged[~azure.mgmt.sql.models.Database] + :raises: :class:`CloudError` + """ + api_version = "2019-06-01-preview" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_inaccessible_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_inaccessible_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases'} + def _failover_initial( self, resource_group_name, server_name, database_name, replica_type=None, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01-preview" + api_version = "2019-06-01-preview" # Construct URL url = self.failover.metadata['url'] @@ -1504,3 +1254,112 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover'} + + + def _export_initial( + self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2020-02-02-preview" + + # Construct URL + url = self.export.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ExportDatabaseDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ImportExportOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def export( + self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Exports a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: The database export request parameters. + :type parameters: ~azure.mgmt.sql.models.ExportDatabaseDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ImportExportOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._export_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ImportExportOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_import_export_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_import_export_operations.py new file mode 100644 index 000000000000..ce62b16c135a --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_import_export_operations.py @@ -0,0 +1,150 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ImportExportOperations(object): + """ImportExportOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2020-02-02-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-02-02-preview" + + self.config = config + + + def _import_method_initial( + self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.import_method.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ImportExistingDatabaseDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ImportExportOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def import_method( + self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Imports a bacpac into a new database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: The database import request parameters. + :type parameters: + ~azure.mgmt.sql.models.ImportExistingDatabaseDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ImportExportOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._import_method_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ImportExportOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + import_method.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/import'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_azure_ad_only_authentications_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_azure_ad_only_authentications_operations.py new file mode 100644 index 000000000000..3a5cfedf4bb5 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_azure_ad_only_authentications_operations.py @@ -0,0 +1,379 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ManagedInstanceAzureADOnlyAuthenticationsOperations(object): + """ManagedInstanceAzureADOnlyAuthenticationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar authentication_name: The name of server azure active directory only authentication. Constant value: "Default". + :ivar api_version: The API version to use for the request. Constant value: "2020-02-02-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.authentication_name = "Default" + self.api_version = "2020-02-02-preview" + + self.config = config + + def get( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific Azure Active Directory only authentication property. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagedInstanceAzureADOnlyAuthentication or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.sql.models.ManagedInstanceAzureADOnlyAuthentication or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'authenticationName': self._serialize.url("self.authentication_name", self.authentication_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagedInstanceAzureADOnlyAuthentication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}'} + + + def _create_or_update_initial( + self, resource_group_name, managed_instance_name, azure_ad_only_authentication, custom_headers=None, raw=False, **operation_config): + parameters = models.ManagedInstanceAzureADOnlyAuthentication(azure_ad_only_authentication=azure_ad_only_authentication) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'authenticationName': self._serialize.url("self.authentication_name", self.authentication_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ManagedInstanceAzureADOnlyAuthentication') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagedInstanceAzureADOnlyAuthentication', response) + if response.status_code == 201: + deserialized = self._deserialize('ManagedInstanceAzureADOnlyAuthentication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, managed_instance_name, azure_ad_only_authentication, custom_headers=None, raw=False, polling=True, **operation_config): + """Sets Server Active Directory only authentication property or updates an + existing server Active Directory only authentication property. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param azure_ad_only_authentication: Azure Active Directory only + Authentication enabled. + :type azure_ad_only_authentication: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ManagedInstanceAzureADOnlyAuthentication or + ClientRawResponse if + raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstanceAzureADOnlyAuthentication] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstanceAzureADOnlyAuthentication]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + azure_ad_only_authentication=azure_ad_only_authentication, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedInstanceAzureADOnlyAuthentication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}'} + + + def _delete_initial( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'authenticationName': self._serialize.url("self.authentication_name", self.authentication_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing server Active Directory only authentication + property. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}'} + + def list_by_instance( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of server Azure Active Directory only authentications. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + ManagedInstanceAzureADOnlyAuthentication + :rtype: + ~azure.mgmt.sql.models.ManagedInstanceAzureADOnlyAuthenticationPaged[~azure.mgmt.sql.models.ManagedInstanceAzureADOnlyAuthentication] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_instance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedInstanceAzureADOnlyAuthenticationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py index 2e49de1ea356..95e205d67278 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py @@ -39,81 +39,93 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_instance_pool( - self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of all managed instances in an instance pool. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param instance_pool_name: The instance pool name. - :type instance_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedInstance - :rtype: - ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] - :raises: :class:`CloudError` - """ - api_version = "2018-06-01-preview" - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_instance_pool.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) + def _failover_initial( + self, resource_group_name, managed_instance_name, replica_type=None, custom_headers=None, raw=False, **operation_config): + api_version = "2019-06-01-preview" - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - query_parameters = {} + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) + if replica_type is not None: + query_parameters['replicaType'] = self._serialize.query("replica_type", replica_type, 'str') - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - def internal_paging(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - response = self._client.send(request, stream=False, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + def failover( + self, resource_group_name, managed_instance_name, replica_type=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers a managed instance. - return response + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param replica_type: The type of replica to be failed over. Possible + values include: 'Primary', 'ReadableSecondary' + :type replica_type: str or ~azure.mgmt.sql.models.ReplicaType + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._failover_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + replica_type=replica_type, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - return deserialized - list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances'} + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -133,7 +145,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - api_version = "2018-06-01-preview" + api_version = "2020-02-02-preview" def prepare_request(next_link=None): if not next_link: @@ -208,7 +220,7 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2018-06-01-preview" + api_version = "2020-02-02-preview" # Construct URL url = self.get.metadata['url'] @@ -256,7 +268,7 @@ def get( def _create_or_update_initial( self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01-preview" + api_version = "2020-02-02-preview" # Construct URL url = self.create_or_update.metadata['url'] @@ -362,7 +374,7 @@ def get_long_running_output(response): def _delete_initial( self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01-preview" + api_version = "2020-02-02-preview" # Construct URL url = self.delete.metadata['url'] @@ -445,7 +457,7 @@ def get_long_running_output(response): def _update_initial( self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01-preview" + api_version = "2020-02-02-preview" # Construct URL url = self.update.metadata['url'] @@ -546,10 +558,16 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all managed instances in the subscription. + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in an instance pool. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param instance_pool_name: The instance pool name. + :type instance_pool_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -560,13 +578,15 @@ def list( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - api_version = "2018-06-01-preview" + api_version = "2020-02-02-preview" def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_instance_pool.metadata['url'] path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -612,92 +632,72 @@ def internal_paging(next_link=None): deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances'} + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in the subscription. - def _failover_initial( - self, resource_group_name, managed_instance_name, replica_type=None, custom_headers=None, raw=False, **operation_config): - api_version = "2019-06-01-preview" + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + api_version = "2020-02-02-preview" - # Construct URL - url = self.failover.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - if replica_type is not None: - query_parameters['replicaType'] = self._serialize.query("replica_type", replica_type, 'str') + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + else: + url = next_link + query_parameters = {} - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + def internal_paging(next_link=None): + request = prepare_request(next_link) - def failover( - self, resource_group_name, managed_instance_name, replica_type=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Failovers a managed instance. + response = self._client.send(request, stream=False, **operation_config) - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param managed_instance_name: The name of the managed instance. - :type managed_instance_name: str - :param replica_type: The type of replica to be failed over. Possible - values include: 'Primary', 'ReadableSecondary' - :type replica_type: str or ~azure.mgmt.sql.models.ReplicaType - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._failover_initial( - resource_group_name=resource_group_name, - managed_instance_name=managed_instance_name, - replica_type=replica_type, - custom_headers=custom_headers, - raw=True, - **operation_config - ) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + return response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover'} + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py index 2bfa200b74fe..a14bcecb0748 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py @@ -170,8 +170,8 @@ def create_or_update( :type resource_group_name: str :param server_name: The name of the server. :type server_name: str - :param parameters: The required parameters for creating or updating an - Active Directory Administrator. + :param parameters: The requested Azure Active Directory administrator + Resource state. :type parameters: ~azure.mgmt.sql.models.ServerAzureADAdministrator :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -369,99 +369,3 @@ def internal_paging(next_link=None): return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators'} - - - def _disable_azure_ad_only_authentication_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.disable_azure_ad_only_authentication.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerAzureADAdministrator', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def disable_azure_ad_only_authentication( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Disables Azure Active Directory only authentication on logical Server. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerAzureADAdministrator or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerAzureADAdministrator] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerAzureADAdministrator]] - :raises: :class:`CloudError` - """ - raw_result = self._disable_azure_ad_only_authentication_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerAzureADAdministrator', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - disable_azure_ad_only_authentication.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disableAzureADOnlyAuthentication'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_only_authentications_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_only_authentications_operations.py new file mode 100644 index 000000000000..37e8bf34606d --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_only_authentications_operations.py @@ -0,0 +1,376 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ServerAzureADOnlyAuthenticationsOperations(object): + """ServerAzureADOnlyAuthenticationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2020-02-02-preview". + :ivar authentication_name: The name of server azure active directory only authentication. Constant value: "Default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-02-02-preview" + self.authentication_name = "Default" + + self.config = config + + def get( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific Azure Active Directory only authentication property. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerAzureADOnlyAuthentication or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.ServerAzureADOnlyAuthentication or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'authenticationName': self._serialize.url("self.authentication_name", self.authentication_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerAzureADOnlyAuthentication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, azure_ad_only_authentication, custom_headers=None, raw=False, **operation_config): + parameters = models.ServerAzureADOnlyAuthentication(azure_ad_only_authentication=azure_ad_only_authentication) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'authenticationName': self._serialize.url("self.authentication_name", self.authentication_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerAzureADOnlyAuthentication') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServerAzureADOnlyAuthentication', response) + if response.status_code == 201: + deserialized = self._deserialize('ServerAzureADOnlyAuthentication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, azure_ad_only_authentication, custom_headers=None, raw=False, polling=True, **operation_config): + """Sets Server Active Directory only authentication property or updates an + existing server Active Directory only authentication property. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param azure_ad_only_authentication: Azure Active Directory only + Authentication enabled. + :type azure_ad_only_authentication: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ServerAzureADOnlyAuthentication or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ServerAzureADOnlyAuthentication] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ServerAzureADOnlyAuthentication]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + azure_ad_only_authentication=azure_ad_only_authentication, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServerAzureADOnlyAuthentication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}'} + + + def _delete_initial( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'authenticationName': self._serialize.url("self.authentication_name", self.authentication_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing server Active Directory only authentication + property. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of server Azure Active Directory only authentications. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServerAzureADOnlyAuthentication + :rtype: + ~azure.mgmt.sql.models.ServerAzureADOnlyAuthenticationPaged[~azure.mgmt.sql.models.ServerAzureADOnlyAuthentication] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServerAzureADOnlyAuthenticationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py index 7abf430deda2..ebba98c1f7bf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py @@ -27,7 +27,6 @@ class ServersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2019-06-01-preview". """ models = models @@ -37,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" self.config = config @@ -59,6 +57,8 @@ def list_by_resource_group( ~azure.mgmt.sql.models.ServerPaged[~azure.mgmt.sql.models.Server] :raises: :class:`CloudError` """ + api_version = "2019-06-01-preview" + def prepare_request(next_link=None): if not next_link: # Construct URL @@ -71,7 +71,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') else: url = next_link @@ -132,6 +132,8 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2019-06-01-preview" + # Construct URL url = self.get.metadata['url'] path_format_arguments = { @@ -143,7 +145,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -178,6 +180,8 @@ def get( def _create_or_update_initial( self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2019-06-01-preview" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -189,7 +193,7 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -282,6 +286,8 @@ def get_long_running_output(response): def _delete_initial( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + api_version = "2019-06-01-preview" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -293,7 +299,7 @@ def _delete_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -363,6 +369,8 @@ def get_long_running_output(response): def _update_initial( self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2019-06-01-preview" + # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -374,7 +382,7 @@ def _update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -476,6 +484,8 @@ def list( ~azure.mgmt.sql.models.ServerPaged[~azure.mgmt.sql.models.Server] :raises: :class:`CloudError` """ + api_version = "2019-06-01-preview" + def prepare_request(next_link=None): if not next_link: # Construct URL @@ -487,7 +497,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') else: url = next_link @@ -547,6 +557,8 @@ def check_name_availability( """ parameters = models.CheckNameAvailabilityRequest(name=name) + api_version = "2019-06-01-preview" + # Construct URL url = self.check_name_availability.metadata['url'] path_format_arguments = { @@ -556,7 +568,7 @@ def check_name_availability( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -591,3 +603,108 @@ def check_name_availability( return deserialized check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability'} + + + def _import_database_initial( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2020-02-02-preview" + + # Construct URL + url = self.import_database.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ImportNewDatabaseDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ImportExportOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def import_database( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Imports a bacpac into a new database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The database import request parameters. + :type parameters: ~azure.mgmt.sql.models.ImportNewDatabaseDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ImportExportOperationResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ImportExportOperationResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ImportExportOperationResult]] + :raises: :class:`CloudError` + """ + raw_result = self._import_database_initial( + resource_group_name=resource_group_name, + server_name=server_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ImportExportOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + import_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import'} diff --git a/sdk/sql/azure-mgmt-sql/setup.py b/sdk/sql/azure-mgmt-sql/setup.py index fbf27d76244c..97474e8ab13e 100644 --- a/sdk/sql/azure-mgmt-sql/setup.py +++ b/sdk/sql/azure-mgmt-sql/setup.py @@ -36,7 +36,7 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') +with open(os.path.join(package_folder_path, 'version.py') if os.path.exists(os.path.join(package_folder_path, 'version.py')) else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', From 7387f8d51d1b70aa98e9b512b097fc5f468a8767 Mon Sep 17 00:00:00 2001 From: Changlong Liu Date: Thu, 3 Sep 2020 17:06:27 +0800 Subject: [PATCH 2/3] version 0.21.0 --- sdk/sql/azure-mgmt-sql/CHANGELOG.md | 25 +++++++++++++++++++ .../azure-mgmt-sql/azure/mgmt/sql/version.py | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/sdk/sql/azure-mgmt-sql/CHANGELOG.md b/sdk/sql/azure-mgmt-sql/CHANGELOG.md index fa7005d8c59e..bac9c7c4c673 100644 --- a/sdk/sql/azure-mgmt-sql/CHANGELOG.md +++ b/sdk/sql/azure-mgmt-sql/CHANGELOG.md @@ -1,5 +1,30 @@ # Release History +## 0.21.0 (2020-09-03) + +**Features** + + - Model DatabaseUpdate has a new parameter storage_account_type + - Model Database has a new parameter storage_account_type + - Model BackupShortTermRetentionPolicy has a new parameter diff_backup_interval_in_hours + - Model ManagedInstance has a new parameter storage_account_type + - Model ManagedInstance has a new parameter provisioning_state + - Model ManagedInstanceUpdate has a new parameter storage_account_type + - Model ManagedInstanceUpdate has a new parameter provisioning_state + - Added operation DatabasesOperations.list_inaccessible_by_server + - Added operation ServersOperations.import_database + - Added operation group ImportExportOperations + - Added operation group ServerAzureADOnlyAuthenticationsOperations + - Added operation group ManagedInstanceAzureADOnlyAuthenticationsOperations + +**Breaking changes** + + - Operation BackupShortTermRetentionPoliciesOperations.create_or_update has a new signature + - Operation BackupShortTermRetentionPoliciesOperations.update has a new signature + - Removed operation DatabasesOperations.import_method + - Removed operation DatabasesOperations.create_import_operation + - Removed operation ServerAzureADAdministratorsOperations.disable_azure_ad_only_authentication + ## 0.20.0 (2020-06-22) **Features** diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py index e42fe119c0b5..db03274825da 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.20.0" +VERSION = "0.21.0" From 5a1024c745c89d0bfd205ce719053f5698f9cdfc Mon Sep 17 00:00:00 2001 From: Changlong Liu Date: Thu, 3 Sep 2020 17:14:02 +0800 Subject: [PATCH 3/3] run test --- .../test_mgmt_sql.test_database.yaml | 155 +++++++----------- .../recordings/test_mgmt_sql.test_server.yaml | 122 +++++++------- 2 files changed, 117 insertions(+), 160 deletions(-) diff --git a/sdk/sql/azure-mgmt-sql/tests/recordings/test_mgmt_sql.test_database.yaml b/sdk/sql/azure-mgmt-sql/tests/recordings/test_mgmt_sql.test_database.yaml index b99ab1e5b477..6a35dd180b9d 100644 --- a/sdk/sql/azure-mgmt-sql/tests/recordings/test_mgmt_sql.test_database.yaml +++ b/sdk/sql/azure-mgmt-sql/tests/recordings/test_mgmt_sql.test_database.yaml @@ -13,30 +13,30 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06?api-version=2019-06-01-preview response: body: - string: '{"operation":"CreateLogicalDatabase","startTime":"2020-06-24T05:29:13.013Z"}' + string: '{"operation":"CreateLogicalDatabase","startTime":"2020-09-03T09:09:26.48Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/875d61e7-6906-4f27-83a0-6e81c48c35e8?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/296f2590-3c1c-4c78-a7ec-4cb0110b3fbd?api-version=2019-06-01-preview cache-control: - no-cache content-length: - - '76' + - '75' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:29:12 GMT + - Thu, 03 Sep 2020 09:09:26 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/875d61e7-6906-4f27-83a0-6e81c48c35e8?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/296f2590-3c1c-4c78-a7ec-4cb0110b3fbd?api-version=2019-06-01-preview pragma: - no-cache server: @@ -46,7 +46,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 202 message: Accepted @@ -60,65 +60,22 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/875d61e7-6906-4f27-83a0-6e81c48c35e8?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/296f2590-3c1c-4c78-a7ec-4cb0110b3fbd?api-version=2019-06-01-preview response: body: - string: '{"name":"875d61e7-6906-4f27-83a0-6e81c48c35e8","status":"InProgress","startTime":"2020-06-24T05:29:13.013Z"}' + string: '{"name":"296f2590-3c1c-4c78-a7ec-4cb0110b3fbd","status":"InProgress","startTime":"2020-09-03T09:09:26.48Z"}' headers: cache-control: - no-cache content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 24 Jun 2020 05:29:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/875d61e7-6906-4f27-83a0-6e81c48c35e8?api-version=2017-10-01-preview - response: - body: - string: '{"name":"875d61e7-6906-4f27-83a0-6e81c48c35e8","status":"InProgress","startTime":"2020-06-24T05:29:13.013Z"}' - headers: - cache-control: - - no-cache - content-length: - - '108' + - '107' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:29:43 GMT + - Thu, 03 Sep 2020 09:09:42 GMT expires: - '-1' pragma: @@ -146,22 +103,22 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/875d61e7-6906-4f27-83a0-6e81c48c35e8?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/296f2590-3c1c-4c78-a7ec-4cb0110b3fbd?api-version=2019-06-01-preview response: body: - string: '{"name":"875d61e7-6906-4f27-83a0-6e81c48c35e8","status":"Succeeded","startTime":"2020-06-24T05:29:13.013Z"}' + string: '{"name":"296f2590-3c1c-4c78-a7ec-4cb0110b3fbd","status":"Succeeded","startTime":"2020-09-03T09:09:26.48Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '106' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:29:58 GMT + - Thu, 03 Sep 2020 09:09:57 GMT expires: - '-1' pragma: @@ -189,22 +146,22 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06?api-version=2019-06-01-preview response: body: - string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"887a897f-bb0b-4ef2-a4fa-193a03d39c78","creationDate":"2020-06-24T05:29:49.29Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"westcentralus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-06-24T05:59:49.29Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06","name":"pyarmdb9c310b06","type":"Microsoft.Sql/servers/databases"}' + string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"fa67eeb4-ddef-4db2-b005-4e3824247dad","creationDate":"2020-09-03T09:09:56.857Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"westcentralus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-09-03T09:39:56.857Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"storageAccountType":"GRS"},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06","name":"pyarmdb9c310b06","type":"Microsoft.Sql/servers/databases"}' headers: cache-control: - no-cache content-length: - - '1019' + - '1048' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:29:59 GMT + - Thu, 03 Sep 2020 09:09:57 GMT expires: - '-1' pragma: @@ -232,24 +189,24 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06?api-version=2019-06-01-preview response: body: - string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"887a897f-bb0b-4ef2-a4fa-193a03d39c78","creationDate":"2020-06-24T05:29:49.29Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"westcentralus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-06-24T05:59:49.29Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06","name":"pyarmdb9c310b06","type":"Microsoft.Sql/servers/databases"}' + string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"fa67eeb4-ddef-4db2-b005-4e3824247dad","creationDate":"2020-09-03T09:09:56.857Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"westcentralus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-09-03T09:39:56.857Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"storageAccountType":"GRS"},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06","name":"pyarmdb9c310b06","type":"Microsoft.Sql/servers/databases"}' headers: cache-control: - no-cache content-length: - - '1019' + - '1048' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:29:59 GMT + - Thu, 03 Sep 2020 09:09:58 GMT expires: - '-1' pragma: @@ -277,24 +234,24 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases?api-version=2019-06-01-preview response: body: - string: '{"value":[{"sku":{"name":"System","tier":"System","capacity":0},"kind":"v12.0,system","managedBy":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":32212254720,"status":"Online","databaseId":"04ef4654-d5a8-4fda-bbd2-45d0f3085ec2","creationDate":"2020-06-24T05:29:00.367Z","currentServiceObjectiveName":"System2","requestedServiceObjectiveName":"System2","defaultSecondaryLocation":"westcentralus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"System","tier":"System","capacity":0}},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/master","name":"master","type":"Microsoft.Sql/servers/databases"},{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"887a897f-bb0b-4ef2-a4fa-193a03d39c78","creationDate":"2020-06-24T05:29:49.29Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"westcentralus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-06-24T05:59:49.29Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06","name":"pyarmdb9c310b06","type":"Microsoft.Sql/servers/databases"}]}' + string: '{"value":[{"sku":{"name":"System","tier":"System","capacity":0},"kind":"v12.0,system","managedBy":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":32212254720,"status":"Online","databaseId":"08c23c0f-aa23-47de-a1bf-6392b52a8fa8","creationDate":"2020-09-03T09:09:07.927Z","currentServiceObjectiveName":"System2","requestedServiceObjectiveName":"System2","defaultSecondaryLocation":"westcentralus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"System","tier":"System","capacity":0},"storageAccountType":"GRS"},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/master","name":"master","type":"Microsoft.Sql/servers/databases"},{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"fa67eeb4-ddef-4db2-b005-4e3824247dad","creationDate":"2020-09-03T09:09:56.857Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"westcentralus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-09-03T09:39:56.857Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"storageAccountType":"GRS"},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06","name":"pyarmdb9c310b06","type":"Microsoft.Sql/servers/databases"}]}' headers: cache-control: - no-cache content-length: - - '2038' + - '2094' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:29:59 GMT + - Thu, 03 Sep 2020 09:09:58 GMT expires: - '-1' pragma: @@ -322,8 +279,8 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: GET @@ -343,7 +300,7 @@ interactions: dataserviceversion: - 3.0; date: - - Wed, 24 Jun 2020 05:30:00 GMT + - Thu, 03 Sep 2020 09:09:58 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -369,30 +326,30 @@ interactions: Content-Length: - '0' User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/servers/mypysqlserverx9c310b06/databases/pyarmdb9c310b06?api-version=2019-06-01-preview response: body: - string: '{"operation":"DropLogicalDatabase","startTime":"2020-06-24T05:30:01.24Z"}' + string: '{"operation":"DropLogicalDatabase","startTime":"2020-09-03T09:10:00.233Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/28a00f10-e880-451d-bf90-8e48eb679524?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/88f9c699-ab41-4ae4-b237-9aecfb30caa5?api-version=2019-06-01-preview cache-control: - no-cache content-length: - - '73' + - '74' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:30:00 GMT + - Thu, 03 Sep 2020 09:10:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/28a00f10-e880-451d-bf90-8e48eb679524?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/88f9c699-ab41-4ae4-b237-9aecfb30caa5?api-version=2019-06-01-preview pragma: - no-cache server: @@ -416,22 +373,22 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/28a00f10-e880-451d-bf90-8e48eb679524?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_database9c310b06/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/88f9c699-ab41-4ae4-b237-9aecfb30caa5?api-version=2019-06-01-preview response: body: - string: '{"name":"28a00f10-e880-451d-bf90-8e48eb679524","status":"Succeeded","startTime":"2020-06-24T05:30:01.24Z"}' + string: '{"name":"88f9c699-ab41-4ae4-b237-9aecfb30caa5","status":"Succeeded","startTime":"2020-09-03T09:10:00.233Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:30:16 GMT + - Thu, 03 Sep 2020 09:10:15 GMT expires: - '-1' pragma: diff --git a/sdk/sql/azure-mgmt-sql/tests/recordings/test_mgmt_sql.test_server.yaml b/sdk/sql/azure-mgmt-sql/tests/recordings/test_mgmt_sql.test_server.yaml index 03080c7ffb64..3b737bc610c5 100644 --- a/sdk/sql/azure-mgmt-sql/tests/recordings/test_mgmt_sql.test_server.yaml +++ b/sdk/sql/azure-mgmt-sql/tests/recordings/test_mgmt_sql.test_server.yaml @@ -14,18 +14,18 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/servers/tstpysqlserverx87460a68?api-version=2019-06-01-preview response: body: - string: '{"operation":"UpsertLogicalServer","startTime":"2020-06-24T05:30:28.983Z"}' + string: '{"operation":"UpsertLogicalServer","startTime":"2020-09-03T09:10:29.353Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/1fc269fe-c787-44fb-b07b-f76b9bf5b146?api-version=2019-06-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e7166ff5-e447-432f-a8b8-d909d0e6e97d?api-version=2019-06-01-preview cache-control: - no-cache content-length: @@ -33,11 +33,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:30:28 GMT + - Thu, 03 Sep 2020 09:10:28 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverOperationResults/1fc269fe-c787-44fb-b07b-f76b9bf5b146?api-version=2019-06-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverOperationResults/e7166ff5-e447-432f-a8b8-d909d0e6e97d?api-version=2019-06-01-preview pragma: - no-cache server: @@ -61,13 +61,13 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/1fc269fe-c787-44fb-b07b-f76b9bf5b146?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e7166ff5-e447-432f-a8b8-d909d0e6e97d?api-version=2019-06-01-preview response: body: - string: '{"name":"1fc269fe-c787-44fb-b07b-f76b9bf5b146","status":"InProgress","startTime":"2020-06-24T05:30:28.983Z"}' + string: '{"name":"e7166ff5-e447-432f-a8b8-d909d0e6e97d","status":"InProgress","startTime":"2020-09-03T09:10:29.353Z"}' headers: cache-control: - no-cache @@ -76,7 +76,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:30:29 GMT + - Thu, 03 Sep 2020 09:10:30 GMT expires: - '-1' pragma: @@ -104,13 +104,13 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/1fc269fe-c787-44fb-b07b-f76b9bf5b146?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e7166ff5-e447-432f-a8b8-d909d0e6e97d?api-version=2019-06-01-preview response: body: - string: '{"name":"1fc269fe-c787-44fb-b07b-f76b9bf5b146","status":"InProgress","startTime":"2020-06-24T05:30:28.983Z"}' + string: '{"name":"e7166ff5-e447-432f-a8b8-d909d0e6e97d","status":"InProgress","startTime":"2020-09-03T09:10:29.353Z"}' headers: cache-control: - no-cache @@ -119,7 +119,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:30:31 GMT + - Thu, 03 Sep 2020 09:10:31 GMT expires: - '-1' pragma: @@ -147,13 +147,13 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/1fc269fe-c787-44fb-b07b-f76b9bf5b146?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e7166ff5-e447-432f-a8b8-d909d0e6e97d?api-version=2019-06-01-preview response: body: - string: '{"name":"1fc269fe-c787-44fb-b07b-f76b9bf5b146","status":"InProgress","startTime":"2020-06-24T05:30:28.983Z"}' + string: '{"name":"e7166ff5-e447-432f-a8b8-d909d0e6e97d","status":"InProgress","startTime":"2020-09-03T09:10:29.353Z"}' headers: cache-control: - no-cache @@ -162,7 +162,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:30:32 GMT + - Thu, 03 Sep 2020 09:10:33 GMT expires: - '-1' pragma: @@ -190,13 +190,13 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/1fc269fe-c787-44fb-b07b-f76b9bf5b146?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e7166ff5-e447-432f-a8b8-d909d0e6e97d?api-version=2019-06-01-preview response: body: - string: '{"name":"1fc269fe-c787-44fb-b07b-f76b9bf5b146","status":"InProgress","startTime":"2020-06-24T05:30:28.983Z"}' + string: '{"name":"e7166ff5-e447-432f-a8b8-d909d0e6e97d","status":"InProgress","startTime":"2020-09-03T09:10:29.353Z"}' headers: cache-control: - no-cache @@ -205,7 +205,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:30:33 GMT + - Thu, 03 Sep 2020 09:10:34 GMT expires: - '-1' pragma: @@ -233,13 +233,13 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/1fc269fe-c787-44fb-b07b-f76b9bf5b146?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e7166ff5-e447-432f-a8b8-d909d0e6e97d?api-version=2019-06-01-preview response: body: - string: '{"name":"1fc269fe-c787-44fb-b07b-f76b9bf5b146","status":"InProgress","startTime":"2020-06-24T05:30:28.983Z"}' + string: '{"name":"e7166ff5-e447-432f-a8b8-d909d0e6e97d","status":"InProgress","startTime":"2020-09-03T09:10:29.353Z"}' headers: cache-control: - no-cache @@ -248,7 +248,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:30:55 GMT + - Thu, 03 Sep 2020 09:10:54 GMT expires: - '-1' pragma: @@ -276,13 +276,13 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/1fc269fe-c787-44fb-b07b-f76b9bf5b146?api-version=2019-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e7166ff5-e447-432f-a8b8-d909d0e6e97d?api-version=2019-06-01-preview response: body: - string: '{"name":"1fc269fe-c787-44fb-b07b-f76b9bf5b146","status":"Succeeded","startTime":"2020-06-24T05:30:28.983Z"}' + string: '{"name":"e7166ff5-e447-432f-a8b8-d909d0e6e97d","status":"Succeeded","startTime":"2020-09-03T09:10:29.353Z"}' headers: cache-control: - no-cache @@ -291,7 +291,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:31:15 GMT + - Thu, 03 Sep 2020 09:11:15 GMT expires: - '-1' pragma: @@ -319,8 +319,8 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/servers/tstpysqlserverx87460a68?api-version=2019-06-01-preview response: @@ -334,7 +334,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:31:15 GMT + - Thu, 03 Sep 2020 09:11:16 GMT expires: - '-1' pragma: @@ -362,8 +362,8 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: GET @@ -379,7 +379,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:31:16 GMT + - Thu, 03 Sep 2020 09:11:16 GMT expires: - '-1' pragma: @@ -407,8 +407,8 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: GET @@ -424,7 +424,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:31:16 GMT + - Thu, 03 Sep 2020 09:11:16 GMT expires: - '-1' pragma: @@ -452,8 +452,8 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: GET @@ -469,7 +469,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:31:16 GMT + - Thu, 03 Sep 2020 09:11:16 GMT expires: - '-1' pragma: @@ -497,8 +497,8 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: GET @@ -518,7 +518,7 @@ interactions: dataserviceversion: - 3.0; date: - - Wed, 24 Jun 2020 05:31:16 GMT + - Thu, 03 Sep 2020 09:11:17 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -546,8 +546,8 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: PUT @@ -566,7 +566,7 @@ interactions: dataserviceversion: - 3.0; date: - - Wed, 24 Jun 2020 05:31:17 GMT + - Thu, 03 Sep 2020 09:11:18 GMT preference-applied: - return-content server: @@ -592,30 +592,30 @@ interactions: Content-Length: - '0' User-Agent: - - python/3.8.2 (Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29) msrest/0.6.16 - msrest_azure/0.6.3 azure-mgmt-sql/0.19.0 Azure-SDK-For-Python + - python/3.8.1 (Windows-10-10.0.19041-SP0) msrest/0.6.13 msrest_azure/0.6.3 + azure-mgmt-sql/0.21.0 Azure-SDK-For-Python accept-language: - en-US method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/servers/tstpysqlserverx87460a68?api-version=2019-06-01-preview response: body: - string: '{"operation":"DropLogicalServer","startTime":"2020-06-24T05:31:18.627Z"}' + string: '{"operation":"DropLogicalServer","startTime":"2020-09-03T09:11:18.96Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/eed9c4cb-f95f-4b01-af3b-648c2135ed05?api-version=2019-06-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/2a44c781-bc83-45ce-80e6-b262e117cc80?api-version=2019-06-01-preview cache-control: - no-cache content-length: - - '72' + - '71' content-type: - application/json; charset=utf-8 date: - - Wed, 24 Jun 2020 05:31:18 GMT + - Thu, 03 Sep 2020 09:11:18 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverOperationResults/eed9c4cb-f95f-4b01-af3b-648c2135ed05?api-version=2019-06-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_sql_test_server87460a68/providers/Microsoft.Sql/locations/westus2/serverOperationResults/2a44c781-bc83-45ce-80e6-b262e117cc80?api-version=2019-06-01-preview pragma: - no-cache server: