| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, h1, h2, h3, div, span, p, pre, a { |
| 5 |
margin: 0; |
| 6 |
padding: 0; |
| 7 |
border: 0; |
| 8 |
font-weight: inherit; |
| 9 |
font-style: inherit; |
| 10 |
font-size: 100%; |
| 11 |
font-family: inherit; |
| 12 |
vertical-align: baseline; |
| 13 |
} |
| 14 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, h2, h3 { |
| 50 |
border-bottom: solid #CCC 1px; |
| 51 |
} |
| 52 |
|
| 53 |
.toc_element { |
| 54 |
margin-top: 0.5em; |
| 55 |
} |
| 56 |
|
| 57 |
.firstline { |
| 58 |
margin-left: 2 em; |
| 59 |
} |
| 60 |
|
| 61 |
.method { |
| 62 |
margin-top: 1em; |
| 63 |
border: solid 1px #CCC; |
| 64 |
padding: 1em; |
| 65 |
background: #EEE; |
| 66 |
} |
| 67 |
|
| 68 |
.details { |
| 69 |
font-weight: bold; |
| 70 |
font-size: 14px; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
<h1><a href="admin_directory_v1.html">Admin SDK API</a> . <a href="admin_directory_v1.roleAssignments.html">roleAssignments</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#delete">delete(customer, roleAssignmentId, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Deletes a role assignment.</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#get">get(customer, roleAssignmentId, x__xgafv=None)</a></code></p> |
| 85 |
<p class="firstline">Retrieves a role assignment.</p> |
| 86 |
<p class="toc_element"> |
| 87 |
<code><a href="#insert">insert(customer, body=None, x__xgafv=None)</a></code></p> |
| 88 |
<p class="firstline">Creates a role assignment.</p> |
| 89 |
<p class="toc_element"> |
| 90 |
<code><a href="#list">list(customer, includeIndirectRoleAssignments=None, maxResults=None, pageToken=None, roleId=None, userKey=None, x__xgafv=None)</a></code></p> |
| 91 |
<p class="firstline">Retrieves a paginated list of all roleAssignments.</p> |
| 92 |
<p class="toc_element"> |
| 93 |
<code><a href="#list_next">list_next()</a></code></p> |
| 94 |
<p class="firstline">Retrieves the next page of results.</p> |
| 95 |
<h3>Method Details</h3> |
| 96 |
<div class="method"> |
| 97 |
<code class="details" id="close">close()</code> |
| 98 |
<pre>Close httplib2 connections.</pre> |
| 99 |
</div> |
| 100 |
|
| 101 |
<div class="method"> |
| 102 |
<code class="details" id="delete">delete(customer, roleAssignmentId, x__xgafv=None)</code> |
| 103 |
<pre>Deletes a role assignment. |
| 104 |
|
| 105 |
Args: |
| 106 |
customer: string, Immutable ID of the Google Workspace account. (required) |
| 107 |
roleAssignmentId: string, Immutable ID of the role assignment. (required) |
| 108 |
x__xgafv: string, V1 error format. |
| 109 |
Allowed values |
| 110 |
1 - v1 error format |
| 111 |
2 - v2 error format |
| 112 |
</pre> |
| 113 |
</div> |
| 114 |
|
| 115 |
<div class="method"> |
| 116 |
<code class="details" id="get">get(customer, roleAssignmentId, x__xgafv=None)</code> |
| 117 |
<pre>Retrieves a role assignment. |
| 118 |
|
| 119 |
Args: |
| 120 |
customer: string, The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](https://developers.google.com/workspace/admin/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter. (required) |
| 121 |
roleAssignmentId: string, Immutable ID of the role assignment. (required) |
| 122 |
x__xgafv: string, V1 error format. |
| 123 |
Allowed values |
| 124 |
1 - v1 error format |
| 125 |
2 - v2 error format |
| 126 |
|
| 127 |
Returns: |
| 128 |
An object of the form: |
| 129 |
|
| 130 |
{ # Defines an assignment of a role. |
| 131 |
"assignedTo": "A String", # The unique ID of the entity this role is assigned to—either the `user_id` of a user, the `group_id` of a group, or the `uniqueId` of a service account as defined in [Identity and Access Management (IAM)](https://cloud.google.com/iam/docs/reference/rest/v1/projects.serviceAccounts). |
| 132 |
"assigneeType": "A String", # Output only. The type of the assignee (`USER` or `GROUP`). |
| 133 |
"condition": "A String", # Optional. The condition associated with this role assignment. Note: Feature is available to Enterprise Standard, Enterprise Plus, Google Workspace for Education Plus and Cloud Identity Premium customers. A `RoleAssignment` with the `condition` field set will only take effect when the resource being accessed meets the condition. If `condition` is empty, the role (`role_id`) is applied to the actor (`assigned_to`) at the scope (`scope_type`) unconditionally. Currently, the following conditions are supported: - To make the `RoleAssignment` only applicable to [Security Groups](https://cloud.google.com/identity/docs/groups#group_types): `api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.security']) && resource.type == 'cloudidentity.googleapis.com/Group'` - To make the `RoleAssignment` not applicable to [Security Groups](https://cloud.google.com/identity/docs/groups#group_types): `!api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.security']) && resource.type == 'cloudidentity.googleapis.com/Group'` Currently, the condition strings have to be verbatim and they only work with the following [pre-built administrator roles](https://support.google.com/a/answer/2405986): - Groups Editor - Groups Reader The condition follows [Cloud IAM condition syntax](https://cloud.google.com/iam/docs/conditions-overview). - To make the `RoleAssignment` not applicable to [Locked Groups](https://cloud.google.com/identity/docs/groups#group_types): `!api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.locked']) && resource.type == 'cloudidentity.googleapis.com/Group'` This condition can also be used in conjunction with a Security-related condition. |
| 134 |
"etag": "A String", # ETag of the resource. |
| 135 |
"kind": "admin#directory#roleAssignment", # The type of the API resource. This is always `admin#directory#roleAssignment`. |
| 136 |
"orgUnitId": "A String", # If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. |
| 137 |
"roleAssignmentId": "A String", # ID of this roleAssignment. |
| 138 |
"roleId": "A String", # The ID of the role that is assigned. |
| 139 |
"scopeType": "A String", # The scope in which this role is assigned. |
| 140 |
}</pre> |
| 141 |
</div> |
| 142 |
|
| 143 |
<div class="method"> |
| 144 |
<code class="details" id="insert">insert(customer, body=None, x__xgafv=None)</code> |
| 145 |
<pre>Creates a role assignment. |
| 146 |
|
| 147 |
Args: |
| 148 |
customer: string, Immutable ID of the Google Workspace account. (required) |
| 149 |
body: object, The request body. |
| 150 |
The object takes the form of: |
| 151 |
|
| 152 |
{ # Defines an assignment of a role. |
| 153 |
"assignedTo": "A String", # The unique ID of the entity this role is assigned to—either the `user_id` of a user, the `group_id` of a group, or the `uniqueId` of a service account as defined in [Identity and Access Management (IAM)](https://cloud.google.com/iam/docs/reference/rest/v1/projects.serviceAccounts). |
| 154 |
"assigneeType": "A String", # Output only. The type of the assignee (`USER` or `GROUP`). |
| 155 |
"condition": "A String", # Optional. The condition associated with this role assignment. Note: Feature is available to Enterprise Standard, Enterprise Plus, Google Workspace for Education Plus and Cloud Identity Premium customers. A `RoleAssignment` with the `condition` field set will only take effect when the resource being accessed meets the condition. If `condition` is empty, the role (`role_id`) is applied to the actor (`assigned_to`) at the scope (`scope_type`) unconditionally. Currently, the following conditions are supported: - To make the `RoleAssignment` only applicable to [Security Groups](https://cloud.google.com/identity/docs/groups#group_types): `api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.security']) && resource.type == 'cloudidentity.googleapis.com/Group'` - To make the `RoleAssignment` not applicable to [Security Groups](https://cloud.google.com/identity/docs/groups#group_types): `!api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.security']) && resource.type == 'cloudidentity.googleapis.com/Group'` Currently, the condition strings have to be verbatim and they only work with the following [pre-built administrator roles](https://support.google.com/a/answer/2405986): - Groups Editor - Groups Reader The condition follows [Cloud IAM condition syntax](https://cloud.google.com/iam/docs/conditions-overview). - To make the `RoleAssignment` not applicable to [Locked Groups](https://cloud.google.com/identity/docs/groups#group_types): `!api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.locked']) && resource.type == 'cloudidentity.googleapis.com/Group'` This condition can also be used in conjunction with a Security-related condition. |
| 156 |
"etag": "A String", # ETag of the resource. |
| 157 |
"kind": "admin#directory#roleAssignment", # The type of the API resource. This is always `admin#directory#roleAssignment`. |
| 158 |
"orgUnitId": "A String", # If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. |
| 159 |
"roleAssignmentId": "A String", # ID of this roleAssignment. |
| 160 |
"roleId": "A String", # The ID of the role that is assigned. |
| 161 |
"scopeType": "A String", # The scope in which this role is assigned. |
| 162 |
} |
| 163 |
|
| 164 |
x__xgafv: string, V1 error format. |
| 165 |
Allowed values |
| 166 |
1 - v1 error format |
| 167 |
2 - v2 error format |
| 168 |
|
| 169 |
Returns: |
| 170 |
An object of the form: |
| 171 |
|
| 172 |
{ # Defines an assignment of a role. |
| 173 |
"assignedTo": "A String", # The unique ID of the entity this role is assigned to—either the `user_id` of a user, the `group_id` of a group, or the `uniqueId` of a service account as defined in [Identity and Access Management (IAM)](https://cloud.google.com/iam/docs/reference/rest/v1/projects.serviceAccounts). |
| 174 |
"assigneeType": "A String", # Output only. The type of the assignee (`USER` or `GROUP`). |
| 175 |
"condition": "A String", # Optional. The condition associated with this role assignment. Note: Feature is available to Enterprise Standard, Enterprise Plus, Google Workspace for Education Plus and Cloud Identity Premium customers. A `RoleAssignment` with the `condition` field set will only take effect when the resource being accessed meets the condition. If `condition` is empty, the role (`role_id`) is applied to the actor (`assigned_to`) at the scope (`scope_type`) unconditionally. Currently, the following conditions are supported: - To make the `RoleAssignment` only applicable to [Security Groups](https://cloud.google.com/identity/docs/groups#group_types): `api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.security']) && resource.type == 'cloudidentity.googleapis.com/Group'` - To make the `RoleAssignment` not applicable to [Security Groups](https://cloud.google.com/identity/docs/groups#group_types): `!api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.security']) && resource.type == 'cloudidentity.googleapis.com/Group'` Currently, the condition strings have to be verbatim and they only work with the following [pre-built administrator roles](https://support.google.com/a/answer/2405986): - Groups Editor - Groups Reader The condition follows [Cloud IAM condition syntax](https://cloud.google.com/iam/docs/conditions-overview). - To make the `RoleAssignment` not applicable to [Locked Groups](https://cloud.google.com/identity/docs/groups#group_types): `!api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.locked']) && resource.type == 'cloudidentity.googleapis.com/Group'` This condition can also be used in conjunction with a Security-related condition. |
| 176 |
"etag": "A String", # ETag of the resource. |
| 177 |
"kind": "admin#directory#roleAssignment", # The type of the API resource. This is always `admin#directory#roleAssignment`. |
| 178 |
"orgUnitId": "A String", # If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. |
| 179 |
"roleAssignmentId": "A String", # ID of this roleAssignment. |
| 180 |
"roleId": "A String", # The ID of the role that is assigned. |
| 181 |
"scopeType": "A String", # The scope in which this role is assigned. |
| 182 |
}</pre> |
| 183 |
</div> |
| 184 |
|
| 185 |
<div class="method"> |
| 186 |
<code class="details" id="list">list(customer, includeIndirectRoleAssignments=None, maxResults=None, pageToken=None, roleId=None, userKey=None, x__xgafv=None)</code> |
| 187 |
<pre>Retrieves a paginated list of all roleAssignments. |
| 188 |
|
| 189 |
Args: |
| 190 |
customer: string, The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](https://developers.google.com/workspace/admin/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter. (required) |
| 191 |
includeIndirectRoleAssignments: boolean, When set to `true`, fetches indirect role assignments (i.e. role assignment via a group) as well as direct ones. Defaults to `false`. You must specify `user_key` or the indirect role assignments will not be included. |
| 192 |
maxResults: integer, Maximum number of results to return. |
| 193 |
pageToken: string, Token to specify the next page in the list. |
| 194 |
roleId: string, Immutable ID of a role. If included in the request, returns only role assignments containing this role ID. |
| 195 |
userKey: string, The primary email address, alias email address, or unique user or group ID. If included in the request, returns role assignments only for this user or group. |
| 196 |
x__xgafv: string, V1 error format. |
| 197 |
Allowed values |
| 198 |
1 - v1 error format |
| 199 |
2 - v2 error format |
| 200 |
|
| 201 |
Returns: |
| 202 |
An object of the form: |
| 203 |
|
| 204 |
{ |
| 205 |
"etag": "A String", # ETag of the resource. |
| 206 |
"items": [ # A list of RoleAssignment resources. |
| 207 |
{ # Defines an assignment of a role. |
| 208 |
"assignedTo": "A String", # The unique ID of the entity this role is assigned to—either the `user_id` of a user, the `group_id` of a group, or the `uniqueId` of a service account as defined in [Identity and Access Management (IAM)](https://cloud.google.com/iam/docs/reference/rest/v1/projects.serviceAccounts). |
| 209 |
"assigneeType": "A String", # Output only. The type of the assignee (`USER` or `GROUP`). |
| 210 |
"condition": "A String", # Optional. The condition associated with this role assignment. Note: Feature is available to Enterprise Standard, Enterprise Plus, Google Workspace for Education Plus and Cloud Identity Premium customers. A `RoleAssignment` with the `condition` field set will only take effect when the resource being accessed meets the condition. If `condition` is empty, the role (`role_id`) is applied to the actor (`assigned_to`) at the scope (`scope_type`) unconditionally. Currently, the following conditions are supported: - To make the `RoleAssignment` only applicable to [Security Groups](https://cloud.google.com/identity/docs/groups#group_types): `api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.security']) && resource.type == 'cloudidentity.googleapis.com/Group'` - To make the `RoleAssignment` not applicable to [Security Groups](https://cloud.google.com/identity/docs/groups#group_types): `!api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.security']) && resource.type == 'cloudidentity.googleapis.com/Group'` Currently, the condition strings have to be verbatim and they only work with the following [pre-built administrator roles](https://support.google.com/a/answer/2405986): - Groups Editor - Groups Reader The condition follows [Cloud IAM condition syntax](https://cloud.google.com/iam/docs/conditions-overview). - To make the `RoleAssignment` not applicable to [Locked Groups](https://cloud.google.com/identity/docs/groups#group_types): `!api.getAttribute('cloudidentity.googleapis.com/groups.labels', []).hasAny(['groups.locked']) && resource.type == 'cloudidentity.googleapis.com/Group'` This condition can also be used in conjunction with a Security-related condition. |
| 211 |
"etag": "A String", # ETag of the resource. |
| 212 |
"kind": "admin#directory#roleAssignment", # The type of the API resource. This is always `admin#directory#roleAssignment`. |
| 213 |
"orgUnitId": "A String", # If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. |
| 214 |
"roleAssignmentId": "A String", # ID of this roleAssignment. |
| 215 |
"roleId": "A String", # The ID of the role that is assigned. |
| 216 |
"scopeType": "A String", # The scope in which this role is assigned. |
| 217 |
}, |
| 218 |
], |
| 219 |
"kind": "admin#directory#roleAssignments", # The type of the API resource. This is always `admin#directory#roleAssignments`. |
| 220 |
"nextPageToken": "A String", |
| 221 |
}</pre> |
| 222 |
</div> |
| 223 |
|
| 224 |
<div class="method"> |
| 225 |
<code class="details" id="list_next">list_next()</code> |
| 226 |
<pre>Retrieves the next page of results. |
| 227 |
|
| 228 |
Args: |
| 229 |
previous_request: The request for the previous page. (required) |
| 230 |
previous_response: The response from the request for the previous page. (required) |
| 231 |
|
| 232 |
Returns: |
| 233 |
A request object that you can call 'execute()' on to request the next |
| 234 |
page. Returns None if there are no more items in the collection. |
| 235 |
</pre> |
| 236 |
</div> |
| 237 |
|
| 238 |
</body></html> |