Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[T1] synapse 2020 12 17 #15838

Merged
merged 2 commits into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sdk/synapse/azure-mgmt-synapse/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -728,6 +730,7 @@ class DataMaskingPolicy(ProxyResource):
'masking_level': {'readonly': True},
'location': {'readonly': True},
'kind': {'readonly': True},
'managed_by': {'readonly': True},
}

_attribute_map = {
Expand All @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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 = {
Expand All @@ -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):
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -728,6 +730,7 @@ class DataMaskingPolicy(ProxyResource):
'masking_level': {'readonly': True},
'location': {'readonly': True},
'kind': {'readonly': True},
'managed_by': {'readonly': True},
}

_attribute_map = {
Expand All @@ -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:
Expand All @@ -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):
Expand Down Expand Up @@ -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 = {
Expand All @@ -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
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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<msrest:optionsforoperations>`.
:return: ManagedIdentitySqlControlSettingsModel or ClientRawResponse
if raw=true
:rtype:
~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModel or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorContractException<azure.mgmt.synapse.models.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
Expand Down Expand Up @@ -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)

Expand All @@ -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<ManagedIdentitySqlControlSettingsModel> 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<azure.mgmt.synapse.models.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'}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.5.0"
VERSION = "0.6.0"