Compute V1 Client - Class AcceleratorConfig (1.16.2)

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
Name Description
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
Type Description
int

hasAcceleratorCount

clearAcceleratorCount

setAcceleratorCount

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

Parameter
Name Description
var int
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$this