Google Cloud Vm Migration V1 Client - Class ComputeScheduling (0.5.2)

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
NameDescription
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
TypeDescription
int

setOnHostMaintenance

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

Parameter
NameDescription
var int
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$this

getNodeAffinities

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

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setNodeAffinities

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

Parameter
NameDescription
var array<Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$this