blob: c3b6cf3b5f047768a83ffeff8255664f924fd286 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="deploymentmanager_v2.html">Google Cloud Deployment Manager API</a> . <a href="deploymentmanager_v2.deployments.html">deployments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#cancelPreview">cancelPreview(project, deployment, body=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070079<p class="firstline">Cancels and removes the preview currently associated with the deployment.</p>
80<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070081 <code><a href="#close">close()</a></code></p>
82<p class="firstline">Close httplib2 connections.</p>
83<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080084 <code><a href="#delete">delete(project, deployment, deletePolicy=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070085<p class="firstline">Deletes a deployment and all of the resources in the deployment.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, deployment)</a></code></p>
88<p class="firstline">Gets information about a specific deployment.</p>
89<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, resource)</a></code></p>
91<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#insert">insert(project, body=None, preview=None, createPolicy=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070094<p class="firstline">Creates a deployment and all of the resources described by the deployment manifest.</p>
95<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070096 <code><a href="#list">list(project, orderBy=None, maxResults=None, filter=None, pageToken=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070097<p class="firstline">Lists all deployments for a given project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102 <code><a href="#patch">patch(project, deployment, body=None, deletePolicy=None, preview=None, createPolicy=None)</a></code></p>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700103<p class="firstline">Patches a deployment and all of the resources described by the deployment manifest.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700106<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#stop">stop(project, deployment, body=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700109<p class="firstline">Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
113<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 <code><a href="#update">update(project, deployment, body=None, deletePolicy=None, createPolicy=None, preview=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700115<p class="firstline">Updates a deployment and all of the resources described by the deployment manifest.</p>
116<h3>Method Details</h3>
117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code class="details" id="cancelPreview">cancelPreview(project, deployment, body=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700119 <pre>Cancels and removes the preview currently associated with the deployment.
120
121Args:
122 project: string, The project ID for this request. (required)
123 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700124 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700125 The object takes the form of:
126
127{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700128 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided in `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to make a new update request while another user attempts to cancel a preview, this would prevent one of the requests).
Takashi Matsuo06694102015-09-11 13:55:40 -0700129 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700130 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint value, perform a `get()` request on the deployment.
Takashi Matsuo06694102015-09-11 13:55:40 -0700131 }
132
133
134Returns:
135 An object of the form:
136
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700137 { # Represents an Operation resource.
138 #
139 # Google Compute Engine has three Operation resources:
140 #
141 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
142 #
143 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
144 #
145 # Operations can be global, regional or zonal.
146 # - For global operations, use the `globalOperations` resource.
147 # - For regional operations, use the `regionOperations` resource.
148 # - For zonal operations, use the `zonalOperations` resource.
149 #
150 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700151 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700153 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
154 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
155 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
156 {
157 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
158 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
159 {
160 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
161 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
162 },
163 ],
164 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
165 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
166 },
167 ],
168 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
169 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700171 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
172 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
173 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
174 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
175 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
176 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
177 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
178 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
179 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
180 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700181 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
182 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700183 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700185 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700186 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700187 },
188 ],
189 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700190 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700191 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
192 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
193 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700194 }</pre>
195</div>
196
197<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700198 <code class="details" id="close">close()</code>
199 <pre>Close httplib2 connections.</pre>
200</div>
201
202<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800203 <code class="details" id="delete">delete(project, deployment, deletePolicy=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700204 <pre>Deletes a deployment and all of the resources in the deployment.
205
206Args:
207 project: string, The project ID for this request. (required)
208 deployment: string, The name of the deployment for this request. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800209 deletePolicy: string, Sets the policy to use for deleting resources.
210 Allowed values
211 ABANDON -
212 DELETE -
Takashi Matsuo06694102015-09-11 13:55:40 -0700213
214Returns:
215 An object of the form:
216
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700217 { # Represents an Operation resource.
218 #
219 # Google Compute Engine has three Operation resources:
220 #
221 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
222 #
223 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
224 #
225 # Operations can be global, regional or zonal.
226 # - For global operations, use the `globalOperations` resource.
227 # - For regional operations, use the `regionOperations` resource.
228 # - For zonal operations, use the `zonalOperations` resource.
229 #
230 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700231 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700232 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700233 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
234 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
235 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
236 {
237 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
238 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
239 {
240 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
241 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
242 },
243 ],
244 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
245 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
246 },
247 ],
248 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
249 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700251 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
252 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
253 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
254 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
255 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
256 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
257 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
258 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
259 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
260 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
262 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700263 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700265 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700267 },
268 ],
269 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700270 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700271 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
272 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
273 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700274 }</pre>
275</div>
276
277<div class="method">
278 <code class="details" id="get">get(project, deployment)</code>
279 <pre>Gets information about a specific deployment.
280
281Args:
282 project: string, The project ID for this request. (required)
283 deployment: string, The name of the deployment for this request. (required)
284
285Returns:
286 An object of the form:
287
288 {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700289 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 {
291 &quot;key&quot;: &quot;A String&quot;,
292 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700293 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700295 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
296 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
297 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
298 &quot;imports&quot;: [ # Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template.
299 {
300 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
301 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
302 },
303 ],
304 &quot;config&quot;: { # The configuration to use for this deployment.
305 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
306 },
307 },
308 &quot;id&quot;: &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700309 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
310 #
311 # Google Compute Engine has three Operation resources:
312 #
313 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
314 #
315 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
316 #
317 # Operations can be global, regional or zonal.
318 # - For global operations, use the `globalOperations` resource.
319 # - For regional operations, use the `regionOperations` resource.
320 # - For zonal operations, use the `zonalOperations` resource.
321 #
322 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700323 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700325 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
326 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
327 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
328 {
329 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
330 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
331 {
332 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
333 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
334 },
335 ],
336 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
337 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
338 },
339 ],
340 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
341 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700342 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700343 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
344 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
345 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
346 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
347 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
348 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
349 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
350 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
351 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
352 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
354 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700355 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700357 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700359 },
360 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700362 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700363 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
364 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
365 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700367 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
368 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
369 #
370 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a deployment.
371 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700373 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent.
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700375 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700376 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 {
378 &quot;key&quot;: &quot;A String&quot;,
379 &quot;value&quot;: &quot;A String&quot;,
380 },
381 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700382 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700383 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700385</div>
386
387<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700388 <code class="details" id="getIamPolicy">getIamPolicy(project, resource)</code>
389 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
390
391Args:
392 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700394
395Returns:
396 An object of the form:
397
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700398 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700399 #
400 #
401 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700402 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700403 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700404 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700405 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700406 # **JSON example:**
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700407 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700408 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700409 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700410 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700412 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700414 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400416 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400417 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400419 #
420 # Example Policy with multiple AuditConfigs:
421 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700422 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400423 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700424 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700425 &quot;exemptedMembers&quot;: [
426 &quot;A String&quot;,
427 ],
428 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -0700429 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400430 { # Provides the configuration for logging a type of permissions. Example:
431 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700432 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400433 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700434 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700435 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
436 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
438 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800439 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800440 },
441 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700442 },
443 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700444 &quot;iamOwned&quot;: True or False,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700445 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700446 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700448 #
449 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
450 #
451 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
452 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700453 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700454 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800455 #
456 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700457 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
458 #
459 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
460 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700461 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
462 #
463 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
464 #
465 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466 #
467 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700468 #
469 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700470 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700471 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700472 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
473 #
474 # If the condition evaluates to `true`, then this binding applies to the current request.
475 #
476 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
477 #
478 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
479 #
480 # Example (Comparison):
481 #
482 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
483 #
484 # Example (Equality):
485 #
486 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
487 #
488 # Example (Logic):
489 #
490 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
491 #
492 # Example (Data Manipulation):
493 #
494 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
495 #
496 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
497 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
498 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
499 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
500 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
501 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700503 },
504 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
506 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700507 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700508 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
509 { # A rule to be applied in a Policy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
511 &quot;A String&quot;,
512 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700513 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
514 &quot;A String&quot;,
515 ],
516 &quot;action&quot;: &quot;A String&quot;, # Required
517 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
518 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
519 { # A condition to be met.
520 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
521 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
522 &quot;values&quot;: [ # The objects of the condition.
523 &quot;A String&quot;,
524 ],
525 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
526 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
527 },
528 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
530 { # Specifies what kind of log the caller must write
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700531 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
532 &quot;logMode&quot;: &quot;A String&quot;,
533 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
535 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
536 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
537 },
538 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
539 },
540 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
541 #
542 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
543 #
544 # Field names correspond to IAM request parameters and field values are their respective values.
545 #
546 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
547 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700548 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700549 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
550 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700551 &quot;customFields&quot;: [ # Custom fields.
552 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
553 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
554 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
555 },
556 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 },
558 },
559 ],
560 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
561 &quot;A String&quot;,
562 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 },
564 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700565 &quot;version&quot;: 42, # Specifies the format of the policy.
566 #
567 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
568 #
569 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
570 #
571 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
572 #
573 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
574 #
575 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
576 #
577 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700578 }</pre>
579</div>
580
581<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700582 <code class="details" id="insert">insert(project, body=None, preview=None, createPolicy=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700583 <pre>Creates a deployment and all of the resources described by the deployment manifest.
584
585Args:
586 project: string, The project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700588 The object takes the form of:
589
590{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700591 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700592 {
593 &quot;key&quot;: &quot;A String&quot;,
594 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700595 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700597 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
598 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
599 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
600 &quot;imports&quot;: [ # Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template.
601 {
602 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
603 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
604 },
605 ],
606 &quot;config&quot;: { # The configuration to use for this deployment.
607 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
608 },
609 },
610 &quot;id&quot;: &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700611 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
612 #
613 # Google Compute Engine has three Operation resources:
614 #
615 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
616 #
617 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
618 #
619 # Operations can be global, regional or zonal.
620 # - For global operations, use the `globalOperations` resource.
621 # - For regional operations, use the `regionOperations` resource.
622 # - For zonal operations, use the `zonalOperations` resource.
623 #
624 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700625 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700627 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
628 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
629 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
630 {
631 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
632 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
633 {
634 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
635 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
636 },
637 ],
638 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
639 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
640 },
641 ],
642 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
643 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700644 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700645 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
646 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
647 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
648 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
649 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
650 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
651 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
652 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
653 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
654 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700655 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
656 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700657 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700658 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700659 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700661 },
662 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700664 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700665 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
666 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
667 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -0700668 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700669 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
670 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
671 #
672 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a deployment.
673 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim65020912020-05-20 12:08:20 -0700674 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700675 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent.
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700677 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700678 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 {
680 &quot;key&quot;: &quot;A String&quot;,
681 &quot;value&quot;: &quot;A String&quot;,
682 },
683 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700684 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700686}
Takashi Matsuo06694102015-09-11 13:55:40 -0700687
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700688 preview: boolean, If set to true, creates a deployment and creates &quot;shell&quot; resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the `update()` method or you can use the `cancelPreview()` method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 createPolicy: string, Sets the policy to use for creating new resources.
690 Allowed values
691 ACQUIRE -
692 CREATE_OR_ACQUIRE -
Takashi Matsuo06694102015-09-11 13:55:40 -0700693
694Returns:
695 An object of the form:
696
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700697 { # Represents an Operation resource.
698 #
699 # Google Compute Engine has three Operation resources:
700 #
701 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
702 #
703 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
704 #
705 # Operations can be global, regional or zonal.
706 # - For global operations, use the `globalOperations` resource.
707 # - For regional operations, use the `regionOperations` resource.
708 # - For zonal operations, use the `zonalOperations` resource.
709 #
710 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700711 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700712 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700713 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
714 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
715 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
716 {
717 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
718 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
719 {
720 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
721 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
722 },
723 ],
724 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
725 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
726 },
727 ],
728 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
729 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700731 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
732 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
733 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
734 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
735 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
736 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
737 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
738 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
739 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
740 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700741 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
742 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700743 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700744 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700745 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700746 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700747 },
748 ],
749 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700750 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700751 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
752 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
753 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700754 }</pre>
755</div>
756
757<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700758 <code class="details" id="list">list(project, orderBy=None, maxResults=None, filter=None, pageToken=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700759 <pre>Lists all deployments for a given project.
760
761Args:
762 project: string, The project ID for this request. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700763 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
764
765You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
766
767Currently, only sorting by `name` or `creationTimestamp desc` is supported.
768 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700769 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700770
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700771For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700772
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700773You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800774
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700775To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700776 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Takashi Matsuo06694102015-09-11 13:55:40 -0700777
778Returns:
779 An object of the form:
780
781 { # A response containing a partial list of deployments and a page token used to build the next request if the request has been truncated.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700782 &quot;nextPageToken&quot;: &quot;A String&quot;, # Output only. A token used to continue a truncated list request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700783 &quot;deployments&quot;: [ # Output only. The deployments contained in this response.
Takashi Matsuo06694102015-09-11 13:55:40 -0700784 {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700785 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700786 {
787 &quot;key&quot;: &quot;A String&quot;,
788 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700789 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700790 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700791 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
792 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
793 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
794 &quot;imports&quot;: [ # Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template.
795 {
796 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
797 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
798 },
799 ],
800 &quot;config&quot;: { # The configuration to use for this deployment.
801 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
802 },
803 },
804 &quot;id&quot;: &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700805 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
806 #
807 # Google Compute Engine has three Operation resources:
808 #
809 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
810 #
811 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
812 #
813 # Operations can be global, regional or zonal.
814 # - For global operations, use the `globalOperations` resource.
815 # - For regional operations, use the `regionOperations` resource.
816 # - For zonal operations, use the `zonalOperations` resource.
817 #
818 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700819 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700820 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700821 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
822 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
823 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
824 {
825 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
826 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
827 {
828 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
829 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
830 },
831 ],
832 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
833 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
834 },
835 ],
836 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
837 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700838 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700839 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
840 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
841 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
842 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
843 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
844 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
845 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
846 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
847 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
848 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700849 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
850 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700851 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700852 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700853 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700855 },
856 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700858 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700859 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
860 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
861 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700862 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700863 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
864 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
865 #
866 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a deployment.
867 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700869 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent.
Bu Sun Kim65020912020-05-20 12:08:20 -0700870 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700871 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700872 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700873 {
874 &quot;key&quot;: &quot;A String&quot;,
875 &quot;value&quot;: &quot;A String&quot;,
876 },
877 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700878 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim65020912020-05-20 12:08:20 -0700879 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700881 ],
882 }</pre>
883</div>
884
885<div class="method">
886 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
887 <pre>Retrieves the next page of results.
888
889Args:
890 previous_request: The request for the previous page. (required)
891 previous_response: The response from the request for the previous page. (required)
892
893Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -0700895 page. Returns None if there are no more items in the collection.
896 </pre>
897</div>
898
899<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700900 <code class="details" id="patch">patch(project, deployment, body=None, deletePolicy=None, preview=None, createPolicy=None)</code>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700901 <pre>Patches a deployment and all of the resources described by the deployment manifest.
Takashi Matsuo06694102015-09-11 13:55:40 -0700902
903Args:
904 project: string, The project ID for this request. (required)
905 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700906 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700907 The object takes the form of:
908
909{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700910 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 {
912 &quot;key&quot;: &quot;A String&quot;,
913 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700914 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700915 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700916 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
917 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
918 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
919 &quot;imports&quot;: [ # Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template.
920 {
921 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
922 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
923 },
924 ],
925 &quot;config&quot;: { # The configuration to use for this deployment.
926 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
927 },
928 },
929 &quot;id&quot;: &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700930 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
931 #
932 # Google Compute Engine has three Operation resources:
933 #
934 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
935 #
936 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
937 #
938 # Operations can be global, regional or zonal.
939 # - For global operations, use the `globalOperations` resource.
940 # - For regional operations, use the `regionOperations` resource.
941 # - For zonal operations, use the `zonalOperations` resource.
942 #
943 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700944 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700946 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
947 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
948 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
949 {
950 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
951 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
952 {
953 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
954 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
955 },
956 ],
957 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
958 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
959 },
960 ],
961 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
962 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700963 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700964 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
965 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
966 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
967 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
968 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
969 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
970 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
971 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
972 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
973 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700974 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
975 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700976 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700977 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700978 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700979 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700980 },
981 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700983 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700984 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
985 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
986 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -0700987 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700988 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
989 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
990 #
991 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a deployment.
992 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim65020912020-05-20 12:08:20 -0700993 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700994 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent.
Bu Sun Kim65020912020-05-20 12:08:20 -0700995 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700996 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700997 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700998 {
999 &quot;key&quot;: &quot;A String&quot;,
1000 &quot;value&quot;: &quot;A String&quot;,
1001 },
1002 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001003 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim65020912020-05-20 12:08:20 -07001004 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001005}
Takashi Matsuo06694102015-09-11 13:55:40 -07001006
Bu Sun Kim65020912020-05-20 12:08:20 -07001007 deletePolicy: string, Sets the policy to use for deleting resources.
1008 Allowed values
1009 ABANDON -
1010 DELETE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001011 preview: boolean, If set to true, updates the deployment and creates and updates the &quot;shell&quot; resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a `target.config` with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the `update()` or you can `cancelPreview()` to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001012 createPolicy: string, Sets the policy to use for creating new resources.
1013 Allowed values
1014 ACQUIRE -
1015 CREATE_OR_ACQUIRE -
Takashi Matsuo06694102015-09-11 13:55:40 -07001016
1017Returns:
1018 An object of the form:
1019
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001020 { # Represents an Operation resource.
1021 #
1022 # Google Compute Engine has three Operation resources:
1023 #
1024 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1025 #
1026 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1027 #
1028 # Operations can be global, regional or zonal.
1029 # - For global operations, use the `globalOperations` resource.
1030 # - For regional operations, use the `regionOperations` resource.
1031 # - For zonal operations, use the `zonalOperations` resource.
1032 #
1033 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001034 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001035 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001036 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1037 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1038 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1039 {
1040 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1041 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1042 {
1043 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1044 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1045 },
1046 ],
1047 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1048 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1049 },
1050 ],
1051 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1052 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001054 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1055 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1056 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1057 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1058 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1059 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1060 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1061 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1062 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1063 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1065 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001066 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001068 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001070 },
1071 ],
1072 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001073 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001074 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1075 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1076 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -07001077 }</pre>
1078</div>
1079
1080<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001081 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001082 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1083
1084Args:
1085 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001086 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001087 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001088 The object takes the form of:
1089
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001090{
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1092 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001093 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1094 #
1095 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1096 #
1097 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1098 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001099 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim65020912020-05-20 12:08:20 -07001100 #
1101 #
1102 #
1103 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1104 #
1105 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1106 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001107 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1108 #
1109 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1110 #
1111 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
Bu Sun Kim65020912020-05-20 12:08:20 -07001112 #
1113 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001114 #
1115 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001116 &quot;A String&quot;,
1117 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001118 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1119 #
1120 # If the condition evaluates to `true`, then this binding applies to the current request.
1121 #
1122 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1123 #
1124 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1125 #
1126 # Example (Comparison):
1127 #
1128 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1129 #
1130 # Example (Equality):
1131 #
1132 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1133 #
1134 # Example (Logic):
1135 #
1136 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1137 #
1138 # Example (Data Manipulation):
1139 #
1140 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1141 #
1142 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1143 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1144 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1145 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1146 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1147 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001148 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1149 },
1150 ],
1151 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001152 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001153 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001154 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001155 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001156 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001157 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001158 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001159 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001160 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001161 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001162 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001163 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001164 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001165 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001166 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001167 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001168 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001169 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001171 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001172 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001173 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001174 # Example Policy with multiple AuditConfigs:
1175 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001176 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001177 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001178 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001179 &quot;exemptedMembers&quot;: [
1180 &quot;A String&quot;,
1181 ],
1182 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -07001183 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001184 { # Provides the configuration for logging a type of permissions. Example:
1185 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001186 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001187 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001188 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001189 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1190 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001191 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1192 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001193 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001194 },
1195 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001196 },
1197 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001198 &quot;iamOwned&quot;: True or False,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001199 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001200 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001201 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001202 #
1203 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1204 #
1205 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1206 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001207 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001208 #
1209 #
1210 #
1211 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1212 #
1213 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1214 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001215 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1216 #
1217 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1218 #
1219 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 #
1221 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001222 #
1223 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001224 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001225 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001226 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1227 #
1228 # If the condition evaluates to `true`, then this binding applies to the current request.
1229 #
1230 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1231 #
1232 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1233 #
1234 # Example (Comparison):
1235 #
1236 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1237 #
1238 # Example (Equality):
1239 #
1240 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1241 #
1242 # Example (Logic):
1243 #
1244 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1245 #
1246 # Example (Data Manipulation):
1247 #
1248 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1249 #
1250 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1251 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1252 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1253 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1254 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1255 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001256 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001257 },
1258 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001259 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1260 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001261 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07001262 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1263 { # A rule to be applied in a Policy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001264 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1265 &quot;A String&quot;,
1266 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001267 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1268 &quot;A String&quot;,
1269 ],
1270 &quot;action&quot;: &quot;A String&quot;, # Required
1271 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1272 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1273 { # A condition to be met.
1274 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1275 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1276 &quot;values&quot;: [ # The objects of the condition.
1277 &quot;A String&quot;,
1278 ],
1279 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1280 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1281 },
1282 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001283 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1284 { # Specifies what kind of log the caller must write
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001285 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1286 &quot;logMode&quot;: &quot;A String&quot;,
1287 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001288 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1289 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1290 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1291 },
1292 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1293 },
1294 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1295 #
1296 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1297 #
1298 # Field names correspond to IAM request parameters and field values are their respective values.
1299 #
1300 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1301 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001302 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001303 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1304 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001305 &quot;customFields&quot;: [ # Custom fields.
1306 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1307 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1308 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1309 },
1310 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001311 },
1312 },
1313 ],
1314 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1315 &quot;A String&quot;,
1316 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001317 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001318 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001319 &quot;version&quot;: 42, # Specifies the format of the policy.
1320 #
1321 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1322 #
1323 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1324 #
1325 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1326 #
1327 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1328 #
1329 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1330 #
1331 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001332 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001333 }
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001334
1335
1336Returns:
1337 An object of the form:
1338
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001339 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001340 #
1341 #
1342 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001343 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001344 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001345 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001346 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001347 # **JSON example:**
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001348 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001349 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001350 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001351 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001352 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001353 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001354 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001355 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001356 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001357 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001358 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001359 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001360 #
1361 # Example Policy with multiple AuditConfigs:
1362 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001363 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001364 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001365 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001366 &quot;exemptedMembers&quot;: [
1367 &quot;A String&quot;,
1368 ],
1369 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001371 { # Provides the configuration for logging a type of permissions. Example:
1372 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001373 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001374 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001375 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001376 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1377 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001378 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1379 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001380 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001381 },
1382 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001383 },
1384 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001385 &quot;iamOwned&quot;: True or False,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001386 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001387 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001388 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001389 #
1390 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1391 #
1392 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1393 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001394 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001395 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001396 #
1397 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001398 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1399 #
1400 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1401 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001402 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1403 #
1404 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1405 #
1406 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001407 #
1408 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001409 #
1410 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001411 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001412 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001413 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1414 #
1415 # If the condition evaluates to `true`, then this binding applies to the current request.
1416 #
1417 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1418 #
1419 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1420 #
1421 # Example (Comparison):
1422 #
1423 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1424 #
1425 # Example (Equality):
1426 #
1427 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1428 #
1429 # Example (Logic):
1430 #
1431 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1432 #
1433 # Example (Data Manipulation):
1434 #
1435 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1436 #
1437 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1438 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1439 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1440 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1441 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1442 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001443 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001444 },
1445 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1447 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001448 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07001449 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1450 { # A rule to be applied in a Policy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001451 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1452 &quot;A String&quot;,
1453 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001454 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1455 &quot;A String&quot;,
1456 ],
1457 &quot;action&quot;: &quot;A String&quot;, # Required
1458 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1459 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1460 { # A condition to be met.
1461 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1462 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1463 &quot;values&quot;: [ # The objects of the condition.
1464 &quot;A String&quot;,
1465 ],
1466 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1467 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1468 },
1469 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001470 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1471 { # Specifies what kind of log the caller must write
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001472 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1473 &quot;logMode&quot;: &quot;A String&quot;,
1474 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001475 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1476 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1477 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1478 },
1479 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1480 },
1481 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1482 #
1483 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1484 #
1485 # Field names correspond to IAM request parameters and field values are their respective values.
1486 #
1487 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1488 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001489 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001490 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1491 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001492 &quot;customFields&quot;: [ # Custom fields.
1493 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1494 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1495 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1496 },
1497 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001498 },
1499 },
1500 ],
1501 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1502 &quot;A String&quot;,
1503 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001504 },
1505 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001506 &quot;version&quot;: 42, # Specifies the format of the policy.
1507 #
1508 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1509 #
1510 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1511 #
1512 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1513 #
1514 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1515 #
1516 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1517 #
1518 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001519 }</pre>
1520</div>
1521
1522<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001523 <code class="details" id="stop">stop(project, deployment, body=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001524 <pre>Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.
1525
1526Args:
1527 project: string, The project ID for this request. (required)
1528 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001529 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001530 The object takes the form of:
1531
1532{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001533 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for `stop()` requests. A fingerprint is a randomly generated value that must be provided in `stop()` requests to perform optimistic locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to make a new update request while another user attempts to stop an ongoing update request, this would prevent a collision).
Takashi Matsuo06694102015-09-11 13:55:40 -07001534 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001535 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint value, perform a `get()` request on the deployment.
Takashi Matsuo06694102015-09-11 13:55:40 -07001536 }
1537
1538
1539Returns:
1540 An object of the form:
1541
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001542 { # Represents an Operation resource.
1543 #
1544 # Google Compute Engine has three Operation resources:
1545 #
1546 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1547 #
1548 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1549 #
1550 # Operations can be global, regional or zonal.
1551 # - For global operations, use the `globalOperations` resource.
1552 # - For regional operations, use the `regionOperations` resource.
1553 # - For zonal operations, use the `zonalOperations` resource.
1554 #
1555 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001556 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001558 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1559 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1560 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1561 {
1562 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1563 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1564 {
1565 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1566 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1567 },
1568 ],
1569 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1570 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1571 },
1572 ],
1573 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1574 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001575 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001576 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1577 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1578 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1579 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1580 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1581 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1582 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1583 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1584 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1585 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001586 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1587 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001588 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001589 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001590 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001591 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001592 },
1593 ],
1594 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001595 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001596 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1597 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1598 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -07001599 }</pre>
1600</div>
1601
1602<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001603 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001604 <pre>Returns permissions that a caller has on the specified resource.
1605
1606Args:
1607 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001608 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001609 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001610 The object takes the form of:
1611
1612{
Bu Sun Kim65020912020-05-20 12:08:20 -07001613 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1614 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001615 ],
1616 }
1617
1618
1619Returns:
1620 An object of the form:
1621
1622 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001623 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1624 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001625 ],
1626 }</pre>
1627</div>
1628
1629<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001630 <code class="details" id="update">update(project, deployment, body=None, deletePolicy=None, createPolicy=None, preview=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001631 <pre>Updates a deployment and all of the resources described by the deployment manifest.
1632
1633Args:
1634 project: string, The project ID for this request. (required)
1635 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001636 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001637 The object takes the form of:
1638
1639{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001640 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001641 {
1642 &quot;key&quot;: &quot;A String&quot;,
1643 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07001644 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001645 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001646 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
1647 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
1648 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
1649 &quot;imports&quot;: [ # Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template.
1650 {
1651 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
1652 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
1653 },
1654 ],
1655 &quot;config&quot;: { # The configuration to use for this deployment.
1656 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
1657 },
1658 },
1659 &quot;id&quot;: &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001660 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
1661 #
1662 # Google Compute Engine has three Operation resources:
1663 #
1664 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1665 #
1666 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1667 #
1668 # Operations can be global, regional or zonal.
1669 # - For global operations, use the `globalOperations` resource.
1670 # - For regional operations, use the `regionOperations` resource.
1671 # - For zonal operations, use the `zonalOperations` resource.
1672 #
1673 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001674 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001675 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001676 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1677 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1678 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1679 {
1680 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1681 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1682 {
1683 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1684 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1685 },
1686 ],
1687 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1688 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1689 },
1690 ],
1691 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1692 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001693 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001694 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1695 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1696 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1697 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1698 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1699 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1700 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1701 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1702 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1703 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001704 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1705 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001706 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001707 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001708 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001709 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001710 },
1711 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001712 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001713 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001714 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1715 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1716 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -07001717 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001718 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
1719 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
1720 #
1721 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a deployment.
1722 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kim65020912020-05-20 12:08:20 -07001723 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001724 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent.
Bu Sun Kim65020912020-05-20 12:08:20 -07001725 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001726 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001727 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001728 {
1729 &quot;key&quot;: &quot;A String&quot;,
1730 &quot;value&quot;: &quot;A String&quot;,
1731 },
1732 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001733 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim65020912020-05-20 12:08:20 -07001734 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001735}
Takashi Matsuo06694102015-09-11 13:55:40 -07001736
Bu Sun Kim65020912020-05-20 12:08:20 -07001737 deletePolicy: string, Sets the policy to use for deleting resources.
1738 Allowed values
1739 ABANDON -
1740 DELETE -
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001741 createPolicy: string, Sets the policy to use for creating new resources.
1742 Allowed values
1743 ACQUIRE -
1744 CREATE_OR_ACQUIRE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001745 preview: boolean, If set to true, updates the deployment and creates and updates the &quot;shell&quot; resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a `target.config` with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the `update()` or you can `cancelPreview()` to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
Takashi Matsuo06694102015-09-11 13:55:40 -07001746
1747Returns:
1748 An object of the form:
1749
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001750 { # Represents an Operation resource.
1751 #
1752 # Google Compute Engine has three Operation resources:
1753 #
1754 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1755 #
1756 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1757 #
1758 # Operations can be global, regional or zonal.
1759 # - For global operations, use the `globalOperations` resource.
1760 # - For regional operations, use the `regionOperations` resource.
1761 # - For zonal operations, use the `zonalOperations` resource.
1762 #
1763 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001764 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001765 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001766 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1767 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1768 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1769 {
1770 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1771 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1772 {
1773 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1774 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1775 },
1776 ],
1777 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1778 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1779 },
1780 ],
1781 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1782 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001783 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001784 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1785 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1786 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1787 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1788 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1789 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1790 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1791 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1792 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1793 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001794 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1795 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001796 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001797 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001798 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001799 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001800 },
1801 ],
1802 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001803 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001804 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1805 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1806 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -07001807 }</pre>
1808</div>
1809
1810</body></html>