Reference documentation and code samples for the Compute V1 Client class VmExtensionPolicy.
Represents a VM extension policy.
Generated from protobuf message google.cloud.compute.v1.VmExtensionPolicy
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. |
↳ extension_policies |
array|Google\Protobuf\Internal\MapField
Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations. |
↳ global_resource_link |
string
Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable. |
↳ id |
int|string
Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
↳ instance_selectors |
array<VmExtensionPolicyInstanceSelector>
Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs. |
↳ kind |
string
Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy. |
↳ managed_by_global |
bool
Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy. |
↳ 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 |
↳ priority |
int
Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence. |
↳ self_link |
string
Output only. [Output Only] Server-defined fully-qualified URL for this resource. |
↳ self_link_with_id |
string
Output only. [Output Only] Server-defined URL for this resource's resource id. |
↳ state |
string
Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING. Check the State enum for the list of possible values. |
↳ update_timestamp |
string
Output only. [Output Only] Update timestamp inRFC3339 text format. |
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.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasDescription
clearDescription
setDescription
An optional description of this resource.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getExtensionPolicies
Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField |
|
setExtensionPolicies
Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.
| Parameter | |
|---|---|
| Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getGlobalResourceLink
Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasGlobalResourceLink
clearGlobalResourceLink
setGlobalResourceLink
Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| 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 |
|
getInstanceSelectors
Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<VmExtensionPolicyInstanceSelector> |
|
setInstanceSelectors
Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.
| Parameter | |
|---|---|
| Name | Description |
var |
array<VmExtensionPolicyInstanceSelector>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getKind
Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasKind
clearKind
setKind
Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getManagedByGlobal
Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy.
| Returns | |
|---|---|
| Type | Description |
bool |
|
hasManagedByGlobal
clearManagedByGlobal
setManagedByGlobal
Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| 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 |
|
getPriority
Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension.
The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasPriority
clearPriority
setPriority
Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension.
The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSelfLink
Output only. [Output Only] Server-defined fully-qualified URL for this resource.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasSelfLink
clearSelfLink
setSelfLink
Output only. [Output Only] Server-defined fully-qualified URL for this resource.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSelfLinkWithId
Output only. [Output Only] Server-defined URL for this resource's resource id.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasSelfLinkWithId
clearSelfLinkWithId
setSelfLinkWithId
Output only. [Output Only] Server-defined URL for this resource's resource id.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getState
Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING.
Check the State enum for the list of possible values.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasState
clearState
setState
Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING.
Check the State enum for the list of possible values.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUpdateTimestamp
Output only. [Output Only] Update timestamp inRFC3339 text format.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasUpdateTimestamp
clearUpdateTimestamp
setUpdateTimestamp
Output only. [Output Only] Update timestamp inRFC3339 text format.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|