blob: b5576c02d652d57094cd4d1f48df08e2ab4d9977 [file] [log] [blame]
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="deploymentmanager_v2beta.html">Google Cloud Deployment Manager API V2Beta Methods</a> . <a href="deploymentmanager_v2beta.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 Cheemalapatie833b792017-03-24 15:06:46 -070079<p class="firstline">Cancels and removes the preview currently associated with the deployment.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(project, deployment, deletePolicy=None)</a></code></p>
82<p class="firstline">Deletes a deployment and all of the resources in the deployment.</p>
83<p class="toc_element">
84 <code><a href="#get">get(project, deployment)</a></code></p>
85<p class="firstline">Gets information about a specific deployment.</p>
86<p class="toc_element">
87 <code><a href="#getIamPolicy">getIamPolicy(project, resource)</a></code></p>
88<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, body=None, createPolicy=None, preview=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070091<p class="firstline">Creates a deployment and all of the resources described by the deployment manifest.</p>
92<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070094<p class="firstline">Lists all deployments for a given project.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#patch">patch(project, deployment, body=None, createPolicy=None, deletePolicy=None, preview=None)</a></code></p>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700100<p class="firstline">Patches a deployment and all of the resources described by the deployment manifest.</p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#stop">stop(project, deployment, body=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700106<p class="firstline">Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700109<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
110<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code><a href="#update">update(project, deployment, body=None, createPolicy=None, deletePolicy=None, preview=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700112<p class="firstline">Updates a deployment and all of the resources described by the deployment manifest.</p>
113<h3>Method Details</h3>
114<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 <code class="details" id="cancelPreview">cancelPreview(project, deployment, body=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700116 <pre>Cancels and removes the preview currently associated with the deployment.
117
118Args:
119 project: string, The project ID for this request. (required)
120 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700122 The object takes the form of:
123
124{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700125 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided in `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to make a new update request while another user attempts to cancel a preview, this would prevent one of the requests).
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700126 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700127 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint value, perform a `get()` request on the deployment.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700128 }
129
130
131Returns:
132 An object of the form:
133
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700134 { # Represents an Operation resource.
135 #
136 # Google Compute Engine has three Operation resources:
137 #
138 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
139 #
140 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
141 #
142 # Operations can be global, regional or zonal.
143 # - For global operations, use the `globalOperations` resource.
144 # - For regional operations, use the `regionOperations` resource.
145 # - For zonal operations, use the `zonalOperations` resource.
146 #
147 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
149 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
150 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
151 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
152 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
153 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700154 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
156 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
157 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700158 },
159 ],
160 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700161 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
162 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
163 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700165 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
166 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
167 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700169 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
171 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700172 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
174 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
175 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700176 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
178 {
179 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
180 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
181 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
182 {
183 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
184 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
185 },
186 ],
187 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
188 },
189 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700190 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700191 }</pre>
192</div>
193
194<div class="method">
195 <code class="details" id="delete">delete(project, deployment, deletePolicy=None)</code>
196 <pre>Deletes a deployment and all of the resources in the deployment.
197
198Args:
199 project: string, The project ID for this request. (required)
200 deployment: string, The name of the deployment for this request. (required)
201 deletePolicy: string, Sets the policy to use for deleting resources.
202 Allowed values
203 ABANDON -
204 DELETE -
205
206Returns:
207 An object of the form:
208
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700209 { # Represents an Operation resource.
210 #
211 # Google Compute Engine has three Operation resources:
212 #
213 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
214 #
215 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
216 #
217 # Operations can be global, regional or zonal.
218 # - For global operations, use the `globalOperations` resource.
219 # - For regional operations, use the `regionOperations` resource.
220 # - For zonal operations, use the `zonalOperations` resource.
221 #
222 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700223 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
224 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
225 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
226 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
227 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
228 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700229 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
231 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
232 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700233 },
234 ],
235 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700236 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
237 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
238 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700240 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
241 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
242 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700244 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
246 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700247 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
249 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
250 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700251 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
253 {
254 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
255 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
256 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
257 {
258 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
259 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
260 },
261 ],
262 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
263 },
264 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700265 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700266 }</pre>
267</div>
268
269<div class="method">
270 <code class="details" id="get">get(project, deployment)</code>
271 <pre>Gets information about a specific deployment.
272
273Args:
274 project: string, The project ID for this request. (required)
275 deployment: string, The name of the deployment for this request. (required)
276
277Returns:
278 An object of the form:
279
280 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700281 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700282 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700284 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a deployment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;id&quot;: &quot;A String&quot;,
286 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700287 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 {
289 &quot;key&quot;: &quot;A String&quot;,
290 &quot;value&quot;: &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700291 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700293 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent.
294 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
295 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
296 #
297 # Google Compute Engine has three Operation resources:
298 #
299 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
300 #
301 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
302 #
303 # Operations can be global, regional or zonal.
304 # - For global operations, use the `globalOperations` resource.
305 # - For regional operations, use the `regionOperations` resource.
306 # - For zonal operations, use the `zonalOperations` resource.
307 #
308 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
310 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
311 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
312 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
313 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
314 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700315 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
317 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
318 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700319 },
320 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700321 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700322 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
323 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
324 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -0700325 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700326 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
327 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
328 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700329 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700330 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
332 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700333 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
335 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
336 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700337 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
339 {
340 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
341 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
342 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700343 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
345 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700346 },
347 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700348 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700349 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700351 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 },
353 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
354 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
355 &quot;config&quot;: { # The configuration to use for this deployment.
356 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700357 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &quot;imports&quot;: [ # Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template.
359 {
360 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
361 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700362 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700363 ],
364 },
365 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
366 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700367 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700368 {
369 &quot;key&quot;: &quot;A String&quot;,
370 &quot;value&quot;: &quot;A String&quot;,
371 },
372 ],
373 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
374 },
375 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
376 }</pre>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700377</div>
378
379<div class="method">
380 <code class="details" id="getIamPolicy">getIamPolicy(project, resource)</code>
381 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
382
383Args:
384 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700386
387Returns:
388 An object of the form:
389
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700390 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700391 #
392 #
393 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700394 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700395 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700396 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700397 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700398 # **JSON example:**
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700399 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700400 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700402 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700404 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700405 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700406 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700407 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400408 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700409 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400411 #
412 # Example Policy with multiple AuditConfigs:
413 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700414 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400415 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700416 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700418 { # Provides the configuration for logging a type of permissions. Example:
419 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700420 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700421 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700422 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
424 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700425 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700426 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -0700427 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700428 },
429 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 &quot;exemptedMembers&quot;: [
431 &quot;A String&quot;,
432 ],
433 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700434 },
435 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700436 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700437 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700438 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700440 # If the condition evaluates to `true`, then this binding applies to the current request.
441 #
442 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
443 #
444 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
445 #
446 # Example (Comparison):
447 #
448 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
449 #
450 # Example (Equality):
451 #
452 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
453 #
454 # Example (Logic):
455 #
456 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
457 #
458 # Example (Data Manipulation):
459 #
460 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
461 #
462 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
463 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700464 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700465 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
466 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 },
468 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700469 #
470 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
471 #
472 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
473 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700474 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700475 #
476 #
477 #
478 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
479 #
480 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
481 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700482 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
483 #
484 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
485 #
486 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 #
488 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700489 #
490 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700491 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700492 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700494 },
495 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
497 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700498 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 &quot;iamOwned&quot;: True or False,
500 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
501 { # A rule to be applied in a Policy.
502 &quot;action&quot;: &quot;A String&quot;, # Required
503 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
504 { # A condition to be met.
505 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
506 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
507 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
508 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700509 &quot;values&quot;: [ # The objects of the condition.
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &quot;A String&quot;,
511 ],
512 },
513 ],
514 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
515 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
516 &quot;A String&quot;,
517 ],
518 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
519 { # Specifies what kind of log the caller must write
520 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
521 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
522 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
523 },
524 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
525 },
526 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
527 #
528 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
529 #
530 # Field names correspond to IAM request parameters and field values are their respective values.
531 #
532 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
533 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700534 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
535 &quot;customFields&quot;: [ # Custom fields.
536 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
537 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
538 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
539 },
540 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
542 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
543 },
544 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700545 &quot;logMode&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 },
547 },
548 ],
549 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
550 &quot;A String&quot;,
551 ],
552 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
553 &quot;A String&quot;,
554 ],
555 },
556 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700557 &quot;version&quot;: 42, # Specifies the format of the policy.
558 #
559 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
560 #
561 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
562 #
563 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
564 #
565 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
566 #
567 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
568 #
569 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700570 }</pre>
571</div>
572
573<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700574 <code class="details" id="insert">insert(project, body=None, createPolicy=None, preview=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700575 <pre>Creates a deployment and all of the resources described by the deployment manifest.
576
577Args:
578 project: string, The project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700580 The object takes the form of:
581
582{
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700584 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
Bu Sun Kim65020912020-05-20 12:08:20 -0700585 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700586 # The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a deployment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &quot;id&quot;: &quot;A String&quot;,
588 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700589 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700590 {
591 &quot;key&quot;: &quot;A String&quot;,
592 &quot;value&quot;: &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700593 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700594 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700595 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent.
596 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
597 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
598 #
599 # Google Compute Engine has three Operation resources:
600 #
601 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
602 #
603 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
604 #
605 # Operations can be global, regional or zonal.
606 # - For global operations, use the `globalOperations` resource.
607 # - For regional operations, use the `regionOperations` resource.
608 # - For zonal operations, use the `zonalOperations` resource.
609 #
610 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700611 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
612 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
613 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
614 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
615 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
616 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700617 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
619 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
620 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700621 },
622 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700623 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700624 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
625 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
626 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -0700627 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700628 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
629 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
630 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700632 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
634 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700635 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
637 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
638 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700639 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
641 {
642 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
643 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
644 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700645 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
647 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700648 },
649 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700651 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700653 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 },
655 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
656 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
657 &quot;config&quot;: { # The configuration to use for this deployment.
658 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700659 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 &quot;imports&quot;: [ # Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template.
661 {
662 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
663 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700664 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700665 ],
666 },
667 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
668 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700669 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 {
671 &quot;key&quot;: &quot;A String&quot;,
672 &quot;value&quot;: &quot;A String&quot;,
673 },
674 ],
675 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
676 },
677 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
678}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700679
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 createPolicy: string, Sets the policy to use for creating new resources.
681 Allowed values
682 ACQUIRE -
683 CREATE -
684 CREATE_OR_ACQUIRE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700685 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 Cheemalapatie833b792017-03-24 15:06:46 -0700686
687Returns:
688 An object of the form:
689
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700690 { # Represents an Operation resource.
691 #
692 # Google Compute Engine has three Operation resources:
693 #
694 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
695 #
696 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
697 #
698 # Operations can be global, regional or zonal.
699 # - For global operations, use the `globalOperations` resource.
700 # - For regional operations, use the `regionOperations` resource.
701 # - For zonal operations, use the `zonalOperations` resource.
702 #
703 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
705 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
706 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
707 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
708 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
709 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700710 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
712 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
713 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700714 },
715 ],
716 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700717 &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`.
718 &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.
719 &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 -0700720 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700721 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
722 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
723 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700724 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700725 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
727 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700728 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700729 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
730 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
731 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700732 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
734 {
735 &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.
736 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
737 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
738 {
739 &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).
740 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
741 },
742 ],
743 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
744 },
745 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700746 &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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700747 }</pre>
748</div>
749
750<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700751 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700752 <pre>Lists all deployments for a given project.
753
754Args:
755 project: string, The project ID for this request. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700756 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 Cheemalapatie833b792017-03-24 15:06:46 -0700757
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700758For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700759
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700760You 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 Cheemalapatie833b792017-03-24 15:06:46 -0700761
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700762To 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) ```
763 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
Bu Sun Kim65020912020-05-20 12:08:20 -0700764 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
765
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700766You 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 -0700767
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700768Currently, only sorting by `name` or `creationTimestamp desc` is supported.
769 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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700770
771Returns:
772 An object of the form:
773
774 { # 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 -0700775 &quot;deployments&quot;: [ # Output only. The deployments contained in this response.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700776 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700777 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700778 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
Bu Sun Kim65020912020-05-20 12:08:20 -0700779 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700780 # 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 -0700781 &quot;id&quot;: &quot;A String&quot;,
782 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700783 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 {
785 &quot;key&quot;: &quot;A String&quot;,
786 &quot;value&quot;: &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700787 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700789 &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.
790 &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.
791 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
792 #
793 # Google Compute Engine has three Operation resources:
794 #
795 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
796 #
797 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
798 #
799 # Operations can be global, regional or zonal.
800 # - For global operations, use the `globalOperations` resource.
801 # - For regional operations, use the `regionOperations` resource.
802 # - For zonal operations, use the `zonalOperations` resource.
803 #
804 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700805 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
806 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
807 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
808 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
809 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
810 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700811 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700812 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
813 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
814 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700815 },
816 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700817 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700818 &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`.
819 &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.
820 &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 -0700821 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700822 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
823 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
824 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700825 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700826 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700827 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
828 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700829 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
831 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
832 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700833 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700834 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
835 {
836 &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.
837 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
838 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700839 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 &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).
841 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700842 },
843 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700844 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700845 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700847 &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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700848 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700849 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
850 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
851 &quot;config&quot;: { # The configuration to use for this deployment.
852 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
853 },
854 &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.
855 {
856 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
857 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
858 },
859 ],
860 },
861 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
862 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700863 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 {
865 &quot;key&quot;: &quot;A String&quot;,
866 &quot;value&quot;: &quot;A String&quot;,
867 },
868 ],
869 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
870 },
871 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
872 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700873 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 &quot;nextPageToken&quot;: &quot;A String&quot;, # Output only. A token used to continue a truncated list request.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700875 }</pre>
876</div>
877
878<div class="method">
879 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
880 <pre>Retrieves the next page of results.
881
882Args:
883 previous_request: The request for the previous page. (required)
884 previous_response: The response from the request for the previous page. (required)
885
886Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700887 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700888 page. Returns None if there are no more items in the collection.
889 </pre>
890</div>
891
892<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700893 <code class="details" id="patch">patch(project, deployment, body=None, createPolicy=None, deletePolicy=None, preview=None)</code>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700894 <pre>Patches a deployment and all of the resources described by the deployment manifest.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700895
896Args:
897 project: string, The project ID for this request. (required)
898 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700899 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700900 The object takes the form of:
901
902{
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700904 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700906 # 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 -0700907 &quot;id&quot;: &quot;A String&quot;,
908 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700909 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 {
911 &quot;key&quot;: &quot;A String&quot;,
912 &quot;value&quot;: &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700913 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700915 &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.
916 &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.
917 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
918 #
919 # Google Compute Engine has three Operation resources:
920 #
921 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
922 #
923 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
924 #
925 # Operations can be global, regional or zonal.
926 # - For global operations, use the `globalOperations` resource.
927 # - For regional operations, use the `regionOperations` resource.
928 # - For zonal operations, use the `zonalOperations` resource.
929 #
930 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700931 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
932 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
933 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
934 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
935 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
936 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700937 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700938 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
939 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
940 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700941 },
942 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700944 &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`.
945 &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.
946 &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 -0700947 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700948 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
949 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
950 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700952 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
954 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700955 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
957 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
958 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700959 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700960 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
961 {
962 &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.
963 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
964 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700965 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &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).
967 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700968 },
969 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700970 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700971 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700972 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700973 &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 -0700974 },
975 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
976 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
977 &quot;config&quot;: { # The configuration to use for this deployment.
978 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700979 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 &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.
981 {
982 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
983 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700984 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700985 ],
986 },
987 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
988 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700989 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700990 {
991 &quot;key&quot;: &quot;A String&quot;,
992 &quot;value&quot;: &quot;A String&quot;,
993 },
994 ],
995 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
996 },
997 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
998}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700999
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001000 createPolicy: string, Sets the policy to use for creating new resources.
1001 Allowed values
1002 ACQUIRE -
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001003 CREATE -
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001004 CREATE_OR_ACQUIRE -
Bu Sun Kim65020912020-05-20 12:08:20 -07001005 deletePolicy: string, Sets the policy to use for deleting resources.
1006 Allowed values
1007 ABANDON -
1008 DELETE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001009 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 Cheemalapatie833b792017-03-24 15:06:46 -07001010
1011Returns:
1012 An object of the form:
1013
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001014 { # Represents an Operation resource.
1015 #
1016 # Google Compute Engine has three Operation resources:
1017 #
1018 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1019 #
1020 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1021 #
1022 # Operations can be global, regional or zonal.
1023 # - For global operations, use the `globalOperations` resource.
1024 # - For regional operations, use the `regionOperations` resource.
1025 # - For zonal operations, use the `zonalOperations` resource.
1026 #
1027 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001028 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1029 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1030 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1031 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1032 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1033 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001034 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001035 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1036 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1037 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001038 },
1039 ],
1040 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001041 &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`.
1042 &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.
1043 &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 -07001044 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001045 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1046 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1047 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -07001048 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001049 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001050 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1051 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001052 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1054 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1055 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001056 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001057 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1058 {
1059 &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.
1060 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1061 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1062 {
1063 &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).
1064 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1065 },
1066 ],
1067 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1068 },
1069 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001070 &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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001071 }</pre>
1072</div>
1073
1074<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001076 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1077
1078Args:
1079 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001081 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001082 The object takes the form of:
1083
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001084{
Bu Sun Kim65020912020-05-20 12:08:20 -07001085 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1086 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001087 &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 -07001088 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001089 # If the condition evaluates to `true`, then this binding applies to the current request.
1090 #
1091 # 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.
1092 #
1093 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1094 #
1095 # Example (Comparison):
1096 #
1097 # 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;
1098 #
1099 # Example (Equality):
1100 #
1101 # 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;
1102 #
1103 # Example (Logic):
1104 #
1105 # 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;
1106 #
1107 # Example (Data Manipulation):
1108 #
1109 # 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;
1110 #
1111 # 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.
1112 &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 -07001113 &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 -07001114 &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.
1115 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001116 },
1117 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1118 #
1119 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1120 #
1121 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1122 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001123 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim65020912020-05-20 12:08:20 -07001124 #
1125 #
1126 #
1127 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1128 #
1129 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1130 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001131 # * `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.
1132 #
1133 # * `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.
1134 #
1135 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 #
1137 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001138 #
1139 # * `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 -07001140 &quot;A String&quot;,
1141 ],
1142 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1143 },
1144 ],
1145 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001146 &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 Cheemalapatie833b792017-03-24 15:06:46 -07001147 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001148 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001149 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001150 # 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 -04001151 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001152 # 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 -07001153 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001154 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001155 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001156 # { &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 -07001157 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001158 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001159 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001160 # 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 -07001161 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001162 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001163 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001164 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001165 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001166 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001167 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001168 # Example Policy with multiple AuditConfigs:
1169 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001170 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001171 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001172 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001173 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001174 { # Provides the configuration for logging a type of permissions. Example:
1175 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001176 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001177 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001178 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001179 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1180 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001181 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001182 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001183 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001184 },
1185 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001186 &quot;exemptedMembers&quot;: [
1187 &quot;A String&quot;,
1188 ],
1189 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001190 },
1191 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001192 &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 -07001193 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001194 &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 -07001195 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001196 # If the condition evaluates to `true`, then this binding applies to the current request.
1197 #
1198 # 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.
1199 #
1200 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1201 #
1202 # Example (Comparison):
1203 #
1204 # 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;
1205 #
1206 # Example (Equality):
1207 #
1208 # 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;
1209 #
1210 # Example (Logic):
1211 #
1212 # 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;
1213 #
1214 # Example (Data Manipulation):
1215 #
1216 # 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;
1217 #
1218 # 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.
1219 &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 -07001220 &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 -07001221 &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.
1222 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001223 },
1224 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001225 #
1226 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1227 #
1228 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1229 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001230 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001231 #
1232 #
1233 #
1234 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1235 #
1236 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1237 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001238 # * `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.
1239 #
1240 # * `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.
1241 #
1242 # * `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 -07001243 #
1244 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001245 #
1246 # * `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 -07001247 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001248 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001249 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001250 },
1251 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001252 &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.
1253 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001254 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07001255 &quot;iamOwned&quot;: True or False,
1256 &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.
1257 { # A rule to be applied in a Policy.
1258 &quot;action&quot;: &quot;A String&quot;, # Required
1259 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1260 { # A condition to be met.
1261 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1262 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1263 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1264 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001265 &quot;values&quot;: [ # The objects of the condition.
Bu Sun Kim65020912020-05-20 12:08:20 -07001266 &quot;A String&quot;,
1267 ],
1268 },
1269 ],
1270 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1271 &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.
1272 &quot;A String&quot;,
1273 ],
1274 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1275 { # Specifies what kind of log the caller must write
1276 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1277 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1278 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1279 },
1280 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1281 },
1282 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1283 #
1284 # 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.
1285 #
1286 # Field names correspond to IAM request parameters and field values are their respective values.
1287 #
1288 # 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.
1289 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001290 # 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]}
1291 &quot;customFields&quot;: [ # Custom fields.
1292 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1293 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1294 &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.
1295 },
1296 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1298 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1299 },
1300 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001301 &quot;logMode&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001302 },
1303 },
1304 ],
1305 &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.
1306 &quot;A String&quot;,
1307 ],
1308 &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.
1309 &quot;A String&quot;,
1310 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001311 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001312 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001313 &quot;version&quot;: 42, # Specifies the format of the policy.
1314 #
1315 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1316 #
1317 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1318 #
1319 # * 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
1320 #
1321 # **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.
1322 #
1323 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1324 #
1325 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001326 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001327 }
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001328
1329
1330Returns:
1331 An object of the form:
1332
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001333 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001334 #
1335 #
1336 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001337 # 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 Cheemalapatie833b792017-03-24 15:06:46 -07001338 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001339 # 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 Cheemalapatie833b792017-03-24 15:06:46 -07001340 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001341 # **JSON example:**
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001342 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001343 # { &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 -07001344 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001345 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001346 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001347 # 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 -07001348 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001349 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001350 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001351 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001352 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001353 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001354 #
1355 # Example Policy with multiple AuditConfigs:
1356 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001357 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001358 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001359 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001360 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001361 { # Provides the configuration for logging a type of permissions. Example:
1362 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001363 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001364 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001365 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001366 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1367 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001368 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001369 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001371 },
1372 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001373 &quot;exemptedMembers&quot;: [
1374 &quot;A String&quot;,
1375 ],
1376 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001377 },
1378 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001379 &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 Cheemalapatie833b792017-03-24 15:06:46 -07001380 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001381 &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 -07001382 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001383 # If the condition evaluates to `true`, then this binding applies to the current request.
1384 #
1385 # 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.
1386 #
1387 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1388 #
1389 # Example (Comparison):
1390 #
1391 # 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;
1392 #
1393 # Example (Equality):
1394 #
1395 # 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;
1396 #
1397 # Example (Logic):
1398 #
1399 # 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;
1400 #
1401 # Example (Data Manipulation):
1402 #
1403 # 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;
1404 #
1405 # 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.
1406 &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 -07001407 &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 -07001408 &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.
1409 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 },
1411 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001412 #
1413 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1414 #
1415 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1416 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001417 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001418 #
1419 #
1420 #
1421 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1422 #
1423 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1424 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001425 # * `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.
1426 #
1427 # * `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.
1428 #
1429 # * `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 -07001430 #
1431 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001432 #
1433 # * `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 -07001434 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001435 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001436 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001437 },
1438 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001439 &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.
1440 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001441 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07001442 &quot;iamOwned&quot;: True or False,
1443 &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.
1444 { # A rule to be applied in a Policy.
1445 &quot;action&quot;: &quot;A String&quot;, # Required
1446 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1447 { # A condition to be met.
1448 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1449 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1450 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1451 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001452 &quot;values&quot;: [ # The objects of the condition.
Bu Sun Kim65020912020-05-20 12:08:20 -07001453 &quot;A String&quot;,
1454 ],
1455 },
1456 ],
1457 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1458 &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.
1459 &quot;A String&quot;,
1460 ],
1461 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1462 { # Specifies what kind of log the caller must write
1463 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1464 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1465 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1466 },
1467 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1468 },
1469 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1470 #
1471 # 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.
1472 #
1473 # Field names correspond to IAM request parameters and field values are their respective values.
1474 #
1475 # 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.
1476 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001477 # 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]}
1478 &quot;customFields&quot;: [ # Custom fields.
1479 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1480 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1481 &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.
1482 },
1483 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001484 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1485 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1486 },
1487 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001488 &quot;logMode&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001489 },
1490 },
1491 ],
1492 &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.
1493 &quot;A String&quot;,
1494 ],
1495 &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.
1496 &quot;A String&quot;,
1497 ],
1498 },
1499 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001500 &quot;version&quot;: 42, # Specifies the format of the policy.
1501 #
1502 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1503 #
1504 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1505 #
1506 # * 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
1507 #
1508 # **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.
1509 #
1510 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1511 #
1512 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001513 }</pre>
1514</div>
1515
1516<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001517 <code class="details" id="stop">stop(project, deployment, body=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001518 <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.
1519
1520Args:
1521 project: string, The project ID for this request. (required)
1522 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001523 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001524 The object takes the form of:
1525
1526{
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001527 &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 Cheemalapatie833b792017-03-24 15:06:46 -07001528 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001529 # 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 Cheemalapatie833b792017-03-24 15:06:46 -07001530 }
1531
1532
1533Returns:
1534 An object of the form:
1535
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001536 { # Represents an Operation resource.
1537 #
1538 # Google Compute Engine has three Operation resources:
1539 #
1540 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1541 #
1542 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1543 #
1544 # Operations can be global, regional or zonal.
1545 # - For global operations, use the `globalOperations` resource.
1546 # - For regional operations, use the `regionOperations` resource.
1547 # - For zonal operations, use the `zonalOperations` resource.
1548 #
1549 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001550 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1551 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1552 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1553 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1554 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1555 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001556 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1558 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1559 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001560 },
1561 ],
1562 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001563 &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`.
1564 &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.
1565 &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 -07001566 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001567 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1568 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1569 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -07001570 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001571 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001572 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1573 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001574 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001575 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1576 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1577 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001578 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001579 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1580 {
1581 &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.
1582 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1583 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1584 {
1585 &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).
1586 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1587 },
1588 ],
1589 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1590 },
1591 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001592 &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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001593 }</pre>
1594</div>
1595
1596<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001597 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001598 <pre>Returns permissions that a caller has on the specified resource.
1599
1600Args:
1601 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001603 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001604 The object takes the form of:
1605
1606{
Bu Sun Kim65020912020-05-20 12:08:20 -07001607 &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.
1608 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001609 ],
1610 }
1611
1612
1613Returns:
1614 An object of the form:
1615
1616 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001617 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1618 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001619 ],
1620 }</pre>
1621</div>
1622
1623<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001624 <code class="details" id="update">update(project, deployment, body=None, createPolicy=None, deletePolicy=None, preview=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001625 <pre>Updates a deployment and all of the resources described by the deployment manifest.
1626
1627Args:
1628 project: string, The project ID for this request. (required)
1629 deployment: string, The name of the deployment for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001630 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001631 The object takes the form of:
1632
1633{
Bu Sun Kim65020912020-05-20 12:08:20 -07001634 &quot;description&quot;: &quot;A String&quot;, # An optional user-provided description of the deployment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001635 &quot;fingerprint&quot;: &quot;A String&quot;, # Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time.
Bu Sun Kim65020912020-05-20 12:08:20 -07001636 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001637 # 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 -07001638 &quot;id&quot;: &quot;A String&quot;,
1639 &quot;insertTime&quot;: &quot;A String&quot;, # Output only. Creation timestamp in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001640 &quot;labels&quot;: [ # Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001641 {
1642 &quot;key&quot;: &quot;A String&quot;,
1643 &quot;value&quot;: &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001644 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001645 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001646 &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.
1647 &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.
1648 &quot;operation&quot;: { # Represents an Operation resource. # Output only. The Operation that most recently ran, or is currently running, on this deployment.
1649 #
1650 # Google Compute Engine has three Operation resources:
1651 #
1652 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1653 #
1654 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1655 #
1656 # Operations can be global, regional or zonal.
1657 # - For global operations, use the `globalOperations` resource.
1658 # - For regional operations, use the `regionOperations` resource.
1659 # - For zonal operations, use the `zonalOperations` resource.
1660 #
1661 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001662 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1663 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1664 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1665 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1666 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1667 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001668 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001669 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1670 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1671 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001672 },
1673 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001674 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001675 &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`.
1676 &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.
1677 &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 -07001678 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001679 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1680 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1681 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -07001682 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001683 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001684 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1685 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001686 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001687 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1688 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1689 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001690 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001691 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1692 {
1693 &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.
1694 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1695 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001696 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001697 &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).
1698 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001699 },
1700 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001701 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001702 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001703 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001704 &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 -07001705 },
1706 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. Server defined URL for the resource.
1707 &quot;target&quot;: { # [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
1708 &quot;config&quot;: { # The configuration to use for this deployment.
1709 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001710 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001711 &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.
1712 {
1713 &quot;content&quot;: &quot;A String&quot;, # The contents of the file.
1714 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001715 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001716 ],
1717 },
1718 &quot;update&quot;: { # Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
1719 &quot;description&quot;: &quot;A String&quot;, # Output only. An optional user-provided description of the deployment after the current update has been applied.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001720 &quot;labels&quot;: [ # Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001721 {
1722 &quot;key&quot;: &quot;A String&quot;,
1723 &quot;value&quot;: &quot;A String&quot;,
1724 },
1725 ],
1726 &quot;manifest&quot;: &quot;A String&quot;, # Output only. URL of the manifest representing the update configuration of this deployment.
1727 },
1728 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update timestamp in RFC3339 text format.
1729}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001730
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001731 createPolicy: string, Sets the policy to use for creating new resources.
1732 Allowed values
1733 ACQUIRE -
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001734 CREATE -
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001735 CREATE_OR_ACQUIRE -
Bu Sun Kim65020912020-05-20 12:08:20 -07001736 deletePolicy: string, Sets the policy to use for deleting resources.
1737 Allowed values
1738 ABANDON -
1739 DELETE -
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001740 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 Cheemalapatie833b792017-03-24 15:06:46 -07001741
1742Returns:
1743 An object of the form:
1744
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001745 { # Represents an Operation resource.
1746 #
1747 # Google Compute Engine has three Operation resources:
1748 #
1749 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1750 #
1751 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1752 #
1753 # Operations can be global, regional or zonal.
1754 # - For global operations, use the `globalOperations` resource.
1755 # - For regional operations, use the `regionOperations` resource.
1756 # - For zonal operations, use the `zonalOperations` resource.
1757 #
1758 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001759 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1760 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1761 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1762 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1763 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1764 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001765 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001766 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1767 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1768 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001769 },
1770 ],
1771 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001772 &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`.
1773 &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.
1774 &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 -07001775 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001776 &quot;kind&quot;: &quot;deploymentmanager#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1777 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1778 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -07001779 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001780 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001781 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1782 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001783 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001784 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1785 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1786 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001787 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001788 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1789 {
1790 &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.
1791 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1792 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1793 {
1794 &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).
1795 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1796 },
1797 ],
1798 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1799 },
1800 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001801 &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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001802 }</pre>
1803</div>
1804
1805</body></html>