Struct google_api_proto::google::cloud::functions::v2::GenerateUploadUrlRequest
source · pub struct GenerateUploadUrlRequest {
pub parent: String,
pub kms_key_name: String,
pub environment: i32,
}
Expand description
Request of GenerateSourceUploadUrl
method.
Fields§
§parent: String
Required. The project and location in which the Google Cloud Storage signed
URL should be generated, specified in the format projects/*/locations/*
.
kms_key_name: String
[Preview] Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in intermediate Cloud Storage buckets. When you generate an upload url and upload your source code, it gets copied to an intermediate Cloud Storage bucket. The source code is then copied to a versioned directory in the sources bucket in the consumer project during the function deployment.
It must match the pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
.
The Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role ‘Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)’ on the Key/KeyRing/Project/Organization (least access preferred).
environment: i32
The function environment the generated upload url will be used for. The upload url for 2nd Gen functions can also be used for 1st gen functions, but not vice versa. If not specified, 2nd generation-style upload URLs are generated.
Implementations§
source§impl GenerateUploadUrlRequest
impl GenerateUploadUrlRequest
sourcepub fn environment(&self) -> Environment
pub fn environment(&self) -> Environment
Returns the enum value of environment
, or the default if the field is set to an invalid enum value.
sourcepub fn set_environment(&mut self, value: Environment)
pub fn set_environment(&mut self, value: Environment)
Sets environment
to the provided enum value.
Trait Implementations§
source§impl Clone for GenerateUploadUrlRequest
impl Clone for GenerateUploadUrlRequest
source§fn clone(&self) -> GenerateUploadUrlRequest
fn clone(&self) -> GenerateUploadUrlRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GenerateUploadUrlRequest
impl Debug for GenerateUploadUrlRequest
source§impl Default for GenerateUploadUrlRequest
impl Default for GenerateUploadUrlRequest
source§impl Message for GenerateUploadUrlRequest
impl Message for GenerateUploadUrlRequest
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 GenerateUploadUrlRequest
impl PartialEq for GenerateUploadUrlRequest
source§fn eq(&self, other: &GenerateUploadUrlRequest) -> bool
fn eq(&self, other: &GenerateUploadUrlRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GenerateUploadUrlRequest
Auto Trait Implementations§
impl Freeze for GenerateUploadUrlRequest
impl RefUnwindSafe for GenerateUploadUrlRequest
impl Send for GenerateUploadUrlRequest
impl Sync for GenerateUploadUrlRequest
impl Unpin for GenerateUploadUrlRequest
impl UnwindSafe for GenerateUploadUrlRequest
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