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
15 changes: 15 additions & 0 deletions azure-mgmt-authorization/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
Release History
===============

0.40.0 (2018-03-13)
+++++++++++++++++++

**Breaking changes**

- Several properties have been flattened ans "properties" attribute is not needed anymore
(e.g. properties.email_address => email_address)
- Some method signature change (e.g. create_by_id)

**Features**

- Adding attributes data_actions / not_data_actions / is_data_actions

API version is now 2018-01-01-preview

0.30.0 (2017-04-28)
+++++++++++++++++++

Expand Down
6 changes: 3 additions & 3 deletions azure-mgmt-authorization/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Authorization Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6.
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down Expand Up @@ -37,8 +37,8 @@ Usage
=====

For code examples, see `Authorization Management
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-mgmt-authorization.html>`__
on readthedocs.org.
<https://docs.microsoft.com/python/api/overview/azure/authorization>`__
on docs.microsoft.com.


Provide Feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.classic_administrators_operations import ClassicAdministratorsOperations
from .operations.permissions_operations import PermissionsOperations
from .operations.provider_operations_metadata_operations import ProviderOperationsMetadataOperations
from .operations.permissions_operations import PermissionsOperations
from .operations.role_assignments_operations import RoleAssignmentsOperations
from .operations.role_definitions_operations import RoleDefinitionsOperations
from . import models
Expand Down Expand Up @@ -46,7 +46,7 @@ def __init__(

super(AuthorizationManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('authorizationmanagementclient/{}'.format(VERSION))
self.add_user_agent('azure-mgmt-authorization/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
Expand All @@ -61,10 +61,10 @@ class AuthorizationManagementClient(object):

:ivar classic_administrators: ClassicAdministrators operations
:vartype classic_administrators: azure.mgmt.authorization.operations.ClassicAdministratorsOperations
:ivar permissions: Permissions operations
:vartype permissions: azure.mgmt.authorization.operations.PermissionsOperations
:ivar provider_operations_metadata: ProviderOperationsMetadata operations
:vartype provider_operations_metadata: azure.mgmt.authorization.operations.ProviderOperationsMetadataOperations
:ivar permissions: Permissions operations
:vartype permissions: azure.mgmt.authorization.operations.PermissionsOperations
:ivar role_assignments: RoleAssignments operations
:vartype role_assignments: azure.mgmt.authorization.operations.RoleAssignmentsOperations
:ivar role_definitions: RoleDefinitions operations
Expand All @@ -85,16 +85,15 @@ def __init__(
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2015-07-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.classic_administrators = ClassicAdministratorsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.permissions = PermissionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.provider_operations_metadata = ProviderOperationsMetadataOperations(
self._client, self.config, self._serialize, self._deserialize)
self.permissions = PermissionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.role_assignments = RoleAssignmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.role_definitions = RoleDefinitionsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,48 @@
# regenerated.
# --------------------------------------------------------------------------

from .role_assignment_filter import RoleAssignmentFilter
from .role_definition_filter import RoleDefinitionFilter
from .classic_administrator_properties import ClassicAdministratorProperties
from .classic_administrator import ClassicAdministrator
from .permission import Permission
from .provider_operation import ProviderOperation
from .resource_type import ResourceType
from .provider_operations_metadata import ProviderOperationsMetadata
from .role_assignment_properties_with_scope import RoleAssignmentPropertiesWithScope
from .role_assignment import RoleAssignment
from .role_assignment_properties import RoleAssignmentProperties
from .role_assignment_create_parameters import RoleAssignmentCreateParameters
from .role_definition_properties import RoleDefinitionProperties
from .role_definition import RoleDefinition
try:
from .classic_administrator_py3 import ClassicAdministrator
from .provider_operation_py3 import ProviderOperation
from .resource_type_py3 import ResourceType
from .provider_operations_metadata_py3 import ProviderOperationsMetadata
from .permission_py3 import Permission
from .role_definition_filter_py3 import RoleDefinitionFilter
from .role_definition_py3 import RoleDefinition
from .role_assignment_filter_py3 import RoleAssignmentFilter
from .role_assignment_py3 import RoleAssignment
from .role_assignment_create_parameters_py3 import RoleAssignmentCreateParameters
except (SyntaxError, ImportError):
from .classic_administrator import ClassicAdministrator
from .provider_operation import ProviderOperation
from .resource_type import ResourceType
from .provider_operations_metadata import ProviderOperationsMetadata
from .permission import Permission
from .role_definition_filter import RoleDefinitionFilter
from .role_definition import RoleDefinition
from .role_assignment_filter import RoleAssignmentFilter
from .role_assignment import RoleAssignment
from .role_assignment_create_parameters import RoleAssignmentCreateParameters
from .classic_administrator_paged import ClassicAdministratorPaged
from .permission_paged import PermissionPaged
from .provider_operations_metadata_paged import ProviderOperationsMetadataPaged
from .permission_paged import PermissionPaged
from .role_assignment_paged import RoleAssignmentPaged
from .role_definition_paged import RoleDefinitionPaged

__all__ = [
'RoleAssignmentFilter',
'RoleDefinitionFilter',
'ClassicAdministratorProperties',
'ClassicAdministrator',
'Permission',
'ProviderOperation',
'ResourceType',
'ProviderOperationsMetadata',
'RoleAssignmentPropertiesWithScope',
'Permission',
'RoleDefinitionFilter',
'RoleDefinition',
'RoleAssignmentFilter',
'RoleAssignment',
'RoleAssignmentProperties',
'RoleAssignmentCreateParameters',
'RoleDefinitionProperties',
'RoleDefinition',
'ClassicAdministratorPaged',
'PermissionPaged',
'ProviderOperationsMetadataPaged',
'PermissionPaged',
'RoleAssignmentPaged',
'RoleDefinitionPaged',
]
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,24 @@ class ClassicAdministrator(Model):
:type name: str
:param type: The type of the administrator.
:type type: str
:param properties: Properties for the classic administrator.
:type properties:
~azure.mgmt.authorization.models.ClassicAdministratorProperties
:param email_address: The email address of the administrator.
:type email_address: str
:param role: The role of the administrator.
:type role: str
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'ClassicAdministratorProperties'},
'email_address': {'key': 'properties.emailAddress', 'type': 'str'},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking:
properties.email_address => email_address
properties.role => role

'role': {'key': 'properties.role', 'type': 'str'},
}

def __init__(self, id=None, name=None, type=None, properties=None):
self.id = id
self.name = name
self.type = type
self.properties = properties
def __init__(self, **kwargs):
super(ClassicAdministrator, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.name = kwargs.get('name', None)
self.type = kwargs.get('type', None)
self.email_address = kwargs.get('email_address', None)
self.role = kwargs.get('role', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ClassicAdministrator(Model):
"""Classic Administrators.

:param id: The ID of the administrator.
:type id: str
:param name: The name of the administrator.
:type name: str
:param type: The type of the administrator.
:type type: str
:param email_address: The email address of the administrator.
:type email_address: str
:param role: The role of the administrator.
:type role: str
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'email_address': {'key': 'properties.emailAddress', 'type': 'str'},
'role': {'key': 'properties.role', 'type': 'str'},
}

def __init__(self, *, id: str=None, name: str=None, type: str=None, email_address: str=None, role: str=None, **kwargs) -> None:
super(ClassicAdministrator, self).__init__(**kwargs)
self.id = id
self.name = name
self.type = type
self.email_address = email_address
self.role = role
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,22 @@ class Permission(Model):
:type actions: list[str]
:param not_actions: Denied actions.
:type not_actions: list[str]
:param data_actions: Allowed Data actions.
:type data_actions: list[str]
:param not_data_actions: Denied Data actions.
:type not_data_actions: list[str]
"""

_attribute_map = {
'actions': {'key': 'actions', 'type': '[str]'},
'not_actions': {'key': 'notActions', 'type': '[str]'},
'data_actions': {'key': 'dataActions', 'type': '[str]'},
'not_data_actions': {'key': 'notDataActions', 'type': '[str]'},
}

def __init__(self, actions=None, not_actions=None):
self.actions = actions
self.not_actions = not_actions
def __init__(self, **kwargs):
super(Permission, self).__init__(**kwargs)
self.actions = kwargs.get('actions', None)
self.not_actions = kwargs.get('not_actions', None)
self.data_actions = kwargs.get('data_actions', None)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new data_actions / not_data_actions

self.not_data_actions = kwargs.get('not_data_actions', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Permission(Model):
"""Role definition permissions.

:param actions: Allowed actions.
:type actions: list[str]
:param not_actions: Denied actions.
:type not_actions: list[str]
:param data_actions: Allowed Data actions.
:type data_actions: list[str]
:param not_data_actions: Denied Data actions.
:type not_data_actions: list[str]
"""

_attribute_map = {
'actions': {'key': 'actions', 'type': '[str]'},
'not_actions': {'key': 'notActions', 'type': '[str]'},
'data_actions': {'key': 'dataActions', 'type': '[str]'},
'not_data_actions': {'key': 'notDataActions', 'type': '[str]'},
}

def __init__(self, *, actions=None, not_actions=None, data_actions=None, not_data_actions=None, **kwargs) -> None:
super(Permission, self).__init__(**kwargs)
self.actions = actions
self.not_actions = not_actions
self.data_actions = data_actions
self.not_data_actions = not_data_actions
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class ProviderOperation(Model):
:type origin: str
:param properties: The operation properties.
:type properties: object
:param is_data_action: The dataAction flag to specify the operation type.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new is_data_action

:type is_data_action: bool
"""

_attribute_map = {
Expand All @@ -33,11 +35,14 @@ class ProviderOperation(Model):
'description': {'key': 'description', 'type': 'str'},
'origin': {'key': 'origin', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'object'},
'is_data_action': {'key': 'isDataAction', 'type': 'bool'},
}

def __init__(self, name=None, display_name=None, description=None, origin=None, properties=None):
self.name = name
self.display_name = display_name
self.description = description
self.origin = origin
self.properties = properties
def __init__(self, **kwargs):
super(ProviderOperation, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display_name = kwargs.get('display_name', None)
self.description = kwargs.get('description', None)
self.origin = kwargs.get('origin', None)
self.properties = kwargs.get('properties', None)
self.is_data_action = kwargs.get('is_data_action', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ProviderOperation(Model):
"""Operation.

:param name: The operation name.
:type name: str
:param display_name: The operation display name.
:type display_name: str
:param description: The operation description.
:type description: str
:param origin: The operation origin.
:type origin: str
:param properties: The operation properties.
:type properties: object
:param is_data_action: The dataAction flag to specify the operation type.
:type is_data_action: bool
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'origin': {'key': 'origin', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'object'},
'is_data_action': {'key': 'isDataAction', 'type': 'bool'},
}

def __init__(self, *, name: str=None, display_name: str=None, description: str=None, origin: str=None, properties=None, is_data_action: bool=None, **kwargs) -> None:
super(ProviderOperation, self).__init__(**kwargs)
self.name = name
self.display_name = display_name
self.description = description
self.origin = origin
self.properties = properties
self.is_data_action = is_data_action
Loading