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..8ff52e383c83 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 @@ -96,6 +100,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 +114,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 +174,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 @@ -224,6 +236,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 +250,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 +310,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( 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..3d0bbb7b50a3 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,6 +28,7 @@ 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 EntityReference from ._models_py3 import EnvironmentVariableSetup @@ -64,6 +65,9 @@ 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,6 +97,8 @@ 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 @@ -106,6 +112,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,6 +180,7 @@ from ._models import DataMaskingPolicy from ._models import DataMaskingRule from ._models import DataWarehouseUserActivities + from ._models import DynamicExecutorAllocation from ._models import EncryptionDetails from ._models import EntityReference from ._models import EnvironmentVariableSetup @@ -208,6 +217,9 @@ 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,6 +249,8 @@ 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 @@ -250,6 +264,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 @@ -345,9 +361,11 @@ RestorePointType, ReplicationRole, ReplicationState, + DayOfWeek, TransparentDataEncryptionStatus, BlobAuditingPolicyState, ManagementOperationState, + SensitivityLabelRank, ColumnDataType, VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, @@ -355,6 +373,8 @@ DataMaskingState, DataMaskingRuleState, DataMaskingFunction, + SensitivityLabelUpdateKind, + RecommendedSensitivityLabelUpdateKind, ResourceIdentityType, IntegrationRuntimeType, IntegrationRuntimeState, @@ -393,6 +413,7 @@ 'DataMaskingPolicy', 'DataMaskingRule', 'DataWarehouseUserActivities', + 'DynamicExecutorAllocation', 'EncryptionDetails', 'EntityReference', 'EnvironmentVariableSetup', @@ -429,6 +450,9 @@ 'LinkedIntegrationRuntimeKeyAuthorization', 'LinkedIntegrationRuntimeRbacAuthorization', 'LinkedIntegrationRuntimeType', + 'MaintenanceWindowOptions', + 'MaintenanceWindows', + 'MaintenanceWindowTimeRange', 'ManagedIdentity', 'ManagedIdentitySqlControlSettingsModel', 'ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity', @@ -458,6 +482,8 @@ 'QueryInterval', 'QueryMetric', 'QueryStatistic', + 'RecommendedSensitivityLabelUpdate', + 'RecommendedSensitivityLabelUpdateList', 'RecoverableSqlPool', 'ReplaceAllFirewallRulesOperationResponse', 'ReplaceAllIpFirewallRulesRequest', @@ -471,6 +497,8 @@ 'SelfHostedIntegrationRuntimeNode', 'SelfHostedIntegrationRuntimeStatus', 'SensitivityLabel', + 'SensitivityLabelUpdate', + 'SensitivityLabelUpdateList', 'ServerBlobAuditingPolicy', 'ServerSecurityAlertPolicy', 'ServerUsage', @@ -565,9 +593,11 @@ 'RestorePointType', 'ReplicationRole', 'ReplicationState', + 'DayOfWeek', 'TransparentDataEncryptionStatus', 'BlobAuditingPolicyState', 'ManagementOperationState', + 'SensitivityLabelRank', 'ColumnDataType', 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', @@ -575,6 +605,8 @@ 'DataMaskingState', 'DataMaskingRuleState', 'DataMaskingFunction', + 'SensitivityLabelUpdateKind', + 'RecommendedSensitivityLabelUpdateKind', 'ResourceIdentityType', 'IntegrationRuntimeType', 'IntegrationRuntimeState', 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..89cc53279228 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,12 +301,14 @@ 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. @@ -349,8 +351,9 @@ 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'}, @@ -368,8 +371,9 @@ 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) @@ -914,6 +918,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. @@ -2497,6 +2518,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 +3691,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. @@ -4234,6 +4457,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 +4475,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): @@ -4921,12 +5244,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 +5260,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): @@ -6437,6 +6765,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 +6779,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 +6803,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 +6824,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 +6970,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 +6984,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 +6997,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..274fd0b76d22 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,12 +301,14 @@ 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. @@ -349,8 +351,9 @@ 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'}, @@ -361,15 +364,16 @@ class BigDataPoolResourceInfo(TrackedResource): 'node_size_family': {'key': 'properties.nodeSizeFamily', 'type': 'str'}, } - 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, 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 @@ -914,6 +918,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. @@ -2497,6 +2518,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 +3691,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. @@ -4234,6 +4457,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 +4475,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): @@ -4921,12 +5244,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 +5260,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): @@ -6437,6 +6765,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 +6779,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 +6803,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 +6824,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 +6970,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 +6984,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 +6997,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/_synapse_management_client_enums.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py index 79dd8590ba62..cd4469172bc8 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 @@ -108,6 +108,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 +141,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 +231,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" 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..ee620e527b43 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 @@ -75,11 +79,14 @@ 'SqlPoolDataWarehouseUserActivitiesOperations', 'SqlPoolRestorePointsOperations', 'SqlPoolReplicationLinksOperations', + 'SqlPoolMaintenanceWindowsOperations', + 'SqlPoolMaintenanceWindowOptionsOperations', 'SqlPoolTransparentDataEncryptionsOperations', 'SqlPoolBlobAuditingPoliciesOperations', 'SqlPoolOperations', 'SqlPoolUsagesOperations', 'SqlPoolSensitivityLabelsOperations', + 'SqlPoolRecommendedSensitivityLabelsOperations', 'SqlPoolSchemasOperations', 'SqlPoolTablesOperations', 'SqlPoolTableColumnsOperations', @@ -109,6 +116,7 @@ 'IntegrationRuntimeMonitoringDataOperations', 'IntegrationRuntimeStatusOperations', 'PrivateLinkResourcesOperations', + 'PrivateLinkHubPrivateLinkResourcesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkHubsOperations', 'PrivateEndpointConnectionsPrivateLinkHubOperations', 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..527828bc1e60 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 @@ -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:`ErrorContractException` """ 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.ErrorContractException(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:`ErrorContractException` """ # 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.ErrorContractException(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..6c2f9548fef1 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 @@ -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:`ErrorContractException` """ # 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.ErrorContractException(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:`ErrorContractException` + """ + # 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.ErrorContractException(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:`ErrorContractException` """ 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.ErrorContractException(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..75a25e3035ad --- /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: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + 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:`ErrorContractException` + """ + 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.ErrorContractException(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:`ErrorContractException` + """ + # 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.ErrorContractException(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/_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..3a1687f4d1ea 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 @@ -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:`ErrorContractException` + """ + 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.ErrorContractException(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. 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..a6f3d6bf93d8 --- /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: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + 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..9359ee80dca4 --- /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: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + 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:`ErrorContractException` + """ + # 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.ErrorContractException(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_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..12ee0cea5c80 --- /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: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + 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_sensitivity_labels_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py index 2daf1f254fbd..5a75f8cd688c 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 @@ -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.