#[non_exhaustive]pub struct ServiceAccountSpec {
pub enable_custom_service_account: bool,
pub service_account: String,
/* private fields */
}Expand description
Configuration for the use of custom service account to run the workloads.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enable_custom_service_account: boolRequired. If true, custom user-managed service account is enforced to run any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses the Vertex AI Custom Code Service Agent.
service_account: StringOptional. Required when all below conditions are met
enable_custom_service_accountis true;- any runtime is specified via
ResourceRuntimeSpecon creation time, for example, Ray
The users must have iam.serviceAccounts.actAs permission on this service
account and then the specified runtime containers will run as it.
Do not set this field if you want to submit jobs using custom service
account to this PersistentResource after creation, but only specify the
service_account inside the job.
Implementations§
Source§impl ServiceAccountSpec
impl ServiceAccountSpec
pub fn new() -> Self
Sourcepub fn set_enable_custom_service_account<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_custom_service_account<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_custom_service_account.
Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
Trait Implementations§
Source§impl Clone for ServiceAccountSpec
impl Clone for ServiceAccountSpec
Source§fn clone(&self) -> ServiceAccountSpec
fn clone(&self) -> ServiceAccountSpec
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceAccountSpec
impl Debug for ServiceAccountSpec
Source§impl Default for ServiceAccountSpec
impl Default for ServiceAccountSpec
Source§fn default() -> ServiceAccountSpec
fn default() -> ServiceAccountSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServiceAccountSpecwhere
ServiceAccountSpec: Default,
impl<'de> Deserialize<'de> for ServiceAccountSpecwhere
ServiceAccountSpec: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for ServiceAccountSpec
impl Message for ServiceAccountSpec
Source§impl PartialEq for ServiceAccountSpec
impl PartialEq for ServiceAccountSpec
Source§impl Serialize for ServiceAccountSpec
impl Serialize for ServiceAccountSpec
impl StructuralPartialEq for ServiceAccountSpec
Auto Trait Implementations§
impl Freeze for ServiceAccountSpec
impl RefUnwindSafe for ServiceAccountSpec
impl Send for ServiceAccountSpec
impl Sync for ServiceAccountSpec
impl Unpin for ServiceAccountSpec
impl UnwindSafe for ServiceAccountSpec
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
Mutably borrows from an owned value. Read more