Struct google_api_proto::google::cloud::run::v2::RevisionTemplate
source · pub struct RevisionTemplate {Show 14 fields
pub revision: String,
pub labels: BTreeMap<String, String>,
pub annotations: BTreeMap<String, String>,
pub scaling: Option<RevisionScaling>,
pub vpc_access: Option<VpcAccess>,
pub timeout: Option<Duration>,
pub service_account: String,
pub containers: Vec<Container>,
pub volumes: Vec<Volume>,
pub execution_environment: i32,
pub encryption_key: String,
pub max_instance_request_concurrency: i32,
pub session_affinity: bool,
pub health_check_disabled: bool,
}
Expand description
RevisionTemplate describes the data a revision should have when created from a template.
Fields§
§revision: String
Optional. The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.
labels: BTreeMap<String, String>
Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google’s billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels.
Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate.
annotations: BTreeMap<String, String>
Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.
Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate.
This field follows Kubernetes annotations' namespacing, limits, and rules.
scaling: Option<RevisionScaling>
Optional. Scaling settings for this Revision.
vpc_access: Option<VpcAccess>
Optional. VPC Access configuration to use for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
timeout: Option<Duration>
Optional. Max allowed time for an instance to respond to a request.
service_account: String
Optional. Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project’s default service account.
containers: Vec<Container>
Holds the single container that defines the unit of execution for this Revision.
volumes: Vec<Volume>
Optional. A list of Volumes to make available to containers.
execution_environment: i32
Optional. The sandbox environment to host this Revision.
encryption_key: String
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
max_instance_request_concurrency: i32
Optional. Sets the maximum number of requests that each serving instance can receive.
session_affinity: bool
Optional. Enable session affinity.
health_check_disabled: bool
Optional. Disables health checking containers during deployment.
Implementations§
source§impl RevisionTemplate
impl RevisionTemplate
sourcepub fn execution_environment(&self) -> ExecutionEnvironment
pub fn execution_environment(&self) -> ExecutionEnvironment
Returns the enum value of execution_environment
, or the default if the field is set to an invalid enum value.
sourcepub fn set_execution_environment(&mut self, value: ExecutionEnvironment)
pub fn set_execution_environment(&mut self, value: ExecutionEnvironment)
Sets execution_environment
to the provided enum value.
Trait Implementations§
source§impl Clone for RevisionTemplate
impl Clone for RevisionTemplate
source§fn clone(&self) -> RevisionTemplate
fn clone(&self) -> RevisionTemplate
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RevisionTemplate
impl Debug for RevisionTemplate
source§impl Default for RevisionTemplate
impl Default for RevisionTemplate
source§impl Message for RevisionTemplate
impl Message for RevisionTemplate
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 RevisionTemplate
impl PartialEq for RevisionTemplate
source§fn eq(&self, other: &RevisionTemplate) -> bool
fn eq(&self, other: &RevisionTemplate) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RevisionTemplate
Auto Trait Implementations§
impl Freeze for RevisionTemplate
impl RefUnwindSafe for RevisionTemplate
impl Send for RevisionTemplate
impl Sync for RevisionTemplate
impl Unpin for RevisionTemplate
impl UnwindSafe for RevisionTemplate
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