#[non_exhaustive]pub struct GenerateUploadUrlRequest {
pub parent: String,
pub kms_key_name: String,
pub environment: Environment,
/* private fields */
}
Expand description
Request of GenerateSourceUploadUrl
method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.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
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: Environment
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
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_kms_key_name<T: Into<String>>(self, v: T) -> Self
pub fn set_kms_key_name<T: Into<String>>(self, v: T) -> Self
Sets the value of kms_key_name.
Sourcepub fn set_environment<T: Into<Environment>>(self, v: T) -> Self
pub fn set_environment<T: Into<Environment>>(self, v: T) -> Self
Sets the value of environment.
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 more