Cloud Functions V2 API - Class Google::Cloud::Functions::V2::ServiceConfig (v0.9.0)

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
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns
  • (::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

#available_cpu=

def available_cpu=(value) -> ::String
Parameter
  • value (::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
Returns
  • (::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

#available_memory

def available_memory() -> ::String
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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.

#binary_authorization_policy

def binary_authorization_policy() -> ::String
Returns
  • (::String) — Optional. The binary authorization policy to be checked when deploying the Cloud Run service.

#binary_authorization_policy=

def binary_authorization_policy=(value) -> ::String
Parameter
  • value (::String) — Optional. The binary authorization policy to be checked when deploying the Cloud Run service.
Returns
  • (::String) — Optional. The binary authorization policy to be checked when deploying the Cloud Run service.

#environment_variables

def environment_variables() -> ::Google::Protobuf::Map{::String => ::String}
Returns
  • (::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}
Parameter
  • value (::Google::Protobuf::Map{::String => ::String}) — Environment variables that shall be available during function execution.
Returns
  • (::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
Returns

#ingress_settings=

def ingress_settings=(value) -> ::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings
Parameter
Returns

#max_instance_count

def max_instance_count() -> ::Integer
Returns
  • (::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
Parameter
  • 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.

Returns
  • (::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
Returns
  • (::Integer) — 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
Parameter
  • value (::Integer) — Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
Returns
  • (::Integer) — Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.

#min_instance_count

def min_instance_count() -> ::Integer
Returns
  • (::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
Parameter
  • 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.

Returns
  • (::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
Returns
  • (::String) — Output only. The name of service revision.

#secret_environment_variables

def secret_environment_variables() -> ::Array<::Google::Cloud::Functions::V2::SecretEnvVar>
Returns

#secret_environment_variables=

def secret_environment_variables=(value) -> ::Array<::Google::Cloud::Functions::V2::SecretEnvVar>
Parameter
Returns

#secret_volumes

def secret_volumes() -> ::Array<::Google::Cloud::Functions::V2::SecretVolume>
Returns

#secret_volumes=

def secret_volumes=(value) -> ::Array<::Google::Cloud::Functions::V2::SecretVolume>
Parameter
Returns

#security_level

def security_level() -> ::Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel
Returns

#security_level=

def security_level=(value) -> ::Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel
Parameter
  • 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.
Returns

#service

def service() -> ::String
Returns
  • (::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
Returns
  • (::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
Parameter
  • value (::String) — The email of the service's service account. If empty, defaults to {project_number}-compute@developer.gserviceaccount.com.
Returns
  • (::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
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns
  • (::String) — Output only. URI of the Service deployed.

#vpc_connector

def vpc_connector() -> ::String
Returns
  • (::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
Parameter
  • value (::String) — The Serverless VPC Access connector that this cloud function can connect to. The format of this field is projects/*/locations/*/connectors/*.
Returns
  • (::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
Returns

#vpc_connector_egress_settings=

def vpc_connector_egress_settings=(value) -> ::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings
Parameter
Returns