1<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"> 78 <code><a href="#create">create(parent, body, 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"> 87 <code><a href="#getIamPolicy">getIamPolicy(resource, 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"> 90 <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> 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"> 96 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p> 97<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p> 98<p class="toc_element"> 99 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p> 100<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"> 102 <code><a href="#update">update(name, body, 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> 104<h3>Method Details</h3> 105<div class="method"> 106 <code class="details" id="create">create(parent, body, x__xgafv=None)</code> 107 <pre>Creates new autoscaling policy. 108 109Args: 110 parent: string, Required. The "resource name" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}. (required) 111 body: object, The request body. (required) 112 The object takes the form of: 113 114{ # Describes an autoscaling policy for Dataproc cluster autoscaler. 115 "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. 116 "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. 117 "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. 118 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 119 "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. 120 }, 121 "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. 122 "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. 123 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 124 "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. 125 }, 126 "name": "A String", # Output only. The "resource name" of the policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. 127 "basicAlgorithm": { # Basic algorithm for autoscaling. 128 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration. 129 "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. 130 "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. 131 "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. 132 "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. 133 "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. 134 }, 135 "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. 136 }, 137} 138 139 x__xgafv: string, V1 error format. 140 Allowed values 141 1 - v1 error format 142 2 - v2 error format 143 144Returns: 145 An object of the form: 146 147 { # Describes an autoscaling policy for Dataproc cluster autoscaler. 148 "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. 149 "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. 150 "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. 151 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 152 "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. 153 }, 154 "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. 155 "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. 156 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 157 "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. 158 }, 159 "name": "A String", # Output only. The "resource name" of the policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. 160 "basicAlgorithm": { # Basic algorithm for autoscaling. 161 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration. 162 "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. 163 "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. 164 "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. 165 "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. 166 "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. 167 }, 168 "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. 169 }, 170 }</pre> 171</div> 172 173<div class="method"> 174 <code class="details" id="delete">delete(name, x__xgafv=None)</code> 175 <pre>Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters. 176 177Args: 178 name: string, Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. (required) 179 x__xgafv: string, V1 error format. 180 Allowed values 181 1 - v1 error format 182 2 - v2 error format 183 184Returns: 185 An object of the form: 186 187 { # 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: 188 # service Foo { 189 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 190 # } 191 # The JSON representation for Empty is empty JSON object {}. 192 }</pre> 193</div> 194 195<div class="method"> 196 <code class="details" id="get">get(name, x__xgafv=None)</code> 197 <pre>Retrieves autoscaling policy. 198 199Args: 200 name: string, Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. (required) 201 x__xgafv: string, V1 error format. 202 Allowed values 203 1 - v1 error format 204 2 - v2 error format 205 206Returns: 207 An object of the form: 208 209 { # Describes an autoscaling policy for Dataproc cluster autoscaler. 210 "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. 211 "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. 212 "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. 213 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 214 "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. 215 }, 216 "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. 217 "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. 218 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 219 "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. 220 }, 221 "name": "A String", # Output only. The "resource name" of the policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. 222 "basicAlgorithm": { # Basic algorithm for autoscaling. 223 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration. 224 "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. 225 "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. 226 "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. 227 "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. 228 "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. 229 }, 230 "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. 231 }, 232 }</pre> 233</div> 234 235<div class="method"> 236 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code> 237 <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. 238 239Args: 240 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required) 241 x__xgafv: string, V1 error format. 242 Allowed values 243 1 - v1 error format 244 2 - v2 error format 245 246Returns: 247 An object of the form: 248 249 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.JSON Example 250 # { 251 # "bindings": [ 252 # { 253 # "role": "roles/owner", 254 # "members": [ 255 # "user:mike@example.com", 256 # "group:admins@example.com", 257 # "domain:google.com", 258 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 259 # ] 260 # }, 261 # { 262 # "role": "roles/viewer", 263 # "members": ["user:sean@example.com"] 264 # } 265 # ] 266 # } 267 # YAML Example 268 # bindings: 269 # - members: 270 # - user:mike@example.com 271 # - group:admins@example.com 272 # - domain:google.com 273 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 274 # role: roles/owner 275 # - members: 276 # - user:sean@example.com 277 # role: roles/viewer 278 # For a description of IAM and its features, see the IAM developer's guide (https://cloud.google.com/iam/docs). 279 "bindings": [ # Associates a list of members to a role. bindings with no members will result in an error. 280 { # Associates members with a role. 281 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. 282 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: 283 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. 284 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. 285 # user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com . 286 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. 287 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com. 288 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com. 289 "A String", 290 ], 291 "condition": { # Represents an expression text. Example: # 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. 292 # title: "User account presence" 293 # description: "Determines whether the request has a user account" 294 # expression: "size(request.user) > 0" 295 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 296 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.The application context of the containing message determines which well-known feature set of CEL is supported. 297 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 298 "title": "A String", # An 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. 299 }, 300 }, 301 ], 302 "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.If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly. 303 "version": 42, # Deprecated. 304 }</pre> 305</div> 306 307<div class="method"> 308 <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None)</code> 309 <pre>Lists autoscaling policies in the project. 310 311Args: 312 parent: string, Required. The "resource name" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} (required) 313 pageToken: string, Optional. The page token, returned by a previous call, to request the next page of results. 314 x__xgafv: string, V1 error format. 315 Allowed values 316 1 - v1 error format 317 2 - v2 error format 318 pageSize: integer, Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100. 319 320Returns: 321 An object of the form: 322 323 { # A response to a request to list autoscaling policies in a project. 324 "nextPageToken": "A String", # Output only. This token is included in the response if there are more results to fetch. 325 "policies": [ # Output only. Autoscaling policies list. 326 { # Describes an autoscaling policy for Dataproc cluster autoscaler. 327 "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. 328 "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. 329 "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. 330 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 331 "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. 332 }, 333 "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. 334 "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. 335 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 336 "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. 337 }, 338 "name": "A String", # Output only. The "resource name" of the policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. 339 "basicAlgorithm": { # Basic algorithm for autoscaling. 340 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration. 341 "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. 342 "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. 343 "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. 344 "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. 345 "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. 346 }, 347 "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. 348 }, 349 }, 350 ], 351 }</pre> 352</div> 353 354<div class="method"> 355 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 356 <pre>Retrieves the next page of results. 357 358Args: 359 previous_request: The request for the previous page. (required) 360 previous_response: The response from the request for the previous page. (required) 361 362Returns: 363 A request object that you can call 'execute()' on to request the next 364 page. Returns None if there are no more items in the collection. 365 </pre> 366</div> 367 368<div class="method"> 369 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code> 370 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. 371 372Args: 373 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required) 374 body: object, The request body. (required) 375 The object takes the form of: 376 377{ # Request message for SetIamPolicy method. 378 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.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. 379 # { 380 # "bindings": [ 381 # { 382 # "role": "roles/owner", 383 # "members": [ 384 # "user:mike@example.com", 385 # "group:admins@example.com", 386 # "domain:google.com", 387 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 388 # ] 389 # }, 390 # { 391 # "role": "roles/viewer", 392 # "members": ["user:sean@example.com"] 393 # } 394 # ] 395 # } 396 # YAML Example 397 # bindings: 398 # - members: 399 # - user:mike@example.com 400 # - group:admins@example.com 401 # - domain:google.com 402 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 403 # role: roles/owner 404 # - members: 405 # - user:sean@example.com 406 # role: roles/viewer 407 # For a description of IAM and its features, see the IAM developer's guide (https://cloud.google.com/iam/docs). 408 "bindings": [ # Associates a list of members to a role. bindings with no members will result in an error. 409 { # Associates members with a role. 410 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. 411 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: 412 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. 413 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. 414 # user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com . 415 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. 416 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com. 417 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com. 418 "A String", 419 ], 420 "condition": { # Represents an expression text. Example: # 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. 421 # title: "User account presence" 422 # description: "Determines whether the request has a user account" 423 # expression: "size(request.user) > 0" 424 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 425 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.The application context of the containing message determines which well-known feature set of CEL is supported. 426 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 427 "title": "A String", # An 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. 428 }, 429 }, 430 ], 431 "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.If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly. 432 "version": 42, # Deprecated. 433 }, 434 } 435 436 x__xgafv: string, V1 error format. 437 Allowed values 438 1 - v1 error format 439 2 - v2 error format 440 441Returns: 442 An object of the form: 443 444 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.JSON Example 445 # { 446 # "bindings": [ 447 # { 448 # "role": "roles/owner", 449 # "members": [ 450 # "user:mike@example.com", 451 # "group:admins@example.com", 452 # "domain:google.com", 453 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 454 # ] 455 # }, 456 # { 457 # "role": "roles/viewer", 458 # "members": ["user:sean@example.com"] 459 # } 460 # ] 461 # } 462 # YAML Example 463 # bindings: 464 # - members: 465 # - user:mike@example.com 466 # - group:admins@example.com 467 # - domain:google.com 468 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 469 # role: roles/owner 470 # - members: 471 # - user:sean@example.com 472 # role: roles/viewer 473 # For a description of IAM and its features, see the IAM developer's guide (https://cloud.google.com/iam/docs). 474 "bindings": [ # Associates a list of members to a role. bindings with no members will result in an error. 475 { # Associates members with a role. 476 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. 477 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: 478 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. 479 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. 480 # user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com . 481 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. 482 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com. 483 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com. 484 "A String", 485 ], 486 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. 487 # title: "User account presence" 488 # description: "Determines whether the request has a user account" 489 # expression: "size(request.user) > 0" 490 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 491 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.The application context of the containing message determines which well-known feature set of CEL is supported. 492 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 493 "title": "A String", # An 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. 494 }, 495 }, 496 ], 497 "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.If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly. 498 "version": 42, # Deprecated. 499 }</pre> 500</div> 501 502<div class="method"> 503 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code> 504 <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. 505 506Args: 507 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) 508 body: object, The request body. (required) 509 The object takes the form of: 510 511{ # Request message for TestIamPermissions method. 512 "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). 513 "A String", 514 ], 515 } 516 517 x__xgafv: string, V1 error format. 518 Allowed values 519 1 - v1 error format 520 2 - v2 error format 521 522Returns: 523 An object of the form: 524 525 { # Response message for TestIamPermissions method. 526 "permissions": [ # A subset of TestPermissionsRequest.permissions that the caller is allowed. 527 "A String", 528 ], 529 }</pre> 530</div> 531 532<div class="method"> 533 <code class="details" id="update">update(name, body, x__xgafv=None)</code> 534 <pre>Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements. 535 536Args: 537 name: string, Output only. The "resource name" of the policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. (required) 538 body: object, The request body. (required) 539 The object takes the form of: 540 541{ # Describes an autoscaling policy for Dataproc cluster autoscaler. 542 "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. 543 "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. 544 "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. 545 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 546 "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. 547 }, 548 "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. 549 "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. 550 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 551 "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. 552 }, 553 "name": "A String", # Output only. The "resource name" of the policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. 554 "basicAlgorithm": { # Basic algorithm for autoscaling. 555 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration. 556 "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. 557 "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. 558 "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. 559 "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. 560 "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. 561 }, 562 "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. 563 }, 564} 565 566 x__xgafv: string, V1 error format. 567 Allowed values 568 1 - v1 error format 569 2 - v2 error format 570 571Returns: 572 An object of the form: 573 574 { # Describes an autoscaling policy for Dataproc cluster autoscaler. 575 "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. 576 "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. 577 "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. 578 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 579 "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. 580 }, 581 "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. 582 "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. 583 "maxInstances": 42, # Optional. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Required. Secondary workers - Bounds: [min_instances, ). Default: 0. 584 "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. 585 }, 586 "name": "A String", # Output only. The "resource name" of the policy, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}. 587 "basicAlgorithm": { # Basic algorithm for autoscaling. 588 "yarnConfig": { # Basic autoscaling configurations for YARN. # Required. YARN autoscaling configuration. 589 "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. 590 "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. 591 "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. 592 "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. 593 "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. 594 }, 595 "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. 596 }, 597 }</pre> 598</div> 599 600</body></html>