autoscaling_policies
Creates, updates, deletes, gets or lists an autoscaling_policies
resource.
Overview
Name | autoscaling_policies |
Type | Resource |
Id | google.dataproc.autoscaling_policies |
Fields
The following fields are returned by SELECT
queries:
- projects_regions_autoscaling_policies_get
- projects_locations_autoscaling_policies_get
- projects_regions_autoscaling_policies_list
- projects_locations_autoscaling_policies_list
Successful response
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. (id: BasicAutoscalingAlgorithm) |
clusterType | string | Optional. The type of the clusters for which this autoscaling policy is to be configured. |
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 | Optional. Describes how the autoscaler will operate for secondary workers. (id: InstanceGroupAutoscalingPolicyConfig) |
workerConfig | object | Required. Describes how the autoscaler will operate for primary workers. (id: InstanceGroupAutoscalingPolicyConfig) |
Successful response
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. (id: BasicAutoscalingAlgorithm) |
clusterType | string | Optional. The type of the clusters for which this autoscaling policy is to be configured. |
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 | Optional. Describes how the autoscaler will operate for secondary workers. (id: InstanceGroupAutoscalingPolicyConfig) |
workerConfig | object | Required. Describes how the autoscaler will operate for primary workers. (id: InstanceGroupAutoscalingPolicyConfig) |
Successful response
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. (id: BasicAutoscalingAlgorithm) |
clusterType | string | Optional. The type of the clusters for which this autoscaling policy is to be configured. |
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 | Optional. Describes how the autoscaler will operate for secondary workers. (id: InstanceGroupAutoscalingPolicyConfig) |
workerConfig | object | Required. Describes how the autoscaler will operate for primary workers. (id: InstanceGroupAutoscalingPolicyConfig) |
Successful response
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. (id: BasicAutoscalingAlgorithm) |
clusterType | string | Optional. The type of the clusters for which this autoscaling policy is to be configured. |
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 | Optional. Describes how the autoscaler will operate for secondary workers. (id: InstanceGroupAutoscalingPolicyConfig) |
workerConfig | object | Required. Describes how the autoscaler will operate for primary workers. (id: InstanceGroupAutoscalingPolicyConfig) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_regions_autoscaling_policies_get | select | projectsId , regionsId , autoscalingPoliciesId | Retrieves autoscaling policy. | |
projects_locations_autoscaling_policies_get | select | projectsId , locationsId , autoscalingPoliciesId | Retrieves autoscaling policy. | |
projects_regions_autoscaling_policies_list | select | projectsId , regionsId | pageSize , pageToken | Lists autoscaling policies in the project. |
projects_locations_autoscaling_policies_list | select | projectsId , locationsId | pageSize , pageToken | Lists autoscaling policies in the project. |
projects_regions_autoscaling_policies_create | insert | projectsId , regionsId | Creates new autoscaling policy. | |
projects_locations_autoscaling_policies_create | insert | projectsId , locationsId | Creates new autoscaling policy. | |
projects_regions_autoscaling_policies_update | replace | projectsId , regionsId , autoscalingPoliciesId | Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements. | |
projects_locations_autoscaling_policies_update | replace | projectsId , locationsId , autoscalingPoliciesId | Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements. | |
projects_regions_autoscaling_policies_delete | delete | projectsId , regionsId , autoscalingPoliciesId | 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_delete | delete | projectsId , locationsId , autoscalingPoliciesId | Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
autoscalingPoliciesId | string | |
locationsId | string | |
projectsId | string | |
regionsId | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- projects_regions_autoscaling_policies_get
- projects_locations_autoscaling_policies_get
- projects_regions_autoscaling_policies_list
- projects_locations_autoscaling_policies_list
Retrieves autoscaling policy.
SELECT
id,
name,
basicAlgorithm,
clusterType,
labels,
secondaryWorkerConfig,
workerConfig
FROM google.dataproc.autoscaling_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND regionsId = '{{ regionsId }}' -- required
AND autoscalingPoliciesId = '{{ autoscalingPoliciesId }}' -- required;
Retrieves autoscaling policy.
SELECT
id,
name,
basicAlgorithm,
clusterType,
labels,
secondaryWorkerConfig,
workerConfig
FROM google.dataproc.autoscaling_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND autoscalingPoliciesId = '{{ autoscalingPoliciesId }}' -- required;
Lists autoscaling policies in the project.
SELECT
id,
name,
basicAlgorithm,
clusterType,
labels,
secondaryWorkerConfig,
workerConfig
FROM google.dataproc.autoscaling_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND regionsId = '{{ regionsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Lists autoscaling policies in the project.
SELECT
id,
name,
basicAlgorithm,
clusterType,
labels,
secondaryWorkerConfig,
workerConfig
FROM google.dataproc.autoscaling_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_regions_autoscaling_policies_create
- projects_locations_autoscaling_policies_create
- Manifest
Creates new autoscaling policy.
INSERT INTO google.dataproc.autoscaling_policies (
data__id,
data__basicAlgorithm,
data__workerConfig,
data__secondaryWorkerConfig,
data__labels,
data__clusterType,
projectsId,
regionsId
)
SELECT
'{{ id }}',
'{{ basicAlgorithm }}',
'{{ workerConfig }}',
'{{ secondaryWorkerConfig }}',
'{{ labels }}',
'{{ clusterType }}',
'{{ projectsId }}',
'{{ regionsId }}'
RETURNING
id,
name,
basicAlgorithm,
clusterType,
labels,
secondaryWorkerConfig,
workerConfig
;
Creates new autoscaling policy.
INSERT INTO google.dataproc.autoscaling_policies (
data__id,
data__basicAlgorithm,
data__workerConfig,
data__secondaryWorkerConfig,
data__labels,
data__clusterType,
projectsId,
locationsId
)
SELECT
'{{ id }}',
'{{ basicAlgorithm }}',
'{{ workerConfig }}',
'{{ secondaryWorkerConfig }}',
'{{ labels }}',
'{{ clusterType }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
id,
name,
basicAlgorithm,
clusterType,
labels,
secondaryWorkerConfig,
workerConfig
;
# Description fields are for documentation purposes
- name: autoscaling_policies
props:
- name: projectsId
value: string
description: Required parameter for the autoscaling_policies resource.
- name: regionsId
value: string
description: Required parameter for the autoscaling_policies resource.
- name: locationsId
value: string
description: Required parameter for the autoscaling_policies resource.
- name: id
value: string
description: >
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: basicAlgorithm
value: object
description: >
Basic algorithm for autoscaling.
- name: workerConfig
value: object
description: >
Required. Describes how the autoscaler will operate for primary workers.
- name: secondaryWorkerConfig
value: object
description: >
Optional. Describes how the autoscaler will operate for secondary workers.
- name: labels
value: object
description: >
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.
- name: clusterType
value: string
description: >
Optional. The type of the clusters for which this autoscaling policy is to be configured.
valid_values: ['CLUSTER_TYPE_UNSPECIFIED', 'STANDARD', 'ZERO_SCALE']
REPLACE
examples
- projects_regions_autoscaling_policies_update
- projects_locations_autoscaling_policies_update
Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
REPLACE google.dataproc.autoscaling_policies
SET
data__id = '{{ id }}',
data__basicAlgorithm = '{{ basicAlgorithm }}',
data__workerConfig = '{{ workerConfig }}',
data__secondaryWorkerConfig = '{{ secondaryWorkerConfig }}',
data__labels = '{{ labels }}',
data__clusterType = '{{ clusterType }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND regionsId = '{{ regionsId }}' --required
AND autoscalingPoliciesId = '{{ autoscalingPoliciesId }}' --required
RETURNING
id,
name,
basicAlgorithm,
clusterType,
labels,
secondaryWorkerConfig,
workerConfig;
Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.
REPLACE google.dataproc.autoscaling_policies
SET
data__id = '{{ id }}',
data__basicAlgorithm = '{{ basicAlgorithm }}',
data__workerConfig = '{{ workerConfig }}',
data__secondaryWorkerConfig = '{{ secondaryWorkerConfig }}',
data__labels = '{{ labels }}',
data__clusterType = '{{ clusterType }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND autoscalingPoliciesId = '{{ autoscalingPoliciesId }}' --required
RETURNING
id,
name,
basicAlgorithm,
clusterType,
labels,
secondaryWorkerConfig,
workerConfig;
DELETE
examples
- projects_regions_autoscaling_policies_delete
- projects_locations_autoscaling_policies_delete
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
DELETE FROM google.dataproc.autoscaling_policies
WHERE projectsId = '{{ projectsId }}' --required
AND regionsId = '{{ regionsId }}' --required
AND autoscalingPoliciesId = '{{ autoscalingPoliciesId }}' --required;
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
DELETE FROM google.dataproc.autoscaling_policies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND autoscalingPoliciesId = '{{ autoscalingPoliciesId }}' --required;