ServiceConfig class final
Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).
- Inheritance
-
- Object
- ProtoMessage
- ServiceConfig
Constructors
-
ServiceConfig({String service = '', int timeoutSeconds = 0, String availableMemory = '', String availableCpu = '', Map<
String, String> environmentVariables = const {}, int maxInstanceCount = 0, int minInstanceCount = 0, String vpcConnector = '', ServiceConfig_VpcConnectorEgressSettings vpcConnectorEgressSettings = ServiceConfig_VpcConnectorEgressSettings.$default, ServiceConfig_IngressSettings ingressSettings = ServiceConfig_IngressSettings.$default, String uri = '', String serviceAccountEmail = '', bool allTrafficOnLatestRevision = false, List<SecretEnvVar> secretEnvironmentVariables = const [], List<SecretVolume> secretVolumes = const [], String revision = '', int maxInstanceRequestConcurrency = 0, ServiceConfig_SecurityLevel securityLevel = ServiceConfig_SecurityLevel.$default, String binaryAuthorizationPolicy = ''}) -
ServiceConfig.fromJson(Map<
String, dynamic> json) -
factory
Properties
- allTrafficOnLatestRevision → 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.
final
- availableCpu → String
-
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
final
- availableMemory → String
-
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.
final
- binaryAuthorizationPolicy → String
-
Optional. The binary authorization policy to be checked when deploying the
Cloud Run service.
final
-
environmentVariables
→ Map<
String, String> -
Environment variables that shall be available during function execution.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- ingressSettings → ServiceConfig_IngressSettings
-
The ingress settings for the function, controlling what traffic can reach
it.
final
- maxInstanceCount → int
-
The limit on the maximum number of function instances that may coexist at a
given time.
final
- maxInstanceRequestConcurrency → int
-
Sets the maximum number of concurrent requests that each instance
can receive. Defaults to 1.
final
- minInstanceCount → int
-
The limit on the minimum number of function instances that may coexist at a
given time.
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - revision → String
-
Output only. The name of service revision.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
secretEnvironmentVariables
→ List<
SecretEnvVar> -
Secret environment variables configuration.
final
-
secretVolumes
→ List<
SecretVolume> -
Secret volumes configuration.
final
- securityLevel → ServiceConfig_SecurityLevel
-
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.
final
- service → String
-
Output only. Name of the service associated with a Function.
The format of this field is
projects/{project}/locations/{region}/services/{service}final - serviceAccountEmail → String
-
The email of the service's service account. If empty, defaults to
{project_number}-compute@developer.gserviceaccount.com.final - timeoutSeconds → 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.
final
- uri → String
-
Output only. URI of the Service deployed.
final
- vpcConnector → String
-
The Serverless VPC Access connector that this cloud function can connect
to. The format of this field is
projects/*/locations/*/connectors/*.final - vpcConnectorEgressSettings → ServiceConfig_VpcConnectorEgressSettings
-
The egress settings for the connector, controlling what traffic is diverted
through it.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String