Class FromRoleArnOptions
Options allowing customizing the behavior of {@link Role.fromRoleArn}.
public class FromRoleArnOptions : IFromRoleArnOptions
- Inheritance
-
FromRoleArnOptions
- Implements
- Inherited Members
Examples
var role = Role.FromRoleArn(this, "Role", "arn:aws:iam::123456789012:role/MyExistingRole", new FromRoleArnOptions {
// Set 'mutable' to 'false' to use the role as-is and prevent adding new
// policies to it. The default is 'true', which means the role may be
// modified as part of the deployment.
Mutable = false
});
Remarks
ExampleMetadata: infused
Constructors
FromRoleArnOptions()
public FromRoleArnOptions()
Properties
AddGrantsToResources
For immutable roles: add grants to resources instead of dropping them.
public bool? AddGrantsToResources { get; set; }
Property Value
- bool?
Remarks
If this is false
or not specified, grant permissions added to this role are ignored.
It is your own responsibility to make sure the role has the required permissions.
If this is true
, any grant permissions will be added to the resource instead.
Default: false
Mutable
Whether the imported role can be modified by attaching policy resources to it.
public bool? Mutable { get; set; }
Property Value
- bool?
Remarks
Default: true