autoscaling_policies
Creates, updates, deletes, gets or lists a autoscaling_policies
resource.
Overview
Name | autoscaling_policies |
Type | Resource |
Id | google.dataproc.autoscaling_policies |
Fields
Name | Datatype | Description |
---|---|---|
id | 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. |
name | string | Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id} |
basicAlgorithm | object | Basic algorithm for autoscaling. |
labels | object | Optional. The labels to associate with this autoscaling policy. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy. |
secondaryWorkerConfig | object | Configuration for the size bounds of an instance group, including its proportional size to other groups. |
workerConfig | object | Configuration for the size bounds of an instance group, including its proportional size to other groups. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_autoscaling_policies_get | SELECT | autoscalingPoliciesId, locationsId, projectsId | Retrieves autoscaling policy. |
projects_locations_autoscaling_policies_list | SELECT | locationsId, projectsId | Lists autoscaling policies in the project. |
projects_regions_autoscaling_policies_get | SELECT | autoscalingPoliciesId, projectsId, regionsId | Retrieves autoscaling policy. |
projects_regions_autoscaling_policies_list | SELECT | projectsId, regionsId | Lists autoscaling policies in the project. |
projects_locations_autoscaling_policies_create | INSERT | locationsId, projectsId | Creates new autoscaling policy. |
projects_regions_autoscaling_policies_create | INSERT | projectsId, regionsId | Creates new autoscaling policy. |
projects_locations_autoscaling_policies_delete | DELETE | autoscalingPoliciesId, locationsId, projectsId | Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters. |
projects_regions_autoscaling_policies_delete | DELETE | autoscalingPoliciesId, projectsId, regionsId | Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters. |
projects_locations_autoscaling_policies_update | REPLACE | autoscalingPoliciesId, locationsId, projectsId | Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements. |
projects_regions_autoscaling_policies_update | REPLACE | autoscalingPoliciesId, projectsId, regionsId | Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements. |
SELECT
examples
Lists autoscaling policies in the project.
SELECT
id,
name,
basicAlgorithm,
labels,
secondaryWorkerConfig,
workerConfig
FROM google.dataproc.autoscaling_policies
WHERE projectsId = '{{ projectsId }}'
AND regionsId = '{{ regionsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new autoscaling_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.dataproc.autoscaling_policies (
projectsId,
regionsId,
basicAlgorithm,
workerConfig,
secondaryWorkerConfig,
labels
)
SELECT
'{{ projectsId }}',
'{{ regionsId }}',
'{{ basicAlgorithm }}',
'{{ workerConfig }}',
'{{ secondaryWorkerConfig }}',
'{{ labels }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: basicAlgorithm
value:
- name: yarnConfig
value:
- name: gracefulDecommissionTimeout
value: string
- name: scaleUpFactor
value: number
- name: scaleDownFactor
value: number
- name: scaleUpMinWorkerFraction
value: number
- name: scaleDownMinWorkerFraction
value: number
- name: sparkStandaloneConfig
value:
- name: gracefulDecommissionTimeout
value: string
- name: scaleUpFactor
value: number
- name: scaleDownFactor
value: number
- name: scaleUpMinWorkerFraction
value: number
- name: scaleDownMinWorkerFraction
value: number
- name: removeOnlyIdleWorkers
value: boolean
- name: cooldownPeriod
value: string
- name: workerConfig
value:
- name: minInstances
value: integer
- name: maxInstances
value: integer
- name: weight
value: integer
- name: labels
value: object
REPLACE
example
Replaces all fields in the specified autoscaling_policies
resource.
/*+ update */
REPLACE google.dataproc.autoscaling_policies
SET
basicAlgorithm = '{{ basicAlgorithm }}',
workerConfig = '{{ workerConfig }}',
secondaryWorkerConfig = '{{ secondaryWorkerConfig }}',
labels = '{{ labels }}'
WHERE
autoscalingPoliciesId = '{{ autoscalingPoliciesId }}'
AND projectsId = '{{ projectsId }}'
AND regionsId = '{{ regionsId }}';
DELETE
example
Deletes the specified autoscaling_policies
resource.
/*+ delete */
DELETE FROM google.dataproc.autoscaling_policies
WHERE autoscalingPoliciesId = '{{ autoscalingPoliciesId }}'
AND projectsId = '{{ projectsId }}'
AND regionsId = '{{ regionsId }}';