blob: a6af9b2103599abd27dd9d788c827a445ef51911 [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="dataproc_v1.html">Cloud Dataproc API</a> . <a href="dataproc_v1.projects.html">projects</a> . <a href="dataproc_v1.projects.regions.html">regions</a> . <a href="dataproc_v1.projects.regions.autoscalingPolicies.html">autoscalingPolicies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates new autoscaling policy.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Retrieves autoscaling policy.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.</p>
89<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070090 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070091<p class="firstline">Lists autoscaling policies in the project.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070097<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -070098<p class="toc_element">
99 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700101<p class="toc_element">
102 <code><a href="#update">update(name, body=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104<h3>Method Details</h3>
105<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
107 <pre>Creates new autoscaling policy.
108
109Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700110 parent: string, Required. The &quot;resource name&quot; of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700111For projects.regions.autoscalingPolicies.create, the resource name of the region has the following format: projects/{project_id}/regions/{region}
112For projects.locations.autoscalingPolicies.create, the resource name of the location has the following format: projects/{project_id}/locations/{location} (required)
113 body: object, The request body.
114 The object takes the form of:
115
116{ # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700117 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
118 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
119 &quot;scaleUpFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling). See How autoscaling works for more information.Bounds: 0.0, 1.0.
120 &quot;scaleDownFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job. See How autoscaling works for more information.Bounds: 0.0, 1.0.
121 &quot;gracefulDecommissionTimeout&quot;: &quot;A String&quot;, # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
122 &quot;scaleUpMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
123 &quot;scaleDownMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
124 },
125 &quot;cooldownPeriod&quot;: &quot;A String&quot;, # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
126 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700127 &quot;workerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700129 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700130 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Dan O'Mearadd494642020-05-01 07:42:23 -0700131 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700132 &quot;id&quot;: &quot;A String&quot;, # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 &quot;name&quot;: &quot;A String&quot;, # Output only. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
135 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;secondaryWorkerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700138 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700139 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700141}
142
143 x__xgafv: string, V1 error format.
144 Allowed values
145 1 - v1 error format
146 2 - v2 error format
147
148Returns:
149 An object of the form:
150
151 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700152 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
153 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
154 &quot;scaleUpFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling). See How autoscaling works for more information.Bounds: 0.0, 1.0.
155 &quot;scaleDownFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job. See How autoscaling works for more information.Bounds: 0.0, 1.0.
156 &quot;gracefulDecommissionTimeout&quot;: &quot;A String&quot;, # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
157 &quot;scaleUpMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
158 &quot;scaleDownMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
159 },
160 &quot;cooldownPeriod&quot;: &quot;A String&quot;, # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
161 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;workerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700163 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700164 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700165 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Dan O'Mearadd494642020-05-01 07:42:23 -0700166 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700167 &quot;id&quot;: &quot;A String&quot;, # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;name&quot;: &quot;A String&quot;, # Output only. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700169 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
170 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 &quot;secondaryWorkerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700173 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700174 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 }</pre>
177</div>
178
179<div class="method">
180 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
181 <pre>Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
182
183Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 name: string, Required. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700185For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
186For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} (required)
187 x__xgafv: string, V1 error format.
188 Allowed values
189 1 - v1 error format
190 2 - v2 error format
191
192Returns:
193 An object of the form:
194
195 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
196 # service Foo {
197 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
198 # }
199 # The JSON representation for Empty is empty JSON object {}.
200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="get">get(name, x__xgafv=None)</code>
205 <pre>Retrieves autoscaling policy.
206
207Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 name: string, Required. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700209For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
210For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} (required)
211 x__xgafv: string, V1 error format.
212 Allowed values
213 1 - v1 error format
214 2 - v2 error format
215
216Returns:
217 An object of the form:
218
219 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700220 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
221 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
222 &quot;scaleUpFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling). See How autoscaling works for more information.Bounds: 0.0, 1.0.
223 &quot;scaleDownFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job. See How autoscaling works for more information.Bounds: 0.0, 1.0.
224 &quot;gracefulDecommissionTimeout&quot;: &quot;A String&quot;, # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
225 &quot;scaleUpMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
226 &quot;scaleDownMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
227 },
228 &quot;cooldownPeriod&quot;: &quot;A String&quot;, # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
229 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 &quot;workerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700232 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700233 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700235 &quot;id&quot;: &quot;A String&quot;, # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700236 &quot;name&quot;: &quot;A String&quot;, # Output only. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700237 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
238 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 &quot;secondaryWorkerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700241 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700242 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700244 }</pre>
245</div>
246
247<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
249 <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
250
251Args:
252 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required)
253 body: object, The request body.
254 The object takes the form of:
255
256{ # Request message for GetIamPolicy method.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700257 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.
258 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.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 -0700259 },
260 }
261
262 x__xgafv: string, V1 error format.
263 Allowed values
264 1 - v1 error format
265 2 - v2 error format
266
267Returns:
268 An object of the form:
269
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700270 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.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.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).JSON example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
275 # &quot;members&quot;: [
276 # &quot;user:mike@example.com&quot;,
277 # &quot;group:admins@example.com&quot;,
278 # &quot;domain:google.com&quot;,
279 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # ]
281 # },
282 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700284 # &quot;members&quot;: [
285 # &quot;user:eve@example.com&quot;
286 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 # &quot;condition&quot;: {
288 # &quot;title&quot;: &quot;expirable access&quot;,
289 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
290 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700293 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
295 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 # bindings:
299 # - members:
300 # - user:mike@example.com
301 # - group:admins@example.com
302 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700303 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
304 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700305 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700306 # - user:eve@example.com
307 # role: roles/resourcemanager.organizationViewer
308 # condition:
309 # title: expirable access
310 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 # - etag: BwWWja0YfJA=
313 # - version: 3
314 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700315 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
316 # Getting a policy that includes a conditional role binding
317 # Adding a conditional role binding to a policy
318 # Changing a conditional role binding in a policy
319 # Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: 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.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.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 Kimd059ad82020-07-22 17:02:09 -0700320 &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.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700321 &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 -0700322 { # Associates members with a role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700323 &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.Example (Comparison): # The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.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.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 # title: &quot;Summary size limit&quot;
325 # description: &quot;Determines if a summary is less than 100 chars&quot;
326 # expression: &quot;document.summary.size() &lt; 100&quot;
327 # Example (Equality):
328 # title: &quot;Requestor is owner&quot;
329 # description: &quot;Determines if requestor is the document owner&quot;
330 # expression: &quot;document.owner == request.auth.claims.email&quot;
331 # Example (Logic):
332 # title: &quot;Public documents&quot;
333 # description: &quot;Determine whether the document should be publicly visible&quot;
334 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
335 # Example (Data Manipulation):
336 # title: &quot;Notification string&quot;
337 # description: &quot;Create a notification string with a timestamp.&quot;
338 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
339 # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700340 &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.
341 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700342 &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.
343 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 },
345 &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 -0700346 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
347 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
350 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 # 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.
352 # 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.
353 # deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354 # 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 -0700355 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700357 &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 -0700358 },
359 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 }</pre>
361</div>
362
363<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700364 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 <pre>Lists autoscaling policies in the project.
366
367Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700368 parent: string, Required. The &quot;resource name&quot; of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700369For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
370For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location} (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700371 pageToken: string, Optional. The page token, returned by a previous call, to request the next page of results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700372 pageSize: integer, Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700373 x__xgafv: string, V1 error format.
374 Allowed values
375 1 - v1 error format
376 2 - v2 error format
Dan O'Mearadd494642020-05-01 07:42:23 -0700377
378Returns:
379 An object of the form:
380
381 { # A response to a request to list autoscaling policies in a project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &quot;policies&quot;: [ # Output only. Autoscaling policies list.
Dan O'Mearadd494642020-05-01 07:42:23 -0700383 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700384 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
385 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
386 &quot;scaleUpFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling). See How autoscaling works for more information.Bounds: 0.0, 1.0.
387 &quot;scaleDownFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job. See How autoscaling works for more information.Bounds: 0.0, 1.0.
388 &quot;gracefulDecommissionTimeout&quot;: &quot;A String&quot;, # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
389 &quot;scaleUpMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
390 &quot;scaleDownMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
391 },
392 &quot;cooldownPeriod&quot;: &quot;A String&quot;, # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
393 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 &quot;workerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700395 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700396 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700397 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Dan O'Mearadd494642020-05-01 07:42:23 -0700398 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700399 &quot;id&quot;: &quot;A String&quot;, # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700400 &quot;name&quot;: &quot;A String&quot;, # Output only. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700401 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
402 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 &quot;secondaryWorkerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700404 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700405 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700406 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Bu Sun Kim65020912020-05-20 12:08:20 -0700407 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700408 },
409 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;nextPageToken&quot;: &quot;A String&quot;, # Output only. This token is included in the response if there are more results to fetch.
Dan O'Mearadd494642020-05-01 07:42:23 -0700411 }</pre>
412</div>
413
414<div class="method">
415 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
416 <pre>Retrieves the next page of results.
417
418Args:
419 previous_request: The request for the previous page. (required)
420 previous_response: The response from the request for the previous page. (required)
421
422Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -0700424 page. Returns None if there are no more items in the collection.
425 </pre>
426</div>
427
428<div class="method">
429 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700430 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Dan O'Mearadd494642020-05-01 07:42:23 -0700431
432Args:
433 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required)
434 body: object, The request body.
435 The object takes the form of:
436
437{ # Request message for SetIamPolicy method.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700438 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.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.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).JSON example: # REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700439 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 # &quot;bindings&quot;: [
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
443 # &quot;members&quot;: [
444 # &quot;user:mike@example.com&quot;,
445 # &quot;group:admins@example.com&quot;,
446 # &quot;domain:google.com&quot;,
447 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700448 # ]
449 # },
450 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700452 # &quot;members&quot;: [
453 # &quot;user:eve@example.com&quot;
454 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 # &quot;condition&quot;: {
456 # &quot;title&quot;: &quot;expirable access&quot;,
457 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
458 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 # }
460 # }
461 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700462 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
463 # &quot;version&quot;: 3
Dan O'Mearadd494642020-05-01 07:42:23 -0700464 # }
465 # YAML example:
466 # bindings:
467 # - members:
468 # - user:mike@example.com
469 # - group:admins@example.com
470 # - domain:google.com
471 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
472 # role: roles/resourcemanager.organizationAdmin
473 # - members:
474 # - user:eve@example.com
475 # role: roles/resourcemanager.organizationViewer
476 # condition:
477 # title: expirable access
478 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700480 # - etag: BwWWja0YfJA=
481 # - version: 3
482 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700483 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
484 # Getting a policy that includes a conditional role binding
485 # Adding a conditional role binding to a policy
486 # Changing a conditional role binding in a policy
487 # Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: 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.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.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 Kimd059ad82020-07-22 17:02:09 -0700488 &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.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700490 { # Associates members with a role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700491 &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.Example (Comparison): # The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.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.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700492 # title: &quot;Summary size limit&quot;
493 # description: &quot;Determines if a summary is less than 100 chars&quot;
494 # expression: &quot;document.summary.size() &lt; 100&quot;
495 # Example (Equality):
496 # title: &quot;Requestor is owner&quot;
497 # description: &quot;Determines if requestor is the document owner&quot;
498 # expression: &quot;document.owner == request.auth.claims.email&quot;
499 # Example (Logic):
500 # title: &quot;Public documents&quot;
501 # description: &quot;Determine whether the document should be publicly visible&quot;
502 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
503 # Example (Data Manipulation):
504 # title: &quot;Notification string&quot;
505 # description: &quot;Create a notification string with a timestamp.&quot;
506 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
507 # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700508 &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.
509 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &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.
511 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 },
513 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
Dan O'Mearadd494642020-05-01 07:42:23 -0700514 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
515 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
516 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
517 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
518 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
519 # 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.
520 # 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.
521 # 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.
522 # 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 -0700523 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700524 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700525 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
Dan O'Mearadd494642020-05-01 07:42:23 -0700526 },
527 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700528 },
529 }
530
531 x__xgafv: string, V1 error format.
532 Allowed values
533 1 - v1 error format
534 2 - v2 error format
535
536Returns:
537 An object of the form:
538
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700539 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.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.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).JSON example:
Dan O'Mearadd494642020-05-01 07:42:23 -0700540 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 # &quot;bindings&quot;: [
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
544 # &quot;members&quot;: [
545 # &quot;user:mike@example.com&quot;,
546 # &quot;group:admins@example.com&quot;,
547 # &quot;domain:google.com&quot;,
548 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700549 # ]
550 # },
551 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700553 # &quot;members&quot;: [
554 # &quot;user:eve@example.com&quot;
555 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700556 # &quot;condition&quot;: {
557 # &quot;title&quot;: &quot;expirable access&quot;,
558 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
559 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 # }
561 # }
562 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
564 # &quot;version&quot;: 3
Dan O'Mearadd494642020-05-01 07:42:23 -0700565 # }
566 # YAML example:
567 # bindings:
568 # - members:
569 # - user:mike@example.com
570 # - group:admins@example.com
571 # - domain:google.com
572 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
573 # role: roles/resourcemanager.organizationAdmin
574 # - members:
575 # - user:eve@example.com
576 # role: roles/resourcemanager.organizationViewer
577 # condition:
578 # title: expirable access
579 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700580 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700581 # - etag: BwWWja0YfJA=
582 # - version: 3
583 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700584 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
585 # Getting a policy that includes a conditional role binding
586 # Adding a conditional role binding to a policy
587 # Changing a conditional role binding in a policy
588 # Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: 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.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.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 Kimd059ad82020-07-22 17:02:09 -0700589 &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.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700590 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700591 { # Associates members with a role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700592 &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.Example (Comparison): # The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.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.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 # title: &quot;Summary size limit&quot;
594 # description: &quot;Determines if a summary is less than 100 chars&quot;
595 # expression: &quot;document.summary.size() &lt; 100&quot;
596 # Example (Equality):
597 # title: &quot;Requestor is owner&quot;
598 # description: &quot;Determines if requestor is the document owner&quot;
599 # expression: &quot;document.owner == request.auth.claims.email&quot;
600 # Example (Logic):
601 # title: &quot;Public documents&quot;
602 # description: &quot;Determine whether the document should be publicly visible&quot;
603 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
604 # Example (Data Manipulation):
605 # title: &quot;Notification string&quot;
606 # description: &quot;Create a notification string with a timestamp.&quot;
607 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
608 # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700609 &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.
610 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700611 &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.
612 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 },
614 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
616 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
617 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
618 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
619 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
620 # 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.
621 # 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.
622 # 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.
623 # 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 -0700624 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700626 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 },
628 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 }</pre>
630</div>
631
632<div class="method">
633 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700634 <pre>Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635
636Args:
637 resource: string, REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700638 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700639 The object takes the form of:
640
641{ # Request message for TestIamPermissions method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 &quot;permissions&quot;: [ # The set of permissions to check for the resource. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
643 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 ],
645 }
646
647 x__xgafv: string, V1 error format.
648 Allowed values
649 1 - v1 error format
650 2 - v2 error format
651
652Returns:
653 An object of the form:
654
655 { # Response message for TestIamPermissions method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700656 &quot;permissions&quot;: [ # A subset of TestPermissionsRequest.permissions that the caller is allowed.
657 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 ],
659 }</pre>
660</div>
661
Dan O'Mearadd494642020-05-01 07:42:23 -0700662<div class="method">
663 <code class="details" id="update">update(name, body=None, x__xgafv=None)</code>
664 <pre>Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
665
666Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 name: string, Output only. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700668For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
669For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} (required)
670 body: object, The request body.
671 The object takes the form of:
672
673{ # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700674 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
675 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
676 &quot;scaleUpFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling). See How autoscaling works for more information.Bounds: 0.0, 1.0.
677 &quot;scaleDownFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job. See How autoscaling works for more information.Bounds: 0.0, 1.0.
678 &quot;gracefulDecommissionTimeout&quot;: &quot;A String&quot;, # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
679 &quot;scaleUpMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
680 &quot;scaleDownMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
681 },
682 &quot;cooldownPeriod&quot;: &quot;A String&quot;, # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
683 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 &quot;workerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700686 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700687 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Dan O'Mearadd494642020-05-01 07:42:23 -0700688 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700689 &quot;id&quot;: &quot;A String&quot;, # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700690 &quot;name&quot;: &quot;A String&quot;, # Output only. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700691 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
692 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim65020912020-05-20 12:08:20 -0700693 &quot;secondaryWorkerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700695 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700696 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Bu Sun Kim65020912020-05-20 12:08:20 -0700697 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700698}
699
700 x__xgafv: string, V1 error format.
701 Allowed values
702 1 - v1 error format
703 2 - v2 error format
704
705Returns:
706 An object of the form:
707
708 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700709 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
710 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
711 &quot;scaleUpFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling). See How autoscaling works for more information.Bounds: 0.0, 1.0.
712 &quot;scaleDownFactor&quot;: 3.14, # Required. Fraction of average YARN pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job. See How autoscaling works for more information.Bounds: 0.0, 1.0.
713 &quot;gracefulDecommissionTimeout&quot;: &quot;A String&quot;, # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
714 &quot;scaleUpMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
715 &quot;scaleDownMinWorkerFraction&quot;: 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
716 },
717 &quot;cooldownPeriod&quot;: &quot;A String&quot;, # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
718 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &quot;workerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700721 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700722 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700724 &quot;id&quot;: &quot;A String&quot;, # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &quot;name&quot;: &quot;A String&quot;, # Output only. The &quot;resource name&quot; of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
Dan O'Mearadd494642020-05-01 07:42:23 -0700726 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
727 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 &quot;secondaryWorkerConfig&quot;: { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700729 &quot;maxInstances&quot;: 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700730 &quot;weight&quot;: 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700731 &quot;minInstances&quot;: 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700733 }</pre>
734</div>
735
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736</body></html>