Reference documentation and code samples for the Cloud Functions V2 API class Google::Cloud::Functions::V2::ServiceConfig.
Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#all_traffic_on_latest_revision
def all_traffic_on_latest_revision() -> ::Boolean
- (::Boolean) — 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.
#all_traffic_on_latest_revision=
def all_traffic_on_latest_revision=(value) -> ::Boolean
- value (::Boolean) — 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.
- (::Boolean) — 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.
#available_cpu
def available_cpu() -> ::String
- (::String) — [Preview] 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
#available_cpu=
def available_cpu=(value) -> ::String
- value (::String) — [Preview] 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
- (::String) — [Preview] 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
#available_memory
def available_memory() -> ::String
- (::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.
#available_memory=
def available_memory=(value) -> ::String
- value (::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.
- (::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.
#environment_variables
def environment_variables() -> ::Google::Protobuf::Map{::String => ::String}
- (::Google::Protobuf::Map{::String => ::String}) — Environment variables that shall be available during function execution.
#environment_variables=
def environment_variables=(value) -> ::Google::Protobuf::Map{::String => ::String}
- value (::Google::Protobuf::Map{::String => ::String}) — Environment variables that shall be available during function execution.
- (::Google::Protobuf::Map{::String => ::String}) — Environment variables that shall be available during function execution.
#ingress_settings
def ingress_settings() -> ::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings
- (::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings) — The ingress settings for the function, controlling what traffic can reach it.
#ingress_settings=
def ingress_settings=(value) -> ::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings
- value (::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings) — The ingress settings for the function, controlling what traffic can reach it.
- (::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings) — The ingress settings for the function, controlling what traffic can reach it.
#max_instance_count
def max_instance_count() -> ::Integer
-
(::Integer) — 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.
#max_instance_count=
def max_instance_count=(value) -> ::Integer
-
value (::Integer) — 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.
-
(::Integer) — 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.
#max_instance_request_concurrency
def max_instance_request_concurrency() -> ::Integer
- (::Integer) — [Preview] Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
#max_instance_request_concurrency=
def max_instance_request_concurrency=(value) -> ::Integer
- value (::Integer) — [Preview] Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
- (::Integer) — [Preview] Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
#min_instance_count
def min_instance_count() -> ::Integer
-
(::Integer) — 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.
#min_instance_count=
def min_instance_count=(value) -> ::Integer
-
value (::Integer) — 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.
-
(::Integer) — 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.
#revision
def revision() -> ::String
- (::String) — Output only. The name of service revision.
#secret_environment_variables
def secret_environment_variables() -> ::Array<::Google::Cloud::Functions::V2::SecretEnvVar>
- (::Array<::Google::Cloud::Functions::V2::SecretEnvVar>) — Secret environment variables configuration.
#secret_environment_variables=
def secret_environment_variables=(value) -> ::Array<::Google::Cloud::Functions::V2::SecretEnvVar>
- value (::Array<::Google::Cloud::Functions::V2::SecretEnvVar>) — Secret environment variables configuration.
- (::Array<::Google::Cloud::Functions::V2::SecretEnvVar>) — Secret environment variables configuration.
#secret_volumes
def secret_volumes() -> ::Array<::Google::Cloud::Functions::V2::SecretVolume>
- (::Array<::Google::Cloud::Functions::V2::SecretVolume>) — Secret volumes configuration.
#secret_volumes=
def secret_volumes=(value) -> ::Array<::Google::Cloud::Functions::V2::SecretVolume>
- value (::Array<::Google::Cloud::Functions::V2::SecretVolume>) — Secret volumes configuration.
- (::Array<::Google::Cloud::Functions::V2::SecretVolume>) — Secret volumes configuration.
#security_level
def security_level() -> ::Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel
- (::Google::Cloud::Functions::V2::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.
#security_level=
def security_level=(value) -> ::Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel
- value (::Google::Cloud::Functions::V2::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.
- (::Google::Cloud::Functions::V2::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.
#service
def service() -> ::String
-
(::String) — Output only. Name of the service associated with a Function.
The format of this field is
projects/{project}/locations/{region}/services/{service}
#service_account_email
def service_account_email() -> ::String
-
(::String) — The email of the service's service account. If empty, defaults to
{project_number}-compute@developer.gserviceaccount.com
.
#service_account_email=
def service_account_email=(value) -> ::String
-
value (::String) — The email of the service's service account. If empty, defaults to
{project_number}-compute@developer.gserviceaccount.com
.
-
(::String) — The email of the service's service account. If empty, defaults to
{project_number}-compute@developer.gserviceaccount.com
.
#timeout_seconds
def timeout_seconds() -> ::Integer
- (::Integer) — 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.
#timeout_seconds=
def timeout_seconds=(value) -> ::Integer
- value (::Integer) — 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.
- (::Integer) — 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.
#uri
def uri() -> ::String
- (::String) — Output only. URI of the Service deployed.
#vpc_connector
def vpc_connector() -> ::String
-
(::String) — The Serverless VPC Access connector that this cloud function can connect
to. The format of this field is
projects/*/locations/*/connectors/*
.
#vpc_connector=
def vpc_connector=(value) -> ::String
-
value (::String) — The Serverless VPC Access connector that this cloud function can connect
to. The format of this field is
projects/*/locations/*/connectors/*
.
-
(::String) — 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
def vpc_connector_egress_settings() -> ::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings
- (::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings) — The egress settings for the connector, controlling what traffic is diverted through it.
#vpc_connector_egress_settings=
def vpc_connector_egress_settings=(value) -> ::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings
- value (::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings) — The egress settings for the connector, controlling what traffic is diverted through it.
- (::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings) — The egress settings for the connector, controlling what traffic is diverted through it.