Struct google_api_proto::google::cloud::functions::v2alpha::ServiceConfig
source · pub struct ServiceConfig {Show 19 fields
pub service: String,
pub timeout_seconds: i32,
pub available_memory: String,
pub available_cpu: String,
pub environment_variables: BTreeMap<String, String>,
pub max_instance_count: i32,
pub min_instance_count: i32,
pub vpc_connector: String,
pub vpc_connector_egress_settings: i32,
pub ingress_settings: i32,
pub uri: String,
pub service_account_email: String,
pub all_traffic_on_latest_revision: bool,
pub secret_environment_variables: Vec<SecretEnvVar>,
pub secret_volumes: Vec<SecretVolume>,
pub revision: String,
pub max_instance_request_concurrency: i32,
pub security_level: i32,
pub binary_authorization_policy: String,
}
Expand description
Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).
Fields§
§service: String
Output only. Name of the service associated with a Function.
The format of this field is
projects/{project}/locations/{region}/services/{service}
timeout_seconds: i32
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.
available_memory: 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_cpu: 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
environment_variables: BTreeMap<String, String>
Environment variables that shall be available during function execution.
max_instance_count: i32
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.
min_instance_count: i32
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.
vpc_connector: 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: i32
The egress settings for the connector, controlling what traffic is diverted through it.
ingress_settings: i32
The ingress settings for the function, controlling what traffic can reach it.
uri: String
Output only. URI of the Service deployed.
service_account_email: String
The email of the service’s service account. If empty, defaults to
{project_number}-compute@developer.gserviceaccount.com
.
all_traffic_on_latest_revision: 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.
secret_environment_variables: Vec<SecretEnvVar>
Secret environment variables configuration.
secret_volumes: Vec<SecretVolume>
Secret volumes configuration.
revision: String
Output only. The name of service revision.
max_instance_request_concurrency: i32
Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
security_level: i32
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.
Optional. The binary authorization policy to be checked when deploying the Cloud Run service.
Implementations§
source§impl ServiceConfig
impl ServiceConfig
sourcepub fn vpc_connector_egress_settings(&self) -> VpcConnectorEgressSettings
pub fn vpc_connector_egress_settings(&self) -> VpcConnectorEgressSettings
Returns the enum value of vpc_connector_egress_settings
, or the default if the field is set to an invalid enum value.
sourcepub fn set_vpc_connector_egress_settings(
&mut self,
value: VpcConnectorEgressSettings,
)
pub fn set_vpc_connector_egress_settings( &mut self, value: VpcConnectorEgressSettings, )
Sets vpc_connector_egress_settings
to the provided enum value.
sourcepub fn ingress_settings(&self) -> IngressSettings
pub fn ingress_settings(&self) -> IngressSettings
Returns the enum value of ingress_settings
, or the default if the field is set to an invalid enum value.
sourcepub fn set_ingress_settings(&mut self, value: IngressSettings)
pub fn set_ingress_settings(&mut self, value: IngressSettings)
Sets ingress_settings
to the provided enum value.
sourcepub fn security_level(&self) -> SecurityLevel
pub fn security_level(&self) -> SecurityLevel
Returns the enum value of security_level
, or the default if the field is set to an invalid enum value.
sourcepub fn set_security_level(&mut self, value: SecurityLevel)
pub fn set_security_level(&mut self, value: SecurityLevel)
Sets security_level
to the provided enum value.
Trait Implementations§
source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
source§fn clone(&self) -> ServiceConfig
fn clone(&self) -> ServiceConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ServiceConfig
impl Debug for ServiceConfig
source§impl Default for ServiceConfig
impl Default for ServiceConfig
source§impl Message for ServiceConfig
impl Message for ServiceConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ServiceConfig
impl PartialEq for ServiceConfig
source§fn eq(&self, other: &ServiceConfig) -> bool
fn eq(&self, other: &ServiceConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ServiceConfig
Auto Trait Implementations§
impl Freeze for ServiceConfig
impl RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl Sync for ServiceConfig
impl Unpin for ServiceConfig
impl UnwindSafe for ServiceConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request