blob: f6a33095d2a786632202053c158972ee14064fc8 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.nodeGroups.html">nodeGroups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addNodes">addNodes(project, zone, nodeGroup, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Adds specified number of nodes to the node group.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#close">close()</a></code></p>
88<p class="firstline">Close httplib2 connections.</p>
89<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#delete">delete(project, zone, nodeGroup, requestId=None)</a></code></p>
91<p class="firstline">Deletes the specified NodeGroup resource.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#deleteNodes">deleteNodes(project, zone, nodeGroup, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Deletes specified nodes from the node group.</p>
95<p class="toc_element">
96 <code><a href="#get">get(project, zone, nodeGroup)</a></code></p>
97<p class="firstline">Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#insert">insert(project, zone, initialNodeCount, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Creates a NodeGroup resource in the specified project using the data included in the request.</p>
104<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.</p>
107<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700108 <code><a href="#listNodes">listNodes(project, zone, nodeGroup, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Lists nodes in the node group.</p>
110<p class="toc_element">
111 <code><a href="#listNodes_next">listNodes_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#patch">patch(project, zone, nodeGroup, body=None, requestId=None)</a></code></p>
118<p class="firstline">Updates the specified node group.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#setNodeTemplate">setNodeTemplate(project, zone, nodeGroup, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124<p class="firstline">Updates the node template of the node group.</p>
125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700127<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
128<h3>Method Details</h3>
129<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700130 <code class="details" id="addNodes">addNodes(project, zone, nodeGroup, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 <pre>Adds specified number of nodes to the node group.
132
133Args:
134 project: string, Project ID for this request. (required)
135 zone: string, The name of the zone for this request. (required)
136 nodeGroup: string, Name of the NodeGroup resource. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700137 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 The object takes the form of:
139
140{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800141 &quot;additionalNodeCount&quot;: 42, # Count of additional nodes to be added to the node group.
142}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143
144 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
145
146For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
147
148The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
149
150Returns:
151 An object of the form:
152
153 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800154 #
155 # Google Compute Engine has three Operation resources:
156 #
157 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
158 #
159 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
160 #
161 # Operations can be global, regional or zonal.
162 # - For global operations, use the `globalOperations` resource.
163 # - For regional operations, use the `regionOperations` resource.
164 # - For zonal operations, use the `zonalOperations` resource.
165 #
166 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
167 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
168 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
169 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
170 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
171 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
172 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800174 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
175 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
176 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 },
178 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800179 },
180 &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`.
181 &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.
182 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
183 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
184 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
185 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800186 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800187 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
188 &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.
189 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
190 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
191 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
192 &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.
193 &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`.
194 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
195 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
196 &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.
197 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
198 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
199 {
200 &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.
201 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
202 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
203 {
204 &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).
205 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
206 },
207 ],
208 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
209 },
210 ],
211 &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.
212}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213</div>
214
215<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 <pre>Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.
218
219Args:
220 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 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;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222
Dan O'Mearadd494642020-05-01 07:42:23 -0700223For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224
Dan O'Mearadd494642020-05-01 07:42:23 -0700225You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226
Bu Sun Kim65020912020-05-20 12:08:20 -0700227To 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) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 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`)
230 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
231
232You 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.
233
234Currently, only sorting by `name` or `creationTimestamp desc` is supported.
235 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800236 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237
238Returns:
239 An object of the form:
240
241 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800242 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
243 &quot;items&quot;: { # A list of NodeGroupsScopedList resources.
244 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of node groups.
245 &quot;nodeGroups&quot;: [ # [Output Only] A list of node groups contained in this scope.
246 { # Represent a sole-tenant Node Group resource.
247 #
248 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
249 &quot;autoscalingPolicy&quot;: { # Specifies how autoscaling should behave.
250 &quot;maxNodes&quot;: 42, # The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
251 &quot;minNodes&quot;: 42, # The minimum number of nodes that the group should have.
252 &quot;mode&quot;: &quot;A String&quot;, # The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see Autoscaler modes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800254 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
255 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
256 &quot;fingerprint&quot;: &quot;A String&quot;,
257 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
258 &quot;kind&quot;: &quot;compute#nodeGroup&quot;, # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
259 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
260 &quot;maintenancePolicy&quot;: &quot;A String&quot;, # Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies.
261 &quot;maintenanceWindow&quot;: { # Time window specified for daily maintenance operations. GCE&#x27;s internal maintenance will be performed within this window.
262 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800263 &quot;maintenanceDuration&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
264 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
265 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
266 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800267 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
268 },
269 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource 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.
270 &quot;nodeTemplate&quot;: &quot;A String&quot;, # URL of the node template to create the node group from.
271 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
272 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700273 &quot;shareSettings&quot;: { # The share setting for reservations and sole tenancy node groups. # Share-settings for the node group
274 &quot;projects&quot;: [ # A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type&#x27;s value is SPECIFIC_PROJECTS.
275 &quot;A String&quot;,
276 ],
277 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
278 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800279 &quot;size&quot;: 42, # [Output Only] The total number of nodes in the node group.
280 &quot;status&quot;: &quot;A String&quot;,
281 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 },
283 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800284 &quot;warning&quot;: { # [Output Only] An informational warning that appears when the nodeGroup list is empty.
285 &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.
286 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
287 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
288 {
289 &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).
290 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
291 },
292 ],
293 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
294 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800296 },
297 &quot;kind&quot;: &quot;compute#nodeGroupAggregatedList&quot;, # [Output Only] Type of resource.Always compute#nodeGroupAggregatedList for aggregated lists of node groups.
298 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
299 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
300 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
301 &quot;A String&quot;,
302 ],
303 &quot;warning&quot;: { # [Output Only] Informational warning message.
304 &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.
305 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
306 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
307 {
308 &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).
309 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
310 },
311 ],
312 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
313 },
314}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315</div>
316
317<div class="method">
318 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
319 <pre>Retrieves the next page of results.
320
321Args:
322 previous_request: The request for the previous page. (required)
323 previous_response: The response from the request for the previous page. (required)
324
325Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 page. Returns None if there are no more items in the collection.
328 </pre>
329</div>
330
331<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700332 <code class="details" id="close">close()</code>
333 <pre>Close httplib2 connections.</pre>
334</div>
335
336<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 <code class="details" id="delete">delete(project, zone, nodeGroup, requestId=None)</code>
338 <pre>Deletes the specified NodeGroup resource.
339
340Args:
341 project: string, Project ID for this request. (required)
342 zone: string, The name of the zone for this request. (required)
343 nodeGroup: string, Name of the NodeGroup resource to delete. (required)
344 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
345
346For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
347
348The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
349
350Returns:
351 An object of the form:
352
353 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800354 #
355 # Google Compute Engine has three Operation resources:
356 #
357 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
358 #
359 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
360 #
361 # Operations can be global, regional or zonal.
362 # - For global operations, use the `globalOperations` resource.
363 # - For regional operations, use the `regionOperations` resource.
364 # - For zonal operations, use the `zonalOperations` resource.
365 #
366 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
367 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
368 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
369 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
370 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
371 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
372 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800374 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
375 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
376 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 },
378 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800379 },
380 &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`.
381 &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.
382 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
383 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
384 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
385 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800386 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800387 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
388 &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.
389 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
390 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
391 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
392 &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.
393 &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`.
394 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
395 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
396 &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.
397 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
398 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
399 {
400 &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.
401 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
402 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
403 {
404 &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).
405 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
406 },
407 ],
408 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
409 },
410 ],
411 &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.
412}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413</div>
414
415<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700416 <code class="details" id="deleteNodes">deleteNodes(project, zone, nodeGroup, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700417 <pre>Deletes specified nodes from the node group.
418
419Args:
420 project: string, Project ID for this request. (required)
421 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700422 nodeGroup: string, Name of the NodeGroup resource whose nodes will be deleted. (required)
423 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700424 The object takes the form of:
425
426{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800427 &quot;nodes&quot;: [ # Names of the nodes to delete.
428 &quot;A String&quot;,
429 ],
430}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700431
432 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
433
434For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
435
436The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
437
438Returns:
439 An object of the form:
440
441 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800442 #
443 # Google Compute Engine has three Operation resources:
444 #
445 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
446 #
447 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
448 #
449 # Operations can be global, regional or zonal.
450 # - For global operations, use the `globalOperations` resource.
451 # - For regional operations, use the `regionOperations` resource.
452 # - For zonal operations, use the `zonalOperations` resource.
453 #
454 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
455 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
456 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
457 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
458 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
459 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
460 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800462 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
463 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
464 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 },
466 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800467 },
468 &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`.
469 &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.
470 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
471 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
472 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
473 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800474 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800475 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
476 &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.
477 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
478 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
479 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
480 &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.
481 &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`.
482 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
483 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
484 &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.
485 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
486 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
487 {
488 &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.
489 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
490 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
491 {
492 &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).
493 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
494 },
495 ],
496 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
497 },
498 ],
499 &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.
500}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700501</div>
502
503<div class="method">
504 <code class="details" id="get">get(project, zone, nodeGroup)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 <pre>Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the &quot;nodes&quot; field should not be used. Use nodeGroups.listNodes instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700506
507Args:
508 project: string, Project ID for this request. (required)
509 zone: string, The name of the zone for this request. (required)
510 nodeGroup: string, Name of the node group to return. (required)
511
512Returns:
513 An object of the form:
514
515 { # Represent a sole-tenant Node Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800516 #
517 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
518 &quot;autoscalingPolicy&quot;: { # Specifies how autoscaling should behave.
519 &quot;maxNodes&quot;: 42, # The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
520 &quot;minNodes&quot;: 42, # The minimum number of nodes that the group should have.
521 &quot;mode&quot;: &quot;A String&quot;, # The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see Autoscaler modes.
522 },
523 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
524 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
525 &quot;fingerprint&quot;: &quot;A String&quot;,
526 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
527 &quot;kind&quot;: &quot;compute#nodeGroup&quot;, # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
528 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
529 &quot;maintenancePolicy&quot;: &quot;A String&quot;, # Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies.
530 &quot;maintenanceWindow&quot;: { # Time window specified for daily maintenance operations. GCE&#x27;s internal maintenance will be performed within this window.
531 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800532 &quot;maintenanceDuration&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
533 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
534 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
535 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800536 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
537 },
538 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource 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.
539 &quot;nodeTemplate&quot;: &quot;A String&quot;, # URL of the node template to create the node group from.
540 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
541 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700542 &quot;shareSettings&quot;: { # The share setting for reservations and sole tenancy node groups. # Share-settings for the node group
543 &quot;projects&quot;: [ # A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type&#x27;s value is SPECIFIC_PROJECTS.
544 &quot;A String&quot;,
545 ],
546 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
547 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800548 &quot;size&quot;: 42, # [Output Only] The total number of nodes in the node group.
549 &quot;status&quot;: &quot;A String&quot;,
550 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
551}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700552</div>
553
554<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
557
558Args:
559 project: string, Project ID for this request. (required)
560 zone: string, The name of the zone for this request. (required)
561 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700562 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563
564Returns:
565 An object of the form:
566
Dan O'Mearadd494642020-05-01 07:42:23 -0700567 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800568 #
569 #
570 #
571 # 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.
572 #
573 # 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).
574 #
575 # **JSON example:**
576 #
577 # { &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 }
578 #
579 # **YAML example:**
580 #
581 # 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
582 #
583 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
584 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
585 { # 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.
586 #
587 # 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.
588 #
589 # Example Policy with multiple AuditConfigs:
590 #
591 # { &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; ] } ] } ] }
592 #
593 # 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.
594 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
595 { # Provides the configuration for logging a type of permissions. Example:
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800597 # { &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 Kim65020912020-05-20 12:08:20 -0700598 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800599 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
600 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
601 &quot;A String&quot;,
602 ],
603 &quot;ignoreChildExemptions&quot;: True or False,
604 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800606 ],
607 &quot;exemptedMembers&quot;: [
608 &quot;A String&quot;,
609 ],
610 &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.
611 },
612 ],
613 &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.
614 { # Associates `members` with a `role`.
615 &quot;bindingId&quot;: &quot;A String&quot;,
616 &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.
617 #
618 # If the condition evaluates to `true`, then this binding applies to the current request.
619 #
620 # 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.
621 #
622 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
623 #
624 # Example (Comparison):
625 #
626 # 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;
627 #
628 # Example (Equality):
629 #
630 # 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;
631 #
632 # Example (Logic):
633 #
634 # 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;
635 #
636 # Example (Data Manipulation):
637 #
638 # 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;
639 #
640 # 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.
641 &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.
642 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
643 &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.
644 &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 Kim715bd7f2019-06-14 16:50:42 -0700645 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800646 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
647 #
648 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
649 #
650 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
651 #
652 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
653 #
654 #
655 #
656 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
657 #
658 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
659 #
660 # * `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.
661 #
662 # * `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.
663 #
664 # * `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.
665 #
666 #
667 #
668 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
669 &quot;A String&quot;,
670 ],
671 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
672 },
673 ],
674 &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.
675 #
676 # **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.
677 &quot;iamOwned&quot;: True or False,
678 &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.
679 { # A rule to be applied in a Policy.
680 &quot;action&quot;: &quot;A String&quot;, # Required
681 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
682 { # A condition to be met.
683 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
684 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
685 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
686 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
687 &quot;values&quot;: [ # The objects of the condition.
688 &quot;A String&quot;,
689 ],
690 },
691 ],
692 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
693 &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.
694 &quot;A String&quot;,
695 ],
696 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
697 { # Specifies what kind of log the caller must write
698 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
699 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
700 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
701 },
702 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim65020912020-05-20 12:08:20 -0700703 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800704 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
705 #
706 # 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.
707 #
708 # Field names correspond to IAM request parameters and field values are their respective values.
709 #
710 # 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.
711 #
712 # 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]}
713 &quot;customFields&quot;: [ # Custom fields.
714 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
715 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
716 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800718 ],
719 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
720 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
Bu Sun Kim65020912020-05-20 12:08:20 -0700721 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800722 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
723 &quot;logMode&quot;: &quot;A String&quot;,
724 },
725 },
726 ],
727 &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.
728 &quot;A String&quot;,
729 ],
730 &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.
731 &quot;A String&quot;,
732 ],
733 },
734 ],
735 &quot;version&quot;: 42, # Specifies the format of the policy.
736 #
737 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
738 #
739 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
740 #
741 # * 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
742 #
743 # **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.
744 #
745 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
746 #
747 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
748}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749</div>
750
751<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700752 <code class="details" id="insert">insert(project, zone, initialNodeCount, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 <pre>Creates a NodeGroup resource in the specified project using the data included in the request.
754
755Args:
756 project: string, Project ID for this request. (required)
757 zone: string, The name of the zone for this request. (required)
758 initialNodeCount: integer, Initial count of nodes in the node group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700759 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700760 The object takes the form of:
761
762{ # Represent a sole-tenant Node Group resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700763 #
764 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
765 &quot;autoscalingPolicy&quot;: { # Specifies how autoscaling should behave.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700766 &quot;maxNodes&quot;: 42, # The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
Bu Sun Kim65020912020-05-20 12:08:20 -0700767 &quot;minNodes&quot;: 42, # The minimum number of nodes that the group should have.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700768 &quot;mode&quot;: &quot;A String&quot;, # The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see Autoscaler modes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 },
770 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
771 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
772 &quot;fingerprint&quot;: &quot;A String&quot;,
773 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
774 &quot;kind&quot;: &quot;compute#nodeGroup&quot;, # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
775 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700776 &quot;maintenancePolicy&quot;: &quot;A String&quot;, # Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies.
Bu Sun Kim65020912020-05-20 12:08:20 -0700777 &quot;maintenanceWindow&quot;: { # Time window specified for daily maintenance operations. GCE&#x27;s internal maintenance will be performed within this window.
778 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800779 &quot;maintenanceDuration&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
780 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
781 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
782 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700783 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
784 },
785 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700786 &quot;nodeTemplate&quot;: &quot;A String&quot;, # URL of the node template to create the node group from.
Bu Sun Kim65020912020-05-20 12:08:20 -0700787 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
788 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700789 &quot;shareSettings&quot;: { # The share setting for reservations and sole tenancy node groups. # Share-settings for the node group
790 &quot;projects&quot;: [ # A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type&#x27;s value is SPECIFIC_PROJECTS.
791 &quot;A String&quot;,
792 ],
793 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
794 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 &quot;size&quot;: 42, # [Output Only] The total number of nodes in the node group.
796 &quot;status&quot;: &quot;A String&quot;,
797 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
798}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700799
800 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
801
802For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
803
804The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
805
806Returns:
807 An object of the form:
808
809 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800810 #
811 # Google Compute Engine has three Operation resources:
812 #
813 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
814 #
815 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
816 #
817 # Operations can be global, regional or zonal.
818 # - For global operations, use the `globalOperations` resource.
819 # - For regional operations, use the `regionOperations` resource.
820 # - For zonal operations, use the `zonalOperations` resource.
821 #
822 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
823 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
824 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
825 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
826 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
827 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
828 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700829 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800830 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
831 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
832 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 },
834 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800835 },
836 &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`.
837 &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.
838 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
839 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
840 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
841 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800842 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800843 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
844 &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.
845 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
846 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
847 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
848 &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.
849 &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`.
850 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
851 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
852 &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.
853 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
854 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
855 {
856 &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.
857 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
858 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
859 {
860 &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).
861 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
862 },
863 ],
864 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
865 },
866 ],
867 &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.
868}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700869</div>
870
871<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700873 <pre>Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.
874
875Args:
876 project: string, Project ID for this request. (required)
877 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700878 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;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879
Dan O'Mearadd494642020-05-01 07:42:23 -0700880For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700881
Dan O'Mearadd494642020-05-01 07:42:23 -0700882You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883
Bu Sun Kim65020912020-05-20 12:08:20 -0700884To 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) ```
885 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`)
886 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
887
888You 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.
889
890Currently, only sorting by `name` or `creationTimestamp desc` is supported.
891 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800892 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893
894Returns:
895 An object of the form:
896
897 { # Contains a list of nodeGroups.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800898 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
899 &quot;items&quot;: [ # A list of NodeGroup resources.
900 { # Represent a sole-tenant Node Group resource.
901 #
902 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
903 &quot;autoscalingPolicy&quot;: { # Specifies how autoscaling should behave.
904 &quot;maxNodes&quot;: 42, # The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
905 &quot;minNodes&quot;: 42, # The minimum number of nodes that the group should have.
906 &quot;mode&quot;: &quot;A String&quot;, # The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see Autoscaler modes.
907 },
908 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
909 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
910 &quot;fingerprint&quot;: &quot;A String&quot;,
911 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
912 &quot;kind&quot;: &quot;compute#nodeGroup&quot;, # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
913 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
914 &quot;maintenancePolicy&quot;: &quot;A String&quot;, # Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies.
915 &quot;maintenanceWindow&quot;: { # Time window specified for daily maintenance operations. GCE&#x27;s internal maintenance will be performed within this window.
916 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800917 &quot;maintenanceDuration&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
918 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
919 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
920 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800921 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
922 },
923 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource 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.
924 &quot;nodeTemplate&quot;: &quot;A String&quot;, # URL of the node template to create the node group from.
925 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
926 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -0700927 &quot;shareSettings&quot;: { # The share setting for reservations and sole tenancy node groups. # Share-settings for the node group
928 &quot;projects&quot;: [ # A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type&#x27;s value is SPECIFIC_PROJECTS.
929 &quot;A String&quot;,
930 ],
931 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
932 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800933 &quot;size&quot;: 42, # [Output Only] The total number of nodes in the node group.
934 &quot;status&quot;: &quot;A String&quot;,
935 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
936 },
937 ],
938 &quot;kind&quot;: &quot;compute#nodeGroupList&quot;, # [Output Only] Type of resource.Always compute#nodeGroupList for lists of node groups.
939 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
940 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
941 &quot;warning&quot;: { # [Output Only] Informational warning message.
942 &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.
943 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
944 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
945 {
946 &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).
947 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700949 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800950 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
951 },
952}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700953</div>
954
955<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 <code class="details" id="listNodes">listNodes(project, zone, nodeGroup, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 <pre>Lists nodes in the node group.
958
959Args:
960 project: string, Project ID for this request. (required)
961 zone: string, The name of the zone for this request. (required)
962 nodeGroup: string, Name of the NodeGroup resource whose nodes you want to list. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700963 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;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700964
Dan O'Mearadd494642020-05-01 07:42:23 -0700965For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700966
Dan O'Mearadd494642020-05-01 07:42:23 -0700967You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700968
Bu Sun Kim65020912020-05-20 12:08:20 -0700969To 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) ```
970 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`)
971 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
972
973You 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.
974
975Currently, only sorting by `name` or `creationTimestamp desc` is supported.
976 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800977 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978
979Returns:
980 An object of the form:
981
982 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800983 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
984 &quot;items&quot;: [ # A list of Node resources.
985 {
986 &quot;accelerators&quot;: [ # Accelerators for this node.
987 { # A specification of the type and number of accelerator cards attached to the instance.
988 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
989 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700990 },
991 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800992 &quot;cpuOvercommitType&quot;: &quot;A String&quot;, # CPU overcommit.
993 &quot;disks&quot;: [ # Local disk configurations.
994 {
995 &quot;diskCount&quot;: 42, # Specifies the number of such disks.
996 &quot;diskSizeGb&quot;: 42, # Specifies the size of the disk in base-2 GB.
997 &quot;diskType&quot;: &quot;A String&quot;, # Specifies the desired disk type on the node. This disk type must be a local storage type (e.g.: local-ssd). Note that for nodeTemplates, this should be the name of the disk type and not its URL.
998 },
999 ],
1000 &quot;instances&quot;: [ # Instances scheduled on this node.
1001 &quot;A String&quot;,
1002 ],
1003 &quot;name&quot;: &quot;A String&quot;, # The name of the node.
1004 &quot;nodeType&quot;: &quot;A String&quot;, # The type of this node.
1005 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
1006 &quot;serverBinding&quot;: { # Binding properties for the physical server.
1007 &quot;type&quot;: &quot;A String&quot;,
1008 },
1009 &quot;serverId&quot;: &quot;A String&quot;, # Server ID associated with this node.
1010 &quot;status&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001011 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001012 ],
1013 &quot;kind&quot;: &quot;compute#nodeGroupsListNodes&quot;, # [Output Only] The resource type, which is always compute.nodeGroupsListNodes for the list of nodes in the specified node group.
1014 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1015 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1016 &quot;warning&quot;: { # [Output Only] Informational warning message.
1017 &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.
1018 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1019 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1020 {
1021 &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).
1022 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1023 },
1024 ],
1025 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1026 },
1027}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028</div>
1029
1030<div class="method">
1031 <code class="details" id="listNodes_next">listNodes_next(previous_request, previous_response)</code>
1032 <pre>Retrieves the next page of results.
1033
1034Args:
1035 previous_request: The request for the previous page. (required)
1036 previous_response: The response from the request for the previous page. (required)
1037
1038Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001039 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 page. Returns None if there are no more items in the collection.
1041 </pre>
1042</div>
1043
1044<div class="method">
1045 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1046 <pre>Retrieves the next page of results.
1047
1048Args:
1049 previous_request: The request for the previous page. (required)
1050 previous_response: The response from the request for the previous page. (required)
1051
1052Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 page. Returns None if there are no more items in the collection.
1055 </pre>
1056</div>
1057
1058<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001059 <code class="details" id="patch">patch(project, zone, nodeGroup, body=None, requestId=None)</code>
1060 <pre>Updates the specified node group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001061
1062Args:
1063 project: string, Project ID for this request. (required)
1064 zone: string, The name of the zone for this request. (required)
1065 nodeGroup: string, Name of the NodeGroup resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001066 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001067 The object takes the form of:
1068
Dan O'Mearadd494642020-05-01 07:42:23 -07001069{ # Represent a sole-tenant Node Group resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001070 #
1071 # A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==)
1072 &quot;autoscalingPolicy&quot;: { # Specifies how autoscaling should behave.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001073 &quot;maxNodes&quot;: 42, # The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
Bu Sun Kim65020912020-05-20 12:08:20 -07001074 &quot;minNodes&quot;: 42, # The minimum number of nodes that the group should have.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001075 &quot;mode&quot;: &quot;A String&quot;, # The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see Autoscaler modes.
Bu Sun Kim65020912020-05-20 12:08:20 -07001076 },
1077 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1078 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1079 &quot;fingerprint&quot;: &quot;A String&quot;,
1080 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1081 &quot;kind&quot;: &quot;compute#nodeGroup&quot;, # [Output Only] The type of the resource. Always compute#nodeGroup for node group.
1082 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001083 &quot;maintenancePolicy&quot;: &quot;A String&quot;, # Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies.
Bu Sun Kim65020912020-05-20 12:08:20 -07001084 &quot;maintenanceWindow&quot;: { # Time window specified for daily maintenance operations. GCE&#x27;s internal maintenance will be performed within this window.
1085 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001086 &quot;maintenanceDuration&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
1087 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1088 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1089 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001090 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
1091 },
1092 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001093 &quot;nodeTemplate&quot;: &quot;A String&quot;, # URL of the node template to create the node group from.
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1095 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
yoshi-code-bot73a0aa32021-05-25 00:30:03 -07001096 &quot;shareSettings&quot;: { # The share setting for reservations and sole tenancy node groups. # Share-settings for the node group
1097 &quot;projects&quot;: [ # A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type&#x27;s value is SPECIFIC_PROJECTS.
1098 &quot;A String&quot;,
1099 ],
1100 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
1101 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001102 &quot;size&quot;: 42, # [Output Only] The total number of nodes in the node group.
1103 &quot;status&quot;: &quot;A String&quot;,
1104 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The name of the zone where the node group resides, such as us-central1-a.
1105}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001106
1107 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1108
1109For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1110
1111The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1112
1113Returns:
1114 An object of the form:
1115
1116 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001117 #
1118 # Google Compute Engine has three Operation resources:
1119 #
1120 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1121 #
1122 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1123 #
1124 # Operations can be global, regional or zonal.
1125 # - For global operations, use the `globalOperations` resource.
1126 # - For regional operations, use the `regionOperations` resource.
1127 # - For zonal operations, use the `zonalOperations` resource.
1128 #
1129 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1130 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1131 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1132 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1133 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1134 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1135 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001137 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1138 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1139 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001140 },
1141 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001142 },
1143 &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`.
1144 &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.
1145 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1146 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1147 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1148 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001149 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001150 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1151 &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.
1152 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1153 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1154 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1155 &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.
1156 &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`.
1157 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1158 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1159 &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.
1160 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1161 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1162 {
1163 &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.
1164 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1165 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1166 {
1167 &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).
1168 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1169 },
1170 ],
1171 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1172 },
1173 ],
1174 &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.
1175}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001176</div>
1177
1178<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001179 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001180 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1181
1182Args:
1183 project: string, Project ID for this request. (required)
1184 zone: string, The name of the zone for this request. (required)
1185 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001186 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001187 The object takes the form of:
1188
1189{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001190 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1191 { # Associates `members` with a `role`.
1192 &quot;bindingId&quot;: &quot;A String&quot;,
1193 &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 -07001194 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001195 # If the condition evaluates to `true`, then this binding applies to the current request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001196 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001197 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001198 #
1199 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001200 #
1201 # Example (Comparison):
1202 #
1203 # 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;
1204 #
1205 # Example (Equality):
1206 #
1207 # 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;
1208 #
1209 # Example (Logic):
1210 #
1211 # 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;
1212 #
1213 # Example (Data Manipulation):
1214 #
1215 # 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;
1216 #
1217 # 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.
1218 &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.
1219 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1220 &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.
1221 &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.
1222 },
1223 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1224 #
1225 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1226 #
1227 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1228 #
1229 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1230 #
1231 #
1232 #
1233 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1234 #
1235 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1236 #
1237 # * `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.
1238 #
1239 # * `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.
1240 #
1241 # * `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.
1242 #
1243 #
1244 #
1245 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1246 &quot;A String&quot;,
1247 ],
1248 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001249 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001250 ],
1251 &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.
1252 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001253 #
1254 #
1255 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001256 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001257 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 # 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 -07001259 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001260 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001261 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001262 # { &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 -07001263 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001264 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001265 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001266 # 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 -07001267 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001268 # 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 -07001269 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001270 { # 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.
1271 #
1272 # 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.
1273 #
1274 # Example Policy with multiple AuditConfigs:
1275 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001276 # { &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 -07001277 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001278 # 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 -07001279 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001280 { # Provides the configuration for logging a type of permissions. Example:
1281 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001282 # { &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 -07001283 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001284 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1285 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1286 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001287 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001288 &quot;ignoreChildExemptions&quot;: True or False,
1289 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290 },
1291 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001292 &quot;exemptedMembers&quot;: [
1293 &quot;A String&quot;,
1294 ],
1295 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001296 },
1297 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001298 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001299 { # Associates `members` with a `role`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001300 &quot;bindingId&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001301 &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.
1302 #
1303 # If the condition evaluates to `true`, then this binding applies to the current request.
1304 #
1305 # 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.
1306 #
1307 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1308 #
1309 # Example (Comparison):
1310 #
1311 # 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;
1312 #
1313 # Example (Equality):
1314 #
1315 # 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;
1316 #
1317 # Example (Logic):
1318 #
1319 # 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;
1320 #
1321 # Example (Data Manipulation):
1322 #
1323 # 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;
1324 #
1325 # 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.
1326 &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.
1327 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1328 &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.
1329 &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.
1330 },
1331 &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 -07001332 #
1333 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1334 #
1335 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1336 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001337 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 #
1339 #
1340 #
1341 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1342 #
1343 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1344 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001345 # * `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.
1346 #
1347 # * `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.
1348 #
1349 # * `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.
1350 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001351 #
1352 #
1353 # * `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 -07001354 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001355 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001356 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001357 },
1358 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001359 &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.
1360 #
1361 # **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.
1362 &quot;iamOwned&quot;: True or False,
1363 &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.
1364 { # A rule to be applied in a Policy.
1365 &quot;action&quot;: &quot;A String&quot;, # Required
1366 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1367 { # A condition to be met.
1368 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1369 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1370 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1371 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1372 &quot;values&quot;: [ # The objects of the condition.
1373 &quot;A String&quot;,
1374 ],
1375 },
1376 ],
1377 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1378 &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.
1379 &quot;A String&quot;,
1380 ],
1381 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1382 { # Specifies what kind of log the caller must write
1383 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1384 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1385 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1386 },
1387 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1388 },
1389 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1390 #
1391 # 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.
1392 #
1393 # Field names correspond to IAM request parameters and field values are their respective values.
1394 #
1395 # 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.
1396 #
1397 # 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]}
1398 &quot;customFields&quot;: [ # Custom fields.
1399 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1400 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1401 &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.
1402 },
1403 ],
1404 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1405 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1406 },
1407 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1408 &quot;logMode&quot;: &quot;A String&quot;,
1409 },
1410 },
1411 ],
1412 &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.
1413 &quot;A String&quot;,
1414 ],
1415 &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.
1416 &quot;A String&quot;,
1417 ],
1418 },
1419 ],
1420 &quot;version&quot;: 42, # Specifies the format of the policy.
1421 #
1422 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1423 #
1424 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1425 #
1426 # * 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
1427 #
1428 # **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.
1429 #
1430 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1431 #
1432 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001433 },
1434}
1435
1436
1437Returns:
1438 An object of the form:
1439
1440 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
1441 #
1442 #
1443 #
1444 # 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.
1445 #
1446 # 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).
1447 #
1448 # **JSON example:**
1449 #
1450 # { &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 }
1451 #
1452 # **YAML example:**
1453 #
1454 # 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
1455 #
1456 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1457 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1458 { # 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.
1459 #
1460 # 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.
1461 #
1462 # Example Policy with multiple AuditConfigs:
1463 #
1464 # { &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; ] } ] } ] }
1465 #
1466 # 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.
1467 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1468 { # Provides the configuration for logging a type of permissions. Example:
1469 #
1470 # { &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; } ] }
1471 #
1472 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1473 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1474 &quot;A String&quot;,
1475 ],
1476 &quot;ignoreChildExemptions&quot;: True or False,
1477 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1478 },
1479 ],
1480 &quot;exemptedMembers&quot;: [
1481 &quot;A String&quot;,
1482 ],
1483 &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.
1484 },
1485 ],
1486 &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.
1487 { # Associates `members` with a `role`.
1488 &quot;bindingId&quot;: &quot;A String&quot;,
1489 &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.
1490 #
1491 # If the condition evaluates to `true`, then this binding applies to the current request.
1492 #
1493 # 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.
1494 #
1495 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1496 #
1497 # Example (Comparison):
1498 #
1499 # 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;
1500 #
1501 # Example (Equality):
1502 #
1503 # 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;
1504 #
1505 # Example (Logic):
1506 #
1507 # 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;
1508 #
1509 # Example (Data Manipulation):
1510 #
1511 # 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;
1512 #
1513 # 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.
1514 &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.
1515 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1516 &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.
1517 &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.
1518 },
1519 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1520 #
1521 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1522 #
1523 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1524 #
1525 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1526 #
1527 #
1528 #
1529 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1530 #
1531 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1532 #
1533 # * `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.
1534 #
1535 # * `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.
1536 #
1537 # * `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.
1538 #
1539 #
1540 #
1541 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1542 &quot;A String&quot;,
1543 ],
1544 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1545 },
1546 ],
1547 &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.
1548 #
1549 # **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.
1550 &quot;iamOwned&quot;: True or False,
1551 &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.
1552 { # A rule to be applied in a Policy.
1553 &quot;action&quot;: &quot;A String&quot;, # Required
1554 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1555 { # A condition to be met.
1556 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1557 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1558 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1559 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1560 &quot;values&quot;: [ # The objects of the condition.
1561 &quot;A String&quot;,
1562 ],
1563 },
1564 ],
1565 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1566 &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.
1567 &quot;A String&quot;,
1568 ],
1569 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1570 { # Specifies what kind of log the caller must write
1571 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1572 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1573 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1574 },
1575 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1576 },
1577 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1578 #
1579 # 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.
1580 #
1581 # Field names correspond to IAM request parameters and field values are their respective values.
1582 #
1583 # 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.
1584 #
1585 # 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]}
1586 &quot;customFields&quot;: [ # Custom fields.
1587 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1588 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1589 &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.
1590 },
1591 ],
1592 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1593 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1594 },
1595 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1596 &quot;logMode&quot;: &quot;A String&quot;,
1597 },
1598 },
1599 ],
1600 &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.
1601 &quot;A String&quot;,
1602 ],
1603 &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.
1604 &quot;A String&quot;,
1605 ],
1606 },
1607 ],
1608 &quot;version&quot;: 42, # Specifies the format of the policy.
1609 #
1610 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1611 #
1612 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1613 #
1614 # * 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
1615 #
1616 # **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.
1617 #
1618 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1619 #
1620 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1621}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001622</div>
1623
1624<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001625 <code class="details" id="setNodeTemplate">setNodeTemplate(project, zone, nodeGroup, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001626 <pre>Updates the node template of the node group.
1627
1628Args:
1629 project: string, Project ID for this request. (required)
1630 zone: string, The name of the zone for this request. (required)
1631 nodeGroup: string, Name of the NodeGroup resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001632 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001633 The object takes the form of:
1634
1635{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001636 &quot;nodeTemplate&quot;: &quot;A String&quot;, # Full or partial URL of the node template resource to be updated for this node group.
1637}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001638
1639 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1640
1641For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1642
1643The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1644
1645Returns:
1646 An object of the form:
1647
1648 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001649 #
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 ==)
1662 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001668 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001669 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001672 },
1673 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001674 },
1675 &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.
1678 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1679 &quot;kind&quot;: &quot;compute#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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001681 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001682 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1683 &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.
1684 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1685 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1686 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1687 &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.
1688 &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`.
1689 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1690 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1691 &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.
1692 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1693 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1694 {
1695 &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.
1696 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1697 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1698 {
1699 &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).
1700 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1701 },
1702 ],
1703 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1704 },
1705 ],
1706 &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.
1707}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001708</div>
1709
1710<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001711 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001712 <pre>Returns permissions that a caller has on the specified resource.
1713
1714Args:
1715 project: string, Project ID for this request. (required)
1716 zone: string, The name of the zone for this request. (required)
1717 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001718 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001719 The object takes the form of:
1720
1721{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001722 &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.
1723 &quot;A String&quot;,
1724 ],
1725}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001726
1727
1728Returns:
1729 An object of the form:
1730
1731 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001732 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1733 &quot;A String&quot;,
1734 ],
1735}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001736</div>
1737
1738</body></html>