Struct google_api_proto::google::cloud::functions::v2alpha::BuildConfig
source · pub struct BuildConfig {
pub build: String,
pub runtime: String,
pub entry_point: String,
pub source: Option<Source>,
pub source_provenance: Option<SourceProvenance>,
pub worker_pool: String,
pub environment_variables: BTreeMap<String, String>,
pub docker_registry: i32,
pub docker_repository: String,
pub service_account: String,
pub runtime_update_policy: Option<RuntimeUpdatePolicy>,
}
Expand description
Describes the Build step of the function that builds a container from the given source.
Fields§
§build: String
Output only. The Cloud Build name of the latest successful deployment of the function.
runtime: String
The runtime in which to run the function. Required when deploying a new
function, optional when updating an existing function. For a complete
list of possible choices, see the
gcloud
command
reference.
entry_point: String
The name of the function (as defined in source code) that will be
executed. Defaults to the resource name suffix, if not specified. For
backward compatibility, if function with given name is not found, then the
system will try to use function named “function”.
For Node.js this is name of a function exported by the module specified
in source_location
.
source: Option<Source>
The location of the function source code.
source_provenance: Option<SourceProvenance>
Output only. A permanent fixed identifier for source.
worker_pool: String
Name of the Cloud Build Custom Worker Pool that should be used to build the
function. The format of this field is
projects/{project}/locations/{region}/workerPools/{workerPool}
where
{project} and {region} are the project id and region respectively where the
worker pool is defined and {workerPool} is the short name of the worker
pool.
If the project id is not the same as the function, then the Cloud Functions Service Agent (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.
environment_variables: BTreeMap<String, String>
User-provided build-time environment variables for the function
docker_registry: i32
Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry.
If unspecified, it defaults to ARTIFACT_REGISTRY
.
If docker_repository
field is specified, this field should either be left
unspecified or set to ARTIFACT_REGISTRY
.
docker_repository: String
Repository in Artifact Registry to which the function docker image will be pushed after it is built by Cloud Build. If specified by user, it is created and managed by user with a customer managed encryption key. Otherwise, GCF will create and use a repository named ‘gcf-artifacts’ for every deployed region.
It must match the pattern
projects/{project}/locations/{location}/repositories/{repository}
.
Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be ‘DOCKER’.
service_account: String
Service account to be used for building the container. The format of this
field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}
.
runtime_update_policy: Option<RuntimeUpdatePolicy>
This controls when security patches are applied to the runtime environment.
Implementations§
source§impl BuildConfig
impl BuildConfig
sourcepub fn docker_registry(&self) -> DockerRegistry
pub fn docker_registry(&self) -> DockerRegistry
Returns the enum value of docker_registry
, or the default if the field is set to an invalid enum value.
sourcepub fn set_docker_registry(&mut self, value: DockerRegistry)
pub fn set_docker_registry(&mut self, value: DockerRegistry)
Sets docker_registry
to the provided enum value.
Trait Implementations§
source§impl Clone for BuildConfig
impl Clone for BuildConfig
source§fn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BuildConfig
impl Debug for BuildConfig
source§impl Default for BuildConfig
impl Default for BuildConfig
source§impl Message for BuildConfig
impl Message for BuildConfig
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 BuildConfig
impl PartialEq for BuildConfig
source§fn eq(&self, other: &BuildConfig) -> bool
fn eq(&self, other: &BuildConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BuildConfig
Auto Trait Implementations§
impl Freeze for BuildConfig
impl RefUnwindSafe for BuildConfig
impl Send for BuildConfig
impl Sync for BuildConfig
impl Unpin for BuildConfig
impl UnwindSafe for BuildConfig
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