Struct aws_sdk_resiliencehub::types::PermissionModel
source · #[non_exhaustive]pub struct PermissionModel {
pub type: PermissionModelType,
pub invoker_role_name: Option<String>,
pub cross_account_role_arns: Option<Vec<String>>,
}Expand description
Defines the roles and credentials that Resilience Hub would use while creating the application, importing its resources, and running an assessment.
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.type: PermissionModelTypeDefines how Resilience Hub scans your resources. It can scan for the resources by using a pre-existing role in your Amazon Web Services account, or by using the credentials of the current IAM user.
invoker_role_name: Option<String>Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.
-
You must have
iam:passRolepermission for this role while creating or updating the application. -
Currently,
invokerRoleNameaccepts only[A-Za-z0-9_+=,.@-]characters.
cross_account_role_arns: Option<Vec<String>>Defines a list of role Amazon Resource Names (ARNs) to be used in other accounts. These ARNs are used for querying purposes while importing resources and assessing your application.
-
These ARNs are required only when your resources are in other accounts and you have different role name in these accounts. Else, the invoker role name will be used in the other accounts.
-
These roles must have a trust policy with
iam:AssumeRolepermission to the invoker role in the primary account.
Implementations§
source§impl PermissionModel
impl PermissionModel
sourcepub fn type(&self) -> &PermissionModelType
pub fn type(&self) -> &PermissionModelType
Defines how Resilience Hub scans your resources. It can scan for the resources by using a pre-existing role in your Amazon Web Services account, or by using the credentials of the current IAM user.
sourcepub fn invoker_role_name(&self) -> Option<&str>
pub fn invoker_role_name(&self) -> Option<&str>
Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment.
-
You must have
iam:passRolepermission for this role while creating or updating the application. -
Currently,
invokerRoleNameaccepts only[A-Za-z0-9_+=,.@-]characters.
sourcepub fn cross_account_role_arns(&self) -> &[String]
pub fn cross_account_role_arns(&self) -> &[String]
Defines a list of role Amazon Resource Names (ARNs) to be used in other accounts. These ARNs are used for querying purposes while importing resources and assessing your application.
-
These ARNs are required only when your resources are in other accounts and you have different role name in these accounts. Else, the invoker role name will be used in the other accounts.
-
These roles must have a trust policy with
iam:AssumeRolepermission to the invoker role in the primary account.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .cross_account_role_arns.is_none().
source§impl PermissionModel
impl PermissionModel
sourcepub fn builder() -> PermissionModelBuilder
pub fn builder() -> PermissionModelBuilder
Creates a new builder-style object to manufacture PermissionModel.
Trait Implementations§
source§impl Clone for PermissionModel
impl Clone for PermissionModel
source§fn clone(&self) -> PermissionModel
fn clone(&self) -> PermissionModel
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for PermissionModel
impl Debug for PermissionModel
source§impl PartialEq for PermissionModel
impl PartialEq for PermissionModel
source§fn eq(&self, other: &PermissionModel) -> bool
fn eq(&self, other: &PermissionModel) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for PermissionModel
Auto Trait Implementations§
impl Freeze for PermissionModel
impl RefUnwindSafe for PermissionModel
impl Send for PermissionModel
impl Sync for PermissionModel
impl Unpin for PermissionModel
impl UnwindSafe for PermissionModel
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more