Compute V1 Client - Class AcceleratorConfig (1.11.1)

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

A specification of the type and number of accelerator cards attached to the instance.

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

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ accelerator_count int

The number of the guest accelerator cards exposed to this instance.

↳ accelerator_type string

Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.

getAcceleratorCount

The number of the guest accelerator cards exposed to this instance.

Returns
TypeDescription
int

hasAcceleratorCount

clearAcceleratorCount

setAcceleratorCount

The number of the guest accelerator cards exposed to this instance.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getAcceleratorType

Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.

Returns
TypeDescription
string

hasAcceleratorType

clearAcceleratorType

setAcceleratorType

Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.

Parameter
NameDescription
var string
Returns
TypeDescription
$this