From e13e46206c2026cff18d6c8c2e9c79c253cd70c4 Mon Sep 17 00:00:00 2001 From: "Kaihui (Kerwin) Sun" Date: Thu, 28 Jan 2021 17:16:21 +0800 Subject: [PATCH] T1 synapse 2021 01 28 (#16395) * CodeGen from PR 12606 in Azure/azure-rest-api-specs [Synapse] - Update readme to use 2020-12-01 (#12606) * Update readme * Add clear-output-folder * Remove 2020-04-01-preview for csharp Co-authored-by: Dongwei Wang * test,version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: Dongwei Wang --- sdk/synapse/azure-mgmt-synapse/CHANGELOG.md | 37 + .../synapse/_synapse_management_client.py | 35 +- .../azure/mgmt/synapse/models/__init__.py | 56 +- .../azure/mgmt/synapse/models/_models.py | 657 ++++++++++++++--- .../azure/mgmt/synapse/models/_models_py3.py | 667 +++++++++++++++--- .../mgmt/synapse/models/_paged_models.py | 13 + .../_synapse_management_client_enums.py | 45 ++ .../azure/mgmt/synapse/operations/__init__.py | 14 +- .../operations/_big_data_pools_operations.py | 24 +- .../_data_masking_policies_operations.py | 19 +- .../_data_masking_rules_operations.py | 87 ++- ..._pool_blob_auditing_policies_operations.py | 4 +- ...ntegration_runtime_auth_keys_operations.py | 19 +- ...ion_runtime_connection_infos_operations.py | 12 +- ...egration_runtime_credentials_operations.py | 12 +- ...tion_runtime_monitoring_data_operations.py | 12 +- ...tion_runtime_node_ip_address_operations.py | 12 +- .../_integration_runtime_nodes_operations.py | 26 +- ...tion_runtime_object_metadata_operations.py | 19 +- .../_integration_runtime_status_operations.py | 12 +- .../_integration_runtimes_operations.py | 75 +- .../_ip_firewall_rules_operations.py | 24 +- .../synapse/operations/_keys_operations.py | 20 +- .../mgmt/synapse/operations/_operations.py | 20 +- ...private_endpoint_connections_operations.py | 20 +- ...connections_private_link_hub_operations.py | 8 +- ...k_hub_private_link_resources_operations.py | 180 +++++ .../_private_link_hubs_operations.py | 28 +- .../_private_link_resources_operations.py | 12 +- ...restorable_dropped_sql_pools_operations.py | 12 +- ..._pool_blob_auditing_policies_operations.py | 4 +- .../_sql_pool_columns_operations.py | 4 +- ...sql_pool_connection_policies_operations.py | 8 +- ...ta_warehouse_user_activities_operations.py | 4 +- ...sql_pool_geo_backup_policies_operations.py | 88 ++- ...l_maintenance_window_options_operations.py | 111 +++ ...sql_pool_maintenance_windows_operations.py | 180 +++++ ...l_pool_metadata_sync_configs_operations.py | 12 +- .../_sql_pool_operation_results_operations.py | 8 +- .../operations/_sql_pool_operations.py | 4 +- ...commended_sensitivity_labels_operations.py | 107 +++ .../_sql_pool_replication_links_operations.py | 12 +- .../_sql_pool_restore_points_operations.py | 8 +- .../_sql_pool_schemas_operations.py | 4 +- ...pool_security_alert_policies_operations.py | 4 +- ..._sql_pool_sensitivity_labels_operations.py | 75 +- .../_sql_pool_table_columns_operations.py | 4 +- .../operations/_sql_pool_tables_operations.py | 4 +- ...transparent_data_encryptions_operations.py | 12 +- .../operations/_sql_pool_usages_operations.py | 8 +- ...ty_assessment_rule_baselines_operations.py | 4 +- ...lnerability_assessment_scans_operations.py | 4 +- ...ol_vulnerability_assessments_operations.py | 4 +- ...sql_pool_workload_classifier_operations.py | 4 +- .../_sql_pool_workload_group_operations.py | 4 +- .../operations/_sql_pools_operations.py | 100 ++- .../_workspace_aad_admins_operations.py | 16 +- ...dentity_sql_control_settings_operations.py | 12 +- ...erver_blob_auditing_policies_operations.py | 4 +- ..._server_encryption_protector_operations.py | 377 ++++++++++ ...ended_blob_auditing_policies_operations.py | 4 +- ...erver_recoverable_sql_pools_operations.py} | 20 +- ...server_security_alert_policy_operations.py | 4 +- ...ce_managed_sql_server_usages_operations.py | 4 +- ...er_vulnerability_assessments_operations.py | 4 +- .../_workspace_sql_aad_admins_operations.py | 16 +- .../operations/_workspaces_operations.py | 28 +- .../azure/mgmt/synapse/version.py | 2 +- 68 files changed, 2855 insertions(+), 598 deletions(-) create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hub_private_link_resources_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_window_options_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_windows_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_recommended_sensitivity_labels_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py rename sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/{_workspace_managed_sql_server_recoverable_sqlpools_operations.py => _workspace_managed_sql_server_recoverable_sql_pools_operations.py} (92%) diff --git a/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md b/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md index 904eb673e60b..9b73d635c2aa 100644 --- a/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md +++ b/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md @@ -1,5 +1,42 @@ # Release History +## 0.7.0 (2021-01-28) + +**Features** + + - Model WorkspaceRepositoryConfiguration has a new parameter tenant_id + - Model WorkspaceRepositoryConfiguration has a new parameter last_commit_id + - Model SqlPoolPatchInfo has a new parameter storage_account_type + - Model Workspace has a new parameter adla_resource_id + - Model SensitivityLabel has a new parameter schema_name + - Model SensitivityLabel has a new parameter table_name + - Model SensitivityLabel has a new parameter column_name + - Model SensitivityLabel has a new parameter managed_by + - Model SensitivityLabel has a new parameter rank + - Model BigDataPoolResourceInfo has a new parameter cache_size + - Model BigDataPoolResourceInfo has a new parameter dynamic_executor_allocation + - Model BigDataPoolResourceInfo has a new parameter custom_libraries + - Model BigDataPoolResourceInfo has a new parameter last_succeeded_timestamp + - Model SqlPoolColumn has a new parameter is_computed + - Model SqlPool has a new parameter storage_account_type + - Added operation SqlPoolsOperations.rename + - Added operation DataMaskingRulesOperations.get + - Added operation SqlPoolSensitivityLabelsOperations.update + - Added operation SqlPoolGeoBackupPoliciesOperations.create_or_update + - Added operation group WorkspaceManagedSqlServerEncryptionProtectorOperations + - Added operation group PrivateLinkHubPrivateLinkResourcesOperations + - Added operation group WorkspaceManagedSqlServerRecoverableSqlPoolsOperations + - Added operation group SqlPoolMaintenanceWindowOptionsOperations + - Added operation group SqlPoolRecommendedSensitivityLabelsOperations + - Added operation group SqlPoolMaintenanceWindowsOperations + +**Breaking changes** + + - Model BigDataPoolResourceInfo no longer has parameter have_library_requirements_changed + - Model ErrorResponse has a new signature + - Model ErrorDetail has a new signature + - Removed operation group WorkspaceManagedSqlServerRecoverableSqlpoolsOperations + ## 0.6.0 (2020-12-17) **Features** diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py index 3c85defe4d99..da8325f5c26d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py @@ -23,11 +23,14 @@ from .operations import SqlPoolDataWarehouseUserActivitiesOperations from .operations import SqlPoolRestorePointsOperations from .operations import SqlPoolReplicationLinksOperations +from .operations import SqlPoolMaintenanceWindowsOperations +from .operations import SqlPoolMaintenanceWindowOptionsOperations from .operations import SqlPoolTransparentDataEncryptionsOperations from .operations import SqlPoolBlobAuditingPoliciesOperations from .operations import SqlPoolOperations from .operations import SqlPoolUsagesOperations from .operations import SqlPoolSensitivityLabelsOperations +from .operations import SqlPoolRecommendedSensitivityLabelsOperations from .operations import SqlPoolSchemasOperations from .operations import SqlPoolTablesOperations from .operations import SqlPoolTableColumnsOperations @@ -57,6 +60,7 @@ from .operations import IntegrationRuntimeMonitoringDataOperations from .operations import IntegrationRuntimeStatusOperations from .operations import PrivateLinkResourcesOperations +from .operations import PrivateLinkHubPrivateLinkResourcesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkHubsOperations from .operations import PrivateEndpointConnectionsPrivateLinkHubOperations @@ -64,8 +68,9 @@ from .operations import WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations from .operations import WorkspaceManagedSqlServerSecurityAlertPolicyOperations from .operations import WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations +from .operations import WorkspaceManagedSqlServerEncryptionProtectorOperations from .operations import WorkspaceManagedSqlServerUsagesOperations -from .operations import WorkspaceManagedSqlServerRecoverableSqlpoolsOperations +from .operations import WorkspaceManagedSqlServerRecoverableSqlPoolsOperations from .operations import KeysOperations from . import models @@ -96,6 +101,10 @@ class SynapseManagementClient(SDKClient): :vartype sql_pool_restore_points: azure.mgmt.synapse.operations.SqlPoolRestorePointsOperations :ivar sql_pool_replication_links: SqlPoolReplicationLinks operations :vartype sql_pool_replication_links: azure.mgmt.synapse.operations.SqlPoolReplicationLinksOperations + :ivar sql_pool_maintenance_windows: SqlPoolMaintenanceWindows operations + :vartype sql_pool_maintenance_windows: azure.mgmt.synapse.operations.SqlPoolMaintenanceWindowsOperations + :ivar sql_pool_maintenance_window_options: SqlPoolMaintenanceWindowOptions operations + :vartype sql_pool_maintenance_window_options: azure.mgmt.synapse.operations.SqlPoolMaintenanceWindowOptionsOperations :ivar sql_pool_transparent_data_encryptions: SqlPoolTransparentDataEncryptions operations :vartype sql_pool_transparent_data_encryptions: azure.mgmt.synapse.operations.SqlPoolTransparentDataEncryptionsOperations :ivar sql_pool_blob_auditing_policies: SqlPoolBlobAuditingPolicies operations @@ -106,6 +115,8 @@ class SynapseManagementClient(SDKClient): :vartype sql_pool_usages: azure.mgmt.synapse.operations.SqlPoolUsagesOperations :ivar sql_pool_sensitivity_labels: SqlPoolSensitivityLabels operations :vartype sql_pool_sensitivity_labels: azure.mgmt.synapse.operations.SqlPoolSensitivityLabelsOperations + :ivar sql_pool_recommended_sensitivity_labels: SqlPoolRecommendedSensitivityLabels operations + :vartype sql_pool_recommended_sensitivity_labels: azure.mgmt.synapse.operations.SqlPoolRecommendedSensitivityLabelsOperations :ivar sql_pool_schemas: SqlPoolSchemas operations :vartype sql_pool_schemas: azure.mgmt.synapse.operations.SqlPoolSchemasOperations :ivar sql_pool_tables: SqlPoolTables operations @@ -164,6 +175,8 @@ class SynapseManagementClient(SDKClient): :vartype integration_runtime_status: azure.mgmt.synapse.operations.IntegrationRuntimeStatusOperations :ivar private_link_resources: PrivateLinkResources operations :vartype private_link_resources: azure.mgmt.synapse.operations.PrivateLinkResourcesOperations + :ivar private_link_hub_private_link_resources: PrivateLinkHubPrivateLinkResources operations + :vartype private_link_hub_private_link_resources: azure.mgmt.synapse.operations.PrivateLinkHubPrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnections operations :vartype private_endpoint_connections: azure.mgmt.synapse.operations.PrivateEndpointConnectionsOperations :ivar private_link_hubs: PrivateLinkHubs operations @@ -178,10 +191,12 @@ class SynapseManagementClient(SDKClient): :vartype workspace_managed_sql_server_security_alert_policy: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerSecurityAlertPolicyOperations :ivar workspace_managed_sql_server_vulnerability_assessments: WorkspaceManagedSqlServerVulnerabilityAssessments operations :vartype workspace_managed_sql_server_vulnerability_assessments: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations + :ivar workspace_managed_sql_server_encryption_protector: WorkspaceManagedSqlServerEncryptionProtector operations + :vartype workspace_managed_sql_server_encryption_protector: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerEncryptionProtectorOperations :ivar workspace_managed_sql_server_usages: WorkspaceManagedSqlServerUsages operations :vartype workspace_managed_sql_server_usages: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerUsagesOperations - :ivar workspace_managed_sql_server_recoverable_sqlpools: WorkspaceManagedSqlServerRecoverableSqlpools operations - :vartype workspace_managed_sql_server_recoverable_sqlpools: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerRecoverableSqlpoolsOperations + :ivar workspace_managed_sql_server_recoverable_sql_pools: WorkspaceManagedSqlServerRecoverableSqlPools operations + :vartype workspace_managed_sql_server_recoverable_sql_pools: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerRecoverableSqlPoolsOperations :ivar keys: Keys operations :vartype keys: azure.mgmt.synapse.operations.KeysOperations @@ -200,7 +215,7 @@ def __init__( super(SynapseManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-06-01-preview' + self.api_version = '2020-12-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -224,6 +239,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.sql_pool_replication_links = SqlPoolReplicationLinksOperations( self._client, self.config, self._serialize, self._deserialize) + self.sql_pool_maintenance_windows = SqlPoolMaintenanceWindowsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.sql_pool_maintenance_window_options = SqlPoolMaintenanceWindowOptionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.sql_pool_transparent_data_encryptions = SqlPoolTransparentDataEncryptionsOperations( self._client, self.config, self._serialize, self._deserialize) self.sql_pool_blob_auditing_policies = SqlPoolBlobAuditingPoliciesOperations( @@ -234,6 +253,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.sql_pool_sensitivity_labels = SqlPoolSensitivityLabelsOperations( self._client, self.config, self._serialize, self._deserialize) + self.sql_pool_recommended_sensitivity_labels = SqlPoolRecommendedSensitivityLabelsOperations( + self._client, self.config, self._serialize, self._deserialize) self.sql_pool_schemas = SqlPoolSchemasOperations( self._client, self.config, self._serialize, self._deserialize) self.sql_pool_tables = SqlPoolTablesOperations( @@ -292,6 +313,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self.config, self._serialize, self._deserialize) + self.private_link_hub_private_link_resources = PrivateLinkHubPrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self.config, self._serialize, self._deserialize) self.private_link_hubs = PrivateLinkHubsOperations( @@ -306,9 +329,11 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workspace_managed_sql_server_vulnerability_assessments = WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations( self._client, self.config, self._serialize, self._deserialize) + self.workspace_managed_sql_server_encryption_protector = WorkspaceManagedSqlServerEncryptionProtectorOperations( + self._client, self.config, self._serialize, self._deserialize) self.workspace_managed_sql_server_usages = WorkspaceManagedSqlServerUsagesOperations( self._client, self.config, self._serialize, self._deserialize) - self.workspace_managed_sql_server_recoverable_sqlpools = WorkspaceManagedSqlServerRecoverableSqlpoolsOperations( + self.workspace_managed_sql_server_recoverable_sql_pools = WorkspaceManagedSqlServerRecoverableSqlPoolsOperations( self._client, self.config, self._serialize, self._deserialize) self.keys = KeysOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py index 693a1f1b3e15..03f7fc629e90 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py @@ -28,13 +28,14 @@ from ._models_py3 import DataMaskingPolicy from ._models_py3 import DataMaskingRule from ._models_py3 import DataWarehouseUserActivities + from ._models_py3 import DynamicExecutorAllocation from ._models_py3 import EncryptionDetails + from ._models_py3 import EncryptionProtector from ._models_py3 import EntityReference from ._models_py3 import EnvironmentVariableSetup from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorContract, ErrorContractException from ._models_py3 import ErrorDetail - from ._models_py3 import ErrorResponse + from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import ExtendedServerBlobAuditingPolicy from ._models_py3 import ExtendedSqlPoolBlobAuditingPolicy from ._models_py3 import GeoBackupPolicy @@ -59,11 +60,15 @@ from ._models_py3 import IpFirewallRuleInfo from ._models_py3 import IpFirewallRuleProperties from ._models_py3 import Key + from ._models_py3 import LibraryInfo from ._models_py3 import LibraryRequirements from ._models_py3 import LinkedIntegrationRuntime from ._models_py3 import LinkedIntegrationRuntimeKeyAuthorization from ._models_py3 import LinkedIntegrationRuntimeRbacAuthorization from ._models_py3 import LinkedIntegrationRuntimeType + from ._models_py3 import MaintenanceWindowOptions + from ._models_py3 import MaintenanceWindows + from ._models_py3 import MaintenanceWindowTimeRange from ._models_py3 import ManagedIdentity from ._models_py3 import ManagedIdentitySqlControlSettingsModel from ._models_py3 import ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity @@ -93,11 +98,14 @@ from ._models_py3 import QueryInterval from ._models_py3 import QueryMetric from ._models_py3 import QueryStatistic + from ._models_py3 import RecommendedSensitivityLabelUpdate + from ._models_py3 import RecommendedSensitivityLabelUpdateList from ._models_py3 import RecoverableSqlPool from ._models_py3 import ReplaceAllFirewallRulesOperationResponse from ._models_py3 import ReplaceAllIpFirewallRulesRequest from ._models_py3 import ReplicationLink from ._models_py3 import Resource + from ._models_py3 import ResourceMoveDefinition from ._models_py3 import RestorableDroppedSqlPool from ._models_py3 import RestorePoint from ._models_py3 import SecretBase @@ -106,6 +114,8 @@ from ._models_py3 import SelfHostedIntegrationRuntimeNode from ._models_py3 import SelfHostedIntegrationRuntimeStatus from ._models_py3 import SensitivityLabel + from ._models_py3 import SensitivityLabelUpdate + from ._models_py3 import SensitivityLabelUpdateList from ._models_py3 import ServerBlobAuditingPolicy from ._models_py3 import ServerSecurityAlertPolicy from ._models_py3 import ServerUsage @@ -172,13 +182,14 @@ from ._models import DataMaskingPolicy from ._models import DataMaskingRule from ._models import DataWarehouseUserActivities + from ._models import DynamicExecutorAllocation from ._models import EncryptionDetails + from ._models import EncryptionProtector from ._models import EntityReference from ._models import EnvironmentVariableSetup from ._models import ErrorAdditionalInfo - from ._models import ErrorContract, ErrorContractException from ._models import ErrorDetail - from ._models import ErrorResponse + from ._models import ErrorResponse, ErrorResponseException from ._models import ExtendedServerBlobAuditingPolicy from ._models import ExtendedSqlPoolBlobAuditingPolicy from ._models import GeoBackupPolicy @@ -203,11 +214,15 @@ from ._models import IpFirewallRuleInfo from ._models import IpFirewallRuleProperties from ._models import Key + from ._models import LibraryInfo from ._models import LibraryRequirements from ._models import LinkedIntegrationRuntime from ._models import LinkedIntegrationRuntimeKeyAuthorization from ._models import LinkedIntegrationRuntimeRbacAuthorization from ._models import LinkedIntegrationRuntimeType + from ._models import MaintenanceWindowOptions + from ._models import MaintenanceWindows + from ._models import MaintenanceWindowTimeRange from ._models import ManagedIdentity from ._models import ManagedIdentitySqlControlSettingsModel from ._models import ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity @@ -237,11 +252,14 @@ from ._models import QueryInterval from ._models import QueryMetric from ._models import QueryStatistic + from ._models import RecommendedSensitivityLabelUpdate + from ._models import RecommendedSensitivityLabelUpdateList from ._models import RecoverableSqlPool from ._models import ReplaceAllFirewallRulesOperationResponse from ._models import ReplaceAllIpFirewallRulesRequest from ._models import ReplicationLink from ._models import Resource + from ._models import ResourceMoveDefinition from ._models import RestorableDroppedSqlPool from ._models import RestorePoint from ._models import SecretBase @@ -250,6 +268,8 @@ from ._models import SelfHostedIntegrationRuntimeNode from ._models import SelfHostedIntegrationRuntimeStatus from ._models import SensitivityLabel + from ._models import SensitivityLabelUpdate + from ._models import SensitivityLabelUpdateList from ._models import ServerBlobAuditingPolicy from ._models import ServerSecurityAlertPolicy from ._models import ServerUsage @@ -299,6 +319,7 @@ from ._models import WorkspaceRepositoryConfiguration from ._paged_models import BigDataPoolResourceInfoPaged from ._paged_models import DataMaskingRulePaged +from ._paged_models import EncryptionProtectorPaged from ._paged_models import ExtendedServerBlobAuditingPolicyPaged from ._paged_models import ExtendedSqlPoolBlobAuditingPolicyPaged from ._paged_models import GeoBackupPolicyPaged @@ -337,6 +358,7 @@ NodeSizeFamily, ProvisioningState, OperationStatus, + StorageAccountType, GeoBackupPolicyState, QueryAggregationFunction, QueryExecutionType, @@ -345,9 +367,11 @@ RestorePointType, ReplicationRole, ReplicationState, + DayOfWeek, TransparentDataEncryptionStatus, BlobAuditingPolicyState, ManagementOperationState, + SensitivityLabelRank, ColumnDataType, VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, @@ -355,6 +379,8 @@ DataMaskingState, DataMaskingRuleState, DataMaskingFunction, + SensitivityLabelUpdateKind, + RecommendedSensitivityLabelUpdateKind, ResourceIdentityType, IntegrationRuntimeType, IntegrationRuntimeState, @@ -370,6 +396,7 @@ IntegrationRuntimeAutoUpdate, IntegrationRuntimeAuthKeyName, SsisObjectMetadataType, + ServerKeyType, SensitivityLabelSource, VulnerabilityAssessmentPolicyBaselineName, ) @@ -393,13 +420,14 @@ 'DataMaskingPolicy', 'DataMaskingRule', 'DataWarehouseUserActivities', + 'DynamicExecutorAllocation', 'EncryptionDetails', + 'EncryptionProtector', 'EntityReference', 'EnvironmentVariableSetup', 'ErrorAdditionalInfo', - 'ErrorContract', 'ErrorContractException', 'ErrorDetail', - 'ErrorResponse', + 'ErrorResponse', 'ErrorResponseException', 'ExtendedServerBlobAuditingPolicy', 'ExtendedSqlPoolBlobAuditingPolicy', 'GeoBackupPolicy', @@ -424,11 +452,15 @@ 'IpFirewallRuleInfo', 'IpFirewallRuleProperties', 'Key', + 'LibraryInfo', 'LibraryRequirements', 'LinkedIntegrationRuntime', 'LinkedIntegrationRuntimeKeyAuthorization', 'LinkedIntegrationRuntimeRbacAuthorization', 'LinkedIntegrationRuntimeType', + 'MaintenanceWindowOptions', + 'MaintenanceWindows', + 'MaintenanceWindowTimeRange', 'ManagedIdentity', 'ManagedIdentitySqlControlSettingsModel', 'ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity', @@ -458,11 +490,14 @@ 'QueryInterval', 'QueryMetric', 'QueryStatistic', + 'RecommendedSensitivityLabelUpdate', + 'RecommendedSensitivityLabelUpdateList', 'RecoverableSqlPool', 'ReplaceAllFirewallRulesOperationResponse', 'ReplaceAllIpFirewallRulesRequest', 'ReplicationLink', 'Resource', + 'ResourceMoveDefinition', 'RestorableDroppedSqlPool', 'RestorePoint', 'SecretBase', @@ -471,6 +506,8 @@ 'SelfHostedIntegrationRuntimeNode', 'SelfHostedIntegrationRuntimeStatus', 'SensitivityLabel', + 'SensitivityLabelUpdate', + 'SensitivityLabelUpdateList', 'ServerBlobAuditingPolicy', 'ServerSecurityAlertPolicy', 'ServerUsage', @@ -550,6 +587,7 @@ 'ExtendedServerBlobAuditingPolicyPaged', 'ServerSecurityAlertPolicyPaged', 'ServerVulnerabilityAssessmentPaged', + 'EncryptionProtectorPaged', 'ServerUsagePaged', 'RecoverableSqlPoolPaged', 'KeyPaged', @@ -557,6 +595,7 @@ 'NodeSizeFamily', 'ProvisioningState', 'OperationStatus', + 'StorageAccountType', 'GeoBackupPolicyState', 'QueryAggregationFunction', 'QueryExecutionType', @@ -565,9 +604,11 @@ 'RestorePointType', 'ReplicationRole', 'ReplicationState', + 'DayOfWeek', 'TransparentDataEncryptionStatus', 'BlobAuditingPolicyState', 'ManagementOperationState', + 'SensitivityLabelRank', 'ColumnDataType', 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', @@ -575,6 +616,8 @@ 'DataMaskingState', 'DataMaskingRuleState', 'DataMaskingFunction', + 'SensitivityLabelUpdateKind', + 'RecommendedSensitivityLabelUpdateKind', 'ResourceIdentityType', 'IntegrationRuntimeType', 'IntegrationRuntimeState', @@ -590,6 +633,7 @@ 'IntegrationRuntimeAutoUpdate', 'IntegrationRuntimeAuthKeyName', 'SsisObjectMetadataType', + 'ServerKeyType', 'SensitivityLabelSource', 'VulnerabilityAssessmentPolicyBaselineName', ] diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py index cfe82ec9b015..6117e3bcd1de 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py @@ -301,18 +301,23 @@ class BigDataPoolResourceInfo(TrackedResource): :param is_compute_isolation_enabled: Whether compute isolation is required or not. :type is_compute_isolation_enabled: bool - :param have_library_requirements_changed: Whether library requirements - changed. - :type have_library_requirements_changed: bool :param session_level_packages_enabled: Whether session level packages enabled. :type session_level_packages_enabled: bool + :param cache_size: The cache size + :type cache_size: int + :param dynamic_executor_allocation: Dynamic Executor Allocation + :type dynamic_executor_allocation: + ~azure.mgmt.synapse.models.DynamicExecutorAllocation :param spark_events_folder: The Spark events folder :type spark_events_folder: str :param node_count: The number of nodes in the Big Data pool. :type node_count: int :param library_requirements: Library version requirements :type library_requirements: ~azure.mgmt.synapse.models.LibraryRequirements + :param custom_libraries: List of custom libraries/packages associated with + the spark pool. + :type custom_libraries: list[~azure.mgmt.synapse.models.LibraryInfo] :param spark_config_properties: Spark configuration file to specify additional properties :type spark_config_properties: @@ -329,6 +334,9 @@ class BigDataPoolResourceInfo(TrackedResource): :param node_size_family: The kind of nodes that the Big Data pool provides. Possible values include: 'None', 'MemoryOptimized' :type node_size_family: str or ~azure.mgmt.synapse.models.NodeSizeFamily + :ivar last_succeeded_timestamp: The time when the Big Data pool was + updated successfully. + :vartype last_succeeded_timestamp: datetime """ _validation = { @@ -336,6 +344,7 @@ class BigDataPoolResourceInfo(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'last_succeeded_timestamp': {'readonly': True}, } _attribute_map = { @@ -349,16 +358,19 @@ class BigDataPoolResourceInfo(TrackedResource): 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'auto_pause': {'key': 'properties.autoPause', 'type': 'AutoPauseProperties'}, 'is_compute_isolation_enabled': {'key': 'properties.isComputeIsolationEnabled', 'type': 'bool'}, - 'have_library_requirements_changed': {'key': 'properties.haveLibraryRequirementsChanged', 'type': 'bool'}, 'session_level_packages_enabled': {'key': 'properties.sessionLevelPackagesEnabled', 'type': 'bool'}, + 'cache_size': {'key': 'properties.cacheSize', 'type': 'int'}, + 'dynamic_executor_allocation': {'key': 'properties.dynamicExecutorAllocation', 'type': 'DynamicExecutorAllocation'}, 'spark_events_folder': {'key': 'properties.sparkEventsFolder', 'type': 'str'}, 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, 'library_requirements': {'key': 'properties.libraryRequirements', 'type': 'LibraryRequirements'}, + 'custom_libraries': {'key': 'properties.customLibraries', 'type': '[LibraryInfo]'}, 'spark_config_properties': {'key': 'properties.sparkConfigProperties', 'type': 'LibraryRequirements'}, 'spark_version': {'key': 'properties.sparkVersion', 'type': 'str'}, 'default_spark_log_folder': {'key': 'properties.defaultSparkLogFolder', 'type': 'str'}, 'node_size': {'key': 'properties.nodeSize', 'type': 'str'}, 'node_size_family': {'key': 'properties.nodeSizeFamily', 'type': 'str'}, + 'last_succeeded_timestamp': {'key': 'properties.lastSucceededTimestamp', 'type': 'iso-8601'}, } def __init__(self, **kwargs): @@ -368,16 +380,19 @@ def __init__(self, **kwargs): self.creation_date = kwargs.get('creation_date', None) self.auto_pause = kwargs.get('auto_pause', None) self.is_compute_isolation_enabled = kwargs.get('is_compute_isolation_enabled', None) - self.have_library_requirements_changed = kwargs.get('have_library_requirements_changed', None) self.session_level_packages_enabled = kwargs.get('session_level_packages_enabled', None) + self.cache_size = kwargs.get('cache_size', None) + self.dynamic_executor_allocation = kwargs.get('dynamic_executor_allocation', None) self.spark_events_folder = kwargs.get('spark_events_folder', None) self.node_count = kwargs.get('node_count', None) self.library_requirements = kwargs.get('library_requirements', None) + self.custom_libraries = kwargs.get('custom_libraries', None) self.spark_config_properties = kwargs.get('spark_config_properties', None) self.spark_version = kwargs.get('spark_version', None) self.default_spark_log_folder = kwargs.get('default_spark_log_folder', None) self.node_size = kwargs.get('node_size', None) self.node_size_family = kwargs.get('node_size_family', None) + self.last_succeeded_timestamp = None class CheckNameAvailabilityRequest(Model): @@ -433,51 +448,12 @@ def __init__(self, **kwargs): class CloudError(Model): - """The object that defines the structure of an Azure Synapse error response. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. - :type code: str - :param message: Required. Error message. - :type message: str - :param target: Property name/path in request associated with error. - :type target: str - :param details: Array with additional error details. - :type details: list[~azure.mgmt.synapse.models.CloudError] + """CloudError. """ - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - _attribute_map = { - 'code': {'key': 'error.code', 'type': 'str'}, - 'message': {'key': 'error.message', 'type': 'str'}, - 'target': {'key': 'error.target', 'type': 'str'}, - 'details': {'key': 'error.details', 'type': '[CloudError]'}, } - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - class CustomSetupBase(Model): """The base definition of the custom setup. @@ -914,6 +890,23 @@ def __init__(self, **kwargs): self.active_queries_count = None +class DynamicExecutorAllocation(Model): + """Dynamic Executor Allocation Properties. + + :param enabled: Indicates whether Dynamic Executor Allocation is enabled + or not. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DynamicExecutorAllocation, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + class EncryptionDetails(Model): """Details of the encryption associated with the workspace. @@ -941,6 +934,77 @@ def __init__(self, **kwargs): self.cmk = kwargs.get('cmk', None) +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.synapse.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.location = None + self.subregion = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + class EntityReference(Model): """The entity reference. @@ -1023,66 +1087,8 @@ def __init__(self, **kwargs): self.info = None -class ErrorContract(Model): - """Error details. - - Contains details when the response code indicates an error. - - :param error: The error details. - :type error: ~azure.mgmt.synapse.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, **kwargs): - super(ErrorContract, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorContractException(HttpOperationError): - """Server responsed with exception of type: 'ErrorContract'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorContractException, self).__init__(deserialize, response, 'ErrorContract', *args) - - class ErrorDetail(Model): - """Error details. - - :param message: Error message - :type message: str - :param code: Error code - :type code: str - :param target: Error target - :type target: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetail, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - - -class ErrorResponse(Model): - """Error Response. - - Common error response for all Azure Resource Manager APIs to return error - details for failed operations. (This also follows the OData error response - format.). + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -1094,7 +1100,7 @@ class ErrorResponse(Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.synapse.models.ErrorResponse] + :vartype details: list[~azure.mgmt.synapse.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~azure.mgmt.synapse.models.ErrorAdditionalInfo] @@ -1112,12 +1118,12 @@ class ErrorResponse(Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -1125,6 +1131,38 @@ def __init__(self, **kwargs): self.additional_info = None +class ErrorResponse(Model): + """Error response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). + + :param error: The error object. + :type error: ~azure.mgmt.synapse.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + class ExtendedServerBlobAuditingPolicy(ProxyResource): """An extended server blob auditing policy. @@ -2332,6 +2370,57 @@ def __init__(self, **kwargs): self.key_vault_url = kwargs.get('key_vault_url', None) +class LibraryInfo(Model): + """Information about a library/package created at the workspace level. + + Library/package information of a Big Data pool powered by Apache Spark. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: Name of the library. + :type name: str + :param path: Storage blob path of library. + :type path: str + :param container_name: Storage blob container name. + :type container_name: str + :ivar uploaded_timestamp: The last update time of the library. + :vartype uploaded_timestamp: datetime + :param type: Type of the library. + :type type: str + :ivar provisioning_status: Provisioning status of the library/package. + :vartype provisioning_status: str + :ivar creator_id: Creator Id of the library/package. + :vartype creator_id: str + """ + + _validation = { + 'uploaded_timestamp': {'readonly': True}, + 'provisioning_status': {'readonly': True}, + 'creator_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'uploaded_timestamp': {'key': 'uploadedTimestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_status': {'key': 'provisioningStatus', 'type': 'str'}, + 'creator_id': {'key': 'creatorId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LibraryInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.path = kwargs.get('path', None) + self.container_name = kwargs.get('container_name', None) + self.uploaded_timestamp = None + self.type = kwargs.get('type', None) + self.provisioning_status = None + self.creator_id = None + + class LibraryRequirements(Model): """Spark pool library version requirements. @@ -2497,6 +2586,136 @@ def __init__(self, **kwargs): self.authorization_type = 'RBAC' +class MaintenanceWindowOptions(ProxyResource): + """Maintenance window options. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param is_enabled: Whether maintenance windows are enabled for the + database. + :type is_enabled: bool + :param maintenance_window_cycles: Available maintenance cycles e.g. + {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. + :type maintenance_window_cycles: + list[~azure.mgmt.synapse.models.MaintenanceWindowTimeRange] + :param min_duration_in_minutes: Minimum duration of maintenance window. + :type min_duration_in_minutes: int + :param default_duration_in_minutes: Default duration for maintenance + window. + :type default_duration_in_minutes: int + :param min_cycles: Minimum number of maintenance windows cycles to be set + on the database. + :type min_cycles: int + :param time_granularity_in_minutes: Time granularity in minutes for + maintenance windows. + :type time_granularity_in_minutes: int + :param allow_multiple_maintenance_windows_per_cycle: Whether we allow + multiple maintenance windows per cycle. + :type allow_multiple_maintenance_windows_per_cycle: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'maintenance_window_cycles': {'key': 'properties.maintenanceWindowCycles', 'type': '[MaintenanceWindowTimeRange]'}, + 'min_duration_in_minutes': {'key': 'properties.minDurationInMinutes', 'type': 'int'}, + 'default_duration_in_minutes': {'key': 'properties.defaultDurationInMinutes', 'type': 'int'}, + 'min_cycles': {'key': 'properties.minCycles', 'type': 'int'}, + 'time_granularity_in_minutes': {'key': 'properties.timeGranularityInMinutes', 'type': 'int'}, + 'allow_multiple_maintenance_windows_per_cycle': {'key': 'properties.allowMultipleMaintenanceWindowsPerCycle', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MaintenanceWindowOptions, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.maintenance_window_cycles = kwargs.get('maintenance_window_cycles', None) + self.min_duration_in_minutes = kwargs.get('min_duration_in_minutes', None) + self.default_duration_in_minutes = kwargs.get('default_duration_in_minutes', None) + self.min_cycles = kwargs.get('min_cycles', None) + self.time_granularity_in_minutes = kwargs.get('time_granularity_in_minutes', None) + self.allow_multiple_maintenance_windows_per_cycle = kwargs.get('allow_multiple_maintenance_windows_per_cycle', None) + + +class MaintenanceWindows(ProxyResource): + """Maintenance windows. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param time_ranges: + :type time_ranges: + list[~azure.mgmt.synapse.models.MaintenanceWindowTimeRange] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time_ranges': {'key': 'properties.timeRanges', 'type': '[MaintenanceWindowTimeRange]'}, + } + + def __init__(self, **kwargs): + super(MaintenanceWindows, self).__init__(**kwargs) + self.time_ranges = kwargs.get('time_ranges', None) + + +class MaintenanceWindowTimeRange(Model): + """Maintenance window time range. + + :param day_of_week: Day of maintenance window. Possible values include: + 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + 'Saturday' + :type day_of_week: str or ~azure.mgmt.synapse.models.DayOfWeek + :param start_time: Start time minutes offset from 12am. + :type start_time: str + :param duration: Duration of maintenance window in minutes. + :type duration: str + """ + + _attribute_map = { + 'day_of_week': {'key': 'dayOfWeek', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaintenanceWindowTimeRange, self).__init__(**kwargs) + self.day_of_week = kwargs.get('day_of_week', None) + self.start_time = kwargs.get('start_time', None) + self.duration = kwargs.get('duration', None) + + class ManagedIdentity(Model): """The workspace managed identity. @@ -3540,6 +3759,78 @@ def __init__(self, **kwargs): self.intervals = None +class RecommendedSensitivityLabelUpdate(ProxyResource): + """A recommended sensitivity label update operation. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param op: Required. Possible values include: 'enable', 'disable' + :type op: str or + ~azure.mgmt.synapse.models.RecommendedSensitivityLabelUpdateKind + :param schema: Required. Schema name of the column to update. + :type schema: str + :param table: Required. Table name of the column to update. + :type table: str + :param column: Required. Column name to update. + :type column: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'op': {'required': True}, + 'schema': {'required': True}, + 'table': {'required': True}, + 'column': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'op': {'key': 'properties.op', 'type': 'RecommendedSensitivityLabelUpdateKind'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'column': {'key': 'properties.column', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecommendedSensitivityLabelUpdate, self).__init__(**kwargs) + self.op = kwargs.get('op', None) + self.schema = kwargs.get('schema', None) + self.table = kwargs.get('table', None) + self.column = kwargs.get('column', None) + + +class RecommendedSensitivityLabelUpdateList(Model): + """A list of recommended sensitivity label update operations. + + :param operations: + :type operations: + list[~azure.mgmt.synapse.models.RecommendedSensitivityLabelUpdate] + """ + + _attribute_map = { + 'operations': {'key': 'operations', 'type': '[RecommendedSensitivityLabelUpdate]'}, + } + + def __init__(self, **kwargs): + super(RecommendedSensitivityLabelUpdateList, self).__init__(**kwargs) + self.operations = kwargs.get('operations', None) + + class RecoverableSqlPool(ProxyResource): """A recoverable sql pool. @@ -3724,6 +4015,28 @@ def __init__(self, **kwargs): self.replication_state = None +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + class RestorableDroppedSqlPool(ProxyResource): """A restorable dropped Sql pool. @@ -4234,6 +4547,12 @@ class SensitivityLabel(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str + :ivar schema_name: The schema name. + :vartype schema_name: str + :ivar table_name: The table name. + :vartype table_name: str + :ivar column_name: The column name. + :vartype column_name: str :param label_name: The label name. :type label_name: str :param label_id: The label ID. @@ -4246,33 +4565,127 @@ class SensitivityLabel(ProxyResource): recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. :vartype is_disabled: bool + :param rank: Possible values include: 'None', 'Low', 'Medium', 'High', + 'Critical' + :type rank: str or ~azure.mgmt.synapse.models.SensitivityLabelRank + :ivar managed_by: managed by + :vartype managed_by: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'schema_name': {'readonly': True}, + 'table_name': {'readonly': True}, + 'column_name': {'readonly': True}, 'is_disabled': {'readonly': True}, + 'managed_by': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, 'label_name': {'key': 'properties.labelName', 'type': 'str'}, 'label_id': {'key': 'properties.labelId', 'type': 'str'}, 'information_type': {'key': 'properties.informationType', 'type': 'str'}, 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + 'rank': {'key': 'properties.rank', 'type': 'SensitivityLabelRank'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, } def __init__(self, **kwargs): super(SensitivityLabel, self).__init__(**kwargs) + self.schema_name = None + self.table_name = None + self.column_name = None self.label_name = kwargs.get('label_name', None) self.label_id = kwargs.get('label_id', None) self.information_type = kwargs.get('information_type', None) self.information_type_id = kwargs.get('information_type_id', None) self.is_disabled = None + self.rank = kwargs.get('rank', None) + self.managed_by = None + + +class SensitivityLabelUpdate(ProxyResource): + """A sensitivity label update operation. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param op: Required. Possible values include: 'set', 'remove' + :type op: str or ~azure.mgmt.synapse.models.SensitivityLabelUpdateKind + :param schema: Required. Schema name of the column to update. + :type schema: str + :param table: Required. Table name of the column to update. + :type table: str + :param column: Required. Column name to update. + :type column: str + :param sensitivity_label: The sensitivity label information to apply on a + column. + :type sensitivity_label: ~azure.mgmt.synapse.models.SensitivityLabel + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'op': {'required': True}, + 'schema': {'required': True}, + 'table': {'required': True}, + 'column': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'op': {'key': 'properties.op', 'type': 'SensitivityLabelUpdateKind'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'column': {'key': 'properties.column', 'type': 'str'}, + 'sensitivity_label': {'key': 'properties.sensitivityLabel', 'type': 'SensitivityLabel'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabelUpdate, self).__init__(**kwargs) + self.op = kwargs.get('op', None) + self.schema = kwargs.get('schema', None) + self.table = kwargs.get('table', None) + self.column = kwargs.get('column', None) + self.sensitivity_label = kwargs.get('sensitivity_label', None) + + +class SensitivityLabelUpdateList(Model): + """A list of sensitivity label update operations. + + :param operations: + :type operations: list[~azure.mgmt.synapse.models.SensitivityLabelUpdate] + """ + + _attribute_map = { + 'operations': {'key': 'operations', 'type': '[SensitivityLabelUpdate]'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabelUpdateList, self).__init__(**kwargs) + self.operations = kwargs.get('operations', None) class ServerBlobAuditingPolicy(ProxyResource): @@ -4703,6 +5116,10 @@ class SqlPool(TrackedResource): :type create_mode: str :param creation_date: Date the SQL pool was created :type creation_date: datetime + :param storage_account_type: The storage account type used to store + backups for this sql pool. Possible values include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.synapse.models.StorageAccountType """ _validation = { @@ -4728,6 +5145,7 @@ class SqlPool(TrackedResource): 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'str'}, 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, } def __init__(self, **kwargs): @@ -4742,6 +5160,7 @@ def __init__(self, **kwargs): self.restore_point_in_time = kwargs.get('restore_point_in_time', None) self.create_mode = kwargs.get('create_mode', None) self.creation_date = kwargs.get('creation_date', None) + self.storage_account_type = kwargs.get('storage_account_type', None) class SqlPoolBlobAuditingPolicy(ProxyResource): @@ -4921,12 +5340,15 @@ class SqlPoolColumn(ProxyResource): 'varbinary', 'varchar', 'binary', 'char', 'timestamp', 'nvarchar', 'nchar', 'xml', 'sysname' :type column_type: str or ~azure.mgmt.synapse.models.ColumnDataType + :ivar is_computed: Indicates whether column value is computed or not + :vartype is_computed: bool """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'is_computed': {'readonly': True}, } _attribute_map = { @@ -4934,11 +5356,13 @@ class SqlPoolColumn(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'column_type': {'key': 'properties.columnType', 'type': 'str'}, + 'is_computed': {'key': 'properties.isComputed', 'type': 'bool'}, } def __init__(self, **kwargs): super(SqlPoolColumn, self).__init__(**kwargs) self.column_type = kwargs.get('column_type', None) + self.is_computed = None class SqlPoolConnectionPolicy(ProxyResource): @@ -5146,6 +5570,10 @@ class SqlPoolPatchInfo(Model): :type create_mode: str :param creation_date: Date the SQL pool was created :type creation_date: datetime + :param storage_account_type: The storage account type used to store + backups for this sql pool. Possible values include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.synapse.models.StorageAccountType """ _attribute_map = { @@ -5161,6 +5589,7 @@ class SqlPoolPatchInfo(Model): 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'str'}, 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, } def __init__(self, **kwargs): @@ -5177,6 +5606,7 @@ def __init__(self, **kwargs): self.restore_point_in_time = kwargs.get('restore_point_in_time', None) self.create_mode = kwargs.get('create_mode', None) self.creation_date = kwargs.get('creation_date', None) + self.storage_account_type = kwargs.get('storage_account_type', None) class SqlPoolSchema(ProxyResource): @@ -6437,6 +6867,8 @@ class Workspace(TrackedResource): :param purview_configuration: Purview Configuration :type purview_configuration: ~azure.mgmt.synapse.models.PurviewConfiguration + :ivar adla_resource_id: The ADLA resource ID. + :vartype adla_resource_id: str :param identity: Identity of the workspace :type identity: ~azure.mgmt.synapse.models.ManagedIdentity """ @@ -6449,6 +6881,7 @@ class Workspace(TrackedResource): 'provisioning_state': {'readonly': True}, 'workspace_uid': {'readonly': True}, 'extra_properties': {'readonly': True}, + 'adla_resource_id': {'readonly': True}, } _attribute_map = { @@ -6472,6 +6905,7 @@ class Workspace(TrackedResource): 'managed_virtual_network_settings': {'key': 'properties.managedVirtualNetworkSettings', 'type': 'ManagedVirtualNetworkSettings'}, 'workspace_repository_configuration': {'key': 'properties.workspaceRepositoryConfiguration', 'type': 'WorkspaceRepositoryConfiguration'}, 'purview_configuration': {'key': 'properties.purviewConfiguration', 'type': 'PurviewConfiguration'}, + 'adla_resource_id': {'key': 'properties.adlaResourceId', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, } @@ -6492,6 +6926,7 @@ def __init__(self, **kwargs): self.managed_virtual_network_settings = kwargs.get('managed_virtual_network_settings', None) self.workspace_repository_configuration = kwargs.get('workspace_repository_configuration', None) self.purview_configuration = kwargs.get('purview_configuration', None) + self.adla_resource_id = None self.identity = kwargs.get('identity', None) @@ -6637,6 +7072,10 @@ class WorkspaceRepositoryConfiguration(Model): :type collaboration_branch: str :param root_folder: Root folder to use in the repository :type root_folder: str + :param last_commit_id: The last commit ID + :type last_commit_id: str + :param tenant_id: The VSTS tenant ID + :type tenant_id: str """ _attribute_map = { @@ -6647,6 +7086,8 @@ class WorkspaceRepositoryConfiguration(Model): 'repository_name': {'key': 'repositoryName', 'type': 'str'}, 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } def __init__(self, **kwargs): @@ -6658,3 +7099,5 @@ def __init__(self, **kwargs): self.repository_name = kwargs.get('repository_name', None) self.collaboration_branch = kwargs.get('collaboration_branch', None) self.root_folder = kwargs.get('root_folder', None) + self.last_commit_id = kwargs.get('last_commit_id', None) + self.tenant_id = kwargs.get('tenant_id', None) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py index 9e57216dc5d1..17208851e6f2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py @@ -301,18 +301,23 @@ class BigDataPoolResourceInfo(TrackedResource): :param is_compute_isolation_enabled: Whether compute isolation is required or not. :type is_compute_isolation_enabled: bool - :param have_library_requirements_changed: Whether library requirements - changed. - :type have_library_requirements_changed: bool :param session_level_packages_enabled: Whether session level packages enabled. :type session_level_packages_enabled: bool + :param cache_size: The cache size + :type cache_size: int + :param dynamic_executor_allocation: Dynamic Executor Allocation + :type dynamic_executor_allocation: + ~azure.mgmt.synapse.models.DynamicExecutorAllocation :param spark_events_folder: The Spark events folder :type spark_events_folder: str :param node_count: The number of nodes in the Big Data pool. :type node_count: int :param library_requirements: Library version requirements :type library_requirements: ~azure.mgmt.synapse.models.LibraryRequirements + :param custom_libraries: List of custom libraries/packages associated with + the spark pool. + :type custom_libraries: list[~azure.mgmt.synapse.models.LibraryInfo] :param spark_config_properties: Spark configuration file to specify additional properties :type spark_config_properties: @@ -329,6 +334,9 @@ class BigDataPoolResourceInfo(TrackedResource): :param node_size_family: The kind of nodes that the Big Data pool provides. Possible values include: 'None', 'MemoryOptimized' :type node_size_family: str or ~azure.mgmt.synapse.models.NodeSizeFamily + :ivar last_succeeded_timestamp: The time when the Big Data pool was + updated successfully. + :vartype last_succeeded_timestamp: datetime """ _validation = { @@ -336,6 +344,7 @@ class BigDataPoolResourceInfo(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'last_succeeded_timestamp': {'readonly': True}, } _attribute_map = { @@ -349,35 +358,41 @@ class BigDataPoolResourceInfo(TrackedResource): 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'auto_pause': {'key': 'properties.autoPause', 'type': 'AutoPauseProperties'}, 'is_compute_isolation_enabled': {'key': 'properties.isComputeIsolationEnabled', 'type': 'bool'}, - 'have_library_requirements_changed': {'key': 'properties.haveLibraryRequirementsChanged', 'type': 'bool'}, 'session_level_packages_enabled': {'key': 'properties.sessionLevelPackagesEnabled', 'type': 'bool'}, + 'cache_size': {'key': 'properties.cacheSize', 'type': 'int'}, + 'dynamic_executor_allocation': {'key': 'properties.dynamicExecutorAllocation', 'type': 'DynamicExecutorAllocation'}, 'spark_events_folder': {'key': 'properties.sparkEventsFolder', 'type': 'str'}, 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, 'library_requirements': {'key': 'properties.libraryRequirements', 'type': 'LibraryRequirements'}, + 'custom_libraries': {'key': 'properties.customLibraries', 'type': '[LibraryInfo]'}, 'spark_config_properties': {'key': 'properties.sparkConfigProperties', 'type': 'LibraryRequirements'}, 'spark_version': {'key': 'properties.sparkVersion', 'type': 'str'}, 'default_spark_log_folder': {'key': 'properties.defaultSparkLogFolder', 'type': 'str'}, 'node_size': {'key': 'properties.nodeSize', 'type': 'str'}, 'node_size_family': {'key': 'properties.nodeSizeFamily', 'type': 'str'}, + 'last_succeeded_timestamp': {'key': 'properties.lastSucceededTimestamp', 'type': 'iso-8601'}, } - def __init__(self, *, location: str, tags=None, provisioning_state: str=None, auto_scale=None, creation_date=None, auto_pause=None, is_compute_isolation_enabled: bool=None, have_library_requirements_changed: bool=None, session_level_packages_enabled: bool=None, spark_events_folder: str=None, node_count: int=None, library_requirements=None, spark_config_properties=None, spark_version: str=None, default_spark_log_folder: str=None, node_size=None, node_size_family=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, provisioning_state: str=None, auto_scale=None, creation_date=None, auto_pause=None, is_compute_isolation_enabled: bool=None, session_level_packages_enabled: bool=None, cache_size: int=None, dynamic_executor_allocation=None, spark_events_folder: str=None, node_count: int=None, library_requirements=None, custom_libraries=None, spark_config_properties=None, spark_version: str=None, default_spark_log_folder: str=None, node_size=None, node_size_family=None, **kwargs) -> None: super(BigDataPoolResourceInfo, self).__init__(tags=tags, location=location, **kwargs) self.provisioning_state = provisioning_state self.auto_scale = auto_scale self.creation_date = creation_date self.auto_pause = auto_pause self.is_compute_isolation_enabled = is_compute_isolation_enabled - self.have_library_requirements_changed = have_library_requirements_changed self.session_level_packages_enabled = session_level_packages_enabled + self.cache_size = cache_size + self.dynamic_executor_allocation = dynamic_executor_allocation self.spark_events_folder = spark_events_folder self.node_count = node_count self.library_requirements = library_requirements + self.custom_libraries = custom_libraries self.spark_config_properties = spark_config_properties self.spark_version = spark_version self.default_spark_log_folder = default_spark_log_folder self.node_size = node_size self.node_size_family = node_size_family + self.last_succeeded_timestamp = None class CheckNameAvailabilityRequest(Model): @@ -433,51 +448,12 @@ def __init__(self, *, message: str=None, available: bool=None, reason: str=None, class CloudError(Model): - """The object that defines the structure of an Azure Synapse error response. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. - :type code: str - :param message: Required. Error message. - :type message: str - :param target: Property name/path in request associated with error. - :type target: str - :param details: Array with additional error details. - :type details: list[~azure.mgmt.synapse.models.CloudError] + """CloudError. """ - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - _attribute_map = { - 'code': {'key': 'error.code', 'type': 'str'}, - 'message': {'key': 'error.message', 'type': 'str'}, - 'target': {'key': 'error.target', 'type': 'str'}, - 'details': {'key': 'error.details', 'type': '[CloudError]'}, } - def __init__(self, *, code: str, message: str, target: str=None, details=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - class CustomSetupBase(Model): """The base definition of the custom setup. @@ -914,6 +890,23 @@ def __init__(self, **kwargs) -> None: self.active_queries_count = None +class DynamicExecutorAllocation(Model): + """Dynamic Executor Allocation Properties. + + :param enabled: Indicates whether Dynamic Executor Allocation is enabled + or not. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(DynamicExecutorAllocation, self).__init__(**kwargs) + self.enabled = enabled + + class EncryptionDetails(Model): """Details of the encryption associated with the workspace. @@ -941,6 +934,77 @@ def __init__(self, *, cmk=None, **kwargs) -> None: self.cmk = cmk +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.synapse.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.location = None + self.subregion = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + class EntityReference(Model): """The entity reference. @@ -1023,66 +1087,8 @@ def __init__(self, **kwargs) -> None: self.info = None -class ErrorContract(Model): - """Error details. - - Contains details when the response code indicates an error. - - :param error: The error details. - :type error: ~azure.mgmt.synapse.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ErrorContract, self).__init__(**kwargs) - self.error = error - - -class ErrorContractException(HttpOperationError): - """Server responsed with exception of type: 'ErrorContract'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorContractException, self).__init__(deserialize, response, 'ErrorContract', *args) - - class ErrorDetail(Model): - """Error details. - - :param message: Error message - :type message: str - :param code: Error code - :type code: str - :param target: Error target - :type target: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, code: str=None, target: str=None, **kwargs) -> None: - super(ErrorDetail, self).__init__(**kwargs) - self.message = message - self.code = code - self.target = target - - -class ErrorResponse(Model): - """Error Response. - - Common error response for all Azure Resource Manager APIs to return error - details for failed operations. (This also follows the OData error response - format.). + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -1094,7 +1100,7 @@ class ErrorResponse(Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.synapse.models.ErrorResponse] + :vartype details: list[~azure.mgmt.synapse.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~azure.mgmt.synapse.models.ErrorAdditionalInfo] @@ -1112,12 +1118,12 @@ class ErrorResponse(Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -1125,6 +1131,38 @@ def __init__(self, **kwargs) -> None: self.additional_info = None +class ErrorResponse(Model): + """Error response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). + + :param error: The error object. + :type error: ~azure.mgmt.synapse.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + class ExtendedServerBlobAuditingPolicy(ProxyResource): """An extended server blob auditing policy. @@ -2332,6 +2370,57 @@ def __init__(self, *, is_active_cmk: bool=None, key_vault_url: str=None, **kwarg self.key_vault_url = key_vault_url +class LibraryInfo(Model): + """Information about a library/package created at the workspace level. + + Library/package information of a Big Data pool powered by Apache Spark. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: Name of the library. + :type name: str + :param path: Storage blob path of library. + :type path: str + :param container_name: Storage blob container name. + :type container_name: str + :ivar uploaded_timestamp: The last update time of the library. + :vartype uploaded_timestamp: datetime + :param type: Type of the library. + :type type: str + :ivar provisioning_status: Provisioning status of the library/package. + :vartype provisioning_status: str + :ivar creator_id: Creator Id of the library/package. + :vartype creator_id: str + """ + + _validation = { + 'uploaded_timestamp': {'readonly': True}, + 'provisioning_status': {'readonly': True}, + 'creator_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'uploaded_timestamp': {'key': 'uploadedTimestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_status': {'key': 'provisioningStatus', 'type': 'str'}, + 'creator_id': {'key': 'creatorId', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, path: str=None, container_name: str=None, type: str=None, **kwargs) -> None: + super(LibraryInfo, self).__init__(**kwargs) + self.name = name + self.path = path + self.container_name = container_name + self.uploaded_timestamp = None + self.type = type + self.provisioning_status = None + self.creator_id = None + + class LibraryRequirements(Model): """Spark pool library version requirements. @@ -2497,6 +2586,136 @@ def __init__(self, *, resource_id: str, **kwargs) -> None: self.authorization_type = 'RBAC' +class MaintenanceWindowOptions(ProxyResource): + """Maintenance window options. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param is_enabled: Whether maintenance windows are enabled for the + database. + :type is_enabled: bool + :param maintenance_window_cycles: Available maintenance cycles e.g. + {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. + :type maintenance_window_cycles: + list[~azure.mgmt.synapse.models.MaintenanceWindowTimeRange] + :param min_duration_in_minutes: Minimum duration of maintenance window. + :type min_duration_in_minutes: int + :param default_duration_in_minutes: Default duration for maintenance + window. + :type default_duration_in_minutes: int + :param min_cycles: Minimum number of maintenance windows cycles to be set + on the database. + :type min_cycles: int + :param time_granularity_in_minutes: Time granularity in minutes for + maintenance windows. + :type time_granularity_in_minutes: int + :param allow_multiple_maintenance_windows_per_cycle: Whether we allow + multiple maintenance windows per cycle. + :type allow_multiple_maintenance_windows_per_cycle: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'maintenance_window_cycles': {'key': 'properties.maintenanceWindowCycles', 'type': '[MaintenanceWindowTimeRange]'}, + 'min_duration_in_minutes': {'key': 'properties.minDurationInMinutes', 'type': 'int'}, + 'default_duration_in_minutes': {'key': 'properties.defaultDurationInMinutes', 'type': 'int'}, + 'min_cycles': {'key': 'properties.minCycles', 'type': 'int'}, + 'time_granularity_in_minutes': {'key': 'properties.timeGranularityInMinutes', 'type': 'int'}, + 'allow_multiple_maintenance_windows_per_cycle': {'key': 'properties.allowMultipleMaintenanceWindowsPerCycle', 'type': 'bool'}, + } + + def __init__(self, *, is_enabled: bool=None, maintenance_window_cycles=None, min_duration_in_minutes: int=None, default_duration_in_minutes: int=None, min_cycles: int=None, time_granularity_in_minutes: int=None, allow_multiple_maintenance_windows_per_cycle: bool=None, **kwargs) -> None: + super(MaintenanceWindowOptions, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.maintenance_window_cycles = maintenance_window_cycles + self.min_duration_in_minutes = min_duration_in_minutes + self.default_duration_in_minutes = default_duration_in_minutes + self.min_cycles = min_cycles + self.time_granularity_in_minutes = time_granularity_in_minutes + self.allow_multiple_maintenance_windows_per_cycle = allow_multiple_maintenance_windows_per_cycle + + +class MaintenanceWindows(ProxyResource): + """Maintenance windows. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param time_ranges: + :type time_ranges: + list[~azure.mgmt.synapse.models.MaintenanceWindowTimeRange] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time_ranges': {'key': 'properties.timeRanges', 'type': '[MaintenanceWindowTimeRange]'}, + } + + def __init__(self, *, time_ranges=None, **kwargs) -> None: + super(MaintenanceWindows, self).__init__(**kwargs) + self.time_ranges = time_ranges + + +class MaintenanceWindowTimeRange(Model): + """Maintenance window time range. + + :param day_of_week: Day of maintenance window. Possible values include: + 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + 'Saturday' + :type day_of_week: str or ~azure.mgmt.synapse.models.DayOfWeek + :param start_time: Start time minutes offset from 12am. + :type start_time: str + :param duration: Duration of maintenance window in minutes. + :type duration: str + """ + + _attribute_map = { + 'day_of_week': {'key': 'dayOfWeek', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__(self, *, day_of_week=None, start_time: str=None, duration: str=None, **kwargs) -> None: + super(MaintenanceWindowTimeRange, self).__init__(**kwargs) + self.day_of_week = day_of_week + self.start_time = start_time + self.duration = duration + + class ManagedIdentity(Model): """The workspace managed identity. @@ -3540,6 +3759,78 @@ def __init__(self, **kwargs) -> None: self.intervals = None +class RecommendedSensitivityLabelUpdate(ProxyResource): + """A recommended sensitivity label update operation. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param op: Required. Possible values include: 'enable', 'disable' + :type op: str or + ~azure.mgmt.synapse.models.RecommendedSensitivityLabelUpdateKind + :param schema: Required. Schema name of the column to update. + :type schema: str + :param table: Required. Table name of the column to update. + :type table: str + :param column: Required. Column name to update. + :type column: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'op': {'required': True}, + 'schema': {'required': True}, + 'table': {'required': True}, + 'column': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'op': {'key': 'properties.op', 'type': 'RecommendedSensitivityLabelUpdateKind'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'column': {'key': 'properties.column', 'type': 'str'}, + } + + def __init__(self, *, op, schema: str, table: str, column: str, **kwargs) -> None: + super(RecommendedSensitivityLabelUpdate, self).__init__(**kwargs) + self.op = op + self.schema = schema + self.table = table + self.column = column + + +class RecommendedSensitivityLabelUpdateList(Model): + """A list of recommended sensitivity label update operations. + + :param operations: + :type operations: + list[~azure.mgmt.synapse.models.RecommendedSensitivityLabelUpdate] + """ + + _attribute_map = { + 'operations': {'key': 'operations', 'type': '[RecommendedSensitivityLabelUpdate]'}, + } + + def __init__(self, *, operations=None, **kwargs) -> None: + super(RecommendedSensitivityLabelUpdateList, self).__init__(**kwargs) + self.operations = operations + + class RecoverableSqlPool(ProxyResource): """A recoverable sql pool. @@ -3724,6 +4015,28 @@ def __init__(self, **kwargs) -> None: self.replication_state = None +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = id + + class RestorableDroppedSqlPool(ProxyResource): """A restorable dropped Sql pool. @@ -4234,6 +4547,12 @@ class SensitivityLabel(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str + :ivar schema_name: The schema name. + :vartype schema_name: str + :ivar table_name: The table name. + :vartype table_name: str + :ivar column_name: The column name. + :vartype column_name: str :param label_name: The label name. :type label_name: str :param label_id: The label ID. @@ -4246,33 +4565,127 @@ class SensitivityLabel(ProxyResource): recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. :vartype is_disabled: bool + :param rank: Possible values include: 'None', 'Low', 'Medium', 'High', + 'Critical' + :type rank: str or ~azure.mgmt.synapse.models.SensitivityLabelRank + :ivar managed_by: managed by + :vartype managed_by: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'schema_name': {'readonly': True}, + 'table_name': {'readonly': True}, + 'column_name': {'readonly': True}, 'is_disabled': {'readonly': True}, + 'managed_by': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, 'label_name': {'key': 'properties.labelName', 'type': 'str'}, 'label_id': {'key': 'properties.labelId', 'type': 'str'}, 'information_type': {'key': 'properties.informationType', 'type': 'str'}, 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + 'rank': {'key': 'properties.rank', 'type': 'SensitivityLabelRank'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, } - def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: + def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, rank=None, **kwargs) -> None: super(SensitivityLabel, self).__init__(**kwargs) + self.schema_name = None + self.table_name = None + self.column_name = None self.label_name = label_name self.label_id = label_id self.information_type = information_type self.information_type_id = information_type_id self.is_disabled = None + self.rank = rank + self.managed_by = None + + +class SensitivityLabelUpdate(ProxyResource): + """A sensitivity label update operation. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param op: Required. Possible values include: 'set', 'remove' + :type op: str or ~azure.mgmt.synapse.models.SensitivityLabelUpdateKind + :param schema: Required. Schema name of the column to update. + :type schema: str + :param table: Required. Table name of the column to update. + :type table: str + :param column: Required. Column name to update. + :type column: str + :param sensitivity_label: The sensitivity label information to apply on a + column. + :type sensitivity_label: ~azure.mgmt.synapse.models.SensitivityLabel + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'op': {'required': True}, + 'schema': {'required': True}, + 'table': {'required': True}, + 'column': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'op': {'key': 'properties.op', 'type': 'SensitivityLabelUpdateKind'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'column': {'key': 'properties.column', 'type': 'str'}, + 'sensitivity_label': {'key': 'properties.sensitivityLabel', 'type': 'SensitivityLabel'}, + } + + def __init__(self, *, op, schema: str, table: str, column: str, sensitivity_label=None, **kwargs) -> None: + super(SensitivityLabelUpdate, self).__init__(**kwargs) + self.op = op + self.schema = schema + self.table = table + self.column = column + self.sensitivity_label = sensitivity_label + + +class SensitivityLabelUpdateList(Model): + """A list of sensitivity label update operations. + + :param operations: + :type operations: list[~azure.mgmt.synapse.models.SensitivityLabelUpdate] + """ + + _attribute_map = { + 'operations': {'key': 'operations', 'type': '[SensitivityLabelUpdate]'}, + } + + def __init__(self, *, operations=None, **kwargs) -> None: + super(SensitivityLabelUpdateList, self).__init__(**kwargs) + self.operations = operations class ServerBlobAuditingPolicy(ProxyResource): @@ -4703,6 +5116,10 @@ class SqlPool(TrackedResource): :type create_mode: str :param creation_date: Date the SQL pool was created :type creation_date: datetime + :param storage_account_type: The storage account type used to store + backups for this sql pool. Possible values include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.synapse.models.StorageAccountType """ _validation = { @@ -4728,9 +5145,10 @@ class SqlPool(TrackedResource): 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'str'}, 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, } - def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, collation: str=None, source_database_id: str=None, recoverable_database_id: str=None, provisioning_state: str=None, status: str=None, restore_point_in_time: str=None, create_mode: str=None, creation_date=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, collation: str=None, source_database_id: str=None, recoverable_database_id: str=None, provisioning_state: str=None, status: str=None, restore_point_in_time: str=None, create_mode: str=None, creation_date=None, storage_account_type=None, **kwargs) -> None: super(SqlPool, self).__init__(tags=tags, location=location, **kwargs) self.sku = sku self.max_size_bytes = max_size_bytes @@ -4742,6 +5160,7 @@ def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=No self.restore_point_in_time = restore_point_in_time self.create_mode = create_mode self.creation_date = creation_date + self.storage_account_type = storage_account_type class SqlPoolBlobAuditingPolicy(ProxyResource): @@ -4921,12 +5340,15 @@ class SqlPoolColumn(ProxyResource): 'varbinary', 'varchar', 'binary', 'char', 'timestamp', 'nvarchar', 'nchar', 'xml', 'sysname' :type column_type: str or ~azure.mgmt.synapse.models.ColumnDataType + :ivar is_computed: Indicates whether column value is computed or not + :vartype is_computed: bool """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'is_computed': {'readonly': True}, } _attribute_map = { @@ -4934,11 +5356,13 @@ class SqlPoolColumn(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'column_type': {'key': 'properties.columnType', 'type': 'str'}, + 'is_computed': {'key': 'properties.isComputed', 'type': 'bool'}, } def __init__(self, *, column_type=None, **kwargs) -> None: super(SqlPoolColumn, self).__init__(**kwargs) self.column_type = column_type + self.is_computed = None class SqlPoolConnectionPolicy(ProxyResource): @@ -5146,6 +5570,10 @@ class SqlPoolPatchInfo(Model): :type create_mode: str :param creation_date: Date the SQL pool was created :type creation_date: datetime + :param storage_account_type: The storage account type used to store + backups for this sql pool. Possible values include: 'GRS', 'LRS', 'ZRS' + :type storage_account_type: str or + ~azure.mgmt.synapse.models.StorageAccountType """ _attribute_map = { @@ -5161,9 +5589,10 @@ class SqlPoolPatchInfo(Model): 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'str'}, 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, } - def __init__(self, *, tags=None, location: str=None, sku=None, max_size_bytes: int=None, collation: str=None, source_database_id: str=None, recoverable_database_id: str=None, provisioning_state: str=None, status: str=None, restore_point_in_time: str=None, create_mode: str=None, creation_date=None, **kwargs) -> None: + def __init__(self, *, tags=None, location: str=None, sku=None, max_size_bytes: int=None, collation: str=None, source_database_id: str=None, recoverable_database_id: str=None, provisioning_state: str=None, status: str=None, restore_point_in_time: str=None, create_mode: str=None, creation_date=None, storage_account_type=None, **kwargs) -> None: super(SqlPoolPatchInfo, self).__init__(**kwargs) self.tags = tags self.location = location @@ -5177,6 +5606,7 @@ def __init__(self, *, tags=None, location: str=None, sku=None, max_size_bytes: i self.restore_point_in_time = restore_point_in_time self.create_mode = create_mode self.creation_date = creation_date + self.storage_account_type = storage_account_type class SqlPoolSchema(ProxyResource): @@ -6437,6 +6867,8 @@ class Workspace(TrackedResource): :param purview_configuration: Purview Configuration :type purview_configuration: ~azure.mgmt.synapse.models.PurviewConfiguration + :ivar adla_resource_id: The ADLA resource ID. + :vartype adla_resource_id: str :param identity: Identity of the workspace :type identity: ~azure.mgmt.synapse.models.ManagedIdentity """ @@ -6449,6 +6881,7 @@ class Workspace(TrackedResource): 'provisioning_state': {'readonly': True}, 'workspace_uid': {'readonly': True}, 'extra_properties': {'readonly': True}, + 'adla_resource_id': {'readonly': True}, } _attribute_map = { @@ -6472,6 +6905,7 @@ class Workspace(TrackedResource): 'managed_virtual_network_settings': {'key': 'properties.managedVirtualNetworkSettings', 'type': 'ManagedVirtualNetworkSettings'}, 'workspace_repository_configuration': {'key': 'properties.workspaceRepositoryConfiguration', 'type': 'WorkspaceRepositoryConfiguration'}, 'purview_configuration': {'key': 'properties.purviewConfiguration', 'type': 'PurviewConfiguration'}, + 'adla_resource_id': {'key': 'properties.adlaResourceId', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, } @@ -6492,6 +6926,7 @@ def __init__(self, *, location: str, tags=None, default_data_lake_storage=None, self.managed_virtual_network_settings = managed_virtual_network_settings self.workspace_repository_configuration = workspace_repository_configuration self.purview_configuration = purview_configuration + self.adla_resource_id = None self.identity = identity @@ -6637,6 +7072,10 @@ class WorkspaceRepositoryConfiguration(Model): :type collaboration_branch: str :param root_folder: Root folder to use in the repository :type root_folder: str + :param last_commit_id: The last commit ID + :type last_commit_id: str + :param tenant_id: The VSTS tenant ID + :type tenant_id: str """ _attribute_map = { @@ -6647,9 +7086,11 @@ class WorkspaceRepositoryConfiguration(Model): 'repository_name': {'key': 'repositoryName', 'type': 'str'}, 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self, *, type: str=None, host_name: str=None, account_name: str=None, project_name: str=None, repository_name: str=None, collaboration_branch: str=None, root_folder: str=None, **kwargs) -> None: + def __init__(self, *, type: str=None, host_name: str=None, account_name: str=None, project_name: str=None, repository_name: str=None, collaboration_branch: str=None, root_folder: str=None, last_commit_id: str=None, tenant_id: str=None, **kwargs) -> None: super(WorkspaceRepositoryConfiguration, self).__init__(**kwargs) self.type = type self.host_name = host_name @@ -6658,3 +7099,5 @@ def __init__(self, *, type: str=None, host_name: str=None, account_name: str=Non self.repository_name = repository_name self.collaboration_branch = collaboration_branch self.root_folder = root_folder + self.last_commit_id = last_commit_id + self.tenant_id = tenant_id diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_paged_models.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_paged_models.py index 986b268c2818..8b67d84fe840 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_paged_models.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_paged_models.py @@ -428,6 +428,19 @@ class ServerVulnerabilityAssessmentPaged(Paged): def __init__(self, *args, **kwargs): super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class EncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`EncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) class ServerUsagePaged(Paged): """ A paging container for iterating over a list of :class:`ServerUsage ` object diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py index 79dd8590ba62..62f07bf19973 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py @@ -46,6 +46,13 @@ class OperationStatus(str, Enum): canceled = "Canceled" +class StorageAccountType(str, Enum): + + grs = "GRS" + lrs = "LRS" + zrs = "ZRS" + + class GeoBackupPolicyState(str, Enum): disabled = "Disabled" @@ -108,6 +115,17 @@ class ReplicationState(str, Enum): suspended = "SUSPENDED" +class DayOfWeek(str, Enum): + + sunday = "Sunday" + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + + class TransparentDataEncryptionStatus(str, Enum): enabled = "Enabled" @@ -130,6 +148,15 @@ class ManagementOperationState(str, Enum): cancelled = "Cancelled" +class SensitivityLabelRank(str, Enum): + + none = "None" + low = "Low" + medium = "Medium" + high = "High" + critical = "Critical" + + class ColumnDataType(str, Enum): image = "image" @@ -211,6 +238,18 @@ class DataMaskingFunction(str, Enum): text = "Text" +class SensitivityLabelUpdateKind(str, Enum): + + set = "set" + remove = "remove" + + +class RecommendedSensitivityLabelUpdateKind(str, Enum): + + enable = "enable" + disable = "disable" + + class ResourceIdentityType(str, Enum): none = "None" @@ -323,6 +362,12 @@ class SsisObjectMetadataType(str, Enum): environment = "Environment" +class ServerKeyType(str, Enum): + + service_managed = "ServiceManaged" + azure_key_vault = "AzureKeyVault" + + class SensitivityLabelSource(str, Enum): current = "current" diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py index b9da72420977..daadaa64217e 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py @@ -19,11 +19,14 @@ from ._sql_pool_data_warehouse_user_activities_operations import SqlPoolDataWarehouseUserActivitiesOperations from ._sql_pool_restore_points_operations import SqlPoolRestorePointsOperations from ._sql_pool_replication_links_operations import SqlPoolReplicationLinksOperations +from ._sql_pool_maintenance_windows_operations import SqlPoolMaintenanceWindowsOperations +from ._sql_pool_maintenance_window_options_operations import SqlPoolMaintenanceWindowOptionsOperations from ._sql_pool_transparent_data_encryptions_operations import SqlPoolTransparentDataEncryptionsOperations from ._sql_pool_blob_auditing_policies_operations import SqlPoolBlobAuditingPoliciesOperations from ._sql_pool_operations import SqlPoolOperations from ._sql_pool_usages_operations import SqlPoolUsagesOperations from ._sql_pool_sensitivity_labels_operations import SqlPoolSensitivityLabelsOperations +from ._sql_pool_recommended_sensitivity_labels_operations import SqlPoolRecommendedSensitivityLabelsOperations from ._sql_pool_schemas_operations import SqlPoolSchemasOperations from ._sql_pool_tables_operations import SqlPoolTablesOperations from ._sql_pool_table_columns_operations import SqlPoolTableColumnsOperations @@ -53,6 +56,7 @@ from ._integration_runtime_monitoring_data_operations import IntegrationRuntimeMonitoringDataOperations from ._integration_runtime_status_operations import IntegrationRuntimeStatusOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._private_link_hub_private_link_resources_operations import PrivateLinkHubPrivateLinkResourcesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_hubs_operations import PrivateLinkHubsOperations from ._private_endpoint_connections_private_link_hub_operations import PrivateEndpointConnectionsPrivateLinkHubOperations @@ -60,8 +64,9 @@ from ._workspace_managed_sql_server_extended_blob_auditing_policies_operations import WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations from ._workspace_managed_sql_server_security_alert_policy_operations import WorkspaceManagedSqlServerSecurityAlertPolicyOperations from ._workspace_managed_sql_server_vulnerability_assessments_operations import WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations +from ._workspace_managed_sql_server_encryption_protector_operations import WorkspaceManagedSqlServerEncryptionProtectorOperations from ._workspace_managed_sql_server_usages_operations import WorkspaceManagedSqlServerUsagesOperations -from ._workspace_managed_sql_server_recoverable_sqlpools_operations import WorkspaceManagedSqlServerRecoverableSqlpoolsOperations +from ._workspace_managed_sql_server_recoverable_sql_pools_operations import WorkspaceManagedSqlServerRecoverableSqlPoolsOperations from ._keys_operations import KeysOperations __all__ = [ @@ -75,11 +80,14 @@ 'SqlPoolDataWarehouseUserActivitiesOperations', 'SqlPoolRestorePointsOperations', 'SqlPoolReplicationLinksOperations', + 'SqlPoolMaintenanceWindowsOperations', + 'SqlPoolMaintenanceWindowOptionsOperations', 'SqlPoolTransparentDataEncryptionsOperations', 'SqlPoolBlobAuditingPoliciesOperations', 'SqlPoolOperations', 'SqlPoolUsagesOperations', 'SqlPoolSensitivityLabelsOperations', + 'SqlPoolRecommendedSensitivityLabelsOperations', 'SqlPoolSchemasOperations', 'SqlPoolTablesOperations', 'SqlPoolTableColumnsOperations', @@ -109,6 +117,7 @@ 'IntegrationRuntimeMonitoringDataOperations', 'IntegrationRuntimeStatusOperations', 'PrivateLinkResourcesOperations', + 'PrivateLinkHubPrivateLinkResourcesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkHubsOperations', 'PrivateEndpointConnectionsPrivateLinkHubOperations', @@ -116,7 +125,8 @@ 'WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations', 'WorkspaceManagedSqlServerSecurityAlertPolicyOperations', 'WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations', + 'WorkspaceManagedSqlServerEncryptionProtectorOperations', 'WorkspaceManagedSqlServerUsagesOperations', - 'WorkspaceManagedSqlServerRecoverableSqlpoolsOperations', + 'WorkspaceManagedSqlServerRecoverableSqlPoolsOperations', 'KeysOperations', ] diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py index 9a98a9b674e2..c089f0670905 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py @@ -26,7 +26,7 @@ class BigDataPoolsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -62,7 +62,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.BigDataPoolResourceInfo or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -93,7 +93,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -130,7 +130,7 @@ def update( :rtype: ~azure.mgmt.synapse.models.BigDataPoolResourceInfo or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ big_data_pool_patch_info = models.BigDataPoolPatchInfo(tags=tags) @@ -167,7 +167,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -218,7 +218,7 @@ def _create_or_update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -263,7 +263,7 @@ def create_or_update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.BigDataPoolResourceInfo]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -326,7 +326,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -364,7 +364,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -413,7 +413,7 @@ def list_by_workspace( :rtype: ~azure.mgmt.synapse.models.BigDataPoolResourceInfoPaged[~azure.mgmt.synapse.models.BigDataPoolResourceInfo] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -454,7 +454,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py index 36324449ef68..506c103ae4f1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class DataMaskingPoliciesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar data_masking_policy_name: The name of the data masking policy for which the masking rule applies. Constant value: "Default". """ @@ -36,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.data_masking_policy_name = "Default" self.config = config @@ -69,7 +68,8 @@ def create_or_update( :return: DataMaskingPolicy or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.DataMaskingPolicy or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ parameters = models.DataMaskingPolicy(data_masking_state=data_masking_state, exempt_principals=exempt_principals) @@ -107,9 +107,7 @@ def create_or_update( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -141,7 +139,8 @@ def get( :return: DataMaskingPolicy or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.DataMaskingPolicy or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -173,9 +172,7 @@ def get( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py index 29593198a344..41acc17a953d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class DataMaskingRulesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar data_masking_policy_name: The name of the data masking policy for which the masking rule applies. Constant value: "Default". """ @@ -36,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.data_masking_policy_name = "Default" self.config = config @@ -65,7 +64,8 @@ def create_or_update( :return: DataMaskingRule or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.DataMaskingRule or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -102,9 +102,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -119,6 +117,74 @@ def create_or_update( return deserialized create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}'} + def get( + self, resource_group_name, workspace_name, sql_pool_name, data_masking_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets the specific Sql pool data masking rule. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param data_masking_rule_name: The name of the data masking rule. + :type data_masking_rule_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: DataMaskingRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.DataMaskingRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_name, 'str'), + 'dataMaskingRuleName': self._serialize.url("data_masking_rule_name", data_masking_rule_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', min_length=1) + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataMaskingRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}'} + def list_by_sql_pool( self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): """Gets a list of Sql pool data masking rules. @@ -138,7 +204,8 @@ def list_by_sql_pool( :return: An iterator like instance of DataMaskingRule :rtype: ~azure.mgmt.synapse.models.DataMaskingRulePaged[~azure.mgmt.synapse.models.DataMaskingRule] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -181,9 +248,7 @@ def internal_paging(next_link=None): 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 + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py index 9e7ddf27809f..3e350a55e2a9 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py @@ -25,7 +25,7 @@ class ExtendedSqlPoolBlobAuditingPoliciesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.blob_auditing_policy_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py index e5cd1f383799..fea1d52a382c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class IntegrationRuntimeAuthKeysOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -64,7 +63,8 @@ def regenerate( :return: IntegrationRuntimeAuthKeys or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeAuthKeys or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ regenerate_key_parameters = models.IntegrationRuntimeRegenerateKeyParameters(key_name=key_name) @@ -101,9 +101,7 @@ def regenerate( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -137,7 +135,8 @@ def list( :return: IntegrationRuntimeAuthKeys or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeAuthKeys or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.list.metadata['url'] @@ -168,9 +167,7 @@ def list( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py index 11a08a6d202a..2a2dc44f41fd 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class IntegrationRuntimeConnectionInfosOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -61,7 +60,8 @@ def get( raw=true :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeConnectionInfo or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -92,9 +92,7 @@ def get( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py index cdc6f4b9bed1..16a56b14a3db 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class IntegrationRuntimeCredentialsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -64,7 +63,8 @@ def sync( overrides`. :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.sync.metadata['url'] @@ -94,9 +94,7 @@ def sync( 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 + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py index 64b03baa3d6a..c4f2f4ba2347 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class IntegrationRuntimeMonitoringDataOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -61,7 +60,8 @@ def list( raw=true :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeMonitoringData or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.list.metadata['url'] @@ -92,9 +92,7 @@ def list( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py index 24f1be141338..80aa32686940 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class IntegrationRuntimeNodeIpAddressOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -63,7 +62,8 @@ def get( raw=true :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeNodeIpAddress or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -95,9 +95,7 @@ def get( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py index 23a9e3e2b06a..55eab70df231 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class IntegrationRuntimeNodesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -63,7 +62,8 @@ def get( raw=true :rtype: ~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNode or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -95,9 +95,7 @@ def get( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -138,7 +136,8 @@ def update( raw=true :rtype: ~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNode or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ update_integration_runtime_node_request = models.UpdateIntegrationRuntimeNodeRequest(concurrent_jobs_limit=concurrent_jobs_limit) @@ -176,9 +175,7 @@ def update( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -213,7 +210,8 @@ def delete( overrides`. :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -244,9 +242,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py index e8f2b2b79f8b..0f1b55aef9ce 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py @@ -11,7 +11,6 @@ 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 @@ -27,7 +26,7 @@ class IntegrationRuntimeObjectMetadataOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -37,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -65,7 +64,8 @@ def list( raw=true :rtype: ~azure.mgmt.synapse.models.SsisObjectMetadataListResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ get_metadata_request = None if metadata_path is not None: @@ -107,9 +107,7 @@ def list( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -154,9 +152,7 @@ def _refresh_initial( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -194,7 +190,8 @@ def refresh( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.SsisObjectMetadataStatusResponse] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.SsisObjectMetadataStatusResponse]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._refresh_initial( resource_group_name=resource_group_name, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py index 383bdc34fe84..312ef8884e0f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class IntegrationRuntimeStatusOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -61,7 +60,8 @@ def get( raw=true :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeStatusResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -92,9 +92,7 @@ def get( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py index ebf248c486e5..12757dedb806 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py @@ -11,7 +11,6 @@ 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 @@ -27,7 +26,7 @@ class IntegrationRuntimesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -37,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -72,7 +71,8 @@ def update( :return: IntegrationRuntimeResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ update_integration_runtime_request = models.UpdateIntegrationRuntimeRequest(auto_update=auto_update, update_delay_offset=update_delay_offset) @@ -109,9 +109,7 @@ def update( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -149,7 +147,8 @@ def get( :return: IntegrationRuntimeResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -182,9 +181,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 304]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -237,9 +234,7 @@ def _create_initial( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -283,7 +278,8 @@ def create( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.IntegrationRuntimeResource] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.IntegrationRuntimeResource]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -345,9 +341,7 @@ def _delete_initial( 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 + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -375,7 +369,8 @@ def delete( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -420,7 +415,8 @@ def upgrade( overrides`. :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.upgrade.metadata['url'] @@ -450,9 +446,7 @@ def upgrade( 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 + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -478,7 +472,8 @@ def list_by_workspace( :return: An iterator like instance of IntegrationRuntimeResource :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeResourcePaged[~azure.mgmt.synapse.models.IntegrationRuntimeResource] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -519,9 +514,7 @@ def internal_paging(next_link=None): 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 + raise models.ErrorResponseException(self._deserialize, response) return response @@ -566,9 +559,7 @@ def _start_initial( 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 + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -606,7 +597,8 @@ def start( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.IntegrationRuntimeStatusResponse] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.IntegrationRuntimeStatusResponse]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._start_initial( resource_group_name=resource_group_name, @@ -666,9 +658,7 @@ def _stop_initial( 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 + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -696,7 +686,8 @@ def stop( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._stop_initial( resource_group_name=resource_group_name, @@ -752,9 +743,7 @@ def _enable_interactive_query_initial( 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 + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -780,7 +769,8 @@ def enable_interactive_query( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._enable_interactive_query_initial( resource_group_name=resource_group_name, @@ -836,9 +826,7 @@ def _disable_interactive_query_initial( 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 + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -864,7 +852,8 @@ def disable_interactive_query( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._disable_interactive_query_initial( resource_group_name=resource_group_name, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py index 600af9a1bde0..7a876d0d4ef8 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py @@ -26,7 +26,7 @@ class IpFirewallRulesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -58,7 +58,7 @@ def list_by_workspace( :rtype: ~azure.mgmt.synapse.models.IpFirewallRuleInfoPaged[~azure.mgmt.synapse.models.IpFirewallRuleInfo] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -99,7 +99,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -150,7 +150,7 @@ def _create_or_update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -194,7 +194,7 @@ def create_or_update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.IpFirewallRuleInfo]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -257,7 +257,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -291,7 +291,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -340,7 +340,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.IpFirewallRuleInfo or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -371,7 +371,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -421,7 +421,7 @@ def _replace_all_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -460,7 +460,7 @@ def replace_all( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.ReplaceAllFirewallRulesOperationResponse]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._replace_all_initial( resource_group_name=resource_group_name, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py index 98dec25566de..d2ad3a64e380 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py @@ -24,7 +24,7 @@ class KeysOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -56,7 +56,7 @@ def list_by_workspace( :rtype: ~azure.mgmt.synapse.models.KeyPaged[~azure.mgmt.synapse.models.Key] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -97,7 +97,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -130,7 +130,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.Key or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -161,7 +161,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -199,7 +199,7 @@ def create_or_update( :rtype: ~azure.mgmt.synapse.models.Key or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ key_properties = models.Key(is_active_cmk=is_active_cmk, key_vault_url=key_vault_url) @@ -236,7 +236,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -269,7 +269,7 @@ def delete( :rtype: ~azure.mgmt.synapse.models.Key or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -300,7 +300,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py index e6bea7ff62ac..84d67c61fa07 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py @@ -24,7 +24,7 @@ class Operations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -58,7 +58,7 @@ def check_name_availability( :rtype: ~azure.mgmt.synapse.models.CheckNameAvailabilityResponse or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ request = models.CheckNameAvailabilityRequest(name=name, type=type) @@ -92,7 +92,7 @@ def check_name_availability( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -120,7 +120,7 @@ def list( :rtype: list[~azure.mgmt.synapse.models.AvailableRpOperation] or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.list.metadata['url'] @@ -143,7 +143,7 @@ def list( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -177,7 +177,7 @@ def get_location_header_result( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get_location_header_result.metadata['url'] @@ -207,7 +207,7 @@ def get_location_header_result( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -236,7 +236,7 @@ def get_azure_async_header_result( :rtype: ~azure.mgmt.synapse.models.OperationResource or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get_azure_async_header_result.metadata['url'] @@ -267,7 +267,7 @@ def get_azure_async_header_result( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 404]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py index 1d438ad2bda9..3f92a1692ffe 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py @@ -26,7 +26,7 @@ class PrivateEndpointConnectionsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -61,7 +61,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.PrivateEndpointConnection or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -92,7 +92,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -143,7 +143,7 @@ def _create_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -190,7 +190,7 @@ def create( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.PrivateEndpointConnection]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -253,7 +253,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -290,7 +290,7 @@ def delete( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.OperationResource]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -337,7 +337,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.PrivateEndpointConnectionPaged[~azure.mgmt.synapse.models.PrivateEndpointConnection] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -378,7 +378,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py index e48100631387..ed83043e49f0 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py @@ -24,7 +24,7 @@ class PrivateEndpointConnectionsPrivateLinkHubOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -57,7 +57,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.PrivateEndpointConnectionForPrivateLinkHubPaged[~azure.mgmt.synapse.models.PrivateEndpointConnectionForPrivateLinkHub] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -98,7 +98,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hub_private_link_resources_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hub_private_link_resources_operations.py new file mode 100644 index 000000000000..4fa93d1ebf8b --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hub_private_link_resources_operations.py @@ -0,0 +1,180 @@ +# 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 .. import models + + +class PrivateLinkHubPrivateLinkResourcesOperations(object): + """PrivateLinkHubPrivateLinkResourcesOperations 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 this operation. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def list( + self, resource_group_name, private_link_hub_name, custom_headers=None, raw=False, **operation_config): + """Private Link Resources. + + Get all private link resources for a private link hub. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param private_link_hub_name: The name of the private link hub + :type private_link_hub_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 PrivateLinkResource + :rtype: + ~azure.mgmt.synapse.models.PrivateLinkResourcePaged[~azure.mgmt.synapse.models.PrivateLinkResource] + :raises: + :class:`ErrorResponseException` + """ + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_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', min_length=1) + + 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]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources'} + + def get( + self, resource_group_name, private_link_hub_name, private_link_resource_name, custom_headers=None, raw=False, **operation_config): + """Get Private Link Hub Private Link Resource. + + Get private link resource in private link hub. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param private_link_hub_name: The name of the private link hub + :type private_link_hub_name: str + :param private_link_resource_name: The name of the private link + resource + :type private_link_resource_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: PrivateLinkResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.PrivateLinkResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), + 'privateLinkResourceName': self._serialize.url("private_link_resource_name", private_link_resource_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', min_length=1) + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources/{privateLinkResourceName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py index 8179d6f40335..92ef36ca79c2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py @@ -26,7 +26,7 @@ class PrivateLinkHubsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -56,7 +56,7 @@ def list_by_resource_group( :rtype: ~azure.mgmt.synapse.models.PrivateLinkHubPaged[~azure.mgmt.synapse.models.PrivateLinkHub] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -96,7 +96,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -127,7 +127,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.PrivateLinkHub or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -157,7 +157,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -190,7 +190,7 @@ def update( :rtype: ~azure.mgmt.synapse.models.PrivateLinkHub or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ private_link_hub_patch_info = models.PrivateLinkHubPatchInfo(tags=tags) @@ -226,7 +226,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -262,7 +262,7 @@ def create_or_update( :rtype: ~azure.mgmt.synapse.models.PrivateLinkHub or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -296,7 +296,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -341,7 +341,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -366,7 +366,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -403,7 +403,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.PrivateLinkHubPaged[~azure.mgmt.synapse.models.PrivateLinkHub] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -442,7 +442,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py index 7e43c3d860c6..242cfaf5bb83 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py @@ -24,7 +24,7 @@ class PrivateLinkResourcesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -58,7 +58,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.PrivateLinkResourcePaged[~azure.mgmt.synapse.models.PrivateLinkResource] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -99,7 +99,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -135,7 +135,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.PrivateLinkResource or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -166,7 +166,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py index 72b1b0260f26..ba4413c59423 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py @@ -24,7 +24,7 @@ class RestorableDroppedSqlPoolsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -59,7 +59,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.RestorableDroppedSqlPool or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -90,7 +90,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -121,7 +121,7 @@ def list_by_workspace( :rtype: ~azure.mgmt.synapse.models.RestorableDroppedSqlPoolPaged[~azure.mgmt.synapse.models.RestorableDroppedSqlPool] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -162,7 +162,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py index 7912ae9c2675..184bbb21d69b 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py @@ -25,7 +25,7 @@ class SqlPoolBlobAuditingPoliciesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.blob_auditing_policy_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py index fa04c3068dd0..ff5873a1ee4f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py @@ -25,7 +25,7 @@ class SqlPoolColumnsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py index f8ec75f130b6..074cf2826a0d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py @@ -24,7 +24,7 @@ class SqlPoolConnectionPoliciesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar connection_policy_name: The name of the connection policy. Constant value: "default". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.connection_policy_name = "default" self.config = config @@ -62,7 +62,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.SqlPoolConnectionPolicy or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -94,7 +94,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_data_warehouse_user_activities_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_data_warehouse_user_activities_operations.py index 390169b21fc1..c88cc2287fdd 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_data_warehouse_user_activities_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_data_warehouse_user_activities_operations.py @@ -25,7 +25,7 @@ class SqlPoolDataWarehouseUserActivitiesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar data_warehouse_user_activity_name: The activity name of the Sql pool. . Constant value: "current". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.data_warehouse_user_activity_name = "current" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py index e937d5a973b8..adb5dfb20016 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py @@ -24,7 +24,7 @@ class SqlPoolGeoBackupPoliciesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar geo_backup_policy_name: The name of the geo backup policy. Constant value: "Default". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.geo_backup_policy_name = "Default" self.config = config @@ -62,7 +62,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.GeoBackupPolicyPaged[~azure.mgmt.synapse.models.GeoBackupPolicy] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -104,7 +104,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -117,6 +117,82 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies'} + def create_or_update( + self, resource_group_name, workspace_name, sql_pool_name, state, custom_headers=None, raw=False, **operation_config): + """Updates a SQL Pool geo backup policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param state: The state of the geo backup policy. Possible values + include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.synapse.models.GeoBackupPolicyState + :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: GeoBackupPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.GeoBackupPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.GeoBackupPolicy(state=state) + + # 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'geoBackupPolicyName': self._serialize.url("self.geo_backup_policy_name", self.geo_backup_policy_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', min_length=1) + + # 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, 'GeoBackupPolicy') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GeoBackupPolicy', response) + if response.status_code == 201: + deserialized = self._deserialize('GeoBackupPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}'} + def get( self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): """Get a SQL pool geo backup policy. @@ -139,7 +215,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.GeoBackupPolicy or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -171,7 +247,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_window_options_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_window_options_operations.py new file mode 100644 index 000000000000..713f035eda01 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_window_options_operations.py @@ -0,0 +1,111 @@ +# 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 .. import models + + +class SqlPoolMaintenanceWindowOptionsOperations(object): + """SqlPoolMaintenanceWindowOptionsOperations 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 this operation. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def get( + self, resource_group_name, workspace_name, sql_pool_name, maintenance_window_options_name, custom_headers=None, raw=False, **operation_config): + """SQL pool's available maintenance windows. + + Get list of SQL pool's available maintenance windows. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param maintenance_window_options_name: Maintenance window options + name. + :type maintenance_window_options_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: MaintenanceWindowOptions or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.MaintenanceWindowOptions 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_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', min_length=1) + query_parameters['maintenanceWindowOptionsName'] = self._serialize.query("maintenance_window_options_name", maintenance_window_options_name, '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('MaintenanceWindowOptions', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenanceWindowOptions/current'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_windows_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_windows_operations.py new file mode 100644 index 000000000000..33422c4c31af --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_windows_operations.py @@ -0,0 +1,180 @@ +# 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 .. import models + + +class SqlPoolMaintenanceWindowsOperations(object): + """SqlPoolMaintenanceWindowsOperations 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 this operation. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def get( + self, resource_group_name, workspace_name, sql_pool_name, maintenance_window_name, custom_headers=None, raw=False, **operation_config): + """Get a SQL pool's Maintenance Windows. + + Get a SQL pool's Maintenance Windows. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param maintenance_window_name: Maintenance window name. + :type maintenance_window_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: MaintenanceWindows or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.MaintenanceWindows or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_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', min_length=1) + query_parameters['maintenanceWindowName'] = self._serialize.query("maintenance_window_name", maintenance_window_name, '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]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MaintenanceWindows', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current'} + + def create_or_update( + self, resource_group_name, workspace_name, sql_pool_name, maintenance_window_name, time_ranges=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Sql pool's maintenance windows settings. + + Creates or updates a Sql pool's maintenance windows settings. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param maintenance_window_name: Maintenance window name. + :type maintenance_window_name: str + :param time_ranges: + :type time_ranges: + list[~azure.mgmt.synapse.models.MaintenanceWindowTimeRange] + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.MaintenanceWindows(time_ranges=time_ranges) + + # 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_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', min_length=1) + query_parameters['maintenanceWindowName'] = self._serialize.query("maintenance_window_name", maintenance_window_name, 'str') + + # Construct headers + header_parameters = {} + 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, 'MaintenanceWindows') + + # 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]: + 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 + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py index d647045e58cc..c66ed6172b71 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py @@ -24,7 +24,7 @@ class SqlPoolMetadataSyncConfigsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -60,7 +60,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.MetadataSyncConfig or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -91,7 +91,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 404]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -131,7 +131,7 @@ def create( :rtype: ~azure.mgmt.synapse.models.MetadataSyncConfig or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ metadata_sync_configuration = models.MetadataSyncConfig(enabled=enabled, sync_interval_in_minutes=sync_interval_in_minutes) @@ -168,7 +168,7 @@ def create( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 404]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py index 6b1f5176c30b..ed321bbd1d67 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py @@ -24,7 +24,7 @@ class SqlPoolOperationResultsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -61,7 +61,7 @@ def get_location_header_result( :return: object or ClientRawResponse if raw=true :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get_location_header_result.metadata['url'] @@ -93,7 +93,7 @@ def get_location_header_result( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operations.py index d667d496759f..7621c0a49139 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operations.py @@ -25,7 +25,7 @@ class SqlPoolOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_recommended_sensitivity_labels_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_recommended_sensitivity_labels_operations.py new file mode 100644 index 000000000000..14a9490a9ff7 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_recommended_sensitivity_labels_operations.py @@ -0,0 +1,107 @@ +# 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 .. import models + + +class SqlPoolRecommendedSensitivityLabelsOperations(object): + """SqlPoolRecommendedSensitivityLabelsOperations 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 this operation. Constant value: "2020-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def update( + self, resource_group_name, workspace_name, sql_pool_name, operations=None, custom_headers=None, raw=False, **operation_config): + """Update recommended sensitivity labels states of a given SQL Pool using + an operations batch. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param operations: + :type operations: + list[~azure.mgmt.synapse.models.RecommendedSensitivityLabelUpdate] + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.RecommendedSensitivityLabelUpdateList(operations=operations) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_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', min_length=1) + + # Construct headers + header_parameters = {} + 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, 'RecommendedSensitivityLabelUpdateList') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py index 0dc97c9a768d..3ef62e1d10e6 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py @@ -24,7 +24,7 @@ class SqlPoolReplicationLinksOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -60,7 +60,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.ReplicationLinkPaged[~azure.mgmt.synapse.models.ReplicationLink] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -102,7 +102,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -139,7 +139,7 @@ def get_by_name( :rtype: ~azure.mgmt.synapse.models.ReplicationLink or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get_by_name.metadata['url'] @@ -171,7 +171,7 @@ def get_by_name( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py index 04592cf3adc2..6d77c2571020 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py @@ -27,7 +27,7 @@ class SqlPoolRestorePointsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -63,7 +63,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.RestorePointPaged[~azure.mgmt.synapse.models.RestorePoint] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -105,7 +105,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py index cdebb2b74a23..d717599f17ae 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py @@ -25,7 +25,7 @@ class SqlPoolSchemasOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py index bccc62bdd332..58f77c180c5c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py @@ -25,7 +25,7 @@ class SqlPoolSecurityAlertPoliciesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar security_alert_policy_name: The name of the security alert policy. Constant value: "default". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.security_alert_policy_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py index 2daf1f254fbd..7e358d51d28b 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py @@ -25,7 +25,7 @@ class SqlPoolSensitivityLabelsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -64,7 +64,7 @@ def list_current( :rtype: ~azure.mgmt.synapse.models.SensitivityLabelPaged[~azure.mgmt.synapse.models.SensitivityLabel] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -108,7 +108,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -121,6 +121,73 @@ def internal_paging(next_link=None): return deserialized list_current.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels'} + def update( + self, resource_group_name, workspace_name, sql_pool_name, operations=None, custom_headers=None, raw=False, **operation_config): + """Update sensitivity labels of a given SQL Pool using an operations + batch. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param operations: + :type operations: + list[~azure.mgmt.synapse.models.SensitivityLabelUpdate] + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.SensitivityLabelUpdateList(operations=operations) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_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', min_length=1) + + # Construct headers + header_parameters = {} + 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, 'SensitivityLabelUpdateList') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels'} + def list_recommended( self, resource_group_name, workspace_name, sql_pool_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets sensitivity labels of a given SQL pool. diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_table_columns_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_table_columns_operations.py index 0a0d60cd6346..da2320769d40 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_table_columns_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_table_columns_operations.py @@ -25,7 +25,7 @@ class SqlPoolTableColumnsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py index 632988a91303..f8d3bc463a33 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py @@ -25,7 +25,7 @@ class SqlPoolTablesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py index 2a0a4c6f7255..915dc520ad43 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py @@ -25,7 +25,7 @@ class SqlPoolTransparentDataEncryptionsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar transparent_data_encryption_name: The name of the transparent data encryption configuration. Constant value: "current". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.transparent_data_encryption_name = "current" self.config = config @@ -63,7 +63,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.TransparentDataEncryption or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -95,7 +95,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -136,7 +136,7 @@ def create_or_update( :rtype: ~azure.mgmt.synapse.models.TransparentDataEncryption or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ parameters = models.TransparentDataEncryption(status=status) @@ -174,7 +174,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py index 77e27346ac56..594d4b80be38 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py @@ -24,7 +24,7 @@ class SqlPoolUsagesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -60,7 +60,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.SqlPoolUsagePaged[~azure.mgmt.synapse.models.SqlPoolUsage] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -102,7 +102,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py index 67ed59fb57e5..32d9e2e53f6d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py @@ -25,7 +25,7 @@ class SqlPoolVulnerabilityAssessmentRuleBaselinesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.vulnerability_assessment_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py index 60a6e649d562..7702e4956815 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py @@ -27,7 +27,7 @@ class SqlPoolVulnerabilityAssessmentScansOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". """ @@ -38,7 +38,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.vulnerability_assessment_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py index 28a3e2b1b27d..71e5cb99cf7a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py @@ -25,7 +25,7 @@ class SqlPoolVulnerabilityAssessmentsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.vulnerability_assessment_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py index f86fddf533a5..a2930234e2af 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py @@ -27,7 +27,7 @@ class SqlPoolWorkloadClassifierOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py index 25b6974b8890..d2952de8e8dc 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py @@ -27,7 +27,7 @@ class SqlPoolWorkloadGroupOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py index 7af48891038e..c17ee9a42698 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py @@ -11,6 +11,7 @@ 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 @@ -26,7 +27,7 @@ class SqlPoolsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -62,7 +63,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.SqlPool or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -93,7 +94,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -130,7 +131,7 @@ def update( :rtype: ~azure.mgmt.synapse.models.SqlPool or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -165,7 +166,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -214,7 +215,7 @@ def _create_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 404]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -254,7 +255,7 @@ def create( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.SqlPool]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -316,7 +317,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -354,7 +355,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -403,7 +404,7 @@ def list_by_workspace( :rtype: ~azure.mgmt.synapse.models.SqlPoolPaged[~azure.mgmt.synapse.models.SqlPool] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -444,7 +445,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -489,7 +490,7 @@ def _pause_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -525,7 +526,7 @@ def pause( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._pause_initial( resource_group_name=resource_group_name, @@ -586,7 +587,7 @@ def _resume_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -622,7 +623,7 @@ def resume( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._resume_initial( resource_group_name=resource_group_name, @@ -650,3 +651,70 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/resume'} + + def rename( + self, resource_group_name, workspace_name, sql_pool_name, id, custom_headers=None, raw=False, **operation_config): + """Rename a SQL pool. + + Rename a SQL pool. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param id: The target ID for the resource + :type id: 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ResourceMoveDefinition(id=id) + + # Construct URL + url = self.rename.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_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', min_length=1) + + # Construct headers + header_parameters = {} + 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, 'ResourceMoveDefinition') + + # 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]: + 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 + rename.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/move'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py index c5c7b882e89f..89bf0d1e7990 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py @@ -26,7 +26,7 @@ class WorkspaceAadAdminsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -58,7 +58,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -88,7 +88,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -136,7 +136,7 @@ def _create_or_update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -175,7 +175,7 @@ def create_or_update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.WorkspaceAadAdminInfo]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -234,7 +234,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -259,7 +259,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py index 5ac5612d9ad1..c1f9dd6ee755 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py @@ -26,7 +26,7 @@ class WorkspaceManagedIdentitySqlControlSettingsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -60,7 +60,7 @@ def get( ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModel or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -90,7 +90,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -140,7 +140,7 @@ def _create_or_update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -179,7 +179,7 @@ def create_or_update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModel]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py index 9f8f14741790..aede6909e3da 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py @@ -27,7 +27,7 @@ class WorkspaceManagedSqlServerBlobAuditingPoliciesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". """ @@ -38,7 +38,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.blob_auditing_policy_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py new file mode 100644 index 000000000000..7545ec06b5c5 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py @@ -0,0 +1,377 @@ +# 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 WorkspaceManagedSqlServerEncryptionProtectorOperations(object): + """WorkspaceManagedSqlServerEncryptionProtectorOperations 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 this operation. Constant value: "2020-12-01". + :ivar encryption_protector_name: The name of the encryption protector. Constant value: "current". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + self.encryption_protector_name = "current" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get workspace server's encryption protector. + + Get workspace managed sql server's encryption protector. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_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: EncryptionProtector or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.EncryptionProtector or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_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', min_length=1) + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EncryptionProtector', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, server_key_type, server_key_name=None, custom_headers=None, raw=False, **operation_config): + parameters = models.EncryptionProtector(server_key_name=server_key_name, server_key_type=server_key_type) + + # 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_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', min_length=1) + + # 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, 'EncryptionProtector') + + # 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, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EncryptionProtector', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, server_key_type, server_key_name=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates workspace server's encryption protector. + + Updates workspace managed sql server's encryption protector. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param server_key_type: The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.synapse.models.ServerKeyType + :param server_key_name: The name of the server key. + :type server_key_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 EncryptionProtector or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.EncryptionProtector] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.EncryptionProtector]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + server_key_type=server_key_type, + server_key_name=server_key_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('EncryptionProtector', 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.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}'} + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get list of encryption protectors for the server. + + Get list of encryption protectors for workspace managed sql server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_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 EncryptionProtector + :rtype: + ~azure.mgmt.synapse.models.EncryptionProtectorPaged[~azure.mgmt.synapse.models.EncryptionProtector] + :raises: :class:`CloudError` + """ + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_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', min_length=1) + + 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.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector'} + + + def _revalidate_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revalidate.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_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', min_length=1) + + # 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.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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revalidate( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revalidates server's existing encryption protector. + + Revalidates workspace managed sql server's existing encryption + protector. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_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._revalidate_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_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) + revalidate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}/revalidate'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py index 98652de3ef07..8c32923c5f77 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py @@ -27,7 +27,7 @@ class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". """ @@ -38,7 +38,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.blob_auditing_policy_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sqlpools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py similarity index 92% rename from sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sqlpools_operations.py rename to sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py index 05e11100f599..162946327267 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sqlpools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py @@ -16,8 +16,8 @@ from .. import models -class WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(object): - """WorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations. +class WorkspaceManagedSqlServerRecoverableSqlPoolsOperations(object): + """WorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -25,7 +25,7 @@ class WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -112,10 +112,10 @@ def internal_paging(next_link=None): deserialized = models.RecoverableSqlPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlpools'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlPools'} def get( - self, resource_group_name, workspace_name, sql_compute_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): """Get recoverable sql pools for the server. Get recoverable sql pools for workspace managed sql server. @@ -125,8 +125,8 @@ def get( :type resource_group_name: str :param workspace_name: The name of the workspace :type workspace_name: str - :param sql_compute_name: The name of the sql compute - :type sql_compute_name: str + :param sql_pool_name: The name of the sql pool + :type sql_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 @@ -143,7 +143,7 @@ def get( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'sqlComputeName': self._serialize.url("sql_compute_name", sql_compute_name, 'str') + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -179,4 +179,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlPools/{sqlComputeName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlPools/{sqlPoolName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py index 42ad059d72a3..de4887607731 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py @@ -27,7 +27,7 @@ class WorkspaceManagedSqlServerSecurityAlertPolicyOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar security_alert_policy_name: The name of the security alert policy. Constant value: "Default". """ @@ -38,7 +38,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.security_alert_policy_name = "Default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py index c2a7fcb6577e..1c263fd80a70 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py @@ -25,7 +25,7 @@ class WorkspaceManagedSqlServerUsagesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py index f96a81a07fb7..37c12a36d54c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py @@ -25,7 +25,7 @@ class WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". :ivar vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". """ @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.vulnerability_assessment_name = "default" self.config = config diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py index 83cd393bb491..fbe23f4dfc19 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py @@ -26,7 +26,7 @@ class WorkspaceSqlAadAdminsOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -58,7 +58,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -88,7 +88,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -136,7 +136,7 @@ def _create_or_update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -175,7 +175,7 @@ def create_or_update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.WorkspaceAadAdminInfo]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -234,7 +234,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -259,7 +259,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py index 9b4aa1c3d02a..d3e295a564a0 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py @@ -26,7 +26,7 @@ class WorkspacesOperations(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 this operation. Constant value: "2019-06-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2020-12-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01-preview" + self.api_version = "2020-12-01" self.config = config @@ -56,7 +56,7 @@ def list_by_resource_group( :rtype: ~azure.mgmt.synapse.models.WorkspacePaged[~azure.mgmt.synapse.models.Workspace] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -96,7 +96,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -127,7 +127,7 @@ def get( :rtype: ~azure.mgmt.synapse.models.Workspace or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -157,7 +157,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -205,7 +205,7 @@ def _update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -244,7 +244,7 @@ def update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.Workspace]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._update_initial( resource_group_name=resource_group_name, @@ -308,7 +308,7 @@ def _create_or_update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -346,7 +346,7 @@ def create_or_update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.Workspace]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -406,7 +406,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -440,7 +440,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -481,7 +481,7 @@ def list( :rtype: ~azure.mgmt.synapse.models.WorkspacePaged[~azure.mgmt.synapse.models.Workspace] :raises: - :class:`ErrorContractException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -520,7 +520,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorContractException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/version.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/version.py index 5a7feab42d26..981739e4ff95 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/version.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.6.0" +VERSION = "0.7.0"