blob: c6c241969b91d1b5ed5834805ddbd816ebf66c1b [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">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080081 <code><a href="#delete">delete(project, deployment, deletePolicy=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070082<p class="firstline">Deletes a deployment and all of the resources in the deployment.</p>
83<p class="toc_element">
84 <code><a href="#get">get(project, deployment)</a></code></p>
85<p class="firstline">Gets information about a specific deployment.</p>
86<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070087 <code><a href="#getIamPolicy">getIamPolicy(project, resource)</a></code></p>
88<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, body=None, createPolicy=None, preview=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070091<p class="firstline">Creates a deployment and all of the resources described by the deployment manifest.</p>
92<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070094<p class="firstline">Lists all deployments for a given project.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#patch">patch(project, deployment, body=None, createPolicy=None, deletePolicy=None, preview=None)</a></code></p>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700100<p class="firstline">Patches a deployment and all of the resources described by the deployment manifest.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#stop">stop(project, deployment, body=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700106<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>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700109<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
110<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code><a href="#update">update(project, deployment, body=None, createPolicy=None, deletePolicy=None, preview=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700112<p class="firstline">Updates a deployment and all of the resources described by the deployment manifest.</p>
113<h3>Method Details</h3>
114<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 <code class="details" id="cancelPreview">cancelPreview(project, deployment, body=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700116 <pre>Cancels and removes the preview currently associated with the deployment.
117
118Args:
119 project: string, The project ID for this request. (required)
120 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700122 The object takes the form of:
123
124{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700125 &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 -0700126 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700127 # 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 -0700128 }
129
130
131Returns:
132 An object of the form:
133
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700134 { # Represents an Operation resource.
135 #
136 # Google Compute Engine has three Operation resources:
137 #
138 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
139 #
140 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
141 #
142 # Operations can be global, regional or zonal.
143 # - For global operations, use the `globalOperations` resource.
144 # - For regional operations, use the `regionOperations` resource.
145 # - For zonal operations, use the `zonalOperations` resource.
146 #
147 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
149 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
150 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
151 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
152 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
153 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700154 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
156 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
157 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700158 },
159 ],
160 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700161 &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`.
162 &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.
163 &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 -0700164 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700165 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
166 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
167 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700169 &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 -0700170 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
171 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700172 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
174 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
175 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700176 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
178 {
179 &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.
180 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
181 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
182 {
183 &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).
184 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
185 },
186 ],
187 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
188 },
189 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700190 &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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700191 }</pre>
192</div>
193
194<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800195 <code class="details" id="delete">delete(project, deployment, deletePolicy=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700196 <pre>Deletes a deployment and all of the resources in the deployment.
197
198Args:
199 project: string, The project ID for this request. (required)
200 deployment: string, The name of the deployment for this request. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800201 deletePolicy: string, Sets the policy to use for deleting resources.
202 Allowed values
203 ABANDON -
204 DELETE -
Takashi Matsuo06694102015-09-11 13:55:40 -0700205
206Returns:
207 An object of the form:
208
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700209 { # Represents an Operation resource.
210 #
211 # Google Compute Engine has three Operation resources:
212 #
213 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
214 #
215 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
216 #
217 # Operations can be global, regional or zonal.
218 # - For global operations, use the `globalOperations` resource.
219 # - For regional operations, use the `regionOperations` resource.
220 # - For zonal operations, use the `zonalOperations` resource.
221 #
222 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700223 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
224 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
225 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
226 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
227 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
228 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700229 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
231 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
232 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700233 },
234 ],
235 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700236 &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`.
237 &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.
238 &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 -0700239 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700240 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
241 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
242 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700244 &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 -0700245 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
246 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700247 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
249 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
250 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700251 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
253 {
254 &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.
255 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
256 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
257 {
258 &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).
259 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
260 },
261 ],
262 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
263 },
264 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700265 &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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700266 }</pre>
267</div>
268
269<div class="method">
270 <code class="details" id="get">get(project, deployment)</code>
271 <pre>Gets information about a specific deployment.
272
273Args:
274 project: string, The project ID for this request. (required)
275 deployment: string, The name of the deployment for this request. (required)
276
277Returns:
278 An object of the form:
279
280 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700281 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700282 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700284 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;id&quot;: &quot;A String&quot;,
286 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700287 &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 -0700288 {
289 &quot;key&quot;: &quot;A String&quot;,
290 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700291 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700293 &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.
294 &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.
295 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
296 #
297 # Google Compute Engine has three Operation resources:
298 #
299 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
300 #
301 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
302 #
303 # Operations can be global, regional or zonal.
304 # - For global operations, use the `globalOperations` resource.
305 # - For regional operations, use the `regionOperations` resource.
306 # - For zonal operations, use the `zonalOperations` resource.
307 #
308 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
310 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
311 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
312 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
313 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
314 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700315 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
317 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
318 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700319 },
320 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700321 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700322 &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`.
323 &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.
324 &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 -0700325 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700326 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
327 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
328 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700329 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700330 &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 -0700331 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
332 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700333 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
335 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
336 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700337 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
339 {
340 &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.
341 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
342 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Takashi Matsuo06694102015-09-11 13:55:40 -0700343 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 &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).
345 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Takashi Matsuo06694102015-09-11 13:55:40 -0700346 },
347 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700348 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Takashi Matsuo06694102015-09-11 13:55:40 -0700349 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700351 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 },
353 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
354 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
355 &quot;config&quot;: { # The configuration to use for this deployment.
356 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700357 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &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.
359 {
360 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
361 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700362 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700363 ],
364 },
365 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
366 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700367 &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 -0700368 {
369 &quot;key&quot;: &quot;A String&quot;,
370 &quot;value&quot;: &quot;A String&quot;,
371 },
372 ],
373 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
374 },
375 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
376 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700377</div>
378
379<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700380 <code class="details" id="getIamPolicy">getIamPolicy(project, resource)</code>
381 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
382
383Args:
384 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700386
387Returns:
388 An object of the form:
389
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700390 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700391 #
392 #
393 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700394 # 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 -0700395 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700396 # 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 -0700397 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700398 # **JSON example:**
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700399 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700400 # { &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 -0700401 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700402 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700404 # 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 -0700405 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700406 # 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 -0700407 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400408 { # 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 -0400409 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 # 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 -0400411 #
412 # Example Policy with multiple AuditConfigs:
413 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700414 # { &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 -0400415 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700416 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400418 { # Provides the configuration for logging a type of permissions. Example:
419 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700420 # { &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 -0400421 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700422 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
424 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800425 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700426 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -0700427 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800428 },
429 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 &quot;exemptedMembers&quot;: [
431 &quot;A String&quot;,
432 ],
433 &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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700434 },
435 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700436 &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 -0700437 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700438 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700440 # If the condition evaluates to `true`, then this binding applies to the current request.
441 #
442 # 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.
443 #
444 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
445 #
446 # Example (Comparison):
447 #
448 # 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;
449 #
450 # Example (Equality):
451 #
452 # 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;
453 #
454 # Example (Logic):
455 #
456 # 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;
457 #
458 # Example (Data Manipulation):
459 #
460 # 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;
461 #
462 # 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.
463 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700464 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700465 &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.
466 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 },
468 &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 -0700469 #
470 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
471 #
472 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
473 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700474 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700475 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800476 #
477 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700478 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
479 #
480 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
481 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700482 # * `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.
483 #
484 # * `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.
485 #
486 # * `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 -0700487 #
488 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700489 #
490 # * `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 -0700491 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700492 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &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 -0700494 },
495 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 &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.
497 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700498 # **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 -0700499 &quot;iamOwned&quot;: True or False,
500 &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.
501 { # A rule to be applied in a Policy.
502 &quot;action&quot;: &quot;A String&quot;, # Required
503 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
504 { # A condition to be met.
505 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
506 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
507 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
508 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700509 &quot;values&quot;: [ # The objects of the condition.
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &quot;A String&quot;,
511 ],
512 },
513 ],
514 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
515 &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.
516 &quot;A String&quot;,
517 ],
518 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
519 { # Specifies what kind of log the caller must write
520 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
521 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
522 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
523 },
524 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
525 },
526 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
527 #
528 # 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.
529 #
530 # Field names correspond to IAM request parameters and field values are their respective values.
531 #
532 # 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.
533 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700534 # 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]}
535 &quot;customFields&quot;: [ # Custom fields.
536 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
537 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
538 &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.
539 },
540 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
542 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
543 },
544 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700545 &quot;logMode&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 },
547 },
548 ],
549 &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.
550 &quot;A String&quot;,
551 ],
552 &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.
553 &quot;A String&quot;,
554 ],
555 },
556 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700557 &quot;version&quot;: 42, # Specifies the format of the policy.
558 #
559 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
560 #
561 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
562 #
563 # * 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
564 #
565 # **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.
566 #
567 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
568 #
569 # 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 -0700570 }</pre>
571</div>
572
573<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700574 <code class="details" id="insert">insert(project, body=None, createPolicy=None, preview=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700575 <pre>Creates a deployment and all of the resources described by the deployment manifest.
576
577Args:
578 project: string, The project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700580 The object takes the form of:
581
582{
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700584 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700585 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700586 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &quot;id&quot;: &quot;A String&quot;,
588 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700589 &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 -0700590 {
591 &quot;key&quot;: &quot;A String&quot;,
592 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700593 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700594 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700595 &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.
596 &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.
597 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
598 #
599 # Google Compute Engine has three Operation resources:
600 #
601 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
602 #
603 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
604 #
605 # Operations can be global, regional or zonal.
606 # - For global operations, use the `globalOperations` resource.
607 # - For regional operations, use the `regionOperations` resource.
608 # - For zonal operations, use the `zonalOperations` resource.
609 #
610 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700611 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
612 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
613 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
614 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
615 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
616 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700617 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
619 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
620 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700621 },
622 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700623 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700624 &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`.
625 &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.
626 &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 -0700627 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700628 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
629 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
630 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700632 &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 -0700633 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
634 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700635 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
637 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
638 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700639 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
641 {
642 &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.
643 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
644 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Takashi Matsuo06694102015-09-11 13:55:40 -0700645 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &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).
647 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Takashi Matsuo06694102015-09-11 13:55:40 -0700648 },
649 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Takashi Matsuo06694102015-09-11 13:55:40 -0700651 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700653 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 },
655 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
656 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
657 &quot;config&quot;: { # The configuration to use for this deployment.
658 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700659 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 &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.
661 {
662 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
663 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700664 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700665 ],
666 },
667 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
668 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700669 &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 -0700670 {
671 &quot;key&quot;: &quot;A String&quot;,
672 &quot;value&quot;: &quot;A String&quot;,
673 },
674 ],
675 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
676 },
677 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
678}
Takashi Matsuo06694102015-09-11 13:55:40 -0700679
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 createPolicy: string, Sets the policy to use for creating new resources.
681 Allowed values
682 ACQUIRE -
683 CREATE_OR_ACQUIRE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700684 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700685
686Returns:
687 An object of the form:
688
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700689 { # Represents an Operation resource.
690 #
691 # Google Compute Engine has three Operation resources:
692 #
693 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
694 #
695 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
696 #
697 # Operations can be global, regional or zonal.
698 # - For global operations, use the `globalOperations` resource.
699 # - For regional operations, use the `regionOperations` resource.
700 # - For zonal operations, use the `zonalOperations` resource.
701 #
702 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700703 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
704 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
705 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
706 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
707 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
708 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700709 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700710 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
711 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
712 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700713 },
714 ],
715 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700716 &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`.
717 &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.
718 &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 -0700719 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700720 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
721 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
722 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700724 &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 -0700725 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
726 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700727 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
729 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
730 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700731 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
733 {
734 &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.
735 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
736 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
737 {
738 &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).
739 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
740 },
741 ],
742 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
743 },
744 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700745 &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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700746 }</pre>
747</div>
748
749<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700751 <pre>Lists all deployments for a given project.
752
753Args:
754 project: string, The project ID for this request. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700755 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 -0700756
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700757For 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 -0700758
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700759You 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 -0800760
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700761To 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) ```
762 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 Kim65020912020-05-20 12:08:20 -0700763 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
764
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700765You 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700767Currently, only sorting by `name` or `creationTimestamp desc` is supported.
768 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 -0700769
770Returns:
771 An object of the form:
772
773 { # A response containing a partial list of deployments and a page token used to build the next request if the request has been truncated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700774 &quot;deployments&quot;: [ # Output only. The deployments contained in this response.
Takashi Matsuo06694102015-09-11 13:55:40 -0700775 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700777 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700779 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700780 &quot;id&quot;: &quot;A String&quot;,
781 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700782 &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 -0700783 {
784 &quot;key&quot;: &quot;A String&quot;,
785 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700786 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700787 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700788 &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.
789 &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.
790 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
791 #
792 # Google Compute Engine has three Operation resources:
793 #
794 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
795 #
796 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
797 #
798 # Operations can be global, regional or zonal.
799 # - For global operations, use the `globalOperations` resource.
800 # - For regional operations, use the `regionOperations` resource.
801 # - For zonal operations, use the `zonalOperations` resource.
802 #
803 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700804 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
805 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
806 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
807 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
808 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
809 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700810 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700811 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
812 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
813 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700814 },
815 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700816 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700817 &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`.
818 &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.
819 &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 -0700820 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700821 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
822 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
823 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700824 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700825 &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 -0700826 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
827 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700828 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700829 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
830 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
831 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700832 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
834 {
835 &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.
836 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
837 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Takashi Matsuo06694102015-09-11 13:55:40 -0700838 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700839 &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).
840 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Takashi Matsuo06694102015-09-11 13:55:40 -0700841 },
842 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Takashi Matsuo06694102015-09-11 13:55:40 -0700844 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700845 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700846 &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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700847 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
849 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
850 &quot;config&quot;: { # The configuration to use for this deployment.
851 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
852 },
853 &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.
854 {
855 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
856 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
857 },
858 ],
859 },
860 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
861 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700862 &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 -0700863 {
864 &quot;key&quot;: &quot;A String&quot;,
865 &quot;value&quot;: &quot;A String&quot;,
866 },
867 ],
868 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
869 },
870 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
871 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700872 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700873 &quot;nextPageToken&quot;: &quot;A String&quot;, # Output only. A token used to continue a truncated list request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700874 }</pre>
875</div>
876
877<div class="method">
878 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
879 <pre>Retrieves the next page of results.
880
881Args:
882 previous_request: The request for the previous page. (required)
883 previous_response: The response from the request for the previous page. (required)
884
885Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700886 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -0700887 page. Returns None if there are no more items in the collection.
888 </pre>
889</div>
890
891<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700892 <code class="details" id="patch">patch(project, deployment, body=None, createPolicy=None, deletePolicy=None, preview=None)</code>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700893 <pre>Patches a deployment and all of the resources described by the deployment manifest.
Takashi Matsuo06694102015-09-11 13:55:40 -0700894
895Args:
896 project: string, The project ID for this request. (required)
897 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700899 The object takes the form of:
900
901{
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700903 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700904 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700905 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 &quot;id&quot;: &quot;A String&quot;,
907 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700908 &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 -0700909 {
910 &quot;key&quot;: &quot;A String&quot;,
911 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700912 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700913 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700914 &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.
915 &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.
916 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
917 #
918 # Google Compute Engine has three Operation resources:
919 #
920 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
921 #
922 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
923 #
924 # Operations can be global, regional or zonal.
925 # - For global operations, use the `globalOperations` resource.
926 # - For regional operations, use the `regionOperations` resource.
927 # - For zonal operations, use the `zonalOperations` resource.
928 #
929 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
931 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
932 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
933 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
934 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
935 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700936 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
938 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
939 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700940 },
941 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700942 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700943 &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`.
944 &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.
945 &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 -0700946 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700947 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
948 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
949 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700950 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700951 &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 -0700952 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
953 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700954 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700955 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
956 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
957 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700958 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
960 {
961 &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.
962 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
963 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Takashi Matsuo06694102015-09-11 13:55:40 -0700964 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700965 &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).
966 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Takashi Matsuo06694102015-09-11 13:55:40 -0700967 },
968 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Takashi Matsuo06694102015-09-11 13:55:40 -0700970 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700971 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700972 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 },
974 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
975 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
976 &quot;config&quot;: { # The configuration to use for this deployment.
977 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700978 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700979 &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.
980 {
981 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
982 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700983 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 ],
985 },
986 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
987 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700988 &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 -0700989 {
990 &quot;key&quot;: &quot;A String&quot;,
991 &quot;value&quot;: &quot;A String&quot;,
992 },
993 ],
994 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
995 },
996 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
997}
Takashi Matsuo06694102015-09-11 13:55:40 -0700998
Takashi Matsuo06694102015-09-11 13:55:40 -0700999 createPolicy: string, Sets the policy to use for creating new resources.
1000 Allowed values
1001 ACQUIRE -
1002 CREATE_OR_ACQUIRE -
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 deletePolicy: string, Sets the policy to use for deleting resources.
1004 Allowed values
1005 ABANDON -
1006 DELETE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001007 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 -07001008
1009Returns:
1010 An object of the form:
1011
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001012 { # Represents an Operation resource.
1013 #
1014 # Google Compute Engine has three Operation resources:
1015 #
1016 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1017 #
1018 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1019 #
1020 # Operations can be global, regional or zonal.
1021 # - For global operations, use the `globalOperations` resource.
1022 # - For regional operations, use the `regionOperations` resource.
1023 # - For zonal operations, use the `zonalOperations` resource.
1024 #
1025 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1027 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1028 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1029 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1030 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1031 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001032 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001033 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1034 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1035 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001036 },
1037 ],
1038 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001039 &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`.
1040 &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.
1041 &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 -07001042 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001043 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1044 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1045 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -07001046 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001047 &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 -07001048 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1049 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001050 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001051 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1052 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1053 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001054 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001055 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1056 {
1057 &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.
1058 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1059 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1060 {
1061 &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).
1062 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1063 },
1064 ],
1065 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1066 },
1067 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001068 &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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001069 }</pre>
1070</div>
1071
1072<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001073 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001074 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1075
1076Args:
1077 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001079 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001080 The object takes the form of:
1081
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001082{
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1084 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001085 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001086 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001087 # If the condition evaluates to `true`, then this binding applies to the current request.
1088 #
1089 # 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.
1090 #
1091 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1092 #
1093 # Example (Comparison):
1094 #
1095 # 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;
1096 #
1097 # Example (Equality):
1098 #
1099 # 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;
1100 #
1101 # Example (Logic):
1102 #
1103 # 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;
1104 #
1105 # Example (Data Manipulation):
1106 #
1107 # 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;
1108 #
1109 # 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.
1110 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001111 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001112 &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.
1113 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 },
1115 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1116 #
1117 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1118 #
1119 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1120 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001121 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim65020912020-05-20 12:08:20 -07001122 #
1123 #
1124 #
1125 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1126 #
1127 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1128 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001129 # * `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.
1130 #
1131 # * `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.
1132 #
1133 # * `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 -07001134 #
1135 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001136 #
1137 # * `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 -07001138 &quot;A String&quot;,
1139 ],
1140 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1141 },
1142 ],
1143 &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 -07001144 &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 -04001145 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001146 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001147 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001148 # 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 -04001149 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001150 # 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 -07001151 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001152 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001154 # { &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 -07001155 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001156 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001157 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001158 # 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 -07001159 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001160 # 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 -07001161 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 { # 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 -04001163 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001164 # 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 -04001165 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001166 # Example Policy with multiple AuditConfigs:
1167 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001168 # { &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 -07001169 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001170 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001171 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001172 { # Provides the configuration for logging a type of permissions. Example:
1173 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001174 # { &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 -07001175 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001176 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001177 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1178 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001179 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001180 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001181 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001182 },
1183 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001184 &quot;exemptedMembers&quot;: [
1185 &quot;A String&quot;,
1186 ],
1187 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001188 },
1189 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001190 &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 -07001191 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001192 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001193 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001194 # If the condition evaluates to `true`, then this binding applies to the current request.
1195 #
1196 # 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.
1197 #
1198 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1199 #
1200 # Example (Comparison):
1201 #
1202 # 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;
1203 #
1204 # Example (Equality):
1205 #
1206 # 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;
1207 #
1208 # Example (Logic):
1209 #
1210 # 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;
1211 #
1212 # Example (Data Manipulation):
1213 #
1214 # 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;
1215 #
1216 # 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.
1217 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001218 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001219 &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.
1220 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 },
1222 &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 -07001223 #
1224 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1225 #
1226 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1227 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001228 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001229 #
1230 #
1231 #
1232 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1233 #
1234 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1235 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001236 # * `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.
1237 #
1238 # * `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.
1239 #
1240 # * `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 -07001241 #
1242 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001243 #
1244 # * `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 -07001245 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001246 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001247 &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 -07001248 },
1249 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001250 &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.
1251 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001252 # **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 -07001253 &quot;iamOwned&quot;: True or False,
1254 &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.
1255 { # A rule to be applied in a Policy.
1256 &quot;action&quot;: &quot;A String&quot;, # Required
1257 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1258 { # A condition to be met.
1259 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1260 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1261 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1262 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001263 &quot;values&quot;: [ # The objects of the condition.
Bu Sun Kim65020912020-05-20 12:08:20 -07001264 &quot;A String&quot;,
1265 ],
1266 },
1267 ],
1268 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1269 &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.
1270 &quot;A String&quot;,
1271 ],
1272 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1273 { # Specifies what kind of log the caller must write
1274 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1275 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1276 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1277 },
1278 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1279 },
1280 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1281 #
1282 # 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.
1283 #
1284 # Field names correspond to IAM request parameters and field values are their respective values.
1285 #
1286 # 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.
1287 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001288 # 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]}
1289 &quot;customFields&quot;: [ # Custom fields.
1290 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1291 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1292 &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.
1293 },
1294 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001295 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1296 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1297 },
1298 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001299 &quot;logMode&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001300 },
1301 },
1302 ],
1303 &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.
1304 &quot;A String&quot;,
1305 ],
1306 &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.
1307 &quot;A String&quot;,
1308 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001309 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001310 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001311 &quot;version&quot;: 42, # Specifies the format of the policy.
1312 #
1313 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1314 #
1315 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1316 #
1317 # * 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
1318 #
1319 # **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.
1320 #
1321 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1322 #
1323 # 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 -07001324 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001325 }
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001326
1327
1328Returns:
1329 An object of the form:
1330
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001331 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001332 #
1333 #
1334 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001335 # 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 -07001336 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001337 # 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 -07001338 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001339 # **JSON example:**
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001340 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001341 # { &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 -07001342 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001343 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001344 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001345 # 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 -07001346 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001347 # 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 -07001348 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001349 { # 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 -04001350 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001351 # 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 -04001352 #
1353 # Example Policy with multiple AuditConfigs:
1354 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001355 # { &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 -04001356 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001357 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001359 { # Provides the configuration for logging a type of permissions. Example:
1360 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001361 # { &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 -04001362 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001363 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001364 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1365 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001366 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001367 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001368 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001369 },
1370 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001371 &quot;exemptedMembers&quot;: [
1372 &quot;A String&quot;,
1373 ],
1374 &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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001375 },
1376 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001377 &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 -07001378 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001379 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001380 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001381 # If the condition evaluates to `true`, then this binding applies to the current request.
1382 #
1383 # 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.
1384 #
1385 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1386 #
1387 # Example (Comparison):
1388 #
1389 # 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;
1390 #
1391 # Example (Equality):
1392 #
1393 # 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;
1394 #
1395 # Example (Logic):
1396 #
1397 # 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;
1398 #
1399 # Example (Data Manipulation):
1400 #
1401 # 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;
1402 #
1403 # 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.
1404 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001405 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001406 &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.
1407 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001408 },
1409 &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 -07001410 #
1411 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1412 #
1413 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1414 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001415 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001416 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001417 #
1418 #
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001419 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1420 #
1421 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1422 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001423 # * `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.
1424 #
1425 # * `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.
1426 #
1427 # * `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 -07001428 #
1429 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001430 #
1431 # * `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 -07001432 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001433 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 &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 -07001435 },
1436 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001437 &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.
1438 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001439 # **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 -07001440 &quot;iamOwned&quot;: True or False,
1441 &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.
1442 { # A rule to be applied in a Policy.
1443 &quot;action&quot;: &quot;A String&quot;, # Required
1444 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1445 { # A condition to be met.
1446 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1447 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1448 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1449 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001450 &quot;values&quot;: [ # The objects of the condition.
Bu Sun Kim65020912020-05-20 12:08:20 -07001451 &quot;A String&quot;,
1452 ],
1453 },
1454 ],
1455 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1456 &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.
1457 &quot;A String&quot;,
1458 ],
1459 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1460 { # Specifies what kind of log the caller must write
1461 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1462 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1463 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1464 },
1465 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1466 },
1467 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1468 #
1469 # 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.
1470 #
1471 # Field names correspond to IAM request parameters and field values are their respective values.
1472 #
1473 # 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.
1474 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001475 # 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]}
1476 &quot;customFields&quot;: [ # Custom fields.
1477 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1478 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1479 &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.
1480 },
1481 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1483 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1484 },
1485 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001486 &quot;logMode&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001487 },
1488 },
1489 ],
1490 &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.
1491 &quot;A String&quot;,
1492 ],
1493 &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.
1494 &quot;A String&quot;,
1495 ],
1496 },
1497 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001498 &quot;version&quot;: 42, # Specifies the format of the policy.
1499 #
1500 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1501 #
1502 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1503 #
1504 # * 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
1505 #
1506 # **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.
1507 #
1508 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1509 #
1510 # 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 -07001511 }</pre>
1512</div>
1513
1514<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001515 <code class="details" id="stop">stop(project, deployment, body=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001516 <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.
1517
1518Args:
1519 project: string, The project ID for this request. (required)
1520 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001521 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001522 The object takes the form of:
1523
1524{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001525 &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 -07001526 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001527 # 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 -07001528 }
1529
1530
1531Returns:
1532 An object of the form:
1533
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001534 { # Represents an Operation resource.
1535 #
1536 # Google Compute Engine has three Operation resources:
1537 #
1538 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1539 #
1540 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1541 #
1542 # Operations can be global, regional or zonal.
1543 # - For global operations, use the `globalOperations` resource.
1544 # - For regional operations, use the `regionOperations` resource.
1545 # - For zonal operations, use the `zonalOperations` resource.
1546 #
1547 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001548 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1549 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1550 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1551 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1552 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1553 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001554 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001555 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1556 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1557 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001558 },
1559 ],
1560 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001561 &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`.
1562 &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.
1563 &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 -07001564 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001565 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1566 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1567 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -07001568 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001569 &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 -07001570 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1571 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001572 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001573 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1574 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1575 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001576 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1578 {
1579 &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.
1580 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1581 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1582 {
1583 &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).
1584 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1585 },
1586 ],
1587 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1588 },
1589 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001590 &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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001591 }</pre>
1592</div>
1593
1594<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001595 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001596 <pre>Returns permissions that a caller has on the specified resource.
1597
1598Args:
1599 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001600 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001601 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001602 The object takes the form of:
1603
1604{
Bu Sun Kim65020912020-05-20 12:08:20 -07001605 &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.
1606 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001607 ],
1608 }
1609
1610
1611Returns:
1612 An object of the form:
1613
1614 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001615 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1616 &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001617 ],
1618 }</pre>
1619</div>
1620
1621<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001622 <code class="details" id="update">update(project, deployment, body=None, createPolicy=None, deletePolicy=None, preview=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001623 <pre>Updates a deployment and all of the resources described by the deployment manifest.
1624
1625Args:
1626 project: string, The project ID for this request. (required)
1627 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001628 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001629 The object takes the form of:
1630
1631{
Bu Sun Kim65020912020-05-20 12:08:20 -07001632 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001633 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001634 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001635 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001636 &quot;id&quot;: &quot;A String&quot;,
1637 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001638 &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 -07001639 {
1640 &quot;key&quot;: &quot;A String&quot;,
1641 &quot;value&quot;: &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -07001642 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001643 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001644 &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.
1645 &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.
1646 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
1647 #
1648 # Google Compute Engine has three Operation resources:
1649 #
1650 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1651 #
1652 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1653 #
1654 # Operations can be global, regional or zonal.
1655 # - For global operations, use the `globalOperations` resource.
1656 # - For regional operations, use the `regionOperations` resource.
1657 # - For zonal operations, use the `zonalOperations` resource.
1658 #
1659 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001660 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1661 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1662 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1663 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1664 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1665 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001666 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001667 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1668 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1669 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001670 },
1671 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001672 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001673 &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`.
1674 &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.
1675 &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 -07001676 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001677 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1678 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1679 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -07001680 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001681 &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 -07001682 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1683 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001684 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001685 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1686 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1687 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001688 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001689 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1690 {
1691 &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.
1692 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1693 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Takashi Matsuo06694102015-09-11 13:55:40 -07001694 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001695 &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).
1696 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Takashi Matsuo06694102015-09-11 13:55:40 -07001697 },
1698 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001699 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Takashi Matsuo06694102015-09-11 13:55:40 -07001700 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001701 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001702 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001703 },
1704 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
1705 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
1706 &quot;config&quot;: { # The configuration to use for this deployment.
1707 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001708 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001709 &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.
1710 {
1711 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
1712 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001713 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001714 ],
1715 },
1716 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
1717 &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 Kim4ed7d3f2020-05-27 12:20:54 -07001718 &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 -07001719 {
1720 &quot;key&quot;: &quot;A String&quot;,
1721 &quot;value&quot;: &quot;A String&quot;,
1722 },
1723 ],
1724 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
1725 },
1726 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
1727}
Takashi Matsuo06694102015-09-11 13:55:40 -07001728
Takashi Matsuo06694102015-09-11 13:55:40 -07001729 createPolicy: string, Sets the policy to use for creating new resources.
1730 Allowed values
1731 ACQUIRE -
1732 CREATE_OR_ACQUIRE -
Bu Sun Kim65020912020-05-20 12:08:20 -07001733 deletePolicy: string, Sets the policy to use for deleting resources.
1734 Allowed values
1735 ABANDON -
1736 DELETE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001737 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 -07001738
1739Returns:
1740 An object of the form:
1741
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001742 { # Represents an Operation resource.
1743 #
1744 # Google Compute Engine has three Operation resources:
1745 #
1746 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1747 #
1748 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1749 #
1750 # Operations can be global, regional or zonal.
1751 # - For global operations, use the `globalOperations` resource.
1752 # - For regional operations, use the `regionOperations` resource.
1753 # - For zonal operations, use the `zonalOperations` resource.
1754 #
1755 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001756 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1757 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1758 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1759 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1760 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1761 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001762 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001763 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1764 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1765 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001766 },
1767 ],
1768 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001769 &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`.
1770 &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.
1771 &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 -07001772 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001773 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1774 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1775 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -07001776 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001777 &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 -07001778 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1779 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001780 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001781 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1782 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1783 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001784 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001785 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1786 {
1787 &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.
1788 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1789 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1790 {
1791 &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).
1792 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1793 },
1794 ],
1795 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1796 },
1797 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001798 &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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001799 }</pre>
1800</div>
1801
1802</body></html>