Skip to content
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
16 changes: 10 additions & 6 deletions sdk/synapse/azure-synapse-accesscontrol/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# Release History

## 0.7.0 (2021-08-10)

- Updated API version to "2020-12-01"

## 0.6.0 (2021-03-09)

* Internal bugfixes (re-generated with latest generator)
* Stop Python 3.5 support
- Internal bugfixes (re-generated with latest generator)
- Stop Python 3.5 support

## 0.5.0 (2021-02-09)

* Update to API version 2020-08-01
- Update to API version 2020-08-01

## 0.4.0 (2020-12-08)

* Internal bugfixes (re-generated with latest generator)
- Internal bugfixes (re-generated with latest generator)

## 0.3.0 (2020-09-15)

* Internal bugfixes (re-generated with latest generator)
- Internal bugfixes (re-generated with latest generator)

## 0.2.0 (2020-07-01)

* Initial Release
- Initial Release
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(

self.credential = credential
self.endpoint = endpoint
self.api_version = "2020-08-01-preview"
self.api_version = "2020-12-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default'])
kwargs.setdefault('sdk_moniker', 'synapse-accesscontrol/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "0.6.0"
VERSION = "0.7.0"
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(

self.credential = credential
self.endpoint = endpoint
self.api_version = "2020-08-01-preview"
self.api_version = "2020-12-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default'])
kwargs.setdefault('sdk_moniker', 'synapse-accesscontrol/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def check_principal_access(
subject: "_models.SubjectInfo",
actions: List["_models.RequiredAction"],
scope: str,
**kwargs
**kwargs: Any
) -> "_models.CheckPrincipalAccessResponse":
"""Check if the given principalId has access to perform list of actions at a given scope.

Expand All @@ -66,7 +66,7 @@ async def check_principal_access(
error_map.update(kwargs.pop('error_map', {}))

_request = _models.CheckPrincipalAccessRequest(subject=subject, actions=actions, scope=scope)
api_version = "2020-08-01-preview"
api_version = "2020-12-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json, text/json"

Expand Down Expand Up @@ -112,7 +112,7 @@ async def list_role_assignments(
principal_id: Optional[str] = None,
scope: Optional[str] = None,
continuation_token_parameter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> "_models.RoleAssignmentDetailsList":
"""List role assignments.

Expand All @@ -134,7 +134,7 @@ async def list_role_assignments(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01-preview"
api_version = "2020-12-01"
accept = "application/json, text/json"

# Construct URL
Expand Down Expand Up @@ -186,7 +186,7 @@ async def create_role_assignment(
principal_id: str,
scope: str,
principal_type: Optional[str] = None,
**kwargs
**kwargs: Any
) -> "_models.RoleAssignmentDetails":
"""Create role assignment.

Expand All @@ -212,7 +212,7 @@ async def create_role_assignment(
error_map.update(kwargs.pop('error_map', {}))

_request = _models.RoleAssignmentRequest(role_id=role_id, principal_id=principal_id, scope=scope, principal_type=principal_type)
api_version = "2020-08-01-preview"
api_version = "2020-12-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json, text/json"

Expand Down Expand Up @@ -256,7 +256,7 @@ async def create_role_assignment(
async def get_role_assignment_by_id(
self,
role_assignment_id: str,
**kwargs
**kwargs: Any
) -> "_models.RoleAssignmentDetails":
"""Get role assignment by role assignment Id.

Expand All @@ -272,7 +272,7 @@ async def get_role_assignment_by_id(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01-preview"
api_version = "2020-12-01"
accept = "application/json, text/json"

# Construct URL
Expand Down Expand Up @@ -312,7 +312,7 @@ async def delete_role_assignment_by_id(
self,
role_assignment_id: str,
scope: Optional[str] = None,
**kwargs
**kwargs: Any
) -> None:
"""Delete role assignment by role assignment Id.

Expand All @@ -330,7 +330,7 @@ async def delete_role_assignment_by_id(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01-preview"
api_version = "2020-12-01"
accept = "application/json, text/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def list_role_definitions(
self,
is_built_in: Optional[bool] = None,
scope: Optional[str] = None,
**kwargs
**kwargs: Any
) -> List["_models.SynapseRoleDefinition"]:
"""List role definitions.

Expand All @@ -61,7 +61,7 @@ async def list_role_definitions(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01-preview"
api_version = "2020-12-01"
accept = "application/json, text/json"

# Construct URL
Expand Down Expand Up @@ -103,7 +103,7 @@ async def list_role_definitions(
async def get_role_definition_by_id(
self,
role_definition_id: str,
**kwargs
**kwargs: Any
) -> "_models.SynapseRoleDefinition":
"""Get role definition by role definition Id.

Expand All @@ -119,7 +119,7 @@ async def get_role_definition_by_id(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01-preview"
api_version = "2020-12-01"
accept = "application/json, text/json"

# Construct URL
Expand Down Expand Up @@ -157,7 +157,7 @@ async def get_role_definition_by_id(

async def list_scopes(
self,
**kwargs
**kwargs: Any
) -> List[str]:
"""List rbac scopes.

Expand All @@ -171,7 +171,7 @@ async def list_scopes(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01-preview"
api_version = "2020-12-01"
accept = "application/json, text/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from ._models_py3 import CheckAccessDecision
from ._models_py3 import CheckPrincipalAccessRequest
from ._models_py3 import CheckPrincipalAccessResponse
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorContract
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorResponse
from ._models_py3 import RequiredAction
from ._models_py3 import RoleAssignmentDetails
Expand All @@ -24,8 +24,8 @@
from ._models import CheckAccessDecision # type: ignore
from ._models import CheckPrincipalAccessRequest # type: ignore
from ._models import CheckPrincipalAccessResponse # type: ignore
from ._models import ErrorAdditionalInfo # type: ignore
from ._models import ErrorContract # type: ignore
from ._models import ErrorDetail # type: ignore
from ._models import ErrorResponse # type: ignore
from ._models import RequiredAction # type: ignore
from ._models import RoleAssignmentDetails # type: ignore
Expand All @@ -39,8 +39,8 @@
'CheckAccessDecision',
'CheckPrincipalAccessRequest',
'CheckPrincipalAccessResponse',
'ErrorAdditionalInfo',
'ErrorContract',
'ErrorDetail',
'ErrorResponse',
'RequiredAction',
'RoleAssignmentDetails',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CheckPrincipalAccessResponse(msrest.serialization.Model):
"""

_attribute_map = {
'access_decisions': {'key': 'AccessDecisions', 'type': '[CheckAccessDecision]'},
'access_decisions': {'key': 'accessDecisions', 'type': '[CheckAccessDecision]'},
}

def __init__(
Expand All @@ -92,95 +92,98 @@ def __init__(
self.access_decisions = kwargs.get('access_decisions', None)


class ErrorContract(msrest.serialization.Model):
"""Contains details when the response code indicates an error.
class ErrorAdditionalInfo(msrest.serialization.Model):
"""The resource management error additional info.

:param error: The error details.
:type error: ~azure.synapse.accesscontrol.models.ErrorResponse
Variables are only populated by the server, and will be ignored when sending a request.

:ivar type: The additional info type.
:vartype type: str
:ivar info: The additional info.
:vartype info: any
"""

_validation = {
'type': {'readonly': True},
'info': {'readonly': True},
}

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorResponse'},
'type': {'key': 'type', 'type': 'str'},
'info': {'key': 'info', 'type': 'object'},
}

def __init__(
self,
**kwargs
):
super(ErrorContract, self).__init__(**kwargs)
self.error = kwargs.get('error', None)

super(ErrorAdditionalInfo, self).__init__(**kwargs)
self.type = None
self.info = None

class ErrorDetail(msrest.serialization.Model):
"""ErrorDetail.

All required parameters must be populated in order to send to Azure.
class ErrorContract(msrest.serialization.Model):
"""Contains details when the response code indicates an error.

:param code: Required.
:type code: str
:param message: Required.
:type message: str
:param target:
:type target: str
:param error: The error details.
:type error: ~azure.synapse.accesscontrol.models.ErrorResponse
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'error': {'key': 'error', 'type': 'ErrorResponse'},
}

def __init__(
self,
**kwargs
):
super(ErrorDetail, self).__init__(**kwargs)
self.code = kwargs['code']
self.message = kwargs['message']
self.target = kwargs.get('target', None)
super(ErrorContract, self).__init__(**kwargs)
self.error = kwargs.get('error', None)


class ErrorResponse(msrest.serialization.Model):
"""ErrorResponse.

All required parameters must be populated in order to send to Azure.

:param code: Required.
:type code: str
:param message: Required.
:type message: str
:param target:
:type target: str
:param details:
:type details: list[~azure.synapse.accesscontrol.models.ErrorDetail]
"""Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

Variables are only populated by the server, and will be ignored when sending a request.

:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details: list[~azure.synapse.accesscontrol.models.ErrorResponse]
:ivar additional_info: The error additional info.
:vartype additional_info: list[~azure.synapse.accesscontrol.models.ErrorAdditionalInfo]
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
'details': {'readonly': True},
'additional_info': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorDetail]'},
'details': {'key': 'details', 'type': '[ErrorResponse]'},
'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
}

def __init__(
self,
**kwargs
):
super(ErrorResponse, self).__init__(**kwargs)
self.code = kwargs['code']
self.message = kwargs['message']
self.target = kwargs.get('target', None)
self.details = kwargs.get('details', None)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None


class RequiredAction(msrest.serialization.Model):
Expand Down
Loading