CfnRolePropsMixin
- class aws_cdk.mixins_preview.aws_iam.mixins.CfnRolePropsMixin(props, *, strategy=None)
Bases:
MixinCreates a new role for your AWS account .
For more information about roles, see IAM roles in the IAM User Guide . For information about quotas for role names and the number of roles you can create, see IAM and AWS STS quotas in the IAM User Guide .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
- CloudformationResource:
AWS::IAM::Role
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_iam import mixins as iam_mixins # assume_role_policy_document: Any # policy_document: Any cfn_role_props_mixin = iam_mixins.CfnRolePropsMixin(iam_mixins.CfnRoleMixinProps( assume_role_policy_document=assume_role_policy_document, description="description", managed_policy_arns=["managedPolicyArns"], max_session_duration=123, path="path", permissions_boundary="permissionsBoundary", policies=[iam_mixins.CfnRolePropsMixin.PolicyProperty( policy_document=policy_document, policy_name="policyName" )], role_name="roleName", tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::IAM::Role.- Parameters:
props (
Union[CfnRoleMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['assumeRolePolicyDocument', 'description', 'managedPolicyArns', 'maxSessionDuration', 'path', 'permissionsBoundary', 'policies', 'roleName', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
PolicyProperty
- class CfnRolePropsMixin.PolicyProperty(*, policy_document=None, policy_name=None)
Bases:
objectContains information about an attached policy.
An attached policy is a managed policy that has been attached to a user, group, or role.
For more information about managed policies, refer to Managed Policies and Inline Policies in the IAM User Guide .
- Parameters:
policy_document (
Any) – The entire contents of the policy that defines permissions. For more information, see Overview of JSON policies .policy_name (
Optional[str]) – The friendly name (not ARN) identifying the policy.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-role-policy.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iam import mixins as iam_mixins # policy_document: Any policy_property = iam_mixins.CfnRolePropsMixin.PolicyProperty( policy_document=policy_document, policy_name="policyName" )
Attributes
- policy_document
The entire contents of the policy that defines permissions.
For more information, see Overview of JSON policies .
- policy_name
The friendly name (not ARN) identifying the policy.