Cloud Functions v2 API - Class Function (1.5.0)

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

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

Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.

Inheritance

object > Function

Namespace

Google.Cloud.Functions.V2

Assembly

Google.Cloud.Functions.V2.dll

Constructors

Function()

public Function()

Function(Function)

public Function(Function other)
Parameter
NameDescription
otherFunction

Properties

BuildConfig

public BuildConfig BuildConfig { get; set; }

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

Property Value
TypeDescription
BuildConfig

Description

public string Description { get; set; }

User-provided description of a function.

Property Value
TypeDescription
string

Environment

public Environment Environment { get; set; }

Describe whether the function is 1st Gen or 2nd Gen.

Property Value
TypeDescription
Environment

EventTrigger

public EventTrigger EventTrigger { get; set; }

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service.

Property Value
TypeDescription
EventTrigger

FunctionName

public FunctionName FunctionName { get; set; }

FunctionName-typed view over the Name resource name property.

Property Value
TypeDescription
FunctionName

KmsKeyName

public string KmsKeyName { get; set; }

[Preview] Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources.

It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

Property Value
TypeDescription
string

KmsKeyNameAsCryptoKeyName

public CryptoKeyName KmsKeyNameAsCryptoKeyName { get; set; }

CryptoKeyName-typed view over the KmsKeyName resource name property.

Property Value
TypeDescription
CryptoKeyName

Labels

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

Labels associated with this Cloud Function.

Property Value
TypeDescription
MapFieldstringstring

Name

public string Name { get; set; }

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

Property Value
TypeDescription
string

ServiceConfig

public ServiceConfig ServiceConfig { get; set; }

Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed).

Property Value
TypeDescription
ServiceConfig

State

public Function.Types.State State { get; set; }

Output only. State of the function.

Property Value
TypeDescription
FunctionTypesState

StateMessages

public RepeatedField<StateMessage> StateMessages { get; }

Output only. State Messages for this Cloud Function.

Property Value
TypeDescription
RepeatedFieldStateMessage

UpdateTime

public Timestamp UpdateTime { get; set; }

Output only. The last update timestamp of a Cloud Function.

Property Value
TypeDescription
Timestamp

Url

public string Url { get; set; }

Output only. The deployed url for the function.

Property Value
TypeDescription
string