Google Cloud Run V2 Client - Class BuildConfig (1.6.0)

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

Describes the Build step of the function that builds a container from the given source.

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

Namespace

Google \ Cloud \ Run \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The Cloud Build name of the latest successful deployment of the function.

↳ source_location string

The Cloud Storage bucket URI where the function source code is located.

↳ function_target string

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".

↳ image_uri string

Optional. Artifact Registry URI to store the built image.

↳ base_image string

Optional. The base image used to build the function.

↳ enable_automatic_updates bool

Optional. Sets whether the function will receive automatic base image updates.

↳ worker_pool string

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

↳ environment_variables array|Google\Protobuf\Internal\MapField

Optional. User-provided build-time environment variables for the function

↳ service_account string

Optional. Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.

getName

Output only. The Cloud Build name of the latest successful deployment of the function.

Returns
Type Description
string

setName

Output only. The Cloud Build name of the latest successful deployment of the function.

Parameter
Name Description
var string
Returns
Type Description
$this

getSourceLocation

The Cloud Storage bucket URI where the function source code is located.

Returns
Type Description
string

setSourceLocation

The Cloud Storage bucket URI where the function source code is located.

Parameter
Name Description
var string
Returns
Type Description
$this

getFunctionTarget

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".

Returns
Type Description
string

setFunctionTarget

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".

Parameter
Name Description
var string
Returns
Type Description
$this

getImageUri

Optional. Artifact Registry URI to store the built image.

Returns
Type Description
string

setImageUri

Optional. Artifact Registry URI to store the built image.

Parameter
Name Description
var string
Returns
Type Description
$this

getBaseImage

Optional. The base image used to build the function.

Returns
Type Description
string

setBaseImage

Optional. The base image used to build the function.

Parameter
Name Description
var string
Returns
Type Description
$this

getEnableAutomaticUpdates

Optional. Sets whether the function will receive automatic base image updates.

Returns
Type Description
bool

setEnableAutomaticUpdates

Optional. Sets whether the function will receive automatic base image updates.

Parameter
Name Description
var bool
Returns
Type Description
$this

getWorkerPool

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

Returns
Type Description
string

setWorkerPool

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

Parameter
Name Description
var string
Returns
Type Description
$this

getEnvironmentVariables

Optional. User-provided build-time environment variables for the function

Returns
Type Description
Google\Protobuf\Internal\MapField

setEnvironmentVariables

Optional. User-provided build-time environment variables for the function

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getServiceAccount

Optional. Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.

Returns
Type Description
string

setServiceAccount

Optional. Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.

Parameter
Name Description
var string
Returns
Type Description
$this