blob: 822977be5be8a85b7263dc6052ada53487e488fb [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<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_alpha.html">Google Cloud Deployment Manager Alpha API</a> . <a href="deploymentmanager_alpha.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>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040079<p class="firstline">Cancels and removes the preview currently associated with the deployment.</p>
80<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070081 <code><a href="#close">close()</a></code></p>
82<p class="firstline">Close httplib2 connections.</p>
83<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#delete">delete(project, deployment, deletePolicy=None)</a></code></p>
85<p class="firstline">Deletes a deployment and all of the resources in the deployment.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, deployment)</a></code></p>
88<p class="firstline">Gets information about a specific deployment.</p>
89<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040091<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, body=None, createPolicy=None, preview=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040094<p class="firstline">Creates a deployment and all of the resources described by the deployment manifest.</p>
95<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070096 <code><a href="#list">list(project, filter=None, returnPartialSuccess=None, pageToken=None, orderBy=None, maxResults=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040097<p class="firstline">Lists all deployments for a given project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102 <code><a href="#patch">patch(project, deployment, body=None, preview=None, deletePolicy=None, createPolicy=None)</a></code></p>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700103<p class="firstline">Patches a deployment and all of the resources described by the deployment manifest.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400106<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#stop">stop(project, deployment, body=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400109<p class="firstline">Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
113<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 <code><a href="#update">update(project, deployment, body=None, deletePolicy=None, createPolicy=None, preview=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400115<p class="firstline">Updates a deployment and all of the resources described by the deployment manifest.</p>
116<h3>Method Details</h3>
117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code class="details" id="cancelPreview">cancelPreview(project, deployment, body=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400119 <pre>Cancels and removes the preview currently associated with the deployment.
120
121Args:
122 project: string, The project ID for this request. (required)
123 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700124 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400125 The object takes the form of:
126
127{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700128 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided in `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to make a new update request while another user attempts to cancel a preview, this would prevent one of the requests).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400129 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700130 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint value, perform a `get()` request on the deployment.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400131 }
132
133
134Returns:
135 An object of the form:
136
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700137 { # Represents an Operation resource.
138 #
139 # Google Compute Engine has three Operation resources:
140 #
141 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
142 #
143 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
144 #
145 # Operations can be global, regional or zonal.
146 # - For global operations, use the `globalOperations` resource.
147 # - For regional operations, use the `regionOperations` resource.
148 # - For zonal operations, use the `zonalOperations` resource.
149 #
150 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700151 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700153 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
154 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700155 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700156 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700158 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
159 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
160 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
161 &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.
162 &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 -0700163 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700164 &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 -0700165 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
166 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700167 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
169 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
170 {
171 &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).
172 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
173 },
174 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700175 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 },
177 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700178 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
179 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
180 &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.
181 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
182 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
183 {
184 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
185 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
186 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
187 },
188 ],
189 },
190 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
191 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
192 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
193 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
194 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400195 }</pre>
196</div>
197
198<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700199 <code class="details" id="close">close()</code>
200 <pre>Close httplib2 connections.</pre>
201</div>
202
203<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400204 <code class="details" id="delete">delete(project, deployment, deletePolicy=None)</code>
205 <pre>Deletes a deployment and all of the resources in the deployment.
206
207Args:
208 project: string, The project ID for this request. (required)
209 deployment: string, The name of the deployment for this request. (required)
210 deletePolicy: string, Sets the policy to use for deleting resources.
211 Allowed values
212 ABANDON -
213 DELETE -
214
215Returns:
216 An object of the form:
217
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700218 { # Represents an Operation resource.
219 #
220 # Google Compute Engine has three Operation resources:
221 #
222 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
223 #
224 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
225 #
226 # Operations can be global, regional or zonal.
227 # - For global operations, use the `globalOperations` resource.
228 # - For regional operations, use the `regionOperations` resource.
229 # - For zonal operations, use the `zonalOperations` resource.
230 #
231 # 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 Kim4ed7d3f2020-05-27 12:20:54 -0700232 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700233 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700234 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
235 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700236 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700237 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700238 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700239 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
240 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
241 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
242 &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.
243 &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 -0700244 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700245 &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 -0700246 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
247 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700248 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
250 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
251 {
252 &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).
253 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
254 },
255 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700256 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 },
258 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700259 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
260 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
261 &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.
262 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
263 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
264 {
265 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
266 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
267 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
268 },
269 ],
270 },
271 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
272 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
273 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
274 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
275 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400276 }</pre>
277</div>
278
279<div class="method">
280 <code class="details" id="get">get(project, deployment)</code>
281 <pre>Gets information about a specific deployment.
282
283Args:
284 project: string, The project ID for this request. (required)
285 deployment: string, The name of the deployment for this request. (required)
286
287Returns:
288 An object of the form:
289
290 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700291 &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])?)?`.
292 {
293 &quot;key&quot;: &quot;A String&quot;,
294 &quot;value&quot;: &quot;A String&quot;,
295 },
296 ],
297 &quot;id&quot;: &quot;A String&quot;,
298 &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.
299 &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.
300 &quot;outputs&quot;: [ # Output only. List of outputs from the last manifest that deployed successfully.
301 { # Output object for Deployments
302 &quot;value&quot;: &quot;A String&quot;, # Value of the label
303 &quot;key&quot;: &quot;A String&quot;, # Key of the output
304 },
305 ],
306 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
307 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
308 &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])?)?`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400309 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700310 &quot;value&quot;: &quot;A String&quot;,
311 &quot;key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400312 },
313 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700314 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
315 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # Output only. The user-provided default credential to use when deploying this preview.
316 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
317 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
318 &quot;password&quot;: &quot;A String&quot;,
319 &quot;user&quot;: &quot;A String&quot;,
320 },
321 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
322 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
323 },
324 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400325 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700326 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
327 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
328 #
329 # Google Compute Engine has three Operation resources:
330 #
331 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
332 #
333 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
334 #
335 # Operations can be global, regional or zonal.
336 # - For global operations, use the `globalOperations` resource.
337 # - For regional operations, use the `regionOperations` resource.
338 # - For zonal operations, use the `zonalOperations` resource.
339 #
340 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
341 &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`.
342 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
343 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
344 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
345 &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`.
346 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
347 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
348 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
349 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
350 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
351 &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.
352 &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.
353 &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.
354 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
355 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
356 {
357 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
358 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
359 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
360 {
361 &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).
362 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
363 },
364 ],
365 &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.
366 },
367 ],
368 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
369 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
370 &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.
371 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
372 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400373 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700374 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
375 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
376 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400377 },
378 ],
379 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700380 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
381 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
382 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
383 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
384 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400385 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700386 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # User provided default credential for the deployment.
387 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700388 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
389 &quot;password&quot;: &quot;A String&quot;,
390 &quot;user&quot;: &quot;A String&quot;,
391 },
392 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
393 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
394 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400395 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700396 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
397 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
398 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
399 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
400 &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.
401 {
402 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
403 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
404 },
405 ],
406 &quot;config&quot;: { # The configuration to use for this deployment.
407 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700408 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700409 },
410 &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.
411 #
412 # 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.
413 }</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400414</div>
415
416<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700417 <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400418 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
419
420Args:
421 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 resource: string, Name or id of the resource for this request. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700423 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400424
425Returns:
426 An object of the form:
427
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700428 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400429 #
430 #
431 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700432 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400433 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700434 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400435 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700436 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400437 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700438 # { &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 -0700439 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700440 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700441 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700442 # 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 -0700443 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700444 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700445 &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.
446 { # A rule to be applied in a Policy.
447 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 &quot;A String&quot;,
449 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700450 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
451 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
452 { # Specifies what kind of log the caller must write
453 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
454 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
455 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
456 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
457 },
458 },
459 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
460 #
461 # 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.
462 #
463 # Field names correspond to IAM request parameters and field values are their respective values.
464 #
465 # 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.
466 #
467 # 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]}
468 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
469 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
470 &quot;customFields&quot;: [ # Custom fields.
471 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
472 &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.
473 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
474 },
475 ],
476 },
477 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
478 &quot;logMode&quot;: &quot;A String&quot;,
479 },
480 },
481 ],
482 &quot;action&quot;: &quot;A String&quot;, # Required
483 &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.
484 &quot;A String&quot;,
485 ],
486 &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.
487 &quot;A String&quot;,
488 ],
489 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
490 { # A condition to be met.
491 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
492 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
493 &quot;values&quot;: [ # The objects of the condition.
494 &quot;A String&quot;,
495 ],
496 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
497 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
498 },
499 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400500 },
501 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700502 &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.
503 #
504 # **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.
505 &quot;version&quot;: 42, # Specifies the format of the policy.
506 #
507 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
508 #
509 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
510 #
511 # * 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
512 #
513 # **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.
514 #
515 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
516 #
517 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
518 &quot;iamOwned&quot;: True or False,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700519 &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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400520 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700521 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
522 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
523 #
524 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
525 #
526 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
527 #
528 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
529 #
530 #
531 #
532 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
533 #
534 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
535 #
536 # * `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.
537 #
538 # * `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.
539 #
540 # * `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.
541 #
542 #
543 #
544 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
545 &quot;A String&quot;,
546 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700547 &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 -0700548 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700549 # If the condition evaluates to `true`, then this binding applies to the current request.
550 #
551 # 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.
552 #
553 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
554 #
555 # Example (Comparison):
556 #
557 # 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;
558 #
559 # Example (Equality):
560 #
561 # 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;
562 #
563 # Example (Logic):
564 #
565 # 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;
566 #
567 # Example (Data Manipulation):
568 #
569 # 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;
570 #
571 # 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.
572 &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 -0700573 &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 -0700574 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700575 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400577 },
578 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700579 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
580 { # 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.
581 #
582 # 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.
583 #
584 # Example Policy with multiple AuditConfigs:
585 #
586 # { &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; ] } ] } ] }
587 #
588 # 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.
589 &quot;exemptedMembers&quot;: [
590 &quot;A String&quot;,
591 ],
592 &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.
593 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
594 { # Provides the configuration for logging a type of permissions. Example:
595 #
596 # { &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;, } ] }
597 #
598 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
599 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
600 &quot;ignoreChildExemptions&quot;: True or False,
601 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 &quot;A String&quot;,
603 ],
604 },
605 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700606 },
607 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400608 }</pre>
609</div>
610
611<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700612 <code class="details" id="insert">insert(project, body=None, createPolicy=None, preview=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400613 <pre>Creates a deployment and all of the resources described by the deployment manifest.
614
615Args:
616 project: string, The project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700617 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400618 The object takes the form of:
619
620{
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700621 &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])?)?`.
622 {
623 &quot;key&quot;: &quot;A String&quot;,
624 &quot;value&quot;: &quot;A String&quot;,
625 },
626 ],
627 &quot;id&quot;: &quot;A String&quot;,
628 &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.
629 &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.
630 &quot;outputs&quot;: [ # Output only. List of outputs from the last manifest that deployed successfully.
631 { # Output object for Deployments
632 &quot;value&quot;: &quot;A String&quot;, # Value of the label
633 &quot;key&quot;: &quot;A String&quot;, # Key of the output
634 },
635 ],
636 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
637 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
638 &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])?)?`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400639 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700640 &quot;value&quot;: &quot;A String&quot;,
641 &quot;key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400642 },
643 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700644 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
645 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # Output only. The user-provided default credential to use when deploying this preview.
646 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
647 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
648 &quot;password&quot;: &quot;A String&quot;,
649 &quot;user&quot;: &quot;A String&quot;,
650 },
651 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
652 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
653 },
654 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400655 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700656 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
657 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
658 #
659 # Google Compute Engine has three Operation resources:
660 #
661 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
662 #
663 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
664 #
665 # Operations can be global, regional or zonal.
666 # - For global operations, use the `globalOperations` resource.
667 # - For regional operations, use the `regionOperations` resource.
668 # - For zonal operations, use the `zonalOperations` resource.
669 #
670 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
671 &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`.
672 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
673 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
674 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
675 &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`.
676 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
677 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
678 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
679 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
680 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
681 &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.
682 &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.
683 &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.
684 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
685 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
686 {
687 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
688 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
689 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
690 {
691 &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).
692 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
693 },
694 ],
695 &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.
696 },
697 ],
698 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
699 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
700 &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.
701 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
702 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400703 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700704 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
705 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
706 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400707 },
708 ],
709 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700710 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
711 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
712 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
713 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
714 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400715 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700716 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # User provided default credential for the deployment.
717 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
719 &quot;password&quot;: &quot;A String&quot;,
720 &quot;user&quot;: &quot;A String&quot;,
721 },
722 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
723 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
724 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400725 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700726 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
727 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
728 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
729 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
730 &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.
731 {
732 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
733 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
734 },
735 ],
736 &quot;config&quot;: { # The configuration to use for this deployment.
737 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700738 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700739 },
740 &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.
741 #
742 # 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.
743 }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400744
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700745 createPolicy: string, Sets the policy to use for creating new resources.
746 Allowed values
747 ACQUIRE -
748 CREATE -
749 CREATE_OR_ACQUIRE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700750 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400751
752Returns:
753 An object of the form:
754
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700755 { # Represents an Operation resource.
756 #
757 # Google Compute Engine has three Operation resources:
758 #
759 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
760 #
761 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
762 #
763 # Operations can be global, regional or zonal.
764 # - For global operations, use the `globalOperations` resource.
765 # - For regional operations, use the `regionOperations` resource.
766 # - For zonal operations, use the `zonalOperations` resource.
767 #
768 # 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 Kim4ed7d3f2020-05-27 12:20:54 -0700769 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700771 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
772 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700773 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700774 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700775 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700776 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
777 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
778 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
779 &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.
780 &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 -0700781 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700782 &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 -0700783 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
784 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700785 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700786 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
787 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
788 {
789 &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).
790 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
791 },
792 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700793 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700794 },
795 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700796 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
797 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
798 &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.
799 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
800 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
801 {
802 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
803 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
804 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
805 },
806 ],
807 },
808 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
809 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
810 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
811 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
812 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400813 }</pre>
814</div>
815
816<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700817 <code class="details" id="list">list(project, filter=None, returnPartialSuccess=None, pageToken=None, orderBy=None, maxResults=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400818 <pre>Lists all deployments for a given project.
819
820Args:
821 project: string, The project ID for this request. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700822 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;`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400823
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700824For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400825
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700826You 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400827
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700828To 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) ```
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700829 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
830 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
832
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700833You 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 -0700834
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700835Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700836 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`)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400837
838Returns:
839 An object of the form:
840
841 { # 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 -0700842 &quot;deployments&quot;: [ # Output only. The deployments contained in this response.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400843 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700844 &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])?)?`.
845 {
846 &quot;key&quot;: &quot;A String&quot;,
847 &quot;value&quot;: &quot;A String&quot;,
848 },
849 ],
850 &quot;id&quot;: &quot;A String&quot;,
851 &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.
852 &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.
853 &quot;outputs&quot;: [ # Output only. List of outputs from the last manifest that deployed successfully.
854 { # Output object for Deployments
855 &quot;value&quot;: &quot;A String&quot;, # Value of the label
856 &quot;key&quot;: &quot;A String&quot;, # Key of the output
857 },
858 ],
859 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
860 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
861 &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])?)?`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400862 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700863 &quot;value&quot;: &quot;A String&quot;,
864 &quot;key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400865 },
866 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700867 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
868 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # Output only. The user-provided default credential to use when deploying this preview.
869 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
870 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
871 &quot;password&quot;: &quot;A String&quot;,
872 &quot;user&quot;: &quot;A String&quot;,
873 },
874 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
875 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
876 },
877 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400878 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700879 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
880 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
881 #
882 # Google Compute Engine has three Operation resources:
883 #
884 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
885 #
886 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
887 #
888 # Operations can be global, regional or zonal.
889 # - For global operations, use the `globalOperations` resource.
890 # - For regional operations, use the `regionOperations` resource.
891 # - For zonal operations, use the `zonalOperations` resource.
892 #
893 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
894 &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`.
895 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
896 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
897 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
898 &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`.
899 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
900 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
901 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
902 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
903 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
904 &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.
905 &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.
906 &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.
907 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
908 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
909 {
910 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
911 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
912 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
913 {
914 &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).
915 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
916 },
917 ],
918 &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.
919 },
920 ],
921 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
922 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
923 &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.
924 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
925 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400926 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700927 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
928 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
929 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400930 },
931 ],
932 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700933 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
934 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
935 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
936 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
937 &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 Kim65020912020-05-20 12:08:20 -0700938 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700939 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # User provided default credential for the deployment.
940 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
942 &quot;password&quot;: &quot;A String&quot;,
943 &quot;user&quot;: &quot;A String&quot;,
944 },
945 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
946 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
947 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700949 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
950 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
951 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
952 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
953 &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.
954 {
955 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
956 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
957 },
958 ],
959 &quot;config&quot;: { # The configuration to use for this deployment.
960 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700962 },
963 &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.
964 #
965 # 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 -0700966 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400967 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 &quot;nextPageToken&quot;: &quot;A String&quot;, # Output only. A token used to continue a truncated list request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400969 }</pre>
970</div>
971
972<div class="method">
973 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
974 <pre>Retrieves the next page of results.
975
976Args:
977 previous_request: The request for the previous page. (required)
978 previous_response: The response from the request for the previous page. (required)
979
980Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700981 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400982 page. Returns None if there are no more items in the collection.
983 </pre>
984</div>
985
986<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700987 <code class="details" id="patch">patch(project, deployment, body=None, preview=None, deletePolicy=None, createPolicy=None)</code>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700988 <pre>Patches a deployment and all of the resources described by the deployment manifest.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400989
990Args:
991 project: string, The project ID for this request. (required)
992 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700993 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400994 The object takes the form of:
995
996{
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700997 &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])?)?`.
998 {
999 &quot;key&quot;: &quot;A String&quot;,
1000 &quot;value&quot;: &quot;A String&quot;,
1001 },
1002 ],
1003 &quot;id&quot;: &quot;A String&quot;,
1004 &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.
1005 &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.
1006 &quot;outputs&quot;: [ # Output only. List of outputs from the last manifest that deployed successfully.
1007 { # Output object for Deployments
1008 &quot;value&quot;: &quot;A String&quot;, # Value of the label
1009 &quot;key&quot;: &quot;A String&quot;, # Key of the output
1010 },
1011 ],
1012 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
1013 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
1014 &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])?)?`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001015 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001016 &quot;value&quot;: &quot;A String&quot;,
1017 &quot;key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001018 },
1019 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001020 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
1021 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # Output only. The user-provided default credential to use when deploying this preview.
1022 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
1023 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
1024 &quot;password&quot;: &quot;A String&quot;,
1025 &quot;user&quot;: &quot;A String&quot;,
1026 },
1027 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
1028 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
1029 },
1030 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001031 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001032 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
1033 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
1034 #
1035 # Google Compute Engine has three Operation resources:
1036 #
1037 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1038 #
1039 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1040 #
1041 # Operations can be global, regional or zonal.
1042 # - For global operations, use the `globalOperations` resource.
1043 # - For regional operations, use the `regionOperations` resource.
1044 # - For zonal operations, use the `zonalOperations` resource.
1045 #
1046 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1047 &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`.
1048 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1049 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1050 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1051 &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`.
1052 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1053 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1054 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1055 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1056 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1057 &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.
1058 &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.
1059 &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.
1060 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1061 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1062 {
1063 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1064 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1065 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1066 {
1067 &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).
1068 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1069 },
1070 ],
1071 &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.
1072 },
1073 ],
1074 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1075 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1076 &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.
1077 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1078 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001079 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001080 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1081 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1082 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001083 },
1084 ],
1085 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001086 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1087 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1088 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1089 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1090 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001091 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001092 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # User provided default credential for the deployment.
1093 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
1095 &quot;password&quot;: &quot;A String&quot;,
1096 &quot;user&quot;: &quot;A String&quot;,
1097 },
1098 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
1099 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
1100 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001101 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001102 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
1103 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
1104 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
1105 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
1106 &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.
1107 {
1108 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
1109 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
1110 },
1111 ],
1112 &quot;config&quot;: { # The configuration to use for this deployment.
1113 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001115 },
1116 &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.
1117 #
1118 # 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.
1119 }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001120
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001121 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.
1122 deletePolicy: string, Sets the policy to use for deleting resources.
1123 Allowed values
1124 ABANDON -
1125 DELETE -
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001126 createPolicy: string, Sets the policy to use for creating new resources.
1127 Allowed values
1128 ACQUIRE -
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001129 CREATE -
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001130 CREATE_OR_ACQUIRE -
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001131
1132Returns:
1133 An object of the form:
1134
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001135 { # Represents an Operation resource.
1136 #
1137 # Google Compute Engine has three Operation resources:
1138 #
1139 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1140 #
1141 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1142 #
1143 # Operations can be global, regional or zonal.
1144 # - For global operations, use the `globalOperations` resource.
1145 # - For regional operations, use the `regionOperations` resource.
1146 # - For zonal operations, use the `zonalOperations` resource.
1147 #
1148 # 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 Kim4ed7d3f2020-05-27 12:20:54 -07001149 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001150 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001151 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1152 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001153 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001154 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001156 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1157 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1158 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1159 &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.
1160 &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 -07001161 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001162 &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 -07001163 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1164 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001165 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim65020912020-05-20 12:08:20 -07001166 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1167 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1168 {
1169 &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).
1170 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1171 },
1172 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001173 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001174 },
1175 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001176 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1177 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1178 &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.
1179 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1180 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1181 {
1182 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1183 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1184 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1185 },
1186 ],
1187 },
1188 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1189 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1190 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1191 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1192 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001193 }</pre>
1194</div>
1195
1196<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001197 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001198 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1199
1200Args:
1201 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001202 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001203 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001204 The object takes the form of:
1205
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001206{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001207 &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 -04001208 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001209 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001210 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001211 # 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 -04001212 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001213 # 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 -07001214 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001215 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001216 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001217 # { &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 -07001218 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001219 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001221 # 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 -07001222 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001223 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001224 &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.
1225 { # A rule to be applied in a Policy.
1226 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001227 &quot;A String&quot;,
1228 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001229 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1230 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1231 { # Specifies what kind of log the caller must write
1232 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1233 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1234 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1235 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1236 },
1237 },
1238 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1239 #
1240 # 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.
1241 #
1242 # Field names correspond to IAM request parameters and field values are their respective values.
1243 #
1244 # 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.
1245 #
1246 # 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]}
1247 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1248 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1249 &quot;customFields&quot;: [ # Custom fields.
1250 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1251 &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.
1252 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1253 },
1254 ],
1255 },
1256 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1257 &quot;logMode&quot;: &quot;A String&quot;,
1258 },
1259 },
1260 ],
1261 &quot;action&quot;: &quot;A String&quot;, # Required
1262 &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.
1263 &quot;A String&quot;,
1264 ],
1265 &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.
1266 &quot;A String&quot;,
1267 ],
1268 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1269 { # A condition to be met.
1270 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1271 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1272 &quot;values&quot;: [ # The objects of the condition.
1273 &quot;A String&quot;,
1274 ],
1275 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1276 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1277 },
1278 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001279 },
1280 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001281 &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.
1282 #
1283 # **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.
1284 &quot;version&quot;: 42, # Specifies the format of the policy.
1285 #
1286 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1287 #
1288 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1289 #
1290 # * 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
1291 #
1292 # **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.
1293 #
1294 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1295 #
1296 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1297 &quot;iamOwned&quot;: True or False,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001298 &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 -07001299 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001300 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1301 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1302 #
1303 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1304 #
1305 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1306 #
1307 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1308 #
1309 #
1310 #
1311 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1312 #
1313 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1314 #
1315 # * `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.
1316 #
1317 # * `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.
1318 #
1319 # * `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.
1320 #
1321 #
1322 #
1323 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1324 &quot;A String&quot;,
1325 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001326 &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 -07001327 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001328 # If the condition evaluates to `true`, then this binding applies to the current request.
1329 #
1330 # 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.
1331 #
1332 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1333 #
1334 # Example (Comparison):
1335 #
1336 # 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;
1337 #
1338 # Example (Equality):
1339 #
1340 # 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;
1341 #
1342 # Example (Logic):
1343 #
1344 # 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;
1345 #
1346 # Example (Data Manipulation):
1347 #
1348 # 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;
1349 #
1350 # 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.
1351 &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 -07001352 &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 -07001353 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001354 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001355 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001356 },
1357 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001358 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1359 { # 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.
1360 #
1361 # 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.
1362 #
1363 # Example Policy with multiple AuditConfigs:
1364 #
1365 # { &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; ] } ] } ] }
1366 #
1367 # 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.
1368 &quot;exemptedMembers&quot;: [
1369 &quot;A String&quot;,
1370 ],
1371 &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.
1372 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1373 { # Provides the configuration for logging a type of permissions. Example:
1374 #
1375 # { &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;, } ] }
1376 #
1377 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1378 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1379 &quot;ignoreChildExemptions&quot;: True or False,
1380 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Bu Sun Kim65020912020-05-20 12:08:20 -07001381 &quot;A String&quot;,
1382 ],
1383 },
1384 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001385 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001386 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001387 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001388 &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.
1389 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1390 { # Associates `members` with a `role`.
1391 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1392 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1393 #
1394 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1395 #
1396 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1397 #
1398 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1399 #
1400 #
1401 #
1402 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1403 #
1404 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1405 #
1406 # * `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.
1407 #
1408 # * `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.
1409 #
1410 # * `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.
1411 #
1412 #
1413 #
1414 # * `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 -07001415 &quot;A String&quot;,
1416 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001417 &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 -07001418 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001419 # If the condition evaluates to `true`, then this binding applies to the current request.
1420 #
1421 # 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.
1422 #
1423 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1424 #
1425 # Example (Comparison):
1426 #
1427 # 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;
1428 #
1429 # Example (Equality):
1430 #
1431 # 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;
1432 #
1433 # Example (Logic):
1434 #
1435 # 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;
1436 #
1437 # Example (Data Manipulation):
1438 #
1439 # 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;
1440 #
1441 # 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.
1442 &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 -07001443 &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 -07001444 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001445 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001447 },
1448 ],
1449 }
1450
1451
1452Returns:
1453 An object of the form:
1454
1455 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
1456 #
1457 #
1458 #
1459 # 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.
1460 #
1461 # 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).
1462 #
1463 # **JSON example:**
1464 #
1465 # { &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 }
1466 #
1467 # **YAML example:**
1468 #
1469 # 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
1470 #
1471 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1472 &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.
1473 { # A rule to be applied in a Policy.
1474 &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.
1475 &quot;A String&quot;,
1476 ],
1477 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1478 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1479 { # Specifies what kind of log the caller must write
1480 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1481 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1482 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1483 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1484 },
1485 },
1486 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1487 #
1488 # 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.
1489 #
1490 # Field names correspond to IAM request parameters and field values are their respective values.
1491 #
1492 # 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.
1493 #
1494 # 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]}
1495 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1496 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1497 &quot;customFields&quot;: [ # Custom fields.
1498 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1499 &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.
1500 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1501 },
1502 ],
1503 },
1504 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1505 &quot;logMode&quot;: &quot;A String&quot;,
1506 },
1507 },
1508 ],
1509 &quot;action&quot;: &quot;A String&quot;, # Required
1510 &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.
1511 &quot;A String&quot;,
1512 ],
1513 &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.
1514 &quot;A String&quot;,
1515 ],
1516 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1517 { # A condition to be met.
1518 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1519 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1520 &quot;values&quot;: [ # The objects of the condition.
1521 &quot;A String&quot;,
1522 ],
1523 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1524 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1525 },
1526 ],
1527 },
1528 ],
1529 &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.
1530 #
1531 # **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.
1532 &quot;version&quot;: 42, # Specifies the format of the policy.
1533 #
1534 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1535 #
1536 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1537 #
1538 # * 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
1539 #
1540 # **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.
1541 #
1542 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1543 #
1544 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1545 &quot;iamOwned&quot;: True or False,
1546 &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.
1547 { # Associates `members` with a `role`.
1548 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001549 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001550 #
1551 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1552 #
1553 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1554 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001555 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001556 #
1557 #
1558 #
1559 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1560 #
1561 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1562 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001563 # * `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.
1564 #
1565 # * `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.
1566 #
1567 # * `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 -07001568 #
1569 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001570 #
1571 # * `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 -07001572 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001573 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001574 &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.
1575 #
1576 # If the condition evaluates to `true`, then this binding applies to the current request.
1577 #
1578 # 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.
1579 #
1580 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1581 #
1582 # Example (Comparison):
1583 #
1584 # 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;
1585 #
1586 # Example (Equality):
1587 #
1588 # 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;
1589 #
1590 # Example (Logic):
1591 #
1592 # 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;
1593 #
1594 # Example (Data Manipulation):
1595 #
1596 # 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;
1597 #
1598 # 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.
1599 &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.
1600 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1601 &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.
1602 &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.
1603 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001604 },
1605 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001606 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1607 { # 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.
1608 #
1609 # 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.
1610 #
1611 # Example Policy with multiple AuditConfigs:
1612 #
1613 # { &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; ] } ] } ] }
1614 #
1615 # 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.
1616 &quot;exemptedMembers&quot;: [
1617 &quot;A String&quot;,
1618 ],
1619 &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.
1620 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1621 { # Provides the configuration for logging a type of permissions. Example:
1622 #
1623 # { &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;, } ] }
1624 #
1625 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1626 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1627 &quot;ignoreChildExemptions&quot;: True or False,
1628 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Bu Sun Kim65020912020-05-20 12:08:20 -07001629 &quot;A String&quot;,
1630 ],
1631 },
1632 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001633 },
1634 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001635 }</pre>
1636</div>
1637
1638<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001639 <code class="details" id="stop">stop(project, deployment, body=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001640 <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.
1641
1642Args:
1643 project: string, The project ID for this request. (required)
1644 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001645 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001646 The object takes the form of:
1647
1648{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001649 &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).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001650 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001651 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001652 }
1653
1654
1655Returns:
1656 An object of the form:
1657
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001658 { # Represents an Operation resource.
1659 #
1660 # Google Compute Engine has three Operation resources:
1661 #
1662 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1663 #
1664 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1665 #
1666 # Operations can be global, regional or zonal.
1667 # - For global operations, use the `globalOperations` resource.
1668 # - For regional operations, use the `regionOperations` resource.
1669 # - For zonal operations, use the `zonalOperations` resource.
1670 #
1671 # 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 Kim4ed7d3f2020-05-27 12:20:54 -07001672 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001673 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001674 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1675 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001676 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001677 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001678 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001679 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1680 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1681 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1682 &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.
1683 &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 -07001684 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001685 &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 -07001686 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1687 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001688 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim65020912020-05-20 12:08:20 -07001689 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1690 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1691 {
1692 &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).
1693 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1694 },
1695 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001696 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001697 },
1698 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001699 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1700 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1701 &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.
1702 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1703 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1704 {
1705 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1706 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1707 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1708 },
1709 ],
1710 },
1711 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1712 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1713 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1714 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1715 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001716 }</pre>
1717</div>
1718
1719<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001720 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001721 <pre>Returns permissions that a caller has on the specified resource.
1722
1723Args:
1724 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001725 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001726 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001727 The object takes the form of:
1728
1729{
Bu Sun Kim65020912020-05-20 12:08:20 -07001730 &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.
1731 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001732 ],
1733 }
1734
1735
1736Returns:
1737 An object of the form:
1738
1739 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001740 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1741 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001742 ],
1743 }</pre>
1744</div>
1745
1746<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001747 <code class="details" id="update">update(project, deployment, body=None, deletePolicy=None, createPolicy=None, preview=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001748 <pre>Updates a deployment and all of the resources described by the deployment manifest.
1749
1750Args:
1751 project: string, The project ID for this request. (required)
1752 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001753 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001754 The object takes the form of:
1755
1756{
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001757 &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])?)?`.
1758 {
1759 &quot;key&quot;: &quot;A String&quot;,
1760 &quot;value&quot;: &quot;A String&quot;,
1761 },
1762 ],
1763 &quot;id&quot;: &quot;A String&quot;,
1764 &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.
1765 &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.
1766 &quot;outputs&quot;: [ # Output only. List of outputs from the last manifest that deployed successfully.
1767 { # Output object for Deployments
1768 &quot;value&quot;: &quot;A String&quot;, # Value of the label
1769 &quot;key&quot;: &quot;A String&quot;, # Key of the output
1770 },
1771 ],
1772 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
1773 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
1774 &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])?)?`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001775 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001776 &quot;value&quot;: &quot;A String&quot;,
1777 &quot;key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001778 },
1779 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001780 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
1781 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # Output only. The user-provided default credential to use when deploying this preview.
1782 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
1783 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
1784 &quot;password&quot;: &quot;A String&quot;,
1785 &quot;user&quot;: &quot;A String&quot;,
1786 },
1787 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
1788 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
1789 },
1790 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001791 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001792 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
1793 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
1794 #
1795 # Google Compute Engine has three Operation resources:
1796 #
1797 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1798 #
1799 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1800 #
1801 # Operations can be global, regional or zonal.
1802 # - For global operations, use the `globalOperations` resource.
1803 # - For regional operations, use the `regionOperations` resource.
1804 # - For zonal operations, use the `zonalOperations` resource.
1805 #
1806 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1807 &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`.
1808 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1809 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1810 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1811 &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`.
1812 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1813 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1814 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1815 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1816 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1817 &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.
1818 &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.
1819 &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.
1820 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1821 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1822 {
1823 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1824 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1825 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1826 {
1827 &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).
1828 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1829 },
1830 ],
1831 &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.
1832 },
1833 ],
1834 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1835 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1836 &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.
1837 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1838 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001839 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001840 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1841 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1842 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001843 },
1844 ],
1845 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001846 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1847 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1848 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1849 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1850 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001851 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001852 &quot;credential&quot;: { # The credential used by Deployment Manager and TypeProvider. Only one of the options is permitted. # User provided default credential for the deployment.
1853 &quot;useProjectDefault&quot;: True or False, # Specify to use the project default credential, only supported by Deployment.
Bu Sun Kim65020912020-05-20 12:08:20 -07001854 &quot;basicAuth&quot;: { # Basic Auth used as a credential. # Basic Auth Credential, only used by TypeProvider.
1855 &quot;password&quot;: &quot;A String&quot;,
1856 &quot;user&quot;: &quot;A String&quot;,
1857 },
1858 &quot;serviceAccount&quot;: { # Service Account used as a credential. # Service Account Credential, only used by Deployment.
1859 &quot;email&quot;: &quot;A String&quot;, # The IAM service account email address like test@myproject.iam.gserviceaccount.com
1860 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001861 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001862 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
1863 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
1864 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
1865 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
1866 &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.
1867 {
1868 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
1869 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
1870 },
1871 ],
1872 &quot;config&quot;: { # The configuration to use for this deployment.
1873 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001874 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001875 },
1876 &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.
1877 #
1878 # 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.
1879 }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001880
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001881 deletePolicy: string, Sets the policy to use for deleting resources.
1882 Allowed values
1883 ABANDON -
1884 DELETE -
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001885 createPolicy: string, Sets the policy to use for creating new resources.
1886 Allowed values
1887 ACQUIRE -
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001888 CREATE -
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001889 CREATE_OR_ACQUIRE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001890 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001891
1892Returns:
1893 An object of the form:
1894
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001895 { # Represents an Operation resource.
1896 #
1897 # Google Compute Engine has three Operation resources:
1898 #
1899 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1900 #
1901 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1902 #
1903 # Operations can be global, regional or zonal.
1904 # - For global operations, use the `globalOperations` resource.
1905 # - For regional operations, use the `regionOperations` resource.
1906 # - For zonal operations, use the `zonalOperations` resource.
1907 #
1908 # 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 Kim4ed7d3f2020-05-27 12:20:54 -07001909 &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`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001910 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001911 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1912 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001913 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001914 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001915 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001916 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1917 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1918 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1919 &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.
1920 &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 -07001921 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001922 &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 -07001923 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1924 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001925 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim65020912020-05-20 12:08:20 -07001926 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1927 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1928 {
1929 &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).
1930 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1931 },
1932 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001933 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001934 },
1935 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001936 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1937 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1938 &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.
1939 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1940 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1941 {
1942 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1943 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1944 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1945 },
1946 ],
1947 },
1948 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1949 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1950 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1951 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1952 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001953 }</pre>
1954</div>
1955
1956</body></html>