blob: ea94c0c8d100df5c5fa7a6af196c0c6f46132502 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dataproc_v1.html">Cloud Dataproc API</a> . <a href="dataproc_v1.projects.html">projects</a> . <a href="dataproc_v1.projects.regions.html">regions</a> . <a href="dataproc_v1.projects.regions.autoscalingPolicies.html">autoscalingPolicies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates new autoscaling policy.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Retrieves autoscaling policy.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p>
91<p class="firstline">Lists autoscaling policies in the project.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED</p>
98<p class="toc_element">
99 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700101<p class="toc_element">
102 <code><a href="#update">update(name, body=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104<h3>Method Details</h3>
105<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
107 <pre>Creates new autoscaling policy.
108
109Args:
110 parent: string, Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
111For projects.regions.autoscalingPolicies.create, the resource name of the region has the following format: projects/{project_id}/regions/{region}
112For projects.locations.autoscalingPolicies.create, the resource name of the location has the following format: projects/{project_id}/locations/{location} (required)
113 body: object, The request body.
114 The object takes the form of:
115
116{ # Describes an autoscaling policy for Dataproc cluster autoscaler.
117 "id": "A String", # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
118 "secondaryWorkerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
119 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
120 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
121 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
122 },
123 "workerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
124 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
125 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
126 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
127 },
128 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
129 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
130 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
131 "basicAlgorithm": { # Basic algorithm for autoscaling.
132 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
133 "scaleDownFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job.Bounds: 0.0, 1.0.
134 "gracefulDecommissionTimeout": "A String", # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
135 "scaleDownMinWorkerFraction": 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
136 "scaleUpFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling).Bounds: 0.0, 1.0.
137 "scaleUpMinWorkerFraction": 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
138 },
139 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
140 },
141}
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.
152 "id": "A String", # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
153 "secondaryWorkerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
154 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
155 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
156 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
157 },
158 "workerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
159 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
160 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
161 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
162 },
163 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
164 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
165 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
166 "basicAlgorithm": { # Basic algorithm for autoscaling.
167 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
168 "scaleDownFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job.Bounds: 0.0, 1.0.
169 "gracefulDecommissionTimeout": "A String", # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
170 "scaleDownMinWorkerFraction": 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
171 "scaleUpFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling).Bounds: 0.0, 1.0.
172 "scaleUpMinWorkerFraction": 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
173 },
174 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
175 },
176 }</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:
184 name: string, Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
185For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
186For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} (required)
187 x__xgafv: string, V1 error format.
188 Allowed values
189 1 - v1 error format
190 2 - v2 error format
191
192Returns:
193 An object of the form:
194
195 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
196 # service Foo {
197 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
198 # }
199 # The JSON representation for Empty is empty JSON object {}.
200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="get">get(name, x__xgafv=None)</code>
205 <pre>Retrieves autoscaling policy.
206
207Args:
208 name: string, Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
209For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
210For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} (required)
211 x__xgafv: string, V1 error format.
212 Allowed values
213 1 - v1 error format
214 2 - v2 error format
215
216Returns:
217 An object of the form:
218
219 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
220 "id": "A String", # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
221 "secondaryWorkerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
222 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
223 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
224 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
225 },
226 "workerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
227 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
228 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
229 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
230 },
231 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
232 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
233 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
234 "basicAlgorithm": { # Basic algorithm for autoscaling.
235 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
236 "scaleDownFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job.Bounds: 0.0, 1.0.
237 "gracefulDecommissionTimeout": "A String", # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
238 "scaleDownMinWorkerFraction": 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
239 "scaleUpFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling).Bounds: 0.0, 1.0.
240 "scaleUpMinWorkerFraction": 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
241 },
242 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
243 },
244 }</pre>
245</div>
246
247<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
249 <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
250
251Args:
252 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required)
253 body: object, The request body.
254 The object takes the form of:
255
256{ # Request message for GetIamPolicy method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy. This field is only used by Cloud IAM.
258 "requestedPolicyVersion": 42, # Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 },
260 }
261
262 x__xgafv: string, V1 error format.
263 Allowed values
264 1 - v1 error format
265 2 - v2 error format
266
267Returns:
268 An object of the form:
269
Dan O'Mearadd494642020-05-01 07:42:23 -0700270 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.Optionally, a binding can specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both.JSON example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 # {
272 # "bindings": [
273 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700274 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 # "members": [
276 # "user:mike@example.com",
277 # "group:admins@example.com",
278 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # ]
281 # },
282 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 # "role": "roles/resourcemanager.organizationViewer",
284 # "members": ["user:eve@example.com"],
285 # "condition": {
286 # "title": "expirable access",
287 # "description": "Does not grant access after Sep 2020",
288 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
289 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 # ],
292 # "etag": "BwWWja0YfJA=",
293 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700295 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 # bindings:
297 # - members:
298 # - user:mike@example.com
299 # - group:admins@example.com
300 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
302 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700304 # - user:eve@example.com
305 # role: roles/resourcemanager.organizationViewer
306 # condition:
307 # title: expirable access
308 # description: Does not grant access after Sep 2020
309 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
310 # - etag: BwWWja0YfJA=
311 # - version: 3
312 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
313 "bindings": [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700314 { # Associates members with a role.
315 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
316 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
317 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
318 # 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 -0700319 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
321 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700322 # 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.
323 # 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.
324 # 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 -0700325 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
326 "A String",
327 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700328 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
329 # title: "Summary size limit"
330 # description: "Determines if a summary is less than 100 chars"
331 # expression: "document.summary.size() &lt; 100"
332 # Example (Equality):
333 # title: "Requestor is owner"
334 # description: "Determines if requestor is the document owner"
335 # expression: "document.owner == request.auth.claims.email"
336 # Example (Logic):
337 # title: "Public documents"
338 # description: "Determine whether the document should be publicly visible"
339 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
340 # Example (Data Manipulation):
341 # title: "Notification string"
342 # description: "Create a notification string with a timestamp."
343 # expression: "'New message received at ' + string(document.create_time)"
344 # 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.
345 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
346 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
347 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
348 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 },
350 },
351 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 "etag": "A String", # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
353 "version": 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
354 # Getting a policy that includes a conditional role binding
355 # Adding a conditional role binding to a policy
356 # Changing a conditional role binding in a policy
357 # Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 }</pre>
359</div>
360
361<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</code>
363 <pre>Lists autoscaling policies in the project.
364
365Args:
366 parent: string, Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
367For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}
368For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location} (required)
369 pageToken: string, Optional. The page token, returned by a previous call, to request the next page of results.
370 x__xgafv: string, V1 error format.
371 Allowed values
372 1 - v1 error format
373 2 - v2 error format
374 pageSize: integer, Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.
375
376Returns:
377 An object of the form:
378
379 { # A response to a request to list autoscaling policies in a project.
380 "nextPageToken": "A String", # Output only. This token is included in the response if there are more results to fetch.
381 "policies": [ # Output only. Autoscaling policies list.
382 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
383 "id": "A String", # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
384 "secondaryWorkerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
385 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
386 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
387 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
388 },
389 "workerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
390 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
391 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
392 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
393 },
394 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
395 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
396 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
397 "basicAlgorithm": { # Basic algorithm for autoscaling.
398 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
399 "scaleDownFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job.Bounds: 0.0, 1.0.
400 "gracefulDecommissionTimeout": "A String", # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
401 "scaleDownMinWorkerFraction": 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
402 "scaleUpFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling).Bounds: 0.0, 1.0.
403 "scaleUpMinWorkerFraction": 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
404 },
405 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
406 },
407 },
408 ],
409 }</pre>
410</div>
411
412<div class="method">
413 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
414 <pre>Retrieves the next page of results.
415
416Args:
417 previous_request: The request for the previous page. (required)
418 previous_response: The response from the request for the previous page. (required)
419
420Returns:
421 A request object that you can call 'execute()' on to request the next
422 page. Returns None if there are no more items in the collection.
423 </pre>
424</div>
425
426<div class="method">
427 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
428 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
429
430Args:
431 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required)
432 body: object, The request body.
433 The object takes the form of:
434
435{ # Request message for SetIamPolicy method.
436 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.Optionally, a binding can specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both.JSON example: # REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
437 # {
438 # "bindings": [
439 # {
440 # "role": "roles/resourcemanager.organizationAdmin",
441 # "members": [
442 # "user:mike@example.com",
443 # "group:admins@example.com",
444 # "domain:google.com",
445 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
446 # ]
447 # },
448 # {
449 # "role": "roles/resourcemanager.organizationViewer",
450 # "members": ["user:eve@example.com"],
451 # "condition": {
452 # "title": "expirable access",
453 # "description": "Does not grant access after Sep 2020",
454 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
455 # }
456 # }
457 # ],
458 # "etag": "BwWWja0YfJA=",
459 # "version": 3
460 # }
461 # YAML example:
462 # bindings:
463 # - members:
464 # - user:mike@example.com
465 # - group:admins@example.com
466 # - domain:google.com
467 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
468 # role: roles/resourcemanager.organizationAdmin
469 # - members:
470 # - user:eve@example.com
471 # role: roles/resourcemanager.organizationViewer
472 # condition:
473 # title: expirable access
474 # description: Does not grant access after Sep 2020
475 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
476 # - etag: BwWWja0YfJA=
477 # - version: 3
478 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
479 "bindings": [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
480 { # Associates members with a role.
481 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
482 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
483 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
484 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
485 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
486 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
487 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
488 # 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.
489 # 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.
490 # 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.
491 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
492 "A String",
493 ],
494 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
495 # title: "Summary size limit"
496 # description: "Determines if a summary is less than 100 chars"
497 # expression: "document.summary.size() &lt; 100"
498 # Example (Equality):
499 # title: "Requestor is owner"
500 # description: "Determines if requestor is the document owner"
501 # expression: "document.owner == request.auth.claims.email"
502 # Example (Logic):
503 # title: "Public documents"
504 # description: "Determine whether the document should be publicly visible"
505 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
506 # Example (Data Manipulation):
507 # title: "Notification string"
508 # description: "Create a notification string with a timestamp."
509 # expression: "'New message received at ' + string(document.create_time)"
510 # 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.
511 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
512 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
513 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
514 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
515 },
516 },
517 ],
518 "etag": "A String", # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
519 "version": 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
520 # Getting a policy that includes a conditional role binding
521 # Adding a conditional role binding to a policy
522 # Changing a conditional role binding in a policy
523 # 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.
524 },
525 }
526
527 x__xgafv: string, V1 error format.
528 Allowed values
529 1 - v1 error format
530 2 - v2 error format
531
532Returns:
533 An object of the form:
534
535 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.Optionally, a binding can specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both.JSON example:
536 # {
537 # "bindings": [
538 # {
539 # "role": "roles/resourcemanager.organizationAdmin",
540 # "members": [
541 # "user:mike@example.com",
542 # "group:admins@example.com",
543 # "domain:google.com",
544 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
545 # ]
546 # },
547 # {
548 # "role": "roles/resourcemanager.organizationViewer",
549 # "members": ["user:eve@example.com"],
550 # "condition": {
551 # "title": "expirable access",
552 # "description": "Does not grant access after Sep 2020",
553 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
554 # }
555 # }
556 # ],
557 # "etag": "BwWWja0YfJA=",
558 # "version": 3
559 # }
560 # YAML example:
561 # bindings:
562 # - members:
563 # - user:mike@example.com
564 # - group:admins@example.com
565 # - domain:google.com
566 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
567 # role: roles/resourcemanager.organizationAdmin
568 # - members:
569 # - user:eve@example.com
570 # role: roles/resourcemanager.organizationViewer
571 # condition:
572 # title: expirable access
573 # description: Does not grant access after Sep 2020
574 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
575 # - etag: BwWWja0YfJA=
576 # - version: 3
577 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
578 "bindings": [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
579 { # Associates members with a role.
580 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
581 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
582 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
583 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
584 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
585 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
586 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
587 # 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.
588 # 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.
589 # 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.
590 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
591 "A String",
592 ],
593 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
594 # title: "Summary size limit"
595 # description: "Determines if a summary is less than 100 chars"
596 # expression: "document.summary.size() &lt; 100"
597 # Example (Equality):
598 # title: "Requestor is owner"
599 # description: "Determines if requestor is the document owner"
600 # expression: "document.owner == request.auth.claims.email"
601 # Example (Logic):
602 # title: "Public documents"
603 # description: "Determine whether the document should be publicly visible"
604 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
605 # Example (Data Manipulation):
606 # title: "Notification string"
607 # description: "Create a notification string with a timestamp."
608 # expression: "'New message received at ' + string(document.create_time)"
609 # 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.
610 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
611 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
612 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
613 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
614 },
615 },
616 ],
617 "etag": "A String", # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
618 "version": 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
619 # Getting a policy that includes a conditional role binding
620 # Adding a conditional role binding to a policy
621 # Changing a conditional role binding in a policy
622 # 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.
623 }</pre>
624</div>
625
626<div class="method">
627 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700628 <pre>Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
629
630Args:
631 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 -0700632 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700633 The object takes the form of:
634
635{ # Request message for TestIamPermissions method.
636 "permissions": [ # The set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
637 "A String",
638 ],
639 }
640
641 x__xgafv: string, V1 error format.
642 Allowed values
643 1 - v1 error format
644 2 - v2 error format
645
646Returns:
647 An object of the form:
648
649 { # Response message for TestIamPermissions method.
650 "permissions": [ # A subset of TestPermissionsRequest.permissions that the caller is allowed.
651 "A String",
652 ],
653 }</pre>
654</div>
655
Dan O'Mearadd494642020-05-01 07:42:23 -0700656<div class="method">
657 <code class="details" id="update">update(name, body=None, x__xgafv=None)</code>
658 <pre>Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
659
660Args:
661 name: string, Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
662For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
663For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} (required)
664 body: object, The request body.
665 The object takes the form of:
666
667{ # Describes an autoscaling policy for Dataproc cluster autoscaler.
668 "id": "A String", # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
669 "secondaryWorkerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
670 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
671 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
672 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
673 },
674 "workerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
675 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
676 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
677 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
678 },
679 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
680 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
681 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
682 "basicAlgorithm": { # Basic algorithm for autoscaling.
683 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
684 "scaleDownFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job.Bounds: 0.0, 1.0.
685 "gracefulDecommissionTimeout": "A String", # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
686 "scaleDownMinWorkerFraction": 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
687 "scaleUpFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling).Bounds: 0.0, 1.0.
688 "scaleUpMinWorkerFraction": 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
689 },
690 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
691 },
692}
693
694 x__xgafv: string, V1 error format.
695 Allowed values
696 1 - v1 error format
697 2 - v2 error format
698
699Returns:
700 An object of the form:
701
702 { # Describes an autoscaling policy for Dataproc cluster autoscaler.
703 "id": "A String", # Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
704 "secondaryWorkerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Optional. Describes how the autoscaler will operate for secondary workers.
705 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
706 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
707 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
708 },
709 "workerConfig": { # Configuration for the size bounds of an instance group, including its proportional size to other groups. # Required. Describes how the autoscaler will operate for primary workers.
710 "minInstances": 42, # Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
711 "maxInstances": 42, # Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
712 "weight": 42, # Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
713 },
714 "name": "A String", # Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
715 # For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
716 # For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}
717 "basicAlgorithm": { # Basic algorithm for autoscaling.
718 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration.
719 "scaleDownFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job.Bounds: 0.0, 1.0.
720 "gracefulDecommissionTimeout": "A String", # Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations.Bounds: 0s, 1d.
721 "scaleDownMinWorkerFraction": 3.14, # Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
722 "scaleUpFactor": 3.14, # Required. Fraction of average pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling).Bounds: 0.0, 1.0.
723 "scaleUpMinWorkerFraction": 3.14, # Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change.Bounds: 0.0, 1.0. Default: 0.0.
724 },
725 "cooldownPeriod": "A String", # Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed.Bounds: 2m, 1d. Default: 2m.
726 },
727 }</pre>
728</div>
729
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730</body></html>