Skip to content

Commit 7b88ae6

Browse files
committed
GraphRbac Composite
1 parent f1841a1 commit 7b88ae6

34 files changed

+686
-306
lines changed

azure-graphrbac/azure/graphrbac/graph_rbac_management_client.py

+24-31
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
from msrest import Serializer, Deserializer
2424
from msrestazure import AzureConfiguration
2525
from .version import VERSION
26-
from .operations.application_operations_operations import ApplicationOperationsOperations
27-
from .operations.object_operations_operations import ObjectOperationsOperations
28-
from .operations.group_operations_operations import GroupOperationsOperations
29-
from .operations.service_principal_operations_operations import ServicePrincipalOperationsOperations
30-
from .operations.user_operations_operations import UserOperationsOperations
26+
from .operations.applications_operations import ApplicationsOperations
27+
from .operations.groups_operations import GroupsOperations
28+
from .operations.service_principals_operations import ServicePrincipalsOperations
29+
from .operations.users_operations import UsersOperations
30+
from .operations.objects_operations import ObjectsOperations
3131
from . import models
3232

3333

@@ -39,8 +39,6 @@ class GraphRbacManagementClientConfiguration(AzureConfiguration):
3939
:param credentials: Gets Azure subscription credentials.
4040
:type credentials: :mod:`A msrestazure Credentials
4141
object<msrestazure.azure_active_directory>`
42-
:param api_version: Client Api Version.
43-
:type api_version: str
4442
:param tenant_id: Gets or sets the tenant Id.
4543
:type tenant_id: str
4644
:param accept_language: Gets or sets the preferred language for the
@@ -58,12 +56,10 @@ class GraphRbacManagementClientConfiguration(AzureConfiguration):
5856
"""
5957

6058
def __init__(
61-
self, credentials, tenant_id, api_version='1.6-internal', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
59+
self, credentials, tenant_id, accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
6260

6361
if credentials is None:
6462
raise ValueError("Parameter 'credentials' must not be None.")
65-
if api_version is not None and not isinstance(api_version, str):
66-
raise TypeError("Optional parameter 'api_version' must be str.")
6763
if tenant_id is None:
6864
raise ValueError("Parameter 'tenant_id' must not be None.")
6965
if not isinstance(tenant_id, str):
@@ -79,35 +75,32 @@ def __init__(
7975
self.add_user_agent('Azure-SDK-For-Python')
8076

8177
self.credentials = credentials
82-
self.api_version = api_version
8378
self.tenant_id = tenant_id
8479
self.accept_language = accept_language
8580
self.long_running_operation_retry_timeout = long_running_operation_retry_timeout
8681
self.generate_client_request_id = generate_client_request_id
8782

8883

8984
class GraphRbacManagementClient(object):
90-
"""GraphRbacManagementClient
85+
"""Composite Swagger for GraphRbac Management Client
9186
9287
:ivar config: Configuration for client.
9388
:vartype config: GraphRbacManagementClientConfiguration
9489
95-
:ivar application_operations: ApplicationOperations operations
96-
:vartype application_operations: .operations.ApplicationOperationsOperations
97-
:ivar object_operations: ObjectOperations operations
98-
:vartype object_operations: .operations.ObjectOperationsOperations
99-
:ivar group_operations: GroupOperations operations
100-
:vartype group_operations: .operations.GroupOperationsOperations
101-
:ivar service_principal_operations: ServicePrincipalOperations operations
102-
:vartype service_principal_operations: .operations.ServicePrincipalOperationsOperations
103-
:ivar user_operations: UserOperations operations
104-
:vartype user_operations: .operations.UserOperationsOperations
90+
:ivar applications: Applications operations
91+
:vartype applications: .operations.ApplicationsOperations
92+
:ivar groups: Groups operations
93+
:vartype groups: .operations.GroupsOperations
94+
:ivar service_principals: ServicePrincipals operations
95+
:vartype service_principals: .operations.ServicePrincipalsOperations
96+
:ivar users: Users operations
97+
:vartype users: .operations.UsersOperations
98+
:ivar objects: Objects operations
99+
:vartype objects: .operations.ObjectsOperations
105100
106101
:param credentials: Gets Azure subscription credentials.
107102
:type credentials: :mod:`A msrestazure Credentials
108103
object<msrestazure.azure_active_directory>`
109-
:param api_version: Client Api Version.
110-
:type api_version: str
111104
:param tenant_id: Gets or sets the tenant Id.
112105
:type tenant_id: str
113106
:param accept_language: Gets or sets the preferred language for the
@@ -125,22 +118,22 @@ class GraphRbacManagementClient(object):
125118
"""
126119

127120
def __init__(
128-
self, credentials, tenant_id, api_version='1.6-internal', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
121+
self, credentials, tenant_id, accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
129122

130-
self.config = GraphRbacManagementClientConfiguration(credentials, tenant_id, api_version, accept_language, long_running_operation_retry_timeout, generate_client_request_id, base_url, filepath)
123+
self.config = GraphRbacManagementClientConfiguration(credentials, tenant_id, accept_language, long_running_operation_retry_timeout, generate_client_request_id, base_url, filepath)
131124
self._client = ServiceClient(self.config.credentials, self.config)
132125

133126
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
134127
self._serialize = Serializer(client_models)
135128
self._deserialize = Deserializer(client_models)
136129

137-
self.application_operations = ApplicationOperationsOperations(
130+
self.applications = ApplicationsOperations(
138131
self._client, self.config, self._serialize, self._deserialize)
139-
self.object_operations = ObjectOperationsOperations(
132+
self.groups = GroupsOperations(
140133
self._client, self.config, self._serialize, self._deserialize)
141-
self.group_operations = GroupOperationsOperations(
134+
self.service_principals = ServicePrincipalsOperations(
142135
self._client, self.config, self._serialize, self._deserialize)
143-
self.service_principal_operations = ServicePrincipalOperationsOperations(
136+
self.users = UsersOperations(
144137
self._client, self.config, self._serialize, self._deserialize)
145-
self.user_operations = UserOperationsOperations(
138+
self.objects = ObjectsOperations(
146139
self._client, self.config, self._serialize, self._deserialize)

azure-graphrbac/azure/graphrbac/models/__init__.py

+14-6
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,27 @@
2222
from .key_credential import KeyCredential
2323
from .password_credential import PasswordCredential
2424
from .application_create_parameters import ApplicationCreateParameters
25+
from .application_update_parameters import ApplicationUpdateParameters
2526
from .application_filter import ApplicationFilter
2627
from .application import Application
27-
from .get_objects_parameters import GetObjectsParameters
2828
from .aad_object import AADObject
2929
from .group_add_member_parameters import GroupAddMemberParameters
3030
from .group_create_parameters import GroupCreateParameters
3131
from .ad_group import ADGroup
3232
from .group_get_member_groups_parameters import GroupGetMemberGroupsParameters
33+
from .check_group_membership_parameters import CheckGroupMembershipParameters
34+
from .check_group_membership_result import CheckGroupMembershipResult
3335
from .service_principal_create_parameters import ServicePrincipalCreateParameters
3436
from .service_principal import ServicePrincipal
35-
from .user_create_parameters_password_profile import UserCreateParametersPasswordProfile
37+
from .password_profile import PasswordProfile
3638
from .user_create_parameters import UserCreateParameters
39+
from .user_update_parameters import UserUpdateParameters
3740
from .user import User
3841
from .user_get_member_groups_parameters import UserGetMemberGroupsParameters
42+
from .get_objects_parameters import GetObjectsParameters
3943
from .application_paged import ApplicationPaged
40-
from .aad_object_paged import AADObjectPaged
4144
from .ad_group_paged import ADGroupPaged
45+
from .aad_object_paged import AADObjectPaged
4246
from .str_paged import strPaged
4347
from .service_principal_paged import ServicePrincipalPaged
4448
from .user_paged import UserPaged
@@ -47,23 +51,27 @@
4751
'KeyCredential',
4852
'PasswordCredential',
4953
'ApplicationCreateParameters',
54+
'ApplicationUpdateParameters',
5055
'ApplicationFilter',
5156
'Application',
52-
'GetObjectsParameters',
5357
'AADObject',
5458
'GroupAddMemberParameters',
5559
'GroupCreateParameters',
5660
'ADGroup',
5761
'GroupGetMemberGroupsParameters',
62+
'CheckGroupMembershipParameters',
63+
'CheckGroupMembershipResult',
5864
'ServicePrincipalCreateParameters',
5965
'ServicePrincipal',
60-
'UserCreateParametersPasswordProfile',
66+
'PasswordProfile',
6167
'UserCreateParameters',
68+
'UserUpdateParameters',
6269
'User',
6370
'UserGetMemberGroupsParameters',
71+
'GetObjectsParameters',
6472
'ApplicationPaged',
65-
'AADObjectPaged',
6673
'ADGroupPaged',
74+
'AADObjectPaged',
6775
'strPaged',
6876
'ServicePrincipalPaged',
6977
'UserPaged',

azure-graphrbac/azure/graphrbac/models/aad_object.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323

2424

2525
class AADObject(Model):
26-
"""
27-
Active Directory object information
26+
"""Active Directory object information.
2827
2928
:param object_id: Gets or sets object Id
3029
:type object_id: str

azure-graphrbac/azure/graphrbac/models/aad_object_paged.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AADObjectPaged(Paged):
2828
"""
2929

3030
_attribute_map = {
31-
'next_link': {'key': 'odata.nextLink', 'type': 'str'},
31+
'next_link': {'key': 'odata\\.nextLink', 'type': 'str'},
3232
'current_page': {'key': 'value', 'type': '[AADObject]'}
3333
}
3434

azure-graphrbac/azure/graphrbac/models/ad_group.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323

2424

2525
class ADGroup(Model):
26-
"""
27-
Active Directory group information
26+
"""Active Directory group information.
2827
2928
:param object_id: Gets or sets object Id
3029
:type object_id: str

azure-graphrbac/azure/graphrbac/models/ad_group_paged.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ADGroupPaged(Paged):
2828
"""
2929

3030
_attribute_map = {
31-
'next_link': {'key': 'odata.nextLink', 'type': 'str'},
31+
'next_link': {'key': 'odata\\.nextLink', 'type': 'str'},
3232
'current_page': {'key': 'value', 'type': '[ADGroup]'}
3333
}
3434

azure-graphrbac/azure/graphrbac/models/application.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323

2424

2525
class Application(Model):
26-
"""
27-
Active Directory user information
26+
"""Active Directory user information.
2827
2928
:param object_id: Gets or sets object Id
3029
:type object_id: str
@@ -43,6 +42,8 @@ class Application(Model):
4342
:type identifier_uris: list of str
4443
:param reply_urls: Gets or sets the application reply Urls
4544
:type reply_urls: list of str
45+
:param homepage: Application homepage
46+
:type homepage: str
4647
"""
4748

4849
_attribute_map = {
@@ -54,9 +55,10 @@ class Application(Model):
5455
'display_name': {'key': 'displayName', 'type': 'str'},
5556
'identifier_uris': {'key': 'identifierUris', 'type': '[str]'},
5657
'reply_urls': {'key': 'replyUrls', 'type': '[str]'},
58+
'homepage': {'key': 'homepage', 'type': 'str'},
5759
}
5860

59-
def __init__(self, object_id=None, object_type=None, app_id=None, app_permissions=None, available_to_other_tenants=None, display_name=None, identifier_uris=None, reply_urls=None):
61+
def __init__(self, object_id=None, object_type=None, app_id=None, app_permissions=None, available_to_other_tenants=None, display_name=None, identifier_uris=None, reply_urls=None, homepage=None):
6062
self.object_id = object_id
6163
self.object_type = object_type
6264
self.app_id = app_id
@@ -65,3 +67,4 @@ def __init__(self, object_id=None, object_type=None, app_id=None, app_permission
6567
self.display_name = display_name
6668
self.identifier_uris = identifier_uris
6769
self.reply_urls = reply_urls
70+
self.homepage = homepage

azure-graphrbac/azure/graphrbac/models/application_create_parameters.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323

2424

2525
class ApplicationCreateParameters(Model):
26-
"""
27-
Request parameters for create a new application
26+
"""Request parameters for create a new application.
2827
2928
:param available_to_other_tenants: Indicates if the application will be
3029
available to other tenants

azure-graphrbac/azure/graphrbac/models/application_filter.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323

2424

2525
class ApplicationFilter(Model):
26-
"""
27-
Filter parameters for listing applications
26+
"""Filter parameters for listing applications.
2827
2928
:param display_name_starts_with: Application display name starts with
3029
:type display_name_starts_with: str
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft and contributors. All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
#
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Code generated by Microsoft (R) AutoRest Code Generator.
18+
# Changes may cause incorrect behavior and will be lost if the code is
19+
# regenerated.
20+
# --------------------------------------------------------------------------
21+
22+
from msrest.serialization import Model
23+
24+
25+
class ApplicationUpdateParameters(Model):
26+
"""Request parameters for updating an existing application.
27+
28+
:param display_name: Application display name
29+
:type display_name: str
30+
:param homepage: Application homepage
31+
:type homepage: str
32+
:param identifier_uris: Application Uris
33+
:type identifier_uris: list of str
34+
:param reply_urls: Application reply Urls
35+
:type reply_urls: list of str
36+
:param key_credentials: Gets or sets the list of KeyCredential objects
37+
:type key_credentials: list of :class:`KeyCredential
38+
<azure.graphrbac.models.KeyCredential>`
39+
:param password_credentials: Gets or sets the list of PasswordCredential
40+
objects
41+
:type password_credentials: list of :class:`PasswordCredential
42+
<azure.graphrbac.models.PasswordCredential>`
43+
"""
44+
45+
_attribute_map = {
46+
'display_name': {'key': 'displayName', 'type': 'str'},
47+
'homepage': {'key': 'homepage', 'type': 'str'},
48+
'identifier_uris': {'key': 'identifierUris', 'type': '[str]'},
49+
'reply_urls': {'key': 'replyUrls', 'type': '[str]'},
50+
'key_credentials': {'key': 'keyCredentials', 'type': '[KeyCredential]'},
51+
'password_credentials': {'key': 'passwordCredentials', 'type': '[PasswordCredential]'},
52+
}
53+
54+
def __init__(self, display_name=None, homepage=None, identifier_uris=None, reply_urls=None, key_credentials=None, password_credentials=None):
55+
self.display_name = display_name
56+
self.homepage = homepage
57+
self.identifier_uris = identifier_uris
58+
self.reply_urls = reply_urls
59+
self.key_credentials = key_credentials
60+
self.password_credentials = password_credentials
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft and contributors. All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
#
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Code generated by Microsoft (R) AutoRest Code Generator.
18+
# Changes may cause incorrect behavior and will be lost if the code is
19+
# regenerated.
20+
# --------------------------------------------------------------------------
21+
22+
from msrest.serialization import Model
23+
24+
25+
class CheckGroupMembershipParameters(Model):
26+
"""Request parameters for IsMemberOf API call.
27+
28+
:param group_id: The object ID of the group to check.
29+
:type group_id: str
30+
:param member_id: The object ID of the contact, group, user, or service
31+
principal to check for membership in the specified group.
32+
:type member_id: str
33+
"""
34+
35+
_validation = {
36+
'group_id': {'required': True},
37+
'member_id': {'required': True},
38+
}
39+
40+
_attribute_map = {
41+
'group_id': {'key': 'groupId', 'type': 'str'},
42+
'member_id': {'key': 'memberId', 'type': 'str'},
43+
}
44+
45+
def __init__(self, group_id, member_id):
46+
self.group_id = group_id
47+
self.member_id = member_id

0 commit comments

Comments
 (0)