Class CloudFunction
Describes a Cloud Function that contains user computation executed in response to an event. It encapsulate function and triggers configurations.
Inheritance
Implements
Inherited Members
Namespace: Google.Apis.CloudFunctions.v1beta2.Data
Assembly: Google.Apis.CloudFunctions.v1beta2.dll
Syntax
public class CloudFunction : IDirectResponseSchema
Properties
AvailableMemoryMb
The amount of memory in MB available for a function. Defaults to 256MB.
Declaration
[JsonProperty("availableMemoryMb")]
public virtual int? AvailableMemoryMb { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
EntryPoint
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
.
Declaration
[JsonProperty("entryPoint")]
public virtual string EntryPoint { get; set; }
Property Value
Type | Description |
---|---|
System.String |
EnvironmentVariables
Environment variables that shall be available during function execution.
Declaration
[JsonProperty("environmentVariables")]
public virtual IDictionary<string, string> EnvironmentVariables { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
System.String |
EventTrigger
A source that fires events in response to a condition in another service.
Declaration
[JsonProperty("eventTrigger")]
public virtual EventTrigger EventTrigger { get; set; }
Property Value
Type | Description |
---|---|
EventTrigger |
HttpsTrigger
An HTTPS endpoint type of source that can be triggered via URL.
Declaration
[JsonProperty("httpsTrigger")]
public virtual HTTPSTrigger HttpsTrigger { get; set; }
Property Value
Type | Description |
---|---|
HTTPSTrigger |
Labels
Labels associated with this Cloud Function.
Declaration
[JsonProperty("labels")]
public virtual IDictionary<string, string> Labels { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
LatestOperation
Output only. Name of the most recent operation modifying the function. If the function status is
DEPLOYING
or DELETING
, then it points to the active operation.
Declaration
[JsonProperty("latestOperation")]
public virtual string LatestOperation { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MaxInstances
The limit on the maximum number of function instances that may coexist at a given time.
Declaration
[JsonProperty("maxInstances")]
public virtual int? MaxInstances { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Name
A user-defined name of the function. Function names must be unique globally and match pattern
projects/locations/functions
Declaration
[JsonProperty("name")]
public virtual string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Network
The VPC Network that this cloud function can connect to. It can be either the fully-qualified URI,
or the short name of the network resource. If the short network name is used, the network must belong to the
same project. Otherwise, it must belong to a project within the same organization. The format of this field
is either projects/{project}/global/networks/{network}
or {network}
, where {project} is a project id
where the network is defined, and {network} is the short name of the network.
This field is mutually exclusive with vpc_connector
and will be replaced by it.
See the VPC documentation for more information on connecting Cloud projects.
Declaration
[JsonProperty("network")]
public virtual string Network { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Runtime
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.
Declaration
[JsonProperty("runtime")]
public virtual string Runtime { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ServiceAccount
The email of the function's service account. If empty, defaults to
{project_id}@appspot.gserviceaccount.com
.
Declaration
[JsonProperty("serviceAccount")]
public virtual string ServiceAccount { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SourceArchiveUrl
The Google Cloud Storage URL, starting with gs://, pointing to the zip archive which contains the function.
Declaration
[JsonProperty("sourceArchiveUrl")]
public virtual string SourceArchiveUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SourceRepository
The hosted repository where the function is defined.
Declaration
[JsonProperty("sourceRepository")]
public virtual SourceRepository SourceRepository { get; set; }
Property Value
Type | Description |
---|---|
SourceRepository |
SourceRepositoryUrl
The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats:
To refer to a specific commit: https://source.developers.google.com/projects/repos/revisions/paths
To
refer to a moveable alias (branch): https://source.developers.google.com/projects/repos/moveable-
aliases/paths
In particular, to refer to HEAD use master
moveable alias. To refer to a specific fixed
alias (tag): https://source.developers.google.com/projects/repos/fixed-aliases/paths
You may omit paths
if you want to use the main directory.
Declaration
[JsonProperty("sourceRepositoryUrl")]
public virtual string SourceRepositoryUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SourceUploadUrl
The Google Cloud Storage signed URL used for source uploading, generated by google.cloud.functions.v1beta2.GenerateUploadUrl
Declaration
[JsonProperty("sourceUploadUrl")]
public virtual string SourceUploadUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Status
Output only. Status of the function deployment.
Declaration
[JsonProperty("status")]
public virtual string Status { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Timeout
The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.
Declaration
[JsonProperty("timeout")]
public virtual object Timeout { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
UpdateTime
Output only. The last update timestamp of a Cloud Function.
Declaration
[JsonProperty("updateTime")]
public virtual object UpdateTime { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
VersionId
Output only. The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
Declaration
[JsonProperty("versionId")]
public virtual long? VersionId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
VpcConnector
The VPC Network Connector that this cloud function can connect to. It can be either the fully-
qualified URI, or the short name of the network connector resource. The format of this field is
projects/locations/connectors
This field is mutually exclusive with network
field and will eventually replace it.
See the VPC documentation for more information on connecting Cloud projects.
Declaration
[JsonProperty("vpcConnector")]
public virtual string VpcConnector { get; set; }
Property Value
Type | Description |
---|---|
System.String |