pub struct ServiceAccount {
pub id: String,
pub stack_permission_sets: Vec<PermissionSet>,
}Expand description
Represents a non-human identity that can be assumed by compute services such as Lambda, Cloud Run, ECS, Container Apps, etc.
Maps to:
- AWS: IAM Role
- GCP: Service Account
- Azure: User-assigned Managed Identity
The ServiceAccount is automatically created from permission profiles in the stack and contains the resolved permission sets for both stack-level and resource-scoped access.
Fields§
§id: StringIdentifier for the service account. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
stack_permission_sets: Vec<PermissionSet>Stack-level permission sets that apply to all resources in the stack. These are derived from the “*” scope in the permission profile. Resource-scoped permissions are handled by individual resource controllers.
Implementations§
Source§impl ServiceAccount
impl ServiceAccount
Sourcepub fn new(id: String) -> ServiceAccountBuilder
pub fn new(id: String) -> ServiceAccountBuilder
Create an instance of ServiceAccount using the builder syntax
Source§impl ServiceAccount
impl ServiceAccount
Sourcepub const RESOURCE_TYPE: ResourceType
pub const RESOURCE_TYPE: ResourceType
The resource type identifier for ServiceAccount
Sourcepub fn from_permission_profile(
id: String,
profile: &PermissionProfile,
permission_set_resolver: impl Fn(&str) -> Option<PermissionSet>,
) -> Result<Self>
pub fn from_permission_profile( id: String, profile: &PermissionProfile, permission_set_resolver: impl Fn(&str) -> Option<PermissionSet>, ) -> Result<Self>
Creates a ServiceAccount from a permission profile by resolving permission set references. This is used by the stack processor to convert profiles into concrete ServiceAccount resources. Only stack-level permissions (“*” scope) are processed - resource-scoped permissions are handled by individual resource controllers when they create their resources.
Trait Implementations§
Source§impl Clone for ServiceAccount
impl Clone for ServiceAccount
Source§fn clone(&self) -> ServiceAccount
fn clone(&self) -> ServiceAccount
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceAccount
impl Debug for ServiceAccount
Source§impl<'de> Deserialize<'de> for ServiceAccount
impl<'de> Deserialize<'de> for ServiceAccount
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>,
Source§impl PartialEq for ServiceAccount
impl PartialEq for ServiceAccount
Source§impl ResourceDefinition for ServiceAccount
impl ResourceDefinition for ServiceAccount
Source§fn resource_type() -> ResourceType
fn resource_type() -> ResourceType
Source§fn get_resource_type(&self) -> ResourceType
fn get_resource_type(&self) -> ResourceType
Source§fn get_dependencies(&self) -> Vec<ResourceRef>
fn get_dependencies(&self) -> Vec<ResourceRef>
Source§fn validate_update(&self, new_config: &dyn ResourceDefinition) -> Result<()>
fn validate_update(&self, new_config: &dyn ResourceDefinition) -> Result<()>
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn box_clone(&self) -> Box<dyn ResourceDefinition>
fn box_clone(&self) -> Box<dyn ResourceDefinition>
Source§fn resource_eq(&self, other: &dyn ResourceDefinition) -> bool
fn resource_eq(&self, other: &dyn ResourceDefinition) -> bool
Source§impl Serialize for ServiceAccount
impl Serialize for ServiceAccount
impl Eq for ServiceAccount
impl StructuralPartialEq for ServiceAccount
Auto Trait Implementations§
impl Freeze for ServiceAccount
impl RefUnwindSafe for ServiceAccount
impl Send for ServiceAccount
impl Sync for ServiceAccount
impl Unpin for ServiceAccount
impl UnsafeUnpin for ServiceAccount
impl UnwindSafe for ServiceAccount
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.