Reference documentation and code samples for the Compute V1 Client class HealthAggregationPolicy.
Represents a health aggregation policy.
A health aggregation policy resource defines a policy to aggregate health. For more information, see Health checks overview.
Generated from protobuf message google.cloud.compute.v1.HealthAggregationPolicy
Namespace
Google \ Cloud \ Compute \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ creation_timestamp |
string
Output only. [Output Only] Creation timestamp inRFC3339 text format. |
↳ description |
string
An optional description of this resource. Provide this property when you create the resource. |
↳ fingerprint |
string
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. |
↳ healthy_percent_threshold |
int
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. |
↳ id |
int|string
Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
↳ kind |
string
Output only. [Output Only] Type of the resource. Alwayscompute#healthAggregationPolicy for health aggregation policies. |
↳ min_healthy_threshold |
int
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. |
↳ name |
string
Name 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 |
↳ policy_type |
string
Specifies 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. Check the PolicyType enum for the list of possible values. |
↳ region |
string
Output 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. |
↳ self_link |
string
Output only. [Output Only] Server-defined URL for the resource. |
↳ self_link_with_id |
string
Output only. [Output Only] Server-defined URL with id for the resource. |
getCreationTimestamp
Output only. [Output Only] Creation timestamp inRFC3339 text format.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasCreationTimestamp
clearCreationTimestamp
setCreationTimestamp
Output only. [Output Only] Creation timestamp inRFC3339 text format.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDescription
An optional description of this resource. Provide this property when you create the resource.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasDescription
clearDescription
setDescription
An optional description of this resource. Provide this property when you create the resource.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFingerprint
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.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasFingerprint
clearFingerprint
setFingerprint
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.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getHealthyPercentThreshold
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.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasHealthyPercentThreshold
clearHealthyPercentThreshold
setHealthyPercentThreshold
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.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getId
Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
| Returns | |
|---|---|
| Type | Description |
int|string |
|
hasId
clearId
setId
Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
| Parameter | |
|---|---|
| Name | Description |
var |
int|string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getKind
Output only. [Output Only] Type of the resource. Alwayscompute#healthAggregationPolicy for health aggregation policies.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasKind
clearKind
setKind
Output only. [Output Only] Type of the resource. Alwayscompute#healthAggregationPolicy for health aggregation policies.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMinHealthyThreshold
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.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasMinHealthyThreshold
clearMinHealthyThreshold
setMinHealthyThreshold
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.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getName
Name 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.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasName
clearName
setName
Name 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.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPolicyType
Specifies 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.
Check the PolicyType enum for the list of possible values.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasPolicyType
clearPolicyType
setPolicyType
Specifies 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.
Check the PolicyType enum for the list of possible values.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRegion
Output 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.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasRegion
clearRegion
setRegion
Output 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.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSelfLink
Output only. [Output Only] Server-defined URL for the resource.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasSelfLink
clearSelfLink
setSelfLink
Output only. [Output Only] Server-defined URL for the resource.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSelfLinkWithId
Output only. [Output Only] Server-defined URL with id for the resource.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasSelfLinkWithId
clearSelfLinkWithId
setSelfLinkWithId
Output only. [Output Only] Server-defined URL with id for the resource.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|