Cloud Functions v2 API - Class BuildConfig (1.0.0)

public sealed class BuildConfig : IMessage<BuildConfig>, IEquatable<BuildConfig>, IDeepCloneable<BuildConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Functions v2 API class BuildConfig.

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

Inheritance

Object > BuildConfig

Namespace

Google.Cloud.Functions.V2

Assembly

Google.Cloud.Functions.V2.dll

Constructors

BuildConfig()

public BuildConfig()

BuildConfig(BuildConfig)

public BuildConfig(BuildConfig other)
Parameter
NameDescription
otherBuildConfig

Properties

Build

public string Build { get; set; }

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

Property Value
TypeDescription
String

BuildAsBuildName

public BuildName BuildAsBuildName { get; set; }

BuildName-typed view over the Build resource name property.

Property Value
TypeDescription
BuildName

DockerRepository

public string DockerRepository { get; set; }

Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region.

It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.

Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.

Property Value
TypeDescription
String

DockerRepositoryAsRepositoryName

public RepositoryName DockerRepositoryAsRepositoryName { get; set; }

RepositoryName-typed view over the DockerRepository resource name property.

Property Value
TypeDescription
RepositoryName

EntryPoint

public string EntryPoint { get; set; }

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". For Node.js this is name of a function exported by the module specified in source_location.

Property Value
TypeDescription
String

EnvironmentVariables

public MapField<string, string> EnvironmentVariables { get; }

User-provided build-time environment variables for the function

Property Value
TypeDescription
MapField<String, String>

Runtime

public string Runtime { get; set; }

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the gcloud command reference.

Property Value
TypeDescription
String

Source

public Source Source { get; set; }

The location of the function source code.

Property Value
TypeDescription
Source

SourceProvenance

public SourceProvenance SourceProvenance { get; set; }

Output only. A permanent fixed identifier for source.

Property Value
TypeDescription
SourceProvenance

WorkerPool

public string WorkerPool { get; set; }

Name of the Cloud Build Custom Worker Pool that should be used to build the 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.

If the project id is not the same as the function, then the Cloud Functions Service Agent (service-&lt;project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.

Property Value
TypeDescription
String

WorkerPoolAsWorkerPoolName

public WorkerPoolName WorkerPoolAsWorkerPoolName { get; set; }

WorkerPoolName-typed view over the WorkerPool resource name property.

Property Value
TypeDescription
WorkerPoolName