Class ServiceConfig (1.9.0)

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

Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).

Attributes

NameDescription
service str
Output only. Name of the service associated with a Function. The format of this field is projects/{project}/locations/{region}/services/{service}
timeout_seconds int
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 str
The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.
environment_variables MutableMapping[str, str]
Environment variables that shall be available during function execution.
max_instance_count int
The limit on the maximum number of function instances that may coexist at a given time. In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate. See the `Max Instances
min_instance_count int
The limit on the minimum number of function instances that may coexist at a given time. Function instances are kept in idle state for a short period after they finished executing the request to reduce cold start time for subsequent requests. Setting a minimum instance count will ensure that the given number of instances are kept running in idle state always. This can help with cold start times when jump in incoming request count occurs after the idle instance would have been stopped in the default case.
vpc_connector str
The Serverless VPC Access connector that this cloud function can connect to. The format of this field is projects/*/locations/*/connectors/*.
vpc_connector_egress_settings google.cloud.functions_v2.types.ServiceConfig.VpcConnectorEgressSettings
The egress settings for the connector, controlling what traffic is diverted through it.
ingress_settings google.cloud.functions_v2.types.ServiceConfig.IngressSettings
The ingress settings for the function, controlling what traffic can reach it.
uri str
Output only. URI of the Service deployed.
service_account_email str
The email of the service's service account. If empty, defaults to {project_number}-compute@developer.gserviceaccount.com.
all_traffic_on_latest_revision bool
Whether 100% of traffic is routed to the latest revision. On CreateFunction and UpdateFunction, when set to true, the revision being deployed will serve 100% of traffic, ignoring any traffic split settings, if any. On GetFunction, true will be returned if the latest revision is serving 100% of traffic.
secret_environment_variables MutableSequence[google.cloud.functions_v2.types.SecretEnvVar]
Secret environment variables configuration.
secret_volumes MutableSequence[google.cloud.functions_v2.types.SecretVolume]
Secret volumes configuration.
revision str
Output only. The name of service revision.

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.

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.