Compute V1 Client - Class SchedulingGracefulShutdown (2.14.1)

Reference documentation and code samples for the Compute V1 Client class SchedulingGracefulShutdown.

The configuration for gracefully shutting down the instance.

Generated from protobuf message google.cloud.compute.v1.SchedulingGracefulShutdown

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ enabled bool

Opts-in for graceful shutdown.

↳ max_duration Duration

The time allotted for the instance to gracefully shut down. If the graceful shutdown isn't complete after this time, then the instance transitions to the STOPPING state.

getEnabled

Opts-in for graceful shutdown.

Returns
Type Description
bool

hasEnabled

clearEnabled

setEnabled

Opts-in for graceful shutdown.

Parameter
Name Description
var bool
Returns
Type Description
$this

getMaxDuration

The time allotted for the instance to gracefully shut down. If the graceful shutdown isn't complete after this time, then the instance transitions to the STOPPING state.

Returns
Type Description
Duration|null

hasMaxDuration

clearMaxDuration

setMaxDuration

The time allotted for the instance to gracefully shut down. If the graceful shutdown isn't complete after this time, then the instance transitions to the STOPPING state.

Parameter
Name Description
var Duration
Returns
Type Description
$this