blob: d7e1b2542ecd6f049c79b809cb75738a59a1b36e [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">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#list">list(parent, pageToken=None, pageSize=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>
Bu Sun Kim65020912020-05-20 12:08:20 -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>
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:
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 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 Kim65020912020-05-20 12:08:20 -0700117 &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 -0700118 &quot;maxInstances&quot;: 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.
119 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700120 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700122 &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 -0700123 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
124 # 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 -0700125 &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 -0700126 &quot;maxInstances&quot;: 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.
127 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700128 &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 Kim65020912020-05-20 12:08:20 -0700129 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700130 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
131 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
132 &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.
133 &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.
134 &quot;scaleUpFactor&quot;: 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.
135 &quot;scaleDownFactor&quot;: 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.
136 &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.
137 },
138 &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.
139 },
140 &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 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 Kim65020912020-05-20 12:08:20 -0700152 &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 -0700153 &quot;maxInstances&quot;: 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.
154 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700155 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &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 -0700158 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
159 # 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 -0700160 &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 -0700161 &quot;maxInstances&quot;: 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.
162 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700163 &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 Kim65020912020-05-20 12:08:20 -0700164 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700165 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
166 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
167 &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.
168 &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.
169 &quot;scaleUpFactor&quot;: 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.
170 &quot;scaleDownFactor&quot;: 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.
171 &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.
172 },
173 &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.
174 },
175 &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 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:
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)
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:
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)
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 Kim65020912020-05-20 12:08:20 -0700220 &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 -0700221 &quot;maxInstances&quot;: 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.
222 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700223 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700224 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 &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 -0700226 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
227 # 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 -0700228 &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 -0700229 &quot;maxInstances&quot;: 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.
230 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700231 &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 Kim65020912020-05-20 12:08:20 -0700232 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700233 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
234 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
235 &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.
236 &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.
237 &quot;scaleUpFactor&quot;: 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.
238 &quot;scaleDownFactor&quot;: 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.
239 &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.
240 },
241 &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.
242 },
243 &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 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)
Bu Sun Kim65020912020-05-20 12:08:20 -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.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 -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
Bu Sun Kim65020912020-05-20 12:08:20 -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.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 -0700263 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
267 # &quot;members&quot;: [
268 # &quot;user:mike@example.com&quot;,
269 # &quot;group:admins@example.com&quot;,
270 # &quot;domain:google.com&quot;,
271 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 # ]
273 # },
274 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
276 # &quot;members&quot;: [
277 # &quot;user:eve@example.com&quot;
278 # ],
279 # &quot;condition&quot;: {
280 # &quot;title&quot;: &quot;expirable access&quot;,
281 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
282 # &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 -0700283 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700285 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
287 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700289 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 # bindings:
291 # - members:
292 # - user:mike@example.com
293 # - group:admins@example.com
294 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700295 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
296 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700297 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700298 # - user:eve@example.com
299 # role: roles/resourcemanager.organizationViewer
300 # condition:
301 # title: expirable access
302 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700304 # - etag: BwWWja0YfJA=
305 # - version: 3
306 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 &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 -0700308 { # Associates members with a role.
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &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).
310 # title: &quot;Summary size limit&quot;
311 # description: &quot;Determines if a summary is less than 100 chars&quot;
312 # expression: &quot;document.summary.size() &lt; 100&quot;
313 # Example (Equality):
314 # title: &quot;Requestor is owner&quot;
315 # description: &quot;Determines if requestor is the document owner&quot;
316 # expression: &quot;document.owner == request.auth.claims.email&quot;
317 # Example (Logic):
318 # title: &quot;Public documents&quot;
319 # description: &quot;Determine whether the document should be publicly visible&quot;
320 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
321 # Example (Data Manipulation):
322 # title: &quot;Notification string&quot;
323 # description: &quot;Create a notification string with a timestamp.&quot;
324 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
325 # 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 Kim65020912020-05-20 12:08:20 -0700326 &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.
327 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700328 &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.
329 &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 -0700330 },
331 &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 -0700332 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
333 # 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 -0700334 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
336 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 # 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.
338 # 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.
339 # 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 -0700340 # 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 -0700341 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 &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 -0700344 },
345 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700346 &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.
347 &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:
348 # Getting a policy that includes a conditional role binding
349 # Adding a conditional role binding to a policy
350 # Changing a conditional role binding in a policy
351 # 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 Kim715bd7f2019-06-14 16:50:42 -0700352 }</pre>
353</div>
354
355<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700357 <pre>Lists autoscaling policies in the project.
358
359Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700360 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 -0700361For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
362For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location} (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 pageToken: string, Optional. The page token, returned by a previous call, to request the next page of results.
Bu Sun Kim65020912020-05-20 12:08:20 -0700364 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 -0700365 x__xgafv: string, V1 error format.
366 Allowed values
367 1 - v1 error format
368 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700369
370Returns:
371 An object of the form:
372
373 { # A response to a request to list autoscaling policies in a project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700374 &quot;nextPageToken&quot;: &quot;A String&quot;, # Output only. This token is included in the response if there are more results to fetch.
Bu Sun Kim65020912020-05-20 12:08:20 -0700375 &quot;policies&quot;: [ # Output only. Autoscaling policies list.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &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 -0700378 &quot;maxInstances&quot;: 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.
379 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700380 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &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 -0700383 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
384 # 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 -0700385 &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 -0700386 &quot;maxInstances&quot;: 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.
387 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700388 &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 Kim65020912020-05-20 12:08:20 -0700389 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700390 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
391 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
392 &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.
393 &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.
394 &quot;scaleUpFactor&quot;: 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.
395 &quot;scaleDownFactor&quot;: 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.
396 &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.
397 },
398 &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.
399 },
400 &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 Kim715bd7f2019-06-14 16:50:42 -0700401 },
402 ],
403 }</pre>
404</div>
405
406<div class="method">
407 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
408 <pre>Retrieves the next page of results.
409
410Args:
411 previous_request: The request for the previous page. (required)
412 previous_response: The response from the request for the previous page. (required)
413
414Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 page. Returns None if there are no more items in the collection.
417 </pre>
418</div>
419
420<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700421 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700422 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423
424Args:
425 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 -0700426 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 The object takes the form of:
428
429{ # Request message for SetIamPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700431 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
435 # &quot;members&quot;: [
436 # &quot;user:mike@example.com&quot;,
437 # &quot;group:admins@example.com&quot;,
438 # &quot;domain:google.com&quot;,
439 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 # ]
441 # },
442 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
444 # &quot;members&quot;: [
445 # &quot;user:eve@example.com&quot;
446 # ],
447 # &quot;condition&quot;: {
448 # &quot;title&quot;: &quot;expirable access&quot;,
449 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
450 # &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 -0700451 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700453 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
455 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 # bindings:
459 # - members:
460 # - user:mike@example.com
461 # - group:admins@example.com
462 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700463 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
464 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700466 # - user:eve@example.com
467 # role: roles/resourcemanager.organizationViewer
468 # condition:
469 # title: expirable access
470 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700472 # - etag: BwWWja0YfJA=
473 # - version: 3
474 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &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 -0700476 { # Associates members with a role.
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 &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).
478 # title: &quot;Summary size limit&quot;
479 # description: &quot;Determines if a summary is less than 100 chars&quot;
480 # expression: &quot;document.summary.size() &lt; 100&quot;
481 # Example (Equality):
482 # title: &quot;Requestor is owner&quot;
483 # description: &quot;Determines if requestor is the document owner&quot;
484 # expression: &quot;document.owner == request.auth.claims.email&quot;
485 # Example (Logic):
486 # title: &quot;Public documents&quot;
487 # description: &quot;Determine whether the document should be publicly visible&quot;
488 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
489 # Example (Data Manipulation):
490 # title: &quot;Notification string&quot;
491 # description: &quot;Create a notification string with a timestamp.&quot;
492 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
493 # 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 Kim65020912020-05-20 12:08:20 -0700494 &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.
495 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700496 &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.
497 &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 -0700498 },
499 &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 -0700500 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
501 # 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 -0700502 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700503 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
504 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700505 # 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.
506 # 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.
507 # 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 -0700508 # 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 -0700509 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700510 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 &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 -0700512 },
513 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700514 &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.
515 &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:
516 # Getting a policy that includes a conditional role binding
517 # Adding a conditional role binding to a policy
518 # Changing a conditional role binding in a policy
519 # 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 Kim715bd7f2019-06-14 16:50:42 -0700520 },
521 }
522
523 x__xgafv: string, V1 error format.
524 Allowed values
525 1 - v1 error format
526 2 - v2 error format
527
528Returns:
529 An object of the form:
530
Bu Sun Kim65020912020-05-20 12:08:20 -0700531 { # 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 -0700532 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700533 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700535 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
536 # &quot;members&quot;: [
537 # &quot;user:mike@example.com&quot;,
538 # &quot;group:admins@example.com&quot;,
539 # &quot;domain:google.com&quot;,
540 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700541 # ]
542 # },
543 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
545 # &quot;members&quot;: [
546 # &quot;user:eve@example.com&quot;
547 # ],
548 # &quot;condition&quot;: {
549 # &quot;title&quot;: &quot;expirable access&quot;,
550 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
551 # &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 -0700552 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700554 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
556 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700558 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559 # bindings:
560 # - members:
561 # - user:mike@example.com
562 # - group:admins@example.com
563 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700564 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
565 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700566 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700567 # - user:eve@example.com
568 # role: roles/resourcemanager.organizationViewer
569 # condition:
570 # title: expirable access
571 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700573 # - etag: BwWWja0YfJA=
574 # - version: 3
575 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 &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 -0700577 { # Associates members with a role.
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 &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).
579 # title: &quot;Summary size limit&quot;
580 # description: &quot;Determines if a summary is less than 100 chars&quot;
581 # expression: &quot;document.summary.size() &lt; 100&quot;
582 # Example (Equality):
583 # title: &quot;Requestor is owner&quot;
584 # description: &quot;Determines if requestor is the document owner&quot;
585 # expression: &quot;document.owner == request.auth.claims.email&quot;
586 # Example (Logic):
587 # title: &quot;Public documents&quot;
588 # description: &quot;Determine whether the document should be publicly visible&quot;
589 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
590 # Example (Data Manipulation):
591 # title: &quot;Notification string&quot;
592 # description: &quot;Create a notification string with a timestamp.&quot;
593 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
594 # 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 Kim65020912020-05-20 12:08:20 -0700595 &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.
596 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700597 &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.
598 &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 -0700599 },
600 &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 -0700601 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
602 # 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 -0700603 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
605 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700606 # 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.
607 # 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.
608 # 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 -0700609 # 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 -0700610 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700612 &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 -0700613 },
614 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700615 &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.
616 &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:
617 # Getting a policy that includes a conditional role binding
618 # Adding a conditional role binding to a policy
619 # Changing a conditional role binding in a policy
620 # 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 Kim715bd7f2019-06-14 16:50:42 -0700621 }</pre>
622</div>
623
624<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 <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 -0700627
628Args:
629 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 -0700630 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631 The object takes the form of:
632
633{ # Request message for TestIamPermissions method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700634 &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).
635 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 ],
637 }
638
639 x__xgafv: string, V1 error format.
640 Allowed values
641 1 - v1 error format
642 2 - v2 error format
643
644Returns:
645 An object of the form:
646
647 { # Response message for TestIamPermissions method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700648 &quot;permissions&quot;: [ # A subset of TestPermissionsRequest.permissions that the caller is allowed.
649 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700650 ],
651 }</pre>
652</div>
653
654<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700655 <code class="details" id="update">update(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700656 <pre>Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
657
658Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 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 -0700660For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
661For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} (required)
662 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700663 The object takes the form of:
664
665{ # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kim65020912020-05-20 12:08:20 -0700666 &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 -0700667 &quot;maxInstances&quot;: 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.
668 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700669 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700671 &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 -0700672 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
673 # 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 -0700674 &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 -0700675 &quot;maxInstances&quot;: 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.
676 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700677 &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 Kim65020912020-05-20 12:08:20 -0700678 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700679 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
680 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
681 &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.
682 &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.
683 &quot;scaleUpFactor&quot;: 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.
684 &quot;scaleDownFactor&quot;: 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.
685 &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.
686 },
687 &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.
688 },
689 &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 Kim715bd7f2019-06-14 16:50:42 -0700690}
691
692 x__xgafv: string, V1 error format.
693 Allowed values
694 1 - v1 error format
695 2 - v2 error format
696
697Returns:
698 An object of the form:
699
700 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
Bu Sun Kim65020912020-05-20 12:08:20 -0700701 &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 -0700702 &quot;maxInstances&quot;: 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.
703 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700704 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700705 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700706 &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 -0700707 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
708 # 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 -0700709 &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 -0700710 &quot;maxInstances&quot;: 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.
711 &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 Kim4ed7d3f2020-05-27 12:20:54 -0700712 &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 Kim65020912020-05-20 12:08:20 -0700713 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700714 &quot;basicAlgorithm&quot;: { # Basic algorithm for autoscaling.
715 &quot;yarnConfig&quot;: { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
716 &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.
717 &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.
718 &quot;scaleUpFactor&quot;: 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.
719 &quot;scaleDownFactor&quot;: 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.
720 &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.
721 },
722 &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.
723 },
724 &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 Kim715bd7f2019-06-14 16:50:42 -0700725 }</pre>
726</div>
727
728</body></html>