Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="cloudresourcemanager_v1beta1.html">Cloud Resource Manager API</a> . <a href="cloudresourcemanager_v1beta1.projects.html">projects</a></h1> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#create">create(body=None, useLegacyStack=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 79 | <p class="firstline">Creates a Project resource.</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 80 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 81 | <code><a href="#delete">delete(projectId, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 82 | <p class="firstline">Marks the Project identified by the specified</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 83 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 84 | <code><a href="#get">get(projectId, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 85 | <p class="firstline">Retrieves the Project identified by the specified</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 86 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 87 | <code><a href="#getAncestry">getAncestry(projectId, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 88 | <p class="firstline">Gets a list of ancestors in the resource hierarchy for the Project</p> |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 89 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 90 | <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 91 | <p class="firstline">Returns the IAM access control policy for the specified Project.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 93 | <code><a href="#list">list(filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Lists Projects that the caller has the `resourcemanager.projects.get`</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 95 | <p class="toc_element"> |
| 96 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 97 | <p class="firstline">Retrieves the next page of results.</p> |
| 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 100 | <p class="firstline">Sets the IAM access control policy for the specified Project.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 101 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 103 | <p class="firstline">Returns permissions that a caller has on the specified Project.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 104 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 105 | <code><a href="#undelete">undelete(projectId, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 106 | <p class="firstline">Restores the Project identified by the specified</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 107 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | <code><a href="#update">update(projectId, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 109 | <p class="firstline">Updates the attributes of the Project identified by the specified</p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 110 | <h3>Method Details</h3> |
| 111 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 112 | <code class="details" id="create">create(body=None, useLegacyStack=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 113 | <pre>Creates a Project resource. |
| 114 | |
| 115 | Initially, the Project resource is owned by its creator exclusively. |
| 116 | The creator can later grant permission to others to read or update the |
| 117 | Project. |
| 118 | |
| 119 | Several APIs are activated automatically for the Project, including |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 120 | Google Cloud Storage. The parent is identified by a specified |
| 121 | ResourceId, which must include both an ID and a type, such as |
| 122 | project, folder, or organization. |
| 123 | |
| 124 | This method does not associate the new project with a billing account. |
| 125 | You can set or update the billing account associated with a project using |
| 126 | the [`projects.updateBillingInfo`] |
| 127 | (/billing/reference/rest/v1/projects/updateBillingInfo) method. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 128 | |
| 129 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 130 | body: object, The request body. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 131 | The object takes the form of: |
| 132 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 133 | { # A Project is a high-level Google Cloud Platform entity. It is a |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 134 | # container for ACLs, APIs, App Engine Apps, VMs, and other |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 135 | # Google Cloud Platform resources. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 136 | "projectId": "A String", # The unique, user-assigned ID of the Project. |
| 137 | # It must be 6 to 30 lowercase letters, digits, or hyphens. |
| 138 | # It must start with a letter. |
| 139 | # Trailing hyphens are prohibited. |
| 140 | # |
| 141 | # Example: <code>tokyo-rain-123</code> |
| 142 | # Read-only after creation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 143 | "labels": { # The labels associated with this Project. |
| 144 | # |
| 145 | # Label keys must be between 1 and 63 characters long and must conform |
| 146 | # to the following regular expression: a-z{0,62}. |
| 147 | # |
| 148 | # Label values must be between 0 and 63 characters long and must conform |
| 149 | # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. |
| 150 | # |
| 151 | # No more than 256 labels can be associated with a given resource. |
| 152 | # |
| 153 | # Clients should store labels in a representation such as JSON that does not |
| 154 | # depend on specific characters being disallowed. |
| 155 | # |
| 156 | # Example: <code>"environment" : "dev"</code> |
| 157 | # Read-write. |
| 158 | "a_key": "A String", |
| 159 | }, |
| 160 | "createTime": "A String", # Creation time. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 161 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 162 | # Read-only. |
| 163 | "projectNumber": "A String", # The number uniquely identifying the project. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 164 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 165 | # Example: <code>415104041262</code> |
| 166 | # Read-only. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 167 | "lifecycleState": "A String", # The Project lifecycle state. |
| 168 | # |
| 169 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 170 | "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource. |
| 171 | # |
| 172 | # Supported parent types include "organization" and "folder". Once set, the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 173 | # parent cannot be cleared. The `parent` can be set on creation or using the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 174 | # `UpdateProject` method; the end user must have the |
| 175 | # `resourcemanager.projects.create` permission on the parent. |
| 176 | # |
| 177 | # Read-write. |
| 178 | # Cloud Platform is a generic term for something you (a developer) may want to |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 179 | # interact with through one of our API's. Some examples are an App Engine app, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 180 | # a Compute Engine instance, a Cloud SQL database, and so on. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 181 | "id": "A String", # Required field for the type-specific id. This should correspond to the id |
| 182 | # used in the type-specific API's. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 183 | "type": "A String", # Required field representing the resource type this id is for. |
| 184 | # At present, the valid types are "project", "folder", and "organization". |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 185 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 186 | "name": "A String", # The optional user-assigned display name of the Project. |
| 187 | # When present it must be between 4 to 30 characters. |
| 188 | # Allowed characters are: lowercase and uppercase letters, numbers, |
| 189 | # hyphen, single-quote, double-quote, space, and exclamation point. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 190 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 191 | # Example: <code>My Project</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 192 | # Read-write. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 193 | } |
| 194 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 195 | useLegacyStack: boolean, A now unused experiment opt-out option. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 196 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 197 | Allowed values |
| 198 | 1 - v1 error format |
| 199 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 200 | |
| 201 | Returns: |
| 202 | An object of the form: |
| 203 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 204 | { # A Project is a high-level Google Cloud Platform entity. It is a |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 205 | # container for ACLs, APIs, App Engine Apps, VMs, and other |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 206 | # Google Cloud Platform resources. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 207 | "projectId": "A String", # The unique, user-assigned ID of the Project. |
| 208 | # It must be 6 to 30 lowercase letters, digits, or hyphens. |
| 209 | # It must start with a letter. |
| 210 | # Trailing hyphens are prohibited. |
| 211 | # |
| 212 | # Example: <code>tokyo-rain-123</code> |
| 213 | # Read-only after creation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 214 | "labels": { # The labels associated with this Project. |
| 215 | # |
| 216 | # Label keys must be between 1 and 63 characters long and must conform |
| 217 | # to the following regular expression: a-z{0,62}. |
| 218 | # |
| 219 | # Label values must be between 0 and 63 characters long and must conform |
| 220 | # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. |
| 221 | # |
| 222 | # No more than 256 labels can be associated with a given resource. |
| 223 | # |
| 224 | # Clients should store labels in a representation such as JSON that does not |
| 225 | # depend on specific characters being disallowed. |
| 226 | # |
| 227 | # Example: <code>"environment" : "dev"</code> |
| 228 | # Read-write. |
| 229 | "a_key": "A String", |
| 230 | }, |
| 231 | "createTime": "A String", # Creation time. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 232 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 233 | # Read-only. |
| 234 | "projectNumber": "A String", # The number uniquely identifying the project. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 235 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 236 | # Example: <code>415104041262</code> |
| 237 | # Read-only. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 238 | "lifecycleState": "A String", # The Project lifecycle state. |
| 239 | # |
| 240 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 241 | "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource. |
| 242 | # |
| 243 | # Supported parent types include "organization" and "folder". Once set, the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 244 | # parent cannot be cleared. The `parent` can be set on creation or using the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 245 | # `UpdateProject` method; the end user must have the |
| 246 | # `resourcemanager.projects.create` permission on the parent. |
| 247 | # |
| 248 | # Read-write. |
| 249 | # Cloud Platform is a generic term for something you (a developer) may want to |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 250 | # interact with through one of our API's. Some examples are an App Engine app, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 251 | # a Compute Engine instance, a Cloud SQL database, and so on. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 252 | "id": "A String", # Required field for the type-specific id. This should correspond to the id |
| 253 | # used in the type-specific API's. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 254 | "type": "A String", # Required field representing the resource type this id is for. |
| 255 | # At present, the valid types are "project", "folder", and "organization". |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 256 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 257 | "name": "A String", # The optional user-assigned display name of the Project. |
| 258 | # When present it must be between 4 to 30 characters. |
| 259 | # Allowed characters are: lowercase and uppercase letters, numbers, |
| 260 | # hyphen, single-quote, double-quote, space, and exclamation point. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 261 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 262 | # Example: <code>My Project</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 263 | # Read-write. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 264 | }</pre> |
| 265 | </div> |
| 266 | |
| 267 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 268 | <code class="details" id="delete">delete(projectId, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 269 | <pre>Marks the Project identified by the specified |
| 270 | `project_id` (for example, `my-project-123`) for deletion. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 271 | This method will only affect the Project if it has a lifecycle state of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 272 | ACTIVE. |
| 273 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 274 | This method changes the Project's lifecycle state from |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 275 | ACTIVE |
| 276 | to DELETE_REQUESTED. |
| 277 | The deletion starts at an unspecified time, at which point the project is |
| 278 | no longer accessible. |
| 279 | |
| 280 | Until the deletion completes, you can check the lifecycle state |
| 281 | checked by retrieving the Project with GetProject, |
| 282 | and the Project remains visible to ListProjects. |
| 283 | However, you cannot update the project. |
| 284 | |
| 285 | After the deletion completes, the Project is not retrievable by |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 286 | the GetProject |
| 287 | and ListProjects |
| 288 | methods. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 289 | |
| 290 | The caller must have modify permissions for this Project. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 291 | |
| 292 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 293 | projectId: string, The Project ID (for example, `foo-bar-123`). |
| 294 | |
| 295 | Required. (required) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 296 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 297 | Allowed values |
| 298 | 1 - v1 error format |
| 299 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 300 | |
| 301 | Returns: |
| 302 | An object of the form: |
| 303 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 304 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 305 | # empty messages in your APIs. A typical example is to use it as the request |
| 306 | # or the response type of an API method. For instance: |
| 307 | # |
| 308 | # service Foo { |
| 309 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 310 | # } |
| 311 | # |
| 312 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 313 | }</pre> |
| 314 | </div> |
| 315 | |
| 316 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 317 | <code class="details" id="get">get(projectId, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 318 | <pre>Retrieves the Project identified by the specified |
| 319 | `project_id` (for example, `my-project-123`). |
| 320 | |
| 321 | The caller must have read permissions for this Project. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 322 | |
| 323 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 324 | projectId: string, The Project ID (for example, `my-project-123`). |
| 325 | |
| 326 | Required. (required) |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 327 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 328 | Allowed values |
| 329 | 1 - v1 error format |
| 330 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 331 | |
| 332 | Returns: |
| 333 | An object of the form: |
| 334 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 335 | { # A Project is a high-level Google Cloud Platform entity. It is a |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 336 | # container for ACLs, APIs, App Engine Apps, VMs, and other |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 337 | # Google Cloud Platform resources. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 338 | "projectId": "A String", # The unique, user-assigned ID of the Project. |
| 339 | # It must be 6 to 30 lowercase letters, digits, or hyphens. |
| 340 | # It must start with a letter. |
| 341 | # Trailing hyphens are prohibited. |
| 342 | # |
| 343 | # Example: <code>tokyo-rain-123</code> |
| 344 | # Read-only after creation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 345 | "labels": { # The labels associated with this Project. |
| 346 | # |
| 347 | # Label keys must be between 1 and 63 characters long and must conform |
| 348 | # to the following regular expression: a-z{0,62}. |
| 349 | # |
| 350 | # Label values must be between 0 and 63 characters long and must conform |
| 351 | # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. |
| 352 | # |
| 353 | # No more than 256 labels can be associated with a given resource. |
| 354 | # |
| 355 | # Clients should store labels in a representation such as JSON that does not |
| 356 | # depend on specific characters being disallowed. |
| 357 | # |
| 358 | # Example: <code>"environment" : "dev"</code> |
| 359 | # Read-write. |
| 360 | "a_key": "A String", |
| 361 | }, |
| 362 | "createTime": "A String", # Creation time. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 363 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 364 | # Read-only. |
| 365 | "projectNumber": "A String", # The number uniquely identifying the project. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 366 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 367 | # Example: <code>415104041262</code> |
| 368 | # Read-only. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 369 | "lifecycleState": "A String", # The Project lifecycle state. |
| 370 | # |
| 371 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 372 | "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource. |
| 373 | # |
| 374 | # Supported parent types include "organization" and "folder". Once set, the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 375 | # parent cannot be cleared. The `parent` can be set on creation or using the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 376 | # `UpdateProject` method; the end user must have the |
| 377 | # `resourcemanager.projects.create` permission on the parent. |
| 378 | # |
| 379 | # Read-write. |
| 380 | # Cloud Platform is a generic term for something you (a developer) may want to |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 381 | # interact with through one of our API's. Some examples are an App Engine app, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 382 | # a Compute Engine instance, a Cloud SQL database, and so on. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 383 | "id": "A String", # Required field for the type-specific id. This should correspond to the id |
| 384 | # used in the type-specific API's. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 385 | "type": "A String", # Required field representing the resource type this id is for. |
| 386 | # At present, the valid types are "project", "folder", and "organization". |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 387 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 388 | "name": "A String", # The optional user-assigned display name of the Project. |
| 389 | # When present it must be between 4 to 30 characters. |
| 390 | # Allowed characters are: lowercase and uppercase letters, numbers, |
| 391 | # hyphen, single-quote, double-quote, space, and exclamation point. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 392 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 393 | # Example: <code>My Project</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 394 | # Read-write. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 395 | }</pre> |
| 396 | </div> |
| 397 | |
| 398 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 399 | <code class="details" id="getAncestry">getAncestry(projectId, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 400 | <pre>Gets a list of ancestors in the resource hierarchy for the Project |
| 401 | identified by the specified `project_id` (for example, `my-project-123`). |
| 402 | |
| 403 | The caller must have read permissions for this Project. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 404 | |
| 405 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 406 | projectId: string, The Project ID (for example, `my-project-123`). |
| 407 | |
| 408 | Required. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 409 | body: object, The request body. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 410 | The object takes the form of: |
| 411 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 412 | { # The request sent to the |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 413 | # [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.GetAncestry] |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 414 | # method. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 415 | } |
| 416 | |
| 417 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 418 | Allowed values |
| 419 | 1 - v1 error format |
| 420 | 2 - v2 error format |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 421 | |
| 422 | Returns: |
| 423 | An object of the form: |
| 424 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 425 | { # Response from the |
| 426 | # projects.getAncestry |
| 427 | # method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 428 | "ancestor": [ # Ancestors are ordered from bottom to top of the resource hierarchy. The |
| 429 | # first ancestor is the project itself, followed by the project's parent, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 430 | # etc. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 431 | { # Identifying information for a single ancestor of a project. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 432 | "resourceId": { # A container to reference an id for any resource type. A `resource` in Google # Resource id of the ancestor. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 433 | # Cloud Platform is a generic term for something you (a developer) may want to |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 434 | # interact with through one of our API's. Some examples are an App Engine app, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 435 | # a Compute Engine instance, a Cloud SQL database, and so on. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 436 | "id": "A String", # Required field for the type-specific id. This should correspond to the id |
| 437 | # used in the type-specific API's. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 438 | "type": "A String", # Required field representing the resource type this id is for. |
| 439 | # At present, the valid types are "project", "folder", and "organization". |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 440 | }, |
| 441 | }, |
| 442 | ], |
| 443 | }</pre> |
| 444 | </div> |
| 445 | |
| 446 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 447 | <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 448 | <pre>Returns the IAM access control policy for the specified Project. |
| 449 | Permission is denied if the policy or the resource does not exist. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 450 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 451 | For additional information about resource structure and identification, |
| 452 | see [Resource Names](/apis/design/resource_names). |
| 453 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 454 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 455 | resource: string, REQUIRED: The resource for which the policy is being requested. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 456 | See the operation documentation for the appropriate value for this field. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 457 | body: object, The request body. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 458 | The object takes the form of: |
| 459 | |
| 460 | { # Request message for `GetIamPolicy` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 461 | "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 462 | # `GetIamPolicy`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 463 | "requestedPolicyVersion": 42, # Optional. The policy format version to be returned. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 464 | # |
| 465 | # Valid values are 0, 1, and 3. Requests specifying an invalid value will be |
| 466 | # rejected. |
| 467 | # |
| 468 | # Requests for policies with any conditional bindings must specify version 3. |
| 469 | # Policies without any conditional bindings may specify any valid value or |
| 470 | # leave the field unset. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 471 | # |
| 472 | # To learn which resources support conditions in their IAM policies, see the |
| 473 | # [IAM |
| 474 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 475 | }, |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 476 | } |
| 477 | |
| 478 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 479 | Allowed values |
| 480 | 1 - v1 error format |
| 481 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 482 | |
| 483 | Returns: |
| 484 | An object of the form: |
| 485 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 486 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 487 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 488 | # |
| 489 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 490 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 491 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 492 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 493 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 494 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 495 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 496 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 497 | # `condition`, which is a logical expression that allows access to a resource |
| 498 | # only if the expression evaluates to `true`. A condition can add constraints |
| 499 | # based on attributes of the request, the resource, or both. To learn which |
| 500 | # resources support conditions in their IAM policies, see the |
| 501 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 502 | # |
| 503 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 504 | # |
| 505 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 506 | # "bindings": [ |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 507 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 508 | # "role": "roles/resourcemanager.organizationAdmin", |
| 509 | # "members": [ |
| 510 | # "user:mike@example.com", |
| 511 | # "group:admins@example.com", |
| 512 | # "domain:google.com", |
| 513 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 514 | # ] |
| 515 | # }, |
| 516 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 517 | # "role": "roles/resourcemanager.organizationViewer", |
| 518 | # "members": [ |
| 519 | # "user:eve@example.com" |
| 520 | # ], |
| 521 | # "condition": { |
| 522 | # "title": "expirable access", |
| 523 | # "description": "Does not grant access after Sep 2020", |
| 524 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 525 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 526 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 527 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 528 | # "etag": "BwWWja0YfJA=", |
| 529 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 530 | # } |
| 531 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 532 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 533 | # |
| 534 | # bindings: |
| 535 | # - members: |
| 536 | # - user:mike@example.com |
| 537 | # - group:admins@example.com |
| 538 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 539 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 540 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 541 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 542 | # - user:eve@example.com |
| 543 | # role: roles/resourcemanager.organizationViewer |
| 544 | # condition: |
| 545 | # title: expirable access |
| 546 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 547 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 548 | # - etag: BwWWja0YfJA= |
| 549 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 550 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 551 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 552 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 553 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 554 | # prevent simultaneous updates of a policy from overwriting each other. |
| 555 | # It is strongly suggested that systems make use of the `etag` in the |
| 556 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 557 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 558 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 559 | # ensure that their change will be applied to the same version of the policy. |
| 560 | # |
| 561 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 562 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 563 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 564 | # the conditions in the version `3` policy are lost. |
| 565 | "version": 42, # Specifies the format of the policy. |
| 566 | # |
| 567 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 568 | # are rejected. |
| 569 | # |
| 570 | # Any operation that affects conditional role bindings must specify version |
| 571 | # `3`. This requirement applies to the following operations: |
| 572 | # |
| 573 | # * Getting a policy that includes a conditional role binding |
| 574 | # * Adding a conditional role binding to a policy |
| 575 | # * Changing a conditional role binding in a policy |
| 576 | # * Removing any role binding, with or without a condition, from a policy |
| 577 | # that includes conditions |
| 578 | # |
| 579 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 580 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 581 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 582 | # the conditions in the version `3` policy are lost. |
| 583 | # |
| 584 | # If a policy does not include any conditions, operations on that policy may |
| 585 | # specify any valid version or leave the field unset. |
| 586 | # |
| 587 | # To learn which resources support conditions in their IAM policies, see the |
| 588 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 589 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 590 | # `condition` that determines how and when the `bindings` are applied. Each |
| 591 | # of the `bindings` must contain at least one member. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 592 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 593 | "role": "A String", # Role that is assigned to `members`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 594 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 595 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 596 | # |
| 597 | # If the condition evaluates to `true`, then this binding applies to the |
| 598 | # current request. |
| 599 | # |
| 600 | # If the condition evaluates to `false`, then this binding does not apply to |
| 601 | # the current request. However, a different role binding might grant the same |
| 602 | # role to one or more of the members in this binding. |
| 603 | # |
| 604 | # To learn which resources support conditions in their IAM policies, see the |
| 605 | # [IAM |
| 606 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 607 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 608 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 609 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 610 | # Example (Comparison): |
| 611 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 612 | # title: "Summary size limit" |
| 613 | # description: "Determines if a summary is less than 100 chars" |
| 614 | # expression: "document.summary.size() < 100" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 615 | # |
| 616 | # Example (Equality): |
| 617 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 618 | # title: "Requestor is owner" |
| 619 | # description: "Determines if requestor is the document owner" |
| 620 | # expression: "document.owner == request.auth.claims.email" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 621 | # |
| 622 | # Example (Logic): |
| 623 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 624 | # title: "Public documents" |
| 625 | # description: "Determine whether the document should be publicly visible" |
| 626 | # expression: "document.type != 'private' && document.type != 'internal'" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 627 | # |
| 628 | # Example (Data Manipulation): |
| 629 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 630 | # title: "Notification string" |
| 631 | # description: "Create a notification string with a timestamp." |
| 632 | # expression: "'New message received at ' + string(document.create_time)" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 633 | # |
| 634 | # The exact variables and functions that may be referenced within an expression |
| 635 | # are determined by the service that evaluates it. See the service |
| 636 | # documentation for additional information. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 637 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 638 | # syntax. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 639 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 640 | # reporting, e.g. a file name and a position in the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 641 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 642 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 643 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 644 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 645 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 646 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 647 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 648 | # `members` can have the following values: |
| 649 | # |
| 650 | # * `allUsers`: A special identifier that represents anyone who is |
| 651 | # on the internet; with or without a Google account. |
| 652 | # |
| 653 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 654 | # who is authenticated with a Google account or a service account. |
| 655 | # |
| 656 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 657 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 658 | # |
| 659 | # |
| 660 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 661 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 662 | # |
| 663 | # * `group:{emailid}`: An email address that represents a Google group. |
| 664 | # For example, `admins@example.com`. |
| 665 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 666 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 667 | # identifier) representing a user that has been recently deleted. For |
| 668 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 669 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 670 | # retains the role in the binding. |
| 671 | # |
| 672 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 673 | # unique identifier) representing a service account that has been recently |
| 674 | # deleted. For example, |
| 675 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 676 | # If the service account is undeleted, this value reverts to |
| 677 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 678 | # role in the binding. |
| 679 | # |
| 680 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 681 | # identifier) representing a Google group that has been recently |
| 682 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 683 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 684 | # recovered group retains the role in the binding. |
| 685 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 686 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 687 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 688 | # users of that domain. For example, `google.com` or `example.com`. |
| 689 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 690 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 691 | ], |
| 692 | }, |
| 693 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 694 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 695 | { # Specifies the audit configuration for a service. |
| 696 | # The configuration determines which permission types are logged, and what |
| 697 | # identities, if any, are exempted from logging. |
| 698 | # An AuditConfig must have one or more AuditLogConfigs. |
| 699 | # |
| 700 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 701 | # the union of the two AuditConfigs is used for that service: the log_types |
| 702 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 703 | # AuditLogConfig are exempted. |
| 704 | # |
| 705 | # Example Policy with multiple AuditConfigs: |
| 706 | # |
| 707 | # { |
| 708 | # "audit_configs": [ |
| 709 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 710 | # "service": "allServices", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 711 | # "audit_log_configs": [ |
| 712 | # { |
| 713 | # "log_type": "DATA_READ", |
| 714 | # "exempted_members": [ |
| 715 | # "user:jose@example.com" |
| 716 | # ] |
| 717 | # }, |
| 718 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 719 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 720 | # }, |
| 721 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 722 | # "log_type": "ADMIN_READ" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 723 | # } |
| 724 | # ] |
| 725 | # }, |
| 726 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 727 | # "service": "sampleservice.googleapis.com", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 728 | # "audit_log_configs": [ |
| 729 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 730 | # "log_type": "DATA_READ" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 731 | # }, |
| 732 | # { |
| 733 | # "log_type": "DATA_WRITE", |
| 734 | # "exempted_members": [ |
| 735 | # "user:aliya@example.com" |
| 736 | # ] |
| 737 | # } |
| 738 | # ] |
| 739 | # } |
| 740 | # ] |
| 741 | # } |
| 742 | # |
| 743 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 744 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 745 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 746 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 747 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 748 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 749 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 750 | { # Provides the configuration for logging a type of permissions. |
| 751 | # Example: |
| 752 | # |
| 753 | # { |
| 754 | # "audit_log_configs": [ |
| 755 | # { |
| 756 | # "log_type": "DATA_READ", |
| 757 | # "exempted_members": [ |
| 758 | # "user:jose@example.com" |
| 759 | # ] |
| 760 | # }, |
| 761 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 762 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 763 | # } |
| 764 | # ] |
| 765 | # } |
| 766 | # |
| 767 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 768 | # jose@example.com from DATA_READ logging. |
| 769 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 770 | # permission. |
| 771 | # Follows the same format of Binding.members. |
| 772 | "A String", |
| 773 | ], |
| 774 | "logType": "A String", # The log type that this config enables. |
| 775 | }, |
| 776 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 777 | }, |
| 778 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 779 | }</pre> |
| 780 | </div> |
| 781 | |
| 782 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 783 | <code class="details" id="list">list(filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 784 | <pre>Lists Projects that the caller has the `resourcemanager.projects.get` |
| 785 | permission on and satisfy the specified filter. |
| 786 | |
| 787 | This method returns Projects in an unspecified order. |
| 788 | This method is eventually consistent with project mutations; this means |
| 789 | that a newly created project may not appear in the results or recent |
| 790 | updates to an existing project may not be reflected in the results. To |
| 791 | retrieve the latest state of a project, use the |
| 792 | GetProject method. |
| 793 | |
| 794 | NOTE: If the request filter contains a `parent.type` and `parent.id` and |
| 795 | the caller has the `resourcemanager.projects.list` permission on the |
| 796 | parent, the results will be drawn from an alternate index which provides |
| 797 | more consistent results. In future versions of this API, this List method |
| 798 | will be split into List and Search to properly capture the behavorial |
| 799 | difference. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 800 | |
| 801 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 802 | filter: string, An expression for filtering the results of the request. Filter rules are |
| 803 | case insensitive. The fields eligible for filtering are: |
| 804 | |
| 805 | + `name` |
| 806 | + `id` |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 807 | + `labels.<key>` (where *key* is the name of a label) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 808 | + `parent.type` |
| 809 | + `parent.id` |
| 810 | |
| 811 | Some examples of using labels as filters: |
| 812 | |
| 813 | | Filter | Description | |
| 814 | |------------------|-----------------------------------------------------| |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 815 | | name:how* | The project's name starts with "how". | |
| 816 | | name:Howl | The project's name is `Howl` or `howl`. | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 817 | | name:HOWL | Equivalent to above. | |
| 818 | | NAME:howl | Equivalent to above. | |
| 819 | | labels.color:* | The project has the label `color`. | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 820 | | labels.color:red | The project's label `color` has the value `red`. | |
| 821 | | labels.color:red&nbsp;labels.size:big |The project's label `color` has |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 822 | the value `red` and its label `size` has the value `big`. | |
| 823 | |
| 824 | If no filter is specified, the call will return projects for which the user |
| 825 | has the `resourcemanager.projects.get` permission. |
| 826 | |
| 827 | NOTE: To perform a by-parent query (eg., what projects are directly in a |
| 828 | Folder), the caller must have the `resourcemanager.projects.list` |
| 829 | permission on the parent and the filter must contain both a `parent.type` |
| 830 | and a `parent.id` restriction |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 831 | (example: "parent.type:folder parent.id:123"). In this case an alternate |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 832 | search index is used which provides more consistent results. |
| 833 | |
| 834 | Optional. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 835 | pageSize: integer, The maximum number of Projects to return in the response. |
| 836 | The server can return fewer Projects than requested. |
| 837 | If unspecified, server picks an appropriate default. |
| 838 | |
| 839 | Optional. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 840 | pageToken: string, A pagination token returned from a previous call to ListProjects |
| 841 | that indicates from where listing should continue. |
| 842 | |
| 843 | Optional. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 844 | x__xgafv: string, V1 error format. |
| 845 | Allowed values |
| 846 | 1 - v1 error format |
| 847 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 848 | |
| 849 | Returns: |
| 850 | An object of the form: |
| 851 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 852 | { # A page of the response received from the |
| 853 | # ListProjects |
| 854 | # method. |
| 855 | # |
| 856 | # A paginated response where more pages are available has |
| 857 | # `next_page_token` set. This token can be used in a subsequent request to |
| 858 | # retrieve the next request page. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 859 | "nextPageToken": "A String", # Pagination token. |
| 860 | # |
| 861 | # If the result set is too large to fit in a single response, this token |
| 862 | # is returned. It encodes the position of the current result cursor. |
| 863 | # Feeding this value into a new list request with the `page_token` parameter |
| 864 | # gives the next page of the results. |
| 865 | # |
| 866 | # When `next_page_token` is not filled in, there is no next page and |
| 867 | # the list returned is the last page in the result set. |
| 868 | # |
| 869 | # Pagination tokens have a limited lifetime. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 870 | "projects": [ # The list of Projects that matched the list filter. This list can |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 871 | # be paginated. |
| 872 | { # A Project is a high-level Google Cloud Platform entity. It is a |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 873 | # container for ACLs, APIs, App Engine Apps, VMs, and other |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 874 | # Google Cloud Platform resources. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 875 | "projectId": "A String", # The unique, user-assigned ID of the Project. |
| 876 | # It must be 6 to 30 lowercase letters, digits, or hyphens. |
| 877 | # It must start with a letter. |
| 878 | # Trailing hyphens are prohibited. |
| 879 | # |
| 880 | # Example: <code>tokyo-rain-123</code> |
| 881 | # Read-only after creation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 882 | "labels": { # The labels associated with this Project. |
| 883 | # |
| 884 | # Label keys must be between 1 and 63 characters long and must conform |
| 885 | # to the following regular expression: a-z{0,62}. |
| 886 | # |
| 887 | # Label values must be between 0 and 63 characters long and must conform |
| 888 | # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. |
| 889 | # |
| 890 | # No more than 256 labels can be associated with a given resource. |
| 891 | # |
| 892 | # Clients should store labels in a representation such as JSON that does not |
| 893 | # depend on specific characters being disallowed. |
| 894 | # |
| 895 | # Example: <code>"environment" : "dev"</code> |
| 896 | # Read-write. |
| 897 | "a_key": "A String", |
| 898 | }, |
| 899 | "createTime": "A String", # Creation time. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 900 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 901 | # Read-only. |
| 902 | "projectNumber": "A String", # The number uniquely identifying the project. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 903 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 904 | # Example: <code>415104041262</code> |
| 905 | # Read-only. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 906 | "lifecycleState": "A String", # The Project lifecycle state. |
| 907 | # |
| 908 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 909 | "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource. |
| 910 | # |
| 911 | # Supported parent types include "organization" and "folder". Once set, the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 912 | # parent cannot be cleared. The `parent` can be set on creation or using the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 913 | # `UpdateProject` method; the end user must have the |
| 914 | # `resourcemanager.projects.create` permission on the parent. |
| 915 | # |
| 916 | # Read-write. |
| 917 | # Cloud Platform is a generic term for something you (a developer) may want to |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 918 | # interact with through one of our API's. Some examples are an App Engine app, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 919 | # a Compute Engine instance, a Cloud SQL database, and so on. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 920 | "id": "A String", # Required field for the type-specific id. This should correspond to the id |
| 921 | # used in the type-specific API's. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 922 | "type": "A String", # Required field representing the resource type this id is for. |
| 923 | # At present, the valid types are "project", "folder", and "organization". |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 924 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 925 | "name": "A String", # The optional user-assigned display name of the Project. |
| 926 | # When present it must be between 4 to 30 characters. |
| 927 | # Allowed characters are: lowercase and uppercase letters, numbers, |
| 928 | # hyphen, single-quote, double-quote, space, and exclamation point. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 929 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 930 | # Example: <code>My Project</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 931 | # Read-write. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 932 | }, |
| 933 | ], |
| 934 | }</pre> |
| 935 | </div> |
| 936 | |
| 937 | <div class="method"> |
| 938 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 939 | <pre>Retrieves the next page of results. |
| 940 | |
| 941 | Args: |
| 942 | previous_request: The request for the previous page. (required) |
| 943 | previous_response: The response from the request for the previous page. (required) |
| 944 | |
| 945 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 946 | A request object that you can call 'execute()' on to request the next |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 947 | page. Returns None if there are no more items in the collection. |
| 948 | </pre> |
| 949 | </div> |
| 950 | |
| 951 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 952 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 953 | <pre>Sets the IAM access control policy for the specified Project. |
| 954 | |
| 955 | CAUTION: This method will replace the existing policy, and cannot be used |
| 956 | to append additional IAM settings. |
| 957 | |
| 958 | NOTE: Removing service accounts from policies or changing their roles can |
| 959 | render services completely inoperable. It is important to understand how |
| 960 | the service account is being used before removing or updating its roles. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 961 | |
| 962 | The following constraints apply when using `setIamPolicy()`: |
| 963 | |
| 964 | + Project does not support `allUsers` and `allAuthenticatedUsers` as |
| 965 | `members` in a `Binding` of a `Policy`. |
| 966 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 967 | + The owner role can be granted to a `user`, `serviceAccount`, or a group |
| 968 | that is part of an organization. For example, |
| 969 | group@myownpersonaldomain.com could be added as an owner to a project in |
| 970 | the myownpersonaldomain.com organization, but not the examplepetstore.com |
| 971 | organization. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 972 | |
| 973 | + Service accounts can be made owners of a project directly |
| 974 | without any restrictions. However, to be added as an owner, a user must be |
| 975 | invited via Cloud Platform console and must accept the invitation. |
| 976 | |
| 977 | + A user cannot be granted the owner role using `setIamPolicy()`. The user |
| 978 | must be granted the owner role using the Cloud Platform Console and must |
| 979 | explicitly accept the invitation. |
| 980 | |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 981 | + Invitations to grant the owner role cannot be sent using |
| 982 | `setIamPolicy()`; they must be sent only using the Cloud Platform Console. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 983 | |
| 984 | + Membership changes that leave the project without any owners that have |
| 985 | accepted the Terms of Service (ToS) will be rejected. |
| 986 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 987 | + If the project is not part of an organization, there must be at least |
| 988 | one owner who has accepted the Terms of Service (ToS) agreement in the |
| 989 | policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner |
| 990 | from the policy will fail. This restriction also applies to legacy |
| 991 | projects that no longer have owners who have accepted the ToS. Edits to |
| 992 | IAM policies will be rejected until the lack of a ToS-accepting owner is |
| 993 | rectified. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 994 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 995 | Authorization requires the Google IAM permission |
| 996 | `resourcemanager.projects.setIamPolicy` on the project |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 997 | |
| 998 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 999 | resource: string, REQUIRED: The resource for which the policy is being specified. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1000 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1001 | body: object, The request body. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1002 | The object takes the form of: |
| 1003 | |
| 1004 | { # Request message for `SetIamPolicy` method. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1005 | "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only |
| 1006 | # the fields in the mask will be modified. If no mask is provided, the |
| 1007 | # following default mask is used: |
| 1008 | # |
| 1009 | # `paths: "bindings, etag"` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1010 | "policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1011 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 1012 | # valid policy but certain Cloud Platform services (such as Projects) |
| 1013 | # might reject them. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1014 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1015 | # |
| 1016 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1017 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 1018 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 1019 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 1020 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 1021 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1022 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1023 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 1024 | # `condition`, which is a logical expression that allows access to a resource |
| 1025 | # only if the expression evaluates to `true`. A condition can add constraints |
| 1026 | # based on attributes of the request, the resource, or both. To learn which |
| 1027 | # resources support conditions in their IAM policies, see the |
| 1028 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1029 | # |
| 1030 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1031 | # |
| 1032 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1033 | # "bindings": [ |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1034 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1035 | # "role": "roles/resourcemanager.organizationAdmin", |
| 1036 | # "members": [ |
| 1037 | # "user:mike@example.com", |
| 1038 | # "group:admins@example.com", |
| 1039 | # "domain:google.com", |
| 1040 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1041 | # ] |
| 1042 | # }, |
| 1043 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1044 | # "role": "roles/resourcemanager.organizationViewer", |
| 1045 | # "members": [ |
| 1046 | # "user:eve@example.com" |
| 1047 | # ], |
| 1048 | # "condition": { |
| 1049 | # "title": "expirable access", |
| 1050 | # "description": "Does not grant access after Sep 2020", |
| 1051 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1052 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1053 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1054 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1055 | # "etag": "BwWWja0YfJA=", |
| 1056 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1057 | # } |
| 1058 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1059 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1060 | # |
| 1061 | # bindings: |
| 1062 | # - members: |
| 1063 | # - user:mike@example.com |
| 1064 | # - group:admins@example.com |
| 1065 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1066 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 1067 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1068 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1069 | # - user:eve@example.com |
| 1070 | # role: roles/resourcemanager.organizationViewer |
| 1071 | # condition: |
| 1072 | # title: expirable access |
| 1073 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1074 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1075 | # - etag: BwWWja0YfJA= |
| 1076 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1077 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1078 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1079 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1080 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1081 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1082 | # It is strongly suggested that systems make use of the `etag` in the |
| 1083 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1084 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1085 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1086 | # ensure that their change will be applied to the same version of the policy. |
| 1087 | # |
| 1088 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1089 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1090 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1091 | # the conditions in the version `3` policy are lost. |
| 1092 | "version": 42, # Specifies the format of the policy. |
| 1093 | # |
| 1094 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1095 | # are rejected. |
| 1096 | # |
| 1097 | # Any operation that affects conditional role bindings must specify version |
| 1098 | # `3`. This requirement applies to the following operations: |
| 1099 | # |
| 1100 | # * Getting a policy that includes a conditional role binding |
| 1101 | # * Adding a conditional role binding to a policy |
| 1102 | # * Changing a conditional role binding in a policy |
| 1103 | # * Removing any role binding, with or without a condition, from a policy |
| 1104 | # that includes conditions |
| 1105 | # |
| 1106 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1107 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1108 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1109 | # the conditions in the version `3` policy are lost. |
| 1110 | # |
| 1111 | # If a policy does not include any conditions, operations on that policy may |
| 1112 | # specify any valid version or leave the field unset. |
| 1113 | # |
| 1114 | # To learn which resources support conditions in their IAM policies, see the |
| 1115 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1116 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1117 | # `condition` that determines how and when the `bindings` are applied. Each |
| 1118 | # of the `bindings` must contain at least one member. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1119 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1120 | "role": "A String", # Role that is assigned to `members`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1121 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1122 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 1123 | # |
| 1124 | # If the condition evaluates to `true`, then this binding applies to the |
| 1125 | # current request. |
| 1126 | # |
| 1127 | # If the condition evaluates to `false`, then this binding does not apply to |
| 1128 | # the current request. However, a different role binding might grant the same |
| 1129 | # role to one or more of the members in this binding. |
| 1130 | # |
| 1131 | # To learn which resources support conditions in their IAM policies, see the |
| 1132 | # [IAM |
| 1133 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1134 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1135 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1136 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1137 | # Example (Comparison): |
| 1138 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1139 | # title: "Summary size limit" |
| 1140 | # description: "Determines if a summary is less than 100 chars" |
| 1141 | # expression: "document.summary.size() < 100" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1142 | # |
| 1143 | # Example (Equality): |
| 1144 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1145 | # title: "Requestor is owner" |
| 1146 | # description: "Determines if requestor is the document owner" |
| 1147 | # expression: "document.owner == request.auth.claims.email" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1148 | # |
| 1149 | # Example (Logic): |
| 1150 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1151 | # title: "Public documents" |
| 1152 | # description: "Determine whether the document should be publicly visible" |
| 1153 | # expression: "document.type != 'private' && document.type != 'internal'" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1154 | # |
| 1155 | # Example (Data Manipulation): |
| 1156 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1157 | # title: "Notification string" |
| 1158 | # description: "Create a notification string with a timestamp." |
| 1159 | # expression: "'New message received at ' + string(document.create_time)" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1160 | # |
| 1161 | # The exact variables and functions that may be referenced within an expression |
| 1162 | # are determined by the service that evaluates it. See the service |
| 1163 | # documentation for additional information. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1164 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1165 | # syntax. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1166 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1167 | # reporting, e.g. a file name and a position in the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1168 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1169 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1170 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1171 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1172 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1173 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1174 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1175 | # `members` can have the following values: |
| 1176 | # |
| 1177 | # * `allUsers`: A special identifier that represents anyone who is |
| 1178 | # on the internet; with or without a Google account. |
| 1179 | # |
| 1180 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1181 | # who is authenticated with a Google account or a service account. |
| 1182 | # |
| 1183 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1184 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1185 | # |
| 1186 | # |
| 1187 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1188 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1189 | # |
| 1190 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1191 | # For example, `admins@example.com`. |
| 1192 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1193 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1194 | # identifier) representing a user that has been recently deleted. For |
| 1195 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1196 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1197 | # retains the role in the binding. |
| 1198 | # |
| 1199 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1200 | # unique identifier) representing a service account that has been recently |
| 1201 | # deleted. For example, |
| 1202 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1203 | # If the service account is undeleted, this value reverts to |
| 1204 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1205 | # role in the binding. |
| 1206 | # |
| 1207 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1208 | # identifier) representing a Google group that has been recently |
| 1209 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1210 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1211 | # recovered group retains the role in the binding. |
| 1212 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 1213 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1214 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1215 | # users of that domain. For example, `google.com` or `example.com`. |
| 1216 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1217 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1218 | ], |
| 1219 | }, |
| 1220 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1221 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 1222 | { # Specifies the audit configuration for a service. |
| 1223 | # The configuration determines which permission types are logged, and what |
| 1224 | # identities, if any, are exempted from logging. |
| 1225 | # An AuditConfig must have one or more AuditLogConfigs. |
| 1226 | # |
| 1227 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 1228 | # the union of the two AuditConfigs is used for that service: the log_types |
| 1229 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 1230 | # AuditLogConfig are exempted. |
| 1231 | # |
| 1232 | # Example Policy with multiple AuditConfigs: |
| 1233 | # |
| 1234 | # { |
| 1235 | # "audit_configs": [ |
| 1236 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1237 | # "service": "allServices", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1238 | # "audit_log_configs": [ |
| 1239 | # { |
| 1240 | # "log_type": "DATA_READ", |
| 1241 | # "exempted_members": [ |
| 1242 | # "user:jose@example.com" |
| 1243 | # ] |
| 1244 | # }, |
| 1245 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1246 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1247 | # }, |
| 1248 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1249 | # "log_type": "ADMIN_READ" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1250 | # } |
| 1251 | # ] |
| 1252 | # }, |
| 1253 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1254 | # "service": "sampleservice.googleapis.com", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1255 | # "audit_log_configs": [ |
| 1256 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1257 | # "log_type": "DATA_READ" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1258 | # }, |
| 1259 | # { |
| 1260 | # "log_type": "DATA_WRITE", |
| 1261 | # "exempted_members": [ |
| 1262 | # "user:aliya@example.com" |
| 1263 | # ] |
| 1264 | # } |
| 1265 | # ] |
| 1266 | # } |
| 1267 | # ] |
| 1268 | # } |
| 1269 | # |
| 1270 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 1271 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 1272 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1273 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 1274 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 1275 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1276 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 1277 | { # Provides the configuration for logging a type of permissions. |
| 1278 | # Example: |
| 1279 | # |
| 1280 | # { |
| 1281 | # "audit_log_configs": [ |
| 1282 | # { |
| 1283 | # "log_type": "DATA_READ", |
| 1284 | # "exempted_members": [ |
| 1285 | # "user:jose@example.com" |
| 1286 | # ] |
| 1287 | # }, |
| 1288 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1289 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1290 | # } |
| 1291 | # ] |
| 1292 | # } |
| 1293 | # |
| 1294 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 1295 | # jose@example.com from DATA_READ logging. |
| 1296 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 1297 | # permission. |
| 1298 | # Follows the same format of Binding.members. |
| 1299 | "A String", |
| 1300 | ], |
| 1301 | "logType": "A String", # The log type that this config enables. |
| 1302 | }, |
| 1303 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1304 | }, |
| 1305 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1306 | }, |
| 1307 | } |
| 1308 | |
| 1309 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1310 | Allowed values |
| 1311 | 1 - v1 error format |
| 1312 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1313 | |
| 1314 | Returns: |
| 1315 | An object of the form: |
| 1316 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1317 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 1318 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1319 | # |
| 1320 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1321 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 1322 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 1323 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 1324 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 1325 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1326 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1327 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 1328 | # `condition`, which is a logical expression that allows access to a resource |
| 1329 | # only if the expression evaluates to `true`. A condition can add constraints |
| 1330 | # based on attributes of the request, the resource, or both. To learn which |
| 1331 | # resources support conditions in their IAM policies, see the |
| 1332 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1333 | # |
| 1334 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1335 | # |
| 1336 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1337 | # "bindings": [ |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1338 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1339 | # "role": "roles/resourcemanager.organizationAdmin", |
| 1340 | # "members": [ |
| 1341 | # "user:mike@example.com", |
| 1342 | # "group:admins@example.com", |
| 1343 | # "domain:google.com", |
| 1344 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1345 | # ] |
| 1346 | # }, |
| 1347 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1348 | # "role": "roles/resourcemanager.organizationViewer", |
| 1349 | # "members": [ |
| 1350 | # "user:eve@example.com" |
| 1351 | # ], |
| 1352 | # "condition": { |
| 1353 | # "title": "expirable access", |
| 1354 | # "description": "Does not grant access after Sep 2020", |
| 1355 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1356 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1357 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1358 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1359 | # "etag": "BwWWja0YfJA=", |
| 1360 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1361 | # } |
| 1362 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1363 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1364 | # |
| 1365 | # bindings: |
| 1366 | # - members: |
| 1367 | # - user:mike@example.com |
| 1368 | # - group:admins@example.com |
| 1369 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1370 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 1371 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1372 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1373 | # - user:eve@example.com |
| 1374 | # role: roles/resourcemanager.organizationViewer |
| 1375 | # condition: |
| 1376 | # title: expirable access |
| 1377 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1378 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1379 | # - etag: BwWWja0YfJA= |
| 1380 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1381 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1382 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1383 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1384 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1385 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1386 | # It is strongly suggested that systems make use of the `etag` in the |
| 1387 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1388 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1389 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1390 | # ensure that their change will be applied to the same version of the policy. |
| 1391 | # |
| 1392 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1393 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1394 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1395 | # the conditions in the version `3` policy are lost. |
| 1396 | "version": 42, # Specifies the format of the policy. |
| 1397 | # |
| 1398 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1399 | # are rejected. |
| 1400 | # |
| 1401 | # Any operation that affects conditional role bindings must specify version |
| 1402 | # `3`. This requirement applies to the following operations: |
| 1403 | # |
| 1404 | # * Getting a policy that includes a conditional role binding |
| 1405 | # * Adding a conditional role binding to a policy |
| 1406 | # * Changing a conditional role binding in a policy |
| 1407 | # * Removing any role binding, with or without a condition, from a policy |
| 1408 | # that includes conditions |
| 1409 | # |
| 1410 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1411 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1412 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1413 | # the conditions in the version `3` policy are lost. |
| 1414 | # |
| 1415 | # If a policy does not include any conditions, operations on that policy may |
| 1416 | # specify any valid version or leave the field unset. |
| 1417 | # |
| 1418 | # To learn which resources support conditions in their IAM policies, see the |
| 1419 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1420 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1421 | # `condition` that determines how and when the `bindings` are applied. Each |
| 1422 | # of the `bindings` must contain at least one member. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1423 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1424 | "role": "A String", # Role that is assigned to `members`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1425 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1426 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 1427 | # |
| 1428 | # If the condition evaluates to `true`, then this binding applies to the |
| 1429 | # current request. |
| 1430 | # |
| 1431 | # If the condition evaluates to `false`, then this binding does not apply to |
| 1432 | # the current request. However, a different role binding might grant the same |
| 1433 | # role to one or more of the members in this binding. |
| 1434 | # |
| 1435 | # To learn which resources support conditions in their IAM policies, see the |
| 1436 | # [IAM |
| 1437 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1438 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1439 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1440 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1441 | # Example (Comparison): |
| 1442 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1443 | # title: "Summary size limit" |
| 1444 | # description: "Determines if a summary is less than 100 chars" |
| 1445 | # expression: "document.summary.size() < 100" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1446 | # |
| 1447 | # Example (Equality): |
| 1448 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1449 | # title: "Requestor is owner" |
| 1450 | # description: "Determines if requestor is the document owner" |
| 1451 | # expression: "document.owner == request.auth.claims.email" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1452 | # |
| 1453 | # Example (Logic): |
| 1454 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1455 | # title: "Public documents" |
| 1456 | # description: "Determine whether the document should be publicly visible" |
| 1457 | # expression: "document.type != 'private' && document.type != 'internal'" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1458 | # |
| 1459 | # Example (Data Manipulation): |
| 1460 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1461 | # title: "Notification string" |
| 1462 | # description: "Create a notification string with a timestamp." |
| 1463 | # expression: "'New message received at ' + string(document.create_time)" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1464 | # |
| 1465 | # The exact variables and functions that may be referenced within an expression |
| 1466 | # are determined by the service that evaluates it. See the service |
| 1467 | # documentation for additional information. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1468 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1469 | # syntax. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1470 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1471 | # reporting, e.g. a file name and a position in the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1472 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1473 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1474 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1475 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1476 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1477 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1478 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1479 | # `members` can have the following values: |
| 1480 | # |
| 1481 | # * `allUsers`: A special identifier that represents anyone who is |
| 1482 | # on the internet; with or without a Google account. |
| 1483 | # |
| 1484 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1485 | # who is authenticated with a Google account or a service account. |
| 1486 | # |
| 1487 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1488 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1489 | # |
| 1490 | # |
| 1491 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1492 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1493 | # |
| 1494 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1495 | # For example, `admins@example.com`. |
| 1496 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1497 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1498 | # identifier) representing a user that has been recently deleted. For |
| 1499 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1500 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1501 | # retains the role in the binding. |
| 1502 | # |
| 1503 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1504 | # unique identifier) representing a service account that has been recently |
| 1505 | # deleted. For example, |
| 1506 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1507 | # If the service account is undeleted, this value reverts to |
| 1508 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1509 | # role in the binding. |
| 1510 | # |
| 1511 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1512 | # identifier) representing a Google group that has been recently |
| 1513 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1514 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1515 | # recovered group retains the role in the binding. |
| 1516 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 1517 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1518 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1519 | # users of that domain. For example, `google.com` or `example.com`. |
| 1520 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1521 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1522 | ], |
| 1523 | }, |
| 1524 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1525 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 1526 | { # Specifies the audit configuration for a service. |
| 1527 | # The configuration determines which permission types are logged, and what |
| 1528 | # identities, if any, are exempted from logging. |
| 1529 | # An AuditConfig must have one or more AuditLogConfigs. |
| 1530 | # |
| 1531 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 1532 | # the union of the two AuditConfigs is used for that service: the log_types |
| 1533 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 1534 | # AuditLogConfig are exempted. |
| 1535 | # |
| 1536 | # Example Policy with multiple AuditConfigs: |
| 1537 | # |
| 1538 | # { |
| 1539 | # "audit_configs": [ |
| 1540 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1541 | # "service": "allServices", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1542 | # "audit_log_configs": [ |
| 1543 | # { |
| 1544 | # "log_type": "DATA_READ", |
| 1545 | # "exempted_members": [ |
| 1546 | # "user:jose@example.com" |
| 1547 | # ] |
| 1548 | # }, |
| 1549 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1550 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1551 | # }, |
| 1552 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1553 | # "log_type": "ADMIN_READ" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1554 | # } |
| 1555 | # ] |
| 1556 | # }, |
| 1557 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1558 | # "service": "sampleservice.googleapis.com", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1559 | # "audit_log_configs": [ |
| 1560 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1561 | # "log_type": "DATA_READ" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1562 | # }, |
| 1563 | # { |
| 1564 | # "log_type": "DATA_WRITE", |
| 1565 | # "exempted_members": [ |
| 1566 | # "user:aliya@example.com" |
| 1567 | # ] |
| 1568 | # } |
| 1569 | # ] |
| 1570 | # } |
| 1571 | # ] |
| 1572 | # } |
| 1573 | # |
| 1574 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 1575 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 1576 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1577 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 1578 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 1579 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1580 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 1581 | { # Provides the configuration for logging a type of permissions. |
| 1582 | # Example: |
| 1583 | # |
| 1584 | # { |
| 1585 | # "audit_log_configs": [ |
| 1586 | # { |
| 1587 | # "log_type": "DATA_READ", |
| 1588 | # "exempted_members": [ |
| 1589 | # "user:jose@example.com" |
| 1590 | # ] |
| 1591 | # }, |
| 1592 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1593 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1594 | # } |
| 1595 | # ] |
| 1596 | # } |
| 1597 | # |
| 1598 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 1599 | # jose@example.com from DATA_READ logging. |
| 1600 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 1601 | # permission. |
| 1602 | # Follows the same format of Binding.members. |
| 1603 | "A String", |
| 1604 | ], |
| 1605 | "logType": "A String", # The log type that this config enables. |
| 1606 | }, |
| 1607 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1608 | }, |
| 1609 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1610 | }</pre> |
| 1611 | </div> |
| 1612 | |
| 1613 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1614 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1615 | <pre>Returns permissions that a caller has on the specified Project. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1616 | |
| 1617 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1618 | resource: string, REQUIRED: The resource for which the policy detail is being requested. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1619 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1620 | body: object, The request body. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1621 | The object takes the form of: |
| 1622 | |
| 1623 | { # Request message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1624 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 1625 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1626 | # information see |
| 1627 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1628 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1629 | ], |
| 1630 | } |
| 1631 | |
| 1632 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1633 | Allowed values |
| 1634 | 1 - v1 error format |
| 1635 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1636 | |
| 1637 | Returns: |
| 1638 | An object of the form: |
| 1639 | |
| 1640 | { # Response message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1641 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1642 | # allowed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1643 | "A String", |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1644 | ], |
| 1645 | }</pre> |
| 1646 | </div> |
| 1647 | |
| 1648 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1649 | <code class="details" id="undelete">undelete(projectId, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1650 | <pre>Restores the Project identified by the specified |
| 1651 | `project_id` (for example, `my-project-123`). |
| 1652 | You can only use this method for a Project that has a lifecycle state of |
| 1653 | DELETE_REQUESTED. |
| 1654 | After deletion starts, the Project cannot be restored. |
| 1655 | |
| 1656 | The caller must have modify permissions for this Project. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1657 | |
| 1658 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1659 | projectId: string, The project ID (for example, `foo-bar-123`). |
| 1660 | |
| 1661 | Required. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1662 | body: object, The request body. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 1663 | The object takes the form of: |
| 1664 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1665 | { # The request sent to the UndeleteProject |
| 1666 | # method. |
Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -0700 | [diff] [blame] | 1667 | } |
| 1668 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1669 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1670 | Allowed values |
| 1671 | 1 - v1 error format |
| 1672 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1673 | |
| 1674 | Returns: |
| 1675 | An object of the form: |
| 1676 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1677 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 1678 | # empty messages in your APIs. A typical example is to use it as the request |
| 1679 | # or the response type of an API method. For instance: |
| 1680 | # |
| 1681 | # service Foo { |
| 1682 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 1683 | # } |
| 1684 | # |
| 1685 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1686 | }</pre> |
| 1687 | </div> |
| 1688 | |
| 1689 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1690 | <code class="details" id="update">update(projectId, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1691 | <pre>Updates the attributes of the Project identified by the specified |
| 1692 | `project_id` (for example, `my-project-123`). |
| 1693 | |
| 1694 | The caller must have modify permissions for this Project. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1695 | |
| 1696 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1697 | projectId: string, The project ID (for example, `my-project-123`). |
| 1698 | |
| 1699 | Required. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1700 | body: object, The request body. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1701 | The object takes the form of: |
| 1702 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1703 | { # A Project is a high-level Google Cloud Platform entity. It is a |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1704 | # container for ACLs, APIs, App Engine Apps, VMs, and other |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1705 | # Google Cloud Platform resources. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1706 | "projectId": "A String", # The unique, user-assigned ID of the Project. |
| 1707 | # It must be 6 to 30 lowercase letters, digits, or hyphens. |
| 1708 | # It must start with a letter. |
| 1709 | # Trailing hyphens are prohibited. |
| 1710 | # |
| 1711 | # Example: <code>tokyo-rain-123</code> |
| 1712 | # Read-only after creation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1713 | "labels": { # The labels associated with this Project. |
| 1714 | # |
| 1715 | # Label keys must be between 1 and 63 characters long and must conform |
| 1716 | # to the following regular expression: a-z{0,62}. |
| 1717 | # |
| 1718 | # Label values must be between 0 and 63 characters long and must conform |
| 1719 | # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. |
| 1720 | # |
| 1721 | # No more than 256 labels can be associated with a given resource. |
| 1722 | # |
| 1723 | # Clients should store labels in a representation such as JSON that does not |
| 1724 | # depend on specific characters being disallowed. |
| 1725 | # |
| 1726 | # Example: <code>"environment" : "dev"</code> |
| 1727 | # Read-write. |
| 1728 | "a_key": "A String", |
| 1729 | }, |
| 1730 | "createTime": "A String", # Creation time. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1731 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1732 | # Read-only. |
| 1733 | "projectNumber": "A String", # The number uniquely identifying the project. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1734 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1735 | # Example: <code>415104041262</code> |
| 1736 | # Read-only. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1737 | "lifecycleState": "A String", # The Project lifecycle state. |
| 1738 | # |
| 1739 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1740 | "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource. |
| 1741 | # |
| 1742 | # Supported parent types include "organization" and "folder". Once set, the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1743 | # parent cannot be cleared. The `parent` can be set on creation or using the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1744 | # `UpdateProject` method; the end user must have the |
| 1745 | # `resourcemanager.projects.create` permission on the parent. |
| 1746 | # |
| 1747 | # Read-write. |
| 1748 | # Cloud Platform is a generic term for something you (a developer) may want to |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1749 | # interact with through one of our API's. Some examples are an App Engine app, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1750 | # a Compute Engine instance, a Cloud SQL database, and so on. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1751 | "id": "A String", # Required field for the type-specific id. This should correspond to the id |
| 1752 | # used in the type-specific API's. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1753 | "type": "A String", # Required field representing the resource type this id is for. |
| 1754 | # At present, the valid types are "project", "folder", and "organization". |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1755 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1756 | "name": "A String", # The optional user-assigned display name of the Project. |
| 1757 | # When present it must be between 4 to 30 characters. |
| 1758 | # Allowed characters are: lowercase and uppercase letters, numbers, |
| 1759 | # hyphen, single-quote, double-quote, space, and exclamation point. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1760 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1761 | # Example: <code>My Project</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1762 | # Read-write. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1763 | } |
| 1764 | |
| 1765 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1766 | Allowed values |
| 1767 | 1 - v1 error format |
| 1768 | 2 - v2 error format |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1769 | |
| 1770 | Returns: |
| 1771 | An object of the form: |
| 1772 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1773 | { # A Project is a high-level Google Cloud Platform entity. It is a |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1774 | # container for ACLs, APIs, App Engine Apps, VMs, and other |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1775 | # Google Cloud Platform resources. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1776 | "projectId": "A String", # The unique, user-assigned ID of the Project. |
| 1777 | # It must be 6 to 30 lowercase letters, digits, or hyphens. |
| 1778 | # It must start with a letter. |
| 1779 | # Trailing hyphens are prohibited. |
| 1780 | # |
| 1781 | # Example: <code>tokyo-rain-123</code> |
| 1782 | # Read-only after creation. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1783 | "labels": { # The labels associated with this Project. |
| 1784 | # |
| 1785 | # Label keys must be between 1 and 63 characters long and must conform |
| 1786 | # to the following regular expression: a-z{0,62}. |
| 1787 | # |
| 1788 | # Label values must be between 0 and 63 characters long and must conform |
| 1789 | # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. |
| 1790 | # |
| 1791 | # No more than 256 labels can be associated with a given resource. |
| 1792 | # |
| 1793 | # Clients should store labels in a representation such as JSON that does not |
| 1794 | # depend on specific characters being disallowed. |
| 1795 | # |
| 1796 | # Example: <code>"environment" : "dev"</code> |
| 1797 | # Read-write. |
| 1798 | "a_key": "A String", |
| 1799 | }, |
| 1800 | "createTime": "A String", # Creation time. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1801 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1802 | # Read-only. |
| 1803 | "projectNumber": "A String", # The number uniquely identifying the project. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1804 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1805 | # Example: <code>415104041262</code> |
| 1806 | # Read-only. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1807 | "lifecycleState": "A String", # The Project lifecycle state. |
| 1808 | # |
| 1809 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1810 | "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource. |
| 1811 | # |
| 1812 | # Supported parent types include "organization" and "folder". Once set, the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1813 | # parent cannot be cleared. The `parent` can be set on creation or using the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1814 | # `UpdateProject` method; the end user must have the |
| 1815 | # `resourcemanager.projects.create` permission on the parent. |
| 1816 | # |
| 1817 | # Read-write. |
| 1818 | # Cloud Platform is a generic term for something you (a developer) may want to |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1819 | # interact with through one of our API's. Some examples are an App Engine app, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1820 | # a Compute Engine instance, a Cloud SQL database, and so on. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1821 | "id": "A String", # Required field for the type-specific id. This should correspond to the id |
| 1822 | # used in the type-specific API's. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1823 | "type": "A String", # Required field representing the resource type this id is for. |
| 1824 | # At present, the valid types are "project", "folder", and "organization". |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1825 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1826 | "name": "A String", # The optional user-assigned display name of the Project. |
| 1827 | # When present it must be between 4 to 30 characters. |
| 1828 | # Allowed characters are: lowercase and uppercase letters, numbers, |
| 1829 | # hyphen, single-quote, double-quote, space, and exclamation point. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1830 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1831 | # Example: <code>My Project</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1832 | # Read-write. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1833 | }</pre> |
| 1834 | </div> |
| 1835 | |
| 1836 | </body></html> |