diff --git a/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md b/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md index 2d7fb77b2c6f..904eb673e60b 100644 --- a/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md +++ b/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 0.6.0 (2020-12-17) + +**Features** + + - Model DataMaskingPolicy has a new parameter managed_by + - Model WorkspacePatchInfo has a new parameter encryption + ## 0.5.0 (2020-11-23) **Features** 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 6b7215951bd4..cfe82ec9b015 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 @@ -717,6 +717,8 @@ class DataMaskingPolicy(ProxyResource): :ivar kind: The kind of data masking policy. Metadata, used for Azure portal. :vartype kind: str + :ivar managed_by: Fully qualified resource ID of the sql pool + :vartype managed_by: str """ _validation = { @@ -728,6 +730,7 @@ class DataMaskingPolicy(ProxyResource): 'masking_level': {'readonly': True}, 'location': {'readonly': True}, 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, } _attribute_map = { @@ -740,6 +743,7 @@ class DataMaskingPolicy(ProxyResource): 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, } def __init__(self, **kwargs): @@ -750,6 +754,7 @@ def __init__(self, **kwargs): self.masking_level = None self.location = None self.kind = None + self.managed_by = None class DataMaskingRule(ProxyResource): @@ -6582,6 +6587,8 @@ class WorkspacePatchInfo(Model): ~azure.mgmt.synapse.models.PurviewConfiguration :ivar provisioning_state: Resource provisioning state :vartype provisioning_state: str + :param encryption: The encryption details of the workspace + :type encryption: ~azure.mgmt.synapse.models.EncryptionDetails """ _validation = { @@ -6596,6 +6603,7 @@ class WorkspacePatchInfo(Model): 'workspace_repository_configuration': {'key': 'properties.workspaceRepositoryConfiguration', 'type': 'WorkspaceRepositoryConfiguration'}, 'purview_configuration': {'key': 'properties.purviewConfiguration', 'type': 'PurviewConfiguration'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionDetails'}, } def __init__(self, **kwargs): @@ -6607,6 +6615,7 @@ def __init__(self, **kwargs): self.workspace_repository_configuration = kwargs.get('workspace_repository_configuration', None) self.purview_configuration = kwargs.get('purview_configuration', None) self.provisioning_state = None + self.encryption = kwargs.get('encryption', None) class WorkspaceRepositoryConfiguration(Model): 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 1ea749f90b92..9e57216dc5d1 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 @@ -717,6 +717,8 @@ class DataMaskingPolicy(ProxyResource): :ivar kind: The kind of data masking policy. Metadata, used for Azure portal. :vartype kind: str + :ivar managed_by: Fully qualified resource ID of the sql pool + :vartype managed_by: str """ _validation = { @@ -728,6 +730,7 @@ class DataMaskingPolicy(ProxyResource): 'masking_level': {'readonly': True}, 'location': {'readonly': True}, 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, } _attribute_map = { @@ -740,6 +743,7 @@ class DataMaskingPolicy(ProxyResource): 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, } def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: @@ -750,6 +754,7 @@ def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) self.masking_level = None self.location = None self.kind = None + self.managed_by = None class DataMaskingRule(ProxyResource): @@ -6582,6 +6587,8 @@ class WorkspacePatchInfo(Model): ~azure.mgmt.synapse.models.PurviewConfiguration :ivar provisioning_state: Resource provisioning state :vartype provisioning_state: str + :param encryption: The encryption details of the workspace + :type encryption: ~azure.mgmt.synapse.models.EncryptionDetails """ _validation = { @@ -6596,9 +6603,10 @@ class WorkspacePatchInfo(Model): 'workspace_repository_configuration': {'key': 'properties.workspaceRepositoryConfiguration', 'type': 'WorkspaceRepositoryConfiguration'}, 'purview_configuration': {'key': 'properties.purviewConfiguration', 'type': 'PurviewConfiguration'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionDetails'}, } - def __init__(self, *, tags=None, identity=None, sql_administrator_login_password: str=None, managed_virtual_network_settings=None, workspace_repository_configuration=None, purview_configuration=None, **kwargs) -> None: + def __init__(self, *, tags=None, identity=None, sql_administrator_login_password: str=None, managed_virtual_network_settings=None, workspace_repository_configuration=None, purview_configuration=None, encryption=None, **kwargs) -> None: super(WorkspacePatchInfo, self).__init__(**kwargs) self.tags = tags self.identity = identity @@ -6607,6 +6615,7 @@ def __init__(self, *, tags=None, identity=None, sql_administrator_login_password self.workspace_repository_configuration = workspace_repository_configuration self.purview_configuration = purview_configuration self.provisioning_state = None + self.encryption = encryption class WorkspaceRepositoryConfiguration(Model): diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py index 88e7ed965efa..5ac5612d9ad1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py @@ -11,6 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -101,32 +103,9 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/managedIdentitySqlControlSettings/default'} - def create_or_update( - self, resource_group_name, workspace_name, grant_sql_control_to_managed_identity=None, custom_headers=None, raw=False, **operation_config): - """Create or update Managed Identity Sql Control 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 grant_sql_control_to_managed_identity: Grant sql control to - managed identity - :type grant_sql_control_to_managed_identity: - ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity - :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: ManagedIdentitySqlControlSettingsModel or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModel or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorContractException` - """ + def _create_or_update_initial( + self, resource_group_name, workspace_name, grant_sql_control_to_managed_identity=None, custom_headers=None, raw=False, **operation_config): managed_identity_sql_control_settings = models.ManagedIdentitySqlControlSettingsModel(grant_sql_control_to_managed_identity=grant_sql_control_to_managed_identity) # Construct URL @@ -164,6 +143,7 @@ def create_or_update( raise models.ErrorContractException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ManagedIdentitySqlControlSettingsModel', response) @@ -172,4 +152,58 @@ def create_or_update( return client_raw_response return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, grant_sql_control_to_managed_identity=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update Managed Identity Sql Control 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 grant_sql_control_to_managed_identity: Grant sql control to + managed identity + :type grant_sql_control_to_managed_identity: + ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ManagedIdentitySqlControlSettingsModel or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModel] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModel]] + :raises: + :class:`ErrorContractException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + grant_sql_control_to_managed_identity=grant_sql_control_to_managed_identity, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedIdentitySqlControlSettingsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/managedIdentitySqlControlSettings/default'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/version.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/version.py index 266f5a486d79..5a7feab42d26 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/version.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.5.0" +VERSION = "0.6.0"