Class CloudFunction (0.5.1)

CloudFunction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

Attributes

NameDescription
name str
A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*
description str
User-provided description of a function.
source_archive_url str
The Google Cloud Storage URL, starting with gs://, pointing to the zip archive which contains the function.
source_repository .gcf_functions.SourceRepository
**Beta Feature** The source repository where a function is hosted.
source_upload_url str
The Google Cloud Storage signed URL used for source uploading, generated by [google.cloud.functions.v1.GenerateUploadUrl][]
https_trigger .gcf_functions.HttpsTrigger
An HTTPS endpoint type of source that can be triggered via URL.
event_trigger .gcf_functions.EventTrigger
A source that fires events in response to a condition in another service.
status .gcf_functions.CloudFunctionStatus
Output only. Status of the function deployment.
entry_point str
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.
runtime str
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 `__.
timeout .duration.Duration
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.
available_memory_mb int
The amount of memory in MB available for a function. Defaults to 256MB.
service_account_email str
The email of the function's service account. If empty, defaults to {project_id}@appspot.gserviceaccount.com.
update_time .timestamp.Timestamp
Output only. The last update timestamp of a Cloud Function.
version_id int
Output only. The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
labels Sequence[.gcf_functions.CloudFunction.LabelsEntry]
Labels associated with this Cloud Function.
environment_variables Sequence[.gcf_functions.CloudFunction.EnvironmentVariablesEntry]
Environment variables that shall be available during function execution.
network str
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
max_instances int
The limit on the maximum number of function instances that may coexist at a given time.
vpc_connector str
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
vpc_connector_egress_settings .gcf_functions.CloudFunction.VpcConnectorEgressSettings
The egress settings for the connector, controlling what traffic is diverted through it.
ingress_settings .gcf_functions.CloudFunction.IngressSettings
The ingress settings for the function, controlling what traffic can reach it.
build_id str
Output only. The Cloud Build ID of the latest successful deployment of the function.

Classes

EnvironmentVariablesEntry

EnvironmentVariablesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.

IngressSettings

IngressSettings(value)

Available ingress settings.

This controls what traffic can reach the function.

If unspecified, ALLOW_ALL will be used.

LabelsEntry

LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.

VpcConnectorEgressSettings

VpcConnectorEgressSettings(value)

Available egress settings.

This controls what traffic is diverted through the VPC Access Connector resource. By default PRIVATE_RANGES_ONLY will be used.