Class CfnManagedPolicy
Creates a new managed policy for your AWS account .
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnManagedPolicy : CfnResource, IInspectable, IManagedPolicyRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnManagedPolicy Inherits CfnResource Implements IInspectable, IManagedPolicyRef, IConstruct, IDependable, IEnvironmentAware
Remarks
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
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IAM;
var policyDocument;
var cfnManagedPolicy = new CfnManagedPolicy(this, "MyCfnManagedPolicy", new CfnManagedPolicyProps {
PolicyDocument = policyDocument,
// the properties below are optional
Description = "description",
Groups = new [] { "groups" },
ManagedPolicyName = "managedPolicyName",
Path = "path",
Roles = new [] { "roles" },
Users = new [] { "users" }
});
Synopsis
Constructors
| CfnManagedPolicy(Construct, string, ICfnManagedPolicyProps) | Create a new |
Properties
| AttrAttachmentCount | The number of principal entities (users, groups, and roles) that the policy is attached to. |
| AttrCreateDate | The date and time, in ISO 8601 date-time format , when the policy was created. |
| AttrDefaultVersionId | The identifier for the version of the policy that is set as the default (operative) version. |
| AttrIsAttachable | Specifies whether the policy can be attached to an IAM user, group, or role. |
| AttrPermissionsBoundaryUsageCount | The number of entities (users and roles) for which the policy is used as the permissions boundary. |
| AttrPolicyArn | The Amazon Resource Name (ARN) of the managed policy that you want information about. |
| AttrPolicyId | The stable and unique string identifying the policy. |
| AttrUpdateDate | The date and time, in ISO 8601 date-time format , when the policy was last updated. |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CfnProperties | Creates a new managed policy for your AWS account . |
| Description | A friendly description of the policy. |
| Groups | The name (friendly name, not ARN) of the group to attach the policy to. |
| ManagedPolicyName | The friendly name of the policy. |
| ManagedPolicyRef | A reference to a ManagedPolicy resource. |
| Path | The path for the policy. |
| PolicyDocument | The JSON policy document that you want to use as the content for the new policy. |
| Roles | The name (friendly name, not ARN) of the role to attach the policy to. |
| Users | The name (friendly name, not ARN) of the IAM user to attach the policy to. |
Methods
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnManagedPolicy(object) | Checks whether the given object is a CfnManagedPolicy. |
| RenderProperties(IDictionary<string, object>) | Creates a new managed policy for your AWS account . |
Constructors
CfnManagedPolicy(Construct, string, ICfnManagedPolicyProps)
Create a new AWS::IAM::ManagedPolicy.
public CfnManagedPolicy(Construct scope, string id, ICfnManagedPolicyProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnManagedPolicyProps
Resource properties.
Remarks
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
ExampleMetadata: fixture=_generated
Properties
AttrAttachmentCount
The number of principal entities (users, groups, and roles) that the policy is attached to.
public virtual double AttrAttachmentCount { get; }
Property Value
Remarks
CloudformationAttribute: AttachmentCount
AttrCreateDate
The date and time, in ISO 8601 date-time format , when the policy was created.
public virtual string AttrCreateDate { get; }
Property Value
Remarks
CloudformationAttribute: CreateDate
AttrDefaultVersionId
The identifier for the version of the policy that is set as the default (operative) version.
public virtual string AttrDefaultVersionId { get; }
Property Value
Remarks
For more information about policy versions, see Versioning for managed policies in the IAM User Guide .
CloudformationAttribute: DefaultVersionId
AttrIsAttachable
Specifies whether the policy can be attached to an IAM user, group, or role.
public virtual IResolvable AttrIsAttachable { get; }
Property Value
Remarks
CloudformationAttribute: IsAttachable
AttrPermissionsBoundaryUsageCount
The number of entities (users and roles) for which the policy is used as the permissions boundary.
public virtual double AttrPermissionsBoundaryUsageCount { get; }
Property Value
Remarks
For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide .
CloudformationAttribute: PermissionsBoundaryUsageCount
AttrPolicyArn
The Amazon Resource Name (ARN) of the managed policy that you want information about.
public virtual string AttrPolicyArn { get; }
Property Value
Remarks
For more information about ARNs, see Amazon Resource Names (ARNs) in the AWS General Reference .
CloudformationAttribute: PolicyArn
AttrPolicyId
The stable and unique string identifying the policy.
public virtual string AttrPolicyId { get; }
Property Value
Remarks
For more information about IDs, see IAM identifiers in the IAM User Guide .
CloudformationAttribute: PolicyId
AttrUpdateDate
The date and time, in ISO 8601 date-time format , when the policy was last updated.
public virtual string AttrUpdateDate { get; }
Property Value
Remarks
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
CloudformationAttribute: UpdateDate
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
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
ExampleMetadata: fixture=_generated
CfnProperties
Creates a new managed policy for your AWS account .
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
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
ExampleMetadata: fixture=_generated
Description
A friendly description of the policy.
public virtual string? Description { get; set; }
Property Value
Remarks
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
ExampleMetadata: fixture=_generated
Groups
The name (friendly name, not ARN) of the group to attach the policy to.
public virtual string[]? Groups { get; set; }
Property Value
string[]
Remarks
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
ExampleMetadata: fixture=_generated
ManagedPolicyName
The friendly name of the policy.
public virtual string? ManagedPolicyName { get; set; }
Property Value
Remarks
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
ExampleMetadata: fixture=_generated
ManagedPolicyRef
A reference to a ManagedPolicy resource.
public virtual IManagedPolicyReference ManagedPolicyRef { get; }
Property Value
Remarks
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
ExampleMetadata: fixture=_generated
Path
The path for the policy.
public virtual string? Path { get; set; }
Property Value
Remarks
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
ExampleMetadata: fixture=_generated
PolicyDocument
The JSON policy document that you want to use as the content for the new policy.
public virtual object PolicyDocument { get; set; }
Property Value
Remarks
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
ExampleMetadata: fixture=_generated
Roles
The name (friendly name, not ARN) of the role to attach the policy to.
public virtual string[]? Roles { get; set; }
Property Value
string[]
Remarks
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
ExampleMetadata: fixture=_generated
Users
The name (friendly name, not ARN) of the IAM user to attach the policy to.
public virtual string[]? Users { get; set; }
Property Value
string[]
Remarks
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
ExampleMetadata: fixture=_generated
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
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
ExampleMetadata: fixture=_generated
IsCfnManagedPolicy(object)
Checks whether the given object is a CfnManagedPolicy.
public static bool IsCfnManagedPolicy(object x)
Parameters
- x object
Returns
Remarks
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
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
Creates a new managed policy for your AWS account .
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
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
ExampleMetadata: fixture=_generated