Skip to main content

region_health_aggregation_policies

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

Overview

Nameregion_health_aggregation_policies
TypeResource
Idgoogle.compute.region_health_aggregation_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uint64)Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestringName of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. (pattern: [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)
creationTimestampstringOutput only. [Output Only] Creation timestamp inRFC3339 text format.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
fingerprintstring (byte)Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthAggregationPolicy. An up-to-date fingerprint must be provided in order to patch the HealthAggregationPolicy; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthAggregationPolicy.
healthyPercentThresholdinteger (uint32)Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies the threshold (as a percentage) of healthy endpoints required in order to consider the aggregated health result HEALTHY. Defaults to 60. Must be in range [0, 100]. Not applicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional, and will be set to the default if unspecified. Note that both this threshold and minHealthyThreshold must be satisfied in order for HEALTHY to be the aggregated result. "Endpoints" refers to network endpoints within a Network Endpoint Group or instances within an Instance Group.
kindstringOutput only. [Output Only] Type of the resource. Alwayscompute#healthAggregationPolicy for health aggregation policies. (default: compute#healthAggregationPolicy)
minHealthyThresholdinteger (uint32)Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies the minimum number of healthy endpoints required in order to consider the aggregated health result HEALTHY. Defaults to 1. Must be positive. Not applicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional, and will be set to the default if unspecified. Note that both this threshold and healthyPercentThreshold must be satisfied in order for HEALTHY to be the aggregated result. "Endpoints" refers to network endpoints within a Network Endpoint Group or instances within an Instance Group.
policyTypestringSpecifies the type of the healthAggregationPolicy. The only allowed value for global resources is DNS_PUBLIC_IP_POLICY. The only allowed value for regional resources is BACKEND_SERVICE_POLICY. Must be specified when the healthAggregationPolicy is created, and cannot be mutated. (BACKEND_SERVICE_POLICY, DNS_PUBLIC_IP_POLICY)
regionstringOutput only. [Output Only] URL of the region where the health aggregation policy resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
selfLinkstringOutput only. [Output Only] Server-defined URL for the resource.
selfLinkWithIdstringOutput only. [Output Only] Server-defined URL with id for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, region, healthAggregationPolicyReturns the specified HealthAggregationPolicy resource in the given region.
listselectproject, regionmaxResults, pageToken, filter, orderBy, returnPartialSuccessLists the HealthAggregationPolicies for a project in the given region.
aggregated_listselectprojectincludeAllScopes, orderBy, maxResults, pageToken, filter, serviceProjectNumber, returnPartialSuccessRetrieves the list of all HealthAggregationPolicy resources,
regional and global, available to the specified project.

To prevent failure, it is recommended that you set the
returnPartialSuccess parameter to true.
insertinsertproject, regionrequestIdCreate a HealthAggregationPolicy in the specified project in the given
region using the parameters that are included in the request.
patchupdateproject, region, healthAggregationPolicyrequestIdUpdates the specified regional HealthAggregationPolicy
resource with the data included in the request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules.
deletedeleteproject, region, healthAggregationPolicyrequestIdDeletes the specified HealthAggregationPolicy in the given region.

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.

NameDatatypeDescription
healthAggregationPolicystring
projectstring
regionstring
filterstring
includeAllScopesboolean
maxResultsinteger (uint32)
orderBystring
pageTokenstring
requestIdstring
returnPartialSuccessboolean
serviceProjectNumberstring (int64)

SELECT examples

Returns the specified HealthAggregationPolicy resource in the given region.

SELECT
id,
name,
creationTimestamp,
description,
fingerprint,
healthyPercentThreshold,
kind,
minHealthyThreshold,
policyType,
region,
selfLink,
selfLinkWithId
FROM google.compute.region_health_aggregation_policies
WHERE project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND healthAggregationPolicy = '{{ healthAggregationPolicy }}' -- required
;

INSERT examples

Create a HealthAggregationPolicy in the specified project in the given
region using the parameters that are included in the request.

INSERT INTO google.compute.region_health_aggregation_policies (
data__name,
data__healthyPercentThreshold,
data__fingerprint,
data__description,
data__minHealthyThreshold,
data__policyType,
project,
region,
requestId
)
SELECT
'{{ name }}',
{{ healthyPercentThreshold }},
'{{ fingerprint }}',
'{{ description }}',
{{ minHealthyThreshold }},
'{{ policyType }}',
'{{ project }}',
'{{ region }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;

UPDATE examples

Updates the specified regional HealthAggregationPolicy
resource with the data included in the request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules.

UPDATE google.compute.region_health_aggregation_policies
SET
data__name = '{{ name }}',
data__healthyPercentThreshold = {{ healthyPercentThreshold }},
data__fingerprint = '{{ fingerprint }}',
data__description = '{{ description }}',
data__minHealthyThreshold = {{ minHealthyThreshold }},
data__policyType = '{{ policyType }}'
WHERE
project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND healthAggregationPolicy = '{{ healthAggregationPolicy }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;

DELETE examples

Deletes the specified HealthAggregationPolicy in the given region.

DELETE FROM google.compute.region_health_aggregation_policies
WHERE project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND healthAggregationPolicy = '{{ healthAggregationPolicy }}' --required
AND requestId = '{{ requestId }}'
;