Skip to main content

autoscaling_policies

Creates, updates, deletes, gets or lists a autoscaling_policies resource.

Overview

Nameautoscaling_policies
TypeResource
Idgoogle.dataproc.autoscaling_policies

Fields

NameDatatypeDescription
idstringRequired. 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.
namestringOutput 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}
basicAlgorithmobjectBasic algorithm for autoscaling.
labelsobjectOptional. 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.
secondaryWorkerConfigobjectConfiguration for the size bounds of an instance group, including its proportional size to other groups.
workerConfigobjectConfiguration for the size bounds of an instance group, including its proportional size to other groups.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_autoscaling_policies_getSELECTautoscalingPoliciesId, locationsId, projectsIdRetrieves autoscaling policy.
projects_locations_autoscaling_policies_listSELECTlocationsId, projectsIdLists autoscaling policies in the project.
projects_regions_autoscaling_policies_getSELECTautoscalingPoliciesId, projectsId, regionsIdRetrieves autoscaling policy.
projects_regions_autoscaling_policies_listSELECTprojectsId, regionsIdLists autoscaling policies in the project.
projects_locations_autoscaling_policies_createINSERTlocationsId, projectsIdCreates new autoscaling policy.
projects_regions_autoscaling_policies_createINSERTprojectsId, regionsIdCreates new autoscaling policy.
projects_locations_autoscaling_policies_deleteDELETEautoscalingPoliciesId, locationsId, projectsIdDeletes 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_deleteDELETEautoscalingPoliciesId, projectsId, regionsIdDeletes 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_updateREPLACEautoscalingPoliciesId, locationsId, projectsIdUpdates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
projects_regions_autoscaling_policies_updateREPLACEautoscalingPoliciesId, projectsId, regionsIdUpdates (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.

/*+ create */
INSERT INTO google.dataproc.autoscaling_policies (
projectsId,
regionsId,
basicAlgorithm,
workerConfig,
secondaryWorkerConfig,
labels
)
SELECT
'{{ projectsId }}',
'{{ regionsId }}',
'{{ basicAlgorithm }}',
'{{ workerConfig }}',
'{{ secondaryWorkerConfig }}',
'{{ labels }}'
;

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 }}';