Interface ServiceConfigOrBuilder (2.10.0)

publicinterface ServiceConfigOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

containsEnvironmentVariables(String key)

publicabstractbooleancontainsEnvironmentVariables(Stringkey)

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameter
Name Description
key String
Returns
Type Description

getAllTrafficOnLatestRevision()

publicabstractbooleangetAllTrafficOnLatestRevision()

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.

bool all_traffic_on_latest_revision = 16;

Returns
Type Description
boolean

The allTrafficOnLatestRevision.

getAvailableMemory()

publicabstractStringgetAvailableMemory()

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.

string available_memory = 13;

Returns
Type Description
String

The availableMemory.

getAvailableMemoryBytes()

publicabstractByteStringgetAvailableMemoryBytes()

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.

string available_memory = 13;

Returns
Type Description
ByteString

The bytes for availableMemory.

getEnvironmentVariables()

publicabstractMap<String,String>getEnvironmentVariables()
Returns
Type Description

getEnvironmentVariablesCount()

publicabstractintgetEnvironmentVariablesCount()

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Returns
Type Description
int

getEnvironmentVariablesMap()

publicabstractMap<String,String>getEnvironmentVariablesMap()

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Returns
Type Description

getEnvironmentVariablesOrDefault(String key, String defaultValue)

publicabstractStringgetEnvironmentVariablesOrDefault(Stringkey,StringdefaultValue)

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description

getEnvironmentVariablesOrThrow(String key)

publicabstractStringgetEnvironmentVariablesOrThrow(Stringkey)

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameter
Name Description
key String
Returns
Type Description

getIngressSettings()

publicabstractServiceConfig.IngressSettingsgetIngressSettings()

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

.google.cloud.functions.v2beta.ServiceConfig.IngressSettings ingress_settings = 8;

Returns
Type Description
ServiceConfig.IngressSettings

The ingressSettings.

getIngressSettingsValue()

publicabstractintgetIngressSettingsValue()

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

.google.cloud.functions.v2beta.ServiceConfig.IngressSettings ingress_settings = 8;

Returns
Type Description
int

The enum numeric value on the wire for ingressSettings.

getMaxInstanceCount()

publicabstractintgetMaxInstanceCount()

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.

int32 max_instance_count = 5;

Returns
Type Description
int

The maxInstanceCount.

getMinInstanceCount()

publicabstractintgetMinInstanceCount()

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.

int32 min_instance_count = 12;

Returns
Type Description
int

The minInstanceCount.

getRevision()

publicabstractStringgetRevision()

Output only. The name of service revision.

string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The revision.

getRevisionBytes()

publicabstractByteStringgetRevisionBytes()

Output only. The name of service revision.

string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for revision.

getSecretEnvironmentVariables(int index)

publicabstractSecretEnvVargetSecretEnvironmentVariables(intindex)

Secret environment variables configuration.

repeated .google.cloud.functions.v2beta.SecretEnvVar secret_environment_variables = 17;

Parameter
Name Description
index int
Returns
Type Description

getSecretEnvironmentVariablesCount()

publicabstractintgetSecretEnvironmentVariablesCount()

Secret environment variables configuration.

repeated .google.cloud.functions.v2beta.SecretEnvVar secret_environment_variables = 17;

Returns
Type Description
int

getSecretEnvironmentVariablesList()

publicabstractList<SecretEnvVar>getSecretEnvironmentVariablesList()

Secret environment variables configuration.

repeated .google.cloud.functions.v2beta.SecretEnvVar secret_environment_variables = 17;

Returns
Type Description

getSecretEnvironmentVariablesOrBuilder(int index)

publicabstractSecretEnvVarOrBuildergetSecretEnvironmentVariablesOrBuilder(intindex)

Secret environment variables configuration.

repeated .google.cloud.functions.v2beta.SecretEnvVar secret_environment_variables = 17;

Parameter
Name Description
index int
Returns
Type Description

getSecretEnvironmentVariablesOrBuilderList()

publicabstractList<?extendsSecretEnvVarOrBuilder>getSecretEnvironmentVariablesOrBuilderList()

Secret environment variables configuration.

repeated .google.cloud.functions.v2beta.SecretEnvVar secret_environment_variables = 17;

Returns
Type Description
List<? extends com.google.cloud.functions.v2beta.SecretEnvVarOrBuilder>

getSecretVolumes(int index)

publicabstractSecretVolumegetSecretVolumes(intindex)

Secret volumes configuration.

repeated .google.cloud.functions.v2beta.SecretVolume secret_volumes = 19;

Parameter
Name Description
index int
Returns
Type Description

getSecretVolumesCount()

publicabstractintgetSecretVolumesCount()

Secret volumes configuration.

repeated .google.cloud.functions.v2beta.SecretVolume secret_volumes = 19;

Returns
Type Description
int

getSecretVolumesList()

publicabstractList<SecretVolume>getSecretVolumesList()

Secret volumes configuration.

repeated .google.cloud.functions.v2beta.SecretVolume secret_volumes = 19;

Returns
Type Description

getSecretVolumesOrBuilder(int index)

publicabstractSecretVolumeOrBuildergetSecretVolumesOrBuilder(intindex)

Secret volumes configuration.

repeated .google.cloud.functions.v2beta.SecretVolume secret_volumes = 19;

Parameter
Name Description
index int
Returns
Type Description

getSecretVolumesOrBuilderList()

publicabstractList<?extendsSecretVolumeOrBuilder>getSecretVolumesOrBuilderList()

Secret volumes configuration.

repeated .google.cloud.functions.v2beta.SecretVolume secret_volumes = 19;

Returns
Type Description
List<? extends com.google.cloud.functions.v2beta.SecretVolumeOrBuilder>

getService()

publicabstractStringgetService()

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

string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The service.

getServiceAccountEmail()

publicabstractStringgetServiceAccountEmail()

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

string service_account_email = 10;

Returns
Type Description
String

The serviceAccountEmail.

getServiceAccountEmailBytes()

publicabstractByteStringgetServiceAccountEmailBytes()

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

string service_account_email = 10;

Returns
Type Description
ByteString

The bytes for serviceAccountEmail.

getServiceBytes()

publicabstractByteStringgetServiceBytes()

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

string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for service.

getTimeoutSeconds()

publicabstractintgetTimeoutSeconds()

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.

int32 timeout_seconds = 2;

Returns
Type Description
int

The timeoutSeconds.

getUri()

publicabstractStringgetUri()

Output only. URI of the Service deployed.

string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uri.

getUriBytes()

publicabstractByteStringgetUriBytes()

Output only. URI of the Service deployed.

string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uri.

getVpcConnector()

publicabstractStringgetVpcConnector()

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

string vpc_connector = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The vpcConnector.

getVpcConnectorBytes()

publicabstractByteStringgetVpcConnectorBytes()

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

string vpc_connector = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for vpcConnector.

getVpcConnectorEgressSettings()

publicabstractServiceConfig.VpcConnectorEgressSettingsgetVpcConnectorEgressSettings()

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

.google.cloud.functions.v2beta.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7;

Returns
Type Description
ServiceConfig.VpcConnectorEgressSettings

The vpcConnectorEgressSettings.

getVpcConnectorEgressSettingsValue()

publicabstractintgetVpcConnectorEgressSettingsValue()

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

.google.cloud.functions.v2beta.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7;

Returns
Type Description
int

The enum numeric value on the wire for vpcConnectorEgressSettings.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.