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.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes
Name | Description |
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.
This field is a member of oneof _ source_code .
|
source_repository |
google.cloud.functions_v1.types.SourceRepository
**Beta Feature** The source repository where a function is hosted. This field is a member of oneof _ source_code .
|
source_upload_url |
str
The Google Cloud Storage signed URL used for source uploading, generated by calling [google.cloud.functions.v1.GenerateUploadUrl]. The signature is validated on write methods (Create, Update) The signature is stripped from the Function object on read methods (Get, List) This field is a member of oneof _ source_code .
|
https_trigger |
google.cloud.functions_v1.types.HttpsTrigger
An HTTPS endpoint type of source that can be triggered via URL. This field is a member of oneof _ trigger .
|
event_trigger |
google.cloud.functions_v1.types.EventTrigger
A source that fires events in response to a condition in another service. This field is a member of oneof _ trigger .
|
status |
google.cloud.functions_v1.types.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 |
google.protobuf.duration_pb2.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 |
google.protobuf.timestamp_pb2.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[google.cloud.functions_v1.types.CloudFunction.LabelsEntry]
Labels associated with this Cloud Function. |
environment_variables |
Sequence[google.cloud.functions_v1.types.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 |
google.cloud.functions_v1.types.CloudFunction.VpcConnectorEgressSettings
The egress settings for the connector, controlling what traffic is diverted through it. |
ingress_settings |
google.cloud.functions_v1.types.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.
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
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 |
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.
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
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 |
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.