Google Cloud Run V2 Client - Class Volume (0.8.0)

Reference documentation and code samples for the Google Cloud Run V2 Client class Volume.

Volume represents a named volume in a container.

Generated from protobuf message google.cloud.run.v2.Volume

Namespace

Google \ Cloud \ Run \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. Volume's name.

↳ secret Google\Cloud\Run\V2\SecretVolumeSource

Secret represents a secret that should populate this volume.

↳ cloud_sql_instance Google\Cloud\Run\V2\CloudSqlInstance

For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.

↳ empty_dir Google\Cloud\Run\V2\EmptyDirVolumeSource

Ephemeral storage used as a shared volume.

getName

Required. Volume's name.

Returns
TypeDescription
string

setName

Required. Volume's name.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSecret

Secret represents a secret that should populate this volume.

Returns
TypeDescription
Google\Cloud\Run\V2\SecretVolumeSource|null

hasSecret

setSecret

Secret represents a secret that should populate this volume.

Parameter
NameDescription
var Google\Cloud\Run\V2\SecretVolumeSource
Returns
TypeDescription
$this

getCloudSqlInstance

For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.

Returns
TypeDescription
Google\Cloud\Run\V2\CloudSqlInstance|null

hasCloudSqlInstance

setCloudSqlInstance

For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.

Parameter
NameDescription
var Google\Cloud\Run\V2\CloudSqlInstance
Returns
TypeDescription
$this

getEmptyDir

Ephemeral storage used as a shared volume.

Returns
TypeDescription
Google\Cloud\Run\V2\EmptyDirVolumeSource|null

hasEmptyDir

setEmptyDir

Ephemeral storage used as a shared volume.

Parameter
NameDescription
var Google\Cloud\Run\V2\EmptyDirVolumeSource
Returns
TypeDescription
$this

getVolumeType

Returns
TypeDescription
string