pub struct PermissionContext {Show 14 fields
pub aws_account_id: Option<String>,
pub aws_region: Option<String>,
pub project_name: Option<String>,
pub region: Option<String>,
pub subscription_id: Option<String>,
pub resource_group: Option<String>,
pub storage_account_name: Option<String>,
pub stack_prefix: Option<String>,
pub resource_name: Option<String>,
pub service_account_name: Option<String>,
pub principal_id: Option<String>,
pub external_id: Option<String>,
pub managing_role_arn: Option<String>,
pub managing_account_id: Option<String>,
}Expand description
Context for generating permissions with type-safe variables
Fields§
§aws_account_id: Option<String>§aws_region: Option<String>§project_name: Option<String>§region: Option<String>§subscription_id: Option<String>§resource_group: Option<String>§storage_account_name: Option<String>§stack_prefix: Option<String>§resource_name: Option<String>§service_account_name: Option<String>§principal_id: Option<String>§external_id: Option<String>§managing_role_arn: Option<String>§managing_account_id: Option<String>Implementations§
Source§impl PermissionContext
impl PermissionContext
Sourcepub fn with_aws_account_id(self, aws_account_id: impl Into<String>) -> Self
pub fn with_aws_account_id(self, aws_account_id: impl Into<String>) -> Self
Builder pattern for AWS account ID
Sourcepub fn with_aws_region(self, aws_region: impl Into<String>) -> Self
pub fn with_aws_region(self, aws_region: impl Into<String>) -> Self
Builder pattern for AWS region
Sourcepub fn with_project_name(self, project_name: impl Into<String>) -> Self
pub fn with_project_name(self, project_name: impl Into<String>) -> Self
Builder pattern for GCP project name
Sourcepub fn with_region(self, region: impl Into<String>) -> Self
pub fn with_region(self, region: impl Into<String>) -> Self
Builder pattern for GCP region (used in artifact-registry, function, network permission sets)
Sourcepub fn with_subscription_id(self, subscription_id: impl Into<String>) -> Self
pub fn with_subscription_id(self, subscription_id: impl Into<String>) -> Self
Builder pattern for Azure subscription ID
Sourcepub fn with_resource_group(self, resource_group: impl Into<String>) -> Self
pub fn with_resource_group(self, resource_group: impl Into<String>) -> Self
Builder pattern for Azure resource group
Sourcepub fn with_storage_account_name(
self,
storage_account_name: impl Into<String>,
) -> Self
pub fn with_storage_account_name( self, storage_account_name: impl Into<String>, ) -> Self
Builder pattern for Azure storage account name
Sourcepub fn with_stack_prefix(self, stack_prefix: impl Into<String>) -> Self
pub fn with_stack_prefix(self, stack_prefix: impl Into<String>) -> Self
Builder pattern for stack prefix
Sourcepub fn with_resource_name(self, resource_name: impl Into<String>) -> Self
pub fn with_resource_name(self, resource_name: impl Into<String>) -> Self
Builder pattern for resource name
Sourcepub fn with_service_account_name(
self,
service_account_name: impl Into<String>,
) -> Self
pub fn with_service_account_name( self, service_account_name: impl Into<String>, ) -> Self
Builder pattern for service account name
Sourcepub fn with_principal_id(self, principal_id: impl Into<String>) -> Self
pub fn with_principal_id(self, principal_id: impl Into<String>) -> Self
Builder pattern for principal ID
Sourcepub fn with_external_id(self, external_id: impl Into<String>) -> Self
pub fn with_external_id(self, external_id: impl Into<String>) -> Self
Builder pattern for external ID
Sourcepub fn with_managing_role_arn(
self,
managing_role_arn: impl Into<String>,
) -> Self
pub fn with_managing_role_arn( self, managing_role_arn: impl Into<String>, ) -> Self
Builder pattern for managing role ARN
Sourcepub fn with_managing_account_id(
self,
managing_account_id: impl Into<String>,
) -> Self
pub fn with_managing_account_id( self, managing_account_id: impl Into<String>, ) -> Self
Builder pattern for managing account ID
Sourcepub fn extract_account_id_from_role_arn(role_arn: &str) -> Option<String>
pub fn extract_account_id_from_role_arn(role_arn: &str) -> Option<String>
Extract AWS account ID from an IAM role ARN Format: arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME
Sourcepub fn get_variable(&self, key: &str) -> Option<&str>
pub fn get_variable(&self, key: &str) -> Option<&str>
Get a variable by name (for backward compatibility with interpolation)
Trait Implementations§
Source§impl Clone for PermissionContext
impl Clone for PermissionContext
Source§fn clone(&self) -> PermissionContext
fn clone(&self) -> PermissionContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more