Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ServiceConfig

import type { ServiceConfig } from "https://googleapis.deno.dev/v1/cloudfunctions:v2.ts";

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

interface ServiceConfig {
allTrafficOnLatestRevision?: boolean;
availableCpu?: string;
availableMemory?: string;
environmentVariables?: {
[key: string]: string;
}
;
ingressSettings?:
| "INGRESS_SETTINGS_UNSPECIFIED"
| "ALLOW_ALL"
| "ALLOW_INTERNAL_ONLY"
| "ALLOW_INTERNAL_AND_GCLB";
maxInstanceCount?: number;
maxInstanceRequestConcurrency?: number;
minInstanceCount?: number;
readonly revision?: string;
secretEnvironmentVariables?: SecretEnvVar[];
secretVolumes?: SecretVolume[];
securityLevel?: "SECURITY_LEVEL_UNSPECIFIED" | "SECURE_ALWAYS" | "SECURE_OPTIONAL";
readonly service?: string;
serviceAccountEmail?: string;
timeoutSeconds?: number;
readonly uri?: string;
vpcConnector?: string;
vpcConnectorEgressSettings?: "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" | "PRIVATE_RANGES_ONLY" | "ALL_TRAFFIC";
}

§Properties

§
allTrafficOnLatestRevision?: boolean
[src]

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.

§
availableCpu?: string
[src]

The number of CPUs used in a single container instance. Default value is calculated from available memory. Supports the same values as Cloud Run, see https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements Example: "1" indicates 1 vCPU

§
availableMemory?: string
[src]

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.

§
environmentVariables?: {
[key: string]: string;
}
[src]

Environment variables that shall be available during function execution.

§
ingressSettings?: "INGRESS_SETTINGS_UNSPECIFIED" | "ALLOW_ALL" | "ALLOW_INTERNAL_ONLY" | "ALLOW_INTERNAL_AND_GCLB"
[src]

The ingress settings for the function, controlling what traffic can reach it.

§
maxInstanceCount?: number
[src]

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 Guide for more details.

§
maxInstanceRequestConcurrency?: number
[src]

Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.

§
minInstanceCount?: number
[src]

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.

§
readonly revision?: string
[src]

Output only. The name of service revision.

§
secretEnvironmentVariables?: SecretEnvVar[]
[src]

Secret environment variables configuration.

§
secretVolumes?: SecretVolume[]
[src]

Secret volumes configuration.

§
securityLevel?: "SECURITY_LEVEL_UNSPECIFIED" | "SECURE_ALWAYS" | "SECURE_OPTIONAL"
[src]

Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.

§
readonly service?: string
[src]

Output only. Name of the service associated with a Function. The format of this field is projects/{project}/locations/{region}/services/{service}

§
serviceAccountEmail?: string
[src]

The email of the service's service account. If empty, defaults to {project_number}-compute@developer.gserviceaccount.com.

§
timeoutSeconds?: number
[src]

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.

§
readonly uri?: string
[src]

Output only. URI of the Service deployed.

§
vpcConnector?: string
[src]

The Serverless VPC Access connector that this cloud function can connect to. The format of this field is projects/*\/locations/*\/connectors/*.

§
vpcConnectorEgressSettings?: "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" | "PRIVATE_RANGES_ONLY" | "ALL_TRAFFIC"
[src]

The egress settings for the connector, controlling what traffic is diverted through it.