CfnManagedPolicyPropsMixin

class aws_cdk.cfn_property_mixins.aws_iam.CfnManagedPolicyPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a new managed policy for your AWS account .

This operation creates a policy version with a version identifier of v1 and sets v1 as the policy’s default version. For more information about policy versions, see Versioning for managed policies in the IAM User Guide .

As a best practice, you can validate your IAM policies. To learn more, see Validating IAM policies in the IAM User Guide .

For more information about managed policies in general, see Managed policies and inline policies in the IAM User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-managedpolicy.html

CloudformationResource:

AWS::IAM::ManagedPolicy

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.cfn_property_mixins import aws_iam as iam
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy
# policy_document: Any

cfn_managed_policy_props_mixin = iam.CfnManagedPolicyPropsMixin(iam.CfnManagedPolicyMixinProps(
    description="description",
    groups=["groups"],
    managed_policy_name="managedPolicyName",
    path="path",
    policy_document=policy_document,
    roles=["roles"],
    users=["users"]
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::IAM::ManagedPolicy.

Parameters:
  • props (Union[CfnManagedPolicyMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['description', 'groups', 'managedPolicyName', 'path', 'policyDocument', 'roles', 'users']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.