#[non_exhaustive]pub struct InitScript {
pub gcs_uri: String,
pub gcs_generation: i64,
pub args: Vec<String>,
pub gcp_secret_manager_secret_uri: String,
/* private fields */
}Expand description
InitScript provide a simply bash script to be executed on the node.
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.gcs_uri: StringThe Cloud Storage URI for storing the init script. Format: gs://BUCKET_NAME/OBJECT_NAME The service account on the node pool must have read access to the object. User can’t configure both gcs_uri and gcp_secret_manager_secret_uri.
gcs_generation: i64The generation of the init script stored in Gloud Storage.
This is the required field to identify the version of the
init script.
User can get the genetaion from
gcloud storage objects describe gs://BUCKET_NAME/OBJECT_NAME --format="value(generation)" or from the “Version history” tab of the
object in the Cloud Console UI.
args: Vec<String>Optional. The optional arguments line to be passed to the init script.
gcp_secret_manager_secret_uri: StringThe resource name of the secret manager secret hosting the init script. Both global and regional secrets are supported with format below: Global secret: projects/{project}/secrets/{secret}/versions/{version} Regional secret: projects/{project}/locations/{location}/secrets/{secret}/versions/{version} Example: projects/1234567890/secrets/script_1/versions/1. Accept version number only, not support version alias. User can’t configure both gcp_secret_manager_secret_uri and gcs_uri.
Implementations§
Source§impl InitScript
impl InitScript
Sourcepub fn set_gcs_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_gcs_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_gcs_generation<T: Into<i64>>(self, v: T) -> Self
pub fn set_gcs_generation<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_gcp_secret_manager_secret_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_gcp_secret_manager_secret_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of gcp_secret_manager_secret_uri.
§Example
let x = InitScript::new().set_gcp_secret_manager_secret_uri("example");Trait Implementations§
Source§impl Clone for InitScript
impl Clone for InitScript
Source§fn clone(&self) -> InitScript
fn clone(&self) -> InitScript
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InitScript
impl Debug for InitScript
Source§impl Default for InitScript
impl Default for InitScript
Source§fn default() -> InitScript
fn default() -> InitScript
Source§impl PartialEq for InitScript
impl PartialEq for InitScript
Source§fn eq(&self, other: &InitScript) -> bool
fn eq(&self, other: &InitScript) -> bool
self and other values to be equal, and is used by ==.