1
- # --------------------------------------------------------------------------------------------
1
+ # --------------------------------------------------------------------------------------------
2
2
# Copyright (c) Microsoft Corporation. All rights reserved.
3
3
# Licensed under the MIT License. See License.txt in the project root for license information.
4
4
# --------------------------------------------------------------------------------------------
@@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None):
27
27
28
28
def remove_access_control_entries (self , security_namespace_id , token = None , descriptors = None ):
29
29
"""RemoveAccessControlEntries.
30
- [Preview API] Remove the specified ACEs from the ACL belonging to the specified token.
30
+ Remove the specified ACEs from the ACL belonging to the specified token.
31
31
:param str security_namespace_id:
32
32
:param str token:
33
33
:param str descriptors:
@@ -43,14 +43,14 @@ def remove_access_control_entries(self, security_namespace_id, token=None, descr
43
43
query_parameters ['descriptors' ] = self ._serialize .query ('descriptors' , descriptors , 'str' )
44
44
response = self ._send (http_method = 'DELETE' ,
45
45
location_id = 'ac08c8ff-4323-4b08-af90-bcd018d380ce' ,
46
- version = '4.1-preview.1 ' ,
46
+ version = '4.1' ,
47
47
route_values = route_values ,
48
48
query_parameters = query_parameters )
49
49
return self ._deserialize ('bool' , response )
50
50
51
51
def set_access_control_entries (self , container , security_namespace_id ):
52
52
"""SetAccessControlEntries.
53
- [Preview API] Add or update ACEs in the ACL for the provided token. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
53
+ Add or update ACEs in the ACL for the provided token. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
54
54
:param :class:`<object> <security.v4_1.models.object>` container:
55
55
:param str security_namespace_id:
56
56
:rtype: [AccessControlEntry]
@@ -61,15 +61,15 @@ def set_access_control_entries(self, container, security_namespace_id):
61
61
content = self ._serialize .body (container , 'object' )
62
62
response = self ._send (http_method = 'POST' ,
63
63
location_id = 'ac08c8ff-4323-4b08-af90-bcd018d380ce' ,
64
- version = '4.1-preview.1 ' ,
64
+ version = '4.1' ,
65
65
route_values = route_values ,
66
66
content = content ,
67
67
returns_collection = True )
68
68
return self ._deserialize ('[AccessControlEntry]' , response )
69
69
70
70
def query_access_control_lists (self , security_namespace_id , token = None , descriptors = None , include_extended_info = None , recurse = None ):
71
71
"""QueryAccessControlLists.
72
- [Preview API] Return a list of access control lists for the specified security namespace and token.
72
+ Return a list of access control lists for the specified security namespace and token.
73
73
:param str security_namespace_id: Security namespace identifier.
74
74
:param str token: Security token
75
75
:param str descriptors:
@@ -91,15 +91,15 @@ def query_access_control_lists(self, security_namespace_id, token=None, descript
91
91
query_parameters ['recurse' ] = self ._serialize .query ('recurse' , recurse , 'bool' )
92
92
response = self ._send (http_method = 'GET' ,
93
93
location_id = '18a2ad18-7571-46ae-bec7-0c7da1495885' ,
94
- version = '4.1-preview.1 ' ,
94
+ version = '4.1' ,
95
95
route_values = route_values ,
96
96
query_parameters = query_parameters ,
97
97
returns_collection = True )
98
98
return self ._deserialize ('[AccessControlList]' , response )
99
99
100
100
def remove_access_control_lists (self , security_namespace_id , tokens = None , recurse = None ):
101
101
"""RemoveAccessControlLists.
102
- [Preview API] Remove access control lists under the specfied security namespace.
102
+ Remove access control lists under the specfied security namespace.
103
103
:param str security_namespace_id: Security namespace identifier.
104
104
:param str tokens: One or more comma-separated security tokens
105
105
:param bool recurse: If true and this is a hierarchical namespace, also remove child ACLs of the specified tokens.
@@ -115,14 +115,14 @@ def remove_access_control_lists(self, security_namespace_id, tokens=None, recurs
115
115
query_parameters ['recurse' ] = self ._serialize .query ('recurse' , recurse , 'bool' )
116
116
response = self ._send (http_method = 'DELETE' ,
117
117
location_id = '18a2ad18-7571-46ae-bec7-0c7da1495885' ,
118
- version = '4.1-preview.1 ' ,
118
+ version = '4.1' ,
119
119
route_values = route_values ,
120
120
query_parameters = query_parameters )
121
121
return self ._deserialize ('bool' , response )
122
122
123
123
def set_access_control_lists (self , access_control_lists , security_namespace_id ):
124
124
"""SetAccessControlLists.
125
- [Preview API] Create one or more access control lists.
125
+ Create one or more access control lists.
126
126
:param :class:`<VssJsonCollectionWrapper> <security.v4_1.models.VssJsonCollectionWrapper>` access_control_lists:
127
127
:param str security_namespace_id: Security namespace identifier.
128
128
"""
@@ -132,26 +132,26 @@ def set_access_control_lists(self, access_control_lists, security_namespace_id):
132
132
content = self ._serialize .body (access_control_lists , 'VssJsonCollectionWrapper' )
133
133
self ._send (http_method = 'POST' ,
134
134
location_id = '18a2ad18-7571-46ae-bec7-0c7da1495885' ,
135
- version = '4.1-preview.1 ' ,
135
+ version = '4.1' ,
136
136
route_values = route_values ,
137
137
content = content )
138
138
139
139
def has_permissions_batch (self , eval_batch ):
140
140
"""HasPermissionsBatch.
141
- [Preview API] Evaluates multiple permissions for the callign user. Note: This methods does not aggregate the results nor does it short-circut if one of the permissions evaluates to false.
142
- :param :class:`<PermissionEvaluationBatch> <security.v4_1.models.PermissionEvaluationBatch>` eval_batch: The set of permissions to check .
141
+ Evaluates multiple permissions for the calling user. Note: This method does not aggregate the results, nor does it short-circuit if one of the permissions evaluates to false.
142
+ :param :class:`<PermissionEvaluationBatch> <security.v4_1.models.PermissionEvaluationBatch>` eval_batch: The set of evaluation requests .
143
143
:rtype: :class:`<PermissionEvaluationBatch> <security.v4_1.models.PermissionEvaluationBatch>`
144
144
"""
145
145
content = self ._serialize .body (eval_batch , 'PermissionEvaluationBatch' )
146
146
response = self ._send (http_method = 'POST' ,
147
147
location_id = 'cf1faa59-1b63-4448-bf04-13d981a46f5d' ,
148
- version = '4.1-preview.1 ' ,
148
+ version = '4.1' ,
149
149
content = content )
150
150
return self ._deserialize ('PermissionEvaluationBatch' , response )
151
151
152
152
def has_permissions (self , security_namespace_id , permissions = None , tokens = None , always_allow_administrators = None , delimiter = None ):
153
153
"""HasPermissions.
154
- [Preview API] Evaluates whether the caller has the specified permissions on the specified set of security tokens.
154
+ Evaluates whether the caller has the specified permissions on the specified set of security tokens.
155
155
:param str security_namespace_id: Security namespace identifier.
156
156
:param int permissions: Permissions to evaluate.
157
157
:param str tokens: One or more security tokens to evaluate.
@@ -173,15 +173,15 @@ def has_permissions(self, security_namespace_id, permissions=None, tokens=None,
173
173
query_parameters ['delimiter' ] = self ._serialize .query ('delimiter' , delimiter , 'str' )
174
174
response = self ._send (http_method = 'GET' ,
175
175
location_id = 'dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d' ,
176
- version = '4.1-preview.2 ' ,
176
+ version = '4.1' ,
177
177
route_values = route_values ,
178
178
query_parameters = query_parameters ,
179
179
returns_collection = True )
180
180
return self ._deserialize ('[bool]' , response )
181
181
182
182
def remove_permission (self , security_namespace_id , permissions = None , token = None , descriptor = None ):
183
183
"""RemovePermission.
184
- [Preview API] Removes the specified permissions from the caller or specified user or group.
184
+ Removes the specified permissions from the caller or specified user or group.
185
185
:param str security_namespace_id: Security namespace identifier.
186
186
:param int permissions: Permissions to remove.
187
187
:param str token: Security token to remove permissions for.
@@ -200,14 +200,13 @@ def remove_permission(self, security_namespace_id, permissions=None, token=None,
200
200
query_parameters ['descriptor' ] = self ._serialize .query ('descriptor' , descriptor , 'str' )
201
201
response = self ._send (http_method = 'DELETE' ,
202
202
location_id = 'dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d' ,
203
- version = '4.1-preview.2 ' ,
203
+ version = '4.1' ,
204
204
route_values = route_values ,
205
205
query_parameters = query_parameters )
206
206
return self ._deserialize ('AccessControlEntry' , response )
207
207
208
208
def query_security_namespaces (self , security_namespace_id , local_only = None ):
209
209
"""QuerySecurityNamespaces.
210
- [Preview API]
211
210
:param str security_namespace_id:
212
211
:param bool local_only:
213
212
:rtype: [SecurityNamespaceDescription]
@@ -220,7 +219,7 @@ def query_security_namespaces(self, security_namespace_id, local_only=None):
220
219
query_parameters ['localOnly' ] = self ._serialize .query ('local_only' , local_only , 'bool' )
221
220
response = self ._send (http_method = 'GET' ,
222
221
location_id = 'ce7b9f95-fde9-4be8-a86d-83b366f0b87a' ,
223
- version = '4.1-preview.1 ' ,
222
+ version = '4.1' ,
224
223
route_values = route_values ,
225
224
query_parameters = query_parameters ,
226
225
returns_collection = True )
0 commit comments