blob: 311464d1f13547d7b7c3a8498705c1c45d81aadc [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_v1beta2.html">Cloud Dataproc API</a> . <a href="dataproc_v1beta2.projects.html">projects</a> . <a href="dataproc_v1beta2.projects.regions.html">regions</a> . <a href="dataproc_v1beta2.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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<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">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<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">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Lists autoscaling policies in the project.</p>
92<p class="toc_element">
93 <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">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <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>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#update">update(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.</p>
104<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107 <pre>Creates new autoscaling policy.
108
109Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700110 parent: string, Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
111For projects.regions.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/regions/{region}
112For projects.locations.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/locations/{location} (required)
113 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 The object takes the form of:
115
116{ # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 "basicAlgorithm": { # Basic algorithm for autoscaling.
118 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
119 "scaleDownFactor": 3.14, # Required. Fraction of average 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.Bounds: 0.0, 1.0.
120 "gracefulDecommissionTimeout": "A String", # 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.
121 "scaleDownMinWorkerFraction": 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.
122 "scaleUpFactor": 3.14, # Required. Fraction of average 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).Bounds: 0.0, 1.0.
123 "scaleUpMinWorkerFraction": 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.
124 },
125 "cooldownPeriod": "A String", # 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 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 "secondaryWorkerConfig": { # 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.
128 "minInstances": 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.
129 "weight": 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.
130 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
131 },
132 "workerConfig": { # 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.
133 "minInstances": 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.
134 "weight": 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.
135 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
136 },
137 "id": "A String", # 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.
138 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
139 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
140 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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 Kim715bd7f2019-06-14 16:50:42 -0700152 "basicAlgorithm": { # Basic algorithm for autoscaling.
153 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
154 "scaleDownFactor": 3.14, # Required. Fraction of average 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.Bounds: 0.0, 1.0.
155 "gracefulDecommissionTimeout": "A String", # 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.
156 "scaleDownMinWorkerFraction": 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.
157 "scaleUpFactor": 3.14, # Required. Fraction of average 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).Bounds: 0.0, 1.0.
158 "scaleUpMinWorkerFraction": 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.
159 },
160 "cooldownPeriod": "A String", # 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 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 "secondaryWorkerConfig": { # 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.
163 "minInstances": 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.
164 "weight": 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.
165 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
166 },
167 "workerConfig": { # 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.
168 "minInstances": 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.
169 "weight": 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.
170 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
171 },
172 "id": "A String", # 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.
173 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
174 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
175 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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:
Dan O'Mearadd494642020-05-01 07:42:23 -0700184 name: string, Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
185For 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)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 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:
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 name: string, Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
209For 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)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 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 Kim715bd7f2019-06-14 16:50:42 -0700220 "basicAlgorithm": { # Basic algorithm for autoscaling.
221 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
222 "scaleDownFactor": 3.14, # Required. Fraction of average 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.Bounds: 0.0, 1.0.
223 "gracefulDecommissionTimeout": "A String", # 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.
224 "scaleDownMinWorkerFraction": 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.
225 "scaleUpFactor": 3.14, # Required. Fraction of average 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).Bounds: 0.0, 1.0.
226 "scaleUpMinWorkerFraction": 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.
227 },
228 "cooldownPeriod": "A String", # 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 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 "secondaryWorkerConfig": { # 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.
231 "minInstances": 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.
232 "weight": 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.
233 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
234 },
235 "workerConfig": { # 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.
236 "minInstances": 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.
237 "weight": 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.
238 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
239 },
240 "id": "A String", # 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.
241 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
242 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
243 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244 }</pre>
245</div>
246
247<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700248 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 <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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 options_requestedPolicyVersion: integer, 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 x__xgafv: string, V1 error format.
255 Allowed values
256 1 - v1 error format
257 2 - v2 error format
258
259Returns:
260 An object of the form:
261
Dan O'Mearadd494642020-05-01 07:42:23 -0700262 { # 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.Optionally, a binding can 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.JSON example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700263 # {
264 # "bindings": [
265 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 # "members": [
268 # "user:mike@example.com",
269 # "group:admins@example.com",
270 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700271 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 # ]
273 # },
274 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700275 # "role": "roles/resourcemanager.organizationViewer",
276 # "members": ["user:eve@example.com"],
277 # "condition": {
278 # "title": "expirable access",
279 # "description": "Does not grant access after Sep 2020",
280 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
281 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 # ],
284 # "etag": "BwWWja0YfJA=",
285 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700287 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 # bindings:
289 # - members:
290 # - user:mike@example.com
291 # - group:admins@example.com
292 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700293 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
294 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700296 # - user:eve@example.com
297 # role: roles/resourcemanager.organizationViewer
298 # condition:
299 # title: expirable access
300 # description: Does not grant access after Sep 2020
301 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
302 # - etag: BwWWja0YfJA=
303 # - version: 3
304 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
305 "bindings": [ # 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 -0700306 { # Associates members with a role.
307 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
308 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
309 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
310 # 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 -0700311 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
313 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 # 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.
315 # 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.
316 # 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 -0700317 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
318 "A String",
319 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
321 # title: "Summary size limit"
322 # description: "Determines if a summary is less than 100 chars"
323 # expression: "document.summary.size() &lt; 100"
324 # Example (Equality):
325 # title: "Requestor is owner"
326 # description: "Determines if requestor is the document owner"
327 # expression: "document.owner == request.auth.claims.email"
328 # Example (Logic):
329 # title: "Public documents"
330 # description: "Determine whether the document should be publicly visible"
331 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
332 # Example (Data Manipulation):
333 # title: "Notification string"
334 # description: "Create a notification string with a timestamp."
335 # expression: "'New message received at ' + string(document.create_time)"
336 # 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.
337 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
338 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
339 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
340 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 },
342 },
343 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700344 "etag": "A String", # 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.
345 "version": 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:
346 # Getting a policy that includes a conditional role binding
347 # Adding a conditional role binding to a policy
348 # Changing a conditional role binding in a policy
349 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 }</pre>
351</div>
352
353<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 <pre>Lists autoscaling policies in the project.
356
357Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700358 parent: string, Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
359For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
360For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location} (required)
361 pageSize: integer, Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700362 pageToken: string, Optional. The page token, returned by a previous call, to request the next page of results.
363 x__xgafv: string, V1 error format.
364 Allowed values
365 1 - v1 error format
366 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367
368Returns:
369 An object of the form:
370
371 { # A response to a request to list autoscaling policies in a project.
372 "nextPageToken": "A String", # Output only. This token is included in the response if there are more results to fetch.
373 "policies": [ # Output only. Autoscaling policies list.
374 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700375 "basicAlgorithm": { # Basic algorithm for autoscaling.
376 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
377 "scaleDownFactor": 3.14, # Required. Fraction of average 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.Bounds: 0.0, 1.0.
378 "gracefulDecommissionTimeout": "A String", # 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.
379 "scaleDownMinWorkerFraction": 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.
380 "scaleUpFactor": 3.14, # Required. Fraction of average 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).Bounds: 0.0, 1.0.
381 "scaleUpMinWorkerFraction": 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.
382 },
383 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
384 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 "secondaryWorkerConfig": { # 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.
386 "minInstances": 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.
387 "weight": 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.
388 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
389 },
390 "workerConfig": { # 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.
391 "minInstances": 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.
392 "weight": 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.
393 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
394 },
395 "id": "A String", # 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.
396 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
397 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
398 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700399 },
400 ],
401 }</pre>
402</div>
403
404<div class="method">
405 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
406 <pre>Retrieves the next page of results.
407
408Args:
409 previous_request: The request for the previous page. (required)
410 previous_response: The response from the request for the previous page. (required)
411
412Returns:
413 A request object that you can call 'execute()' on to request the next
414 page. Returns None if there are no more items in the collection.
415 </pre>
416</div>
417
418<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700419 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
420 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700421
422Args:
423 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700424 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 The object takes the form of:
426
427{ # Request message for SetIamPolicy method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 "policy": { # 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.Optionally, a binding can 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.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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 # {
430 # "bindings": [
431 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 # "members": [
434 # "user:mike@example.com",
435 # "group:admins@example.com",
436 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700437 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 # ]
439 # },
440 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 # "role": "roles/resourcemanager.organizationViewer",
442 # "members": ["user:eve@example.com"],
443 # "condition": {
444 # "title": "expirable access",
445 # "description": "Does not grant access after Sep 2020",
446 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
447 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700449 # ],
450 # "etag": "BwWWja0YfJA=",
451 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700453 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 # bindings:
455 # - members:
456 # - user:mike@example.com
457 # - group:admins@example.com
458 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
460 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700462 # - user:eve@example.com
463 # role: roles/resourcemanager.organizationViewer
464 # condition:
465 # title: expirable access
466 # description: Does not grant access after Sep 2020
467 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
468 # - etag: BwWWja0YfJA=
469 # - version: 3
470 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
471 "bindings": [ # 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 -0700472 { # Associates members with a role.
473 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
474 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
475 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
476 # 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 -0700477 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
479 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700480 # 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.
481 # 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.
482 # 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 -0700483 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
484 "A String",
485 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
487 # title: "Summary size limit"
488 # description: "Determines if a summary is less than 100 chars"
489 # expression: "document.summary.size() &lt; 100"
490 # Example (Equality):
491 # title: "Requestor is owner"
492 # description: "Determines if requestor is the document owner"
493 # expression: "document.owner == request.auth.claims.email"
494 # Example (Logic):
495 # title: "Public documents"
496 # description: "Determine whether the document should be publicly visible"
497 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
498 # Example (Data Manipulation):
499 # title: "Notification string"
500 # description: "Create a notification string with a timestamp."
501 # expression: "'New message received at ' + string(document.create_time)"
502 # 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.
503 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
504 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
505 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
506 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 },
508 },
509 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700510 "etag": "A String", # 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.
511 "version": 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:
512 # Getting a policy that includes a conditional role binding
513 # Adding a conditional role binding to a policy
514 # Changing a conditional role binding in a policy
515 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700516 },
517 }
518
519 x__xgafv: string, V1 error format.
520 Allowed values
521 1 - v1 error format
522 2 - v2 error format
523
524Returns:
525 An object of the form:
526
Dan O'Mearadd494642020-05-01 07:42:23 -0700527 { # 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.Optionally, a binding can 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.JSON example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 # {
529 # "bindings": [
530 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 # "members": [
533 # "user:mike@example.com",
534 # "group:admins@example.com",
535 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700536 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 # ]
538 # },
539 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700540 # "role": "roles/resourcemanager.organizationViewer",
541 # "members": ["user:eve@example.com"],
542 # "condition": {
543 # "title": "expirable access",
544 # "description": "Does not grant access after Sep 2020",
545 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
546 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700547 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 # ],
549 # "etag": "BwWWja0YfJA=",
550 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700552 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 # bindings:
554 # - members:
555 # - user:mike@example.com
556 # - group:admins@example.com
557 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700558 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
559 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700560 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700561 # - user:eve@example.com
562 # role: roles/resourcemanager.organizationViewer
563 # condition:
564 # title: expirable access
565 # description: Does not grant access after Sep 2020
566 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
567 # - etag: BwWWja0YfJA=
568 # - version: 3
569 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
570 "bindings": [ # 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 -0700571 { # Associates members with a role.
572 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
573 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
574 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
575 # 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 -0700576 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700577 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
578 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 # 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.
580 # 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.
581 # 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 -0700582 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
583 "A String",
584 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700585 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
586 # title: "Summary size limit"
587 # description: "Determines if a summary is less than 100 chars"
588 # expression: "document.summary.size() &lt; 100"
589 # Example (Equality):
590 # title: "Requestor is owner"
591 # description: "Determines if requestor is the document owner"
592 # expression: "document.owner == request.auth.claims.email"
593 # Example (Logic):
594 # title: "Public documents"
595 # description: "Determine whether the document should be publicly visible"
596 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
597 # Example (Data Manipulation):
598 # title: "Notification string"
599 # description: "Create a notification string with a timestamp."
600 # expression: "'New message received at ' + string(document.create_time)"
601 # 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.
602 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
603 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
604 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
605 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 },
607 },
608 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700609 "etag": "A String", # 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.
610 "version": 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:
611 # Getting a policy that includes a conditional role binding
612 # Adding a conditional role binding to a policy
613 # Changing a conditional role binding in a policy
614 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700615 }</pre>
616</div>
617
618<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700619 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700620 <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 "fail open" without warning.
621
622Args:
623 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 -0700624 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700625 The object takes the form of:
626
627{ # Request message for TestIamPermissions method.
628 "permissions": [ # The set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
629 "A String",
630 ],
631 }
632
633 x__xgafv: string, V1 error format.
634 Allowed values
635 1 - v1 error format
636 2 - v2 error format
637
638Returns:
639 An object of the form:
640
641 { # Response message for TestIamPermissions method.
642 "permissions": [ # A subset of TestPermissionsRequest.permissions that the caller is allowed.
643 "A String",
644 ],
645 }</pre>
646</div>
647
648<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700649 <code class="details" id="update">update(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700650 <pre>Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
651
652Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700653 name: string, Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
654For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
655For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} (required)
656 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 The object takes the form of:
658
659{ # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700660 "basicAlgorithm": { # Basic algorithm for autoscaling.
661 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
662 "scaleDownFactor": 3.14, # Required. Fraction of average 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.Bounds: 0.0, 1.0.
663 "gracefulDecommissionTimeout": "A String", # 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.
664 "scaleDownMinWorkerFraction": 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.
665 "scaleUpFactor": 3.14, # Required. Fraction of average 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).Bounds: 0.0, 1.0.
666 "scaleUpMinWorkerFraction": 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.
667 },
668 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
669 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 "secondaryWorkerConfig": { # 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.
671 "minInstances": 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.
672 "weight": 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.
673 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
674 },
675 "workerConfig": { # 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.
676 "minInstances": 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.
677 "weight": 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.
678 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
679 },
680 "id": "A String", # 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.
681 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
682 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
683 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684}
685
686 x__xgafv: string, V1 error format.
687 Allowed values
688 1 - v1 error format
689 2 - v2 error format
690
691Returns:
692 An object of the form:
693
694 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 "basicAlgorithm": { # Basic algorithm for autoscaling.
696 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
697 "scaleDownFactor": 3.14, # Required. Fraction of average 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.Bounds: 0.0, 1.0.
698 "gracefulDecommissionTimeout": "A String", # 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.
699 "scaleDownMinWorkerFraction": 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.
700 "scaleUpFactor": 3.14, # Required. Fraction of average 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).Bounds: 0.0, 1.0.
701 "scaleUpMinWorkerFraction": 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.
702 },
703 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
704 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700705 "secondaryWorkerConfig": { # 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.
706 "minInstances": 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.
707 "weight": 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.
708 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
709 },
710 "workerConfig": { # 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.
711 "minInstances": 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.
712 "weight": 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.
713 "maxInstances": 42, # Optional. 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, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0.
714 },
715 "id": "A String", # 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.
716 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
717 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
718 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 }</pre>
720</div>
721
722</body></html>