Google Cloud Vm Migration V1 Client - Class ComputeScheduling (1.0.0-RC1)

Reference documentation and code samples for the Google Cloud Vm Migration V1 Client class ComputeScheduling.

Scheduling information for VM on maintenance/restart behaviour and node allocation in sole tenant nodes.

Generated from protobuf message google.cloud.vmmigration.v1.ComputeScheduling

Namespace

Google \ Cloud \ VMMigration \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ on_host_maintenance int

How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.

↳ restart_type int

Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user). This configuration is identical to automaticRestart field in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart.

↳ node_affinities array<Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>

A set of node affinity and anti-affinity configurations for sole tenant nodes.

↳ min_node_cpus int

The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured.

getOnHostMaintenance

How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.

Returns
Type Description
int

setOnHostMaintenance

How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.

Parameter
Name Description
var int
Returns
Type Description
$this

getRestartType

Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user).

This configuration is identical to automaticRestart field in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart.

Returns
Type Description
int

setRestartType

Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user).

This configuration is identical to automaticRestart field in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart.

Parameter
Name Description
var int
Returns
Type Description
$this

getNodeAffinities

A set of node affinity and anti-affinity configurations for sole tenant nodes.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setNodeAffinities

A set of node affinity and anti-affinity configurations for sole tenant nodes.

Parameter
Name Description
var array<Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>
Returns
Type Description
$this

getMinNodeCpus

The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured.

Returns
Type Description
int

setMinNodeCpus

The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured.

Parameter
Name Description
var int
Returns
Type Description
$this