Show / Hide Table of Contents

Class ManagedPolicy

Managed policy.

Inheritance
System.Object
Construct
Resource
ManagedPolicy
Implements
IResource
IConstruct
IDependable
IManagedPolicy
Inherited Members
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.ToString()
Construct.Node
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.AWS.IAM.dll
Syntax (csharp)
public class ManagedPolicy : Resource, IResource, IConstruct, IDependable, IManagedPolicy
Syntax (vb)
Public Class ManagedPolicy
    Inherits Resource
    Implements IResource, IConstruct, IDependable, IManagedPolicy
Remarks

stability: Stable

Synopsis

Constructors

ManagedPolicy(Construct, String, IManagedPolicyProps)
ManagedPolicy(ByRefValue)
ManagedPolicy(DeputyBase.DeputyProps)

Properties

Description

The description of this policy.

Document

The policy document.

ManagedPolicyArn

Returns the ARN of this managed policy.

ManagedPolicyName

The name of this policy.

Path

The path of this policy.

Methods

AddStatements(PolicyStatement[])

Adds a statement to the policy document.

AttachToGroup(IGroup)

Attaches this policy to a group.

AttachToRole(IRole)

Attaches this policy to a role.

AttachToUser(IUser)

Attaches this policy to a user.

FromAwsManagedPolicyName(String)

Construct a managed policy from one of the policies that AWS manages.

FromManagedPolicyName(Construct, String, String)

Construct a customer managed policy from the managedPolicyName.

Validate()

Validate the current construct.

Constructors

ManagedPolicy(Construct, String, IManagedPolicyProps)

public ManagedPolicy(Construct scope, string id, IManagedPolicyProps props = null)
Parameters
scope Construct
id System.String
props IManagedPolicyProps
Remarks

stability: Stable

ManagedPolicy(ByRefValue)

protected ManagedPolicy(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

ManagedPolicy(DeputyBase.DeputyProps)

protected ManagedPolicy(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

Properties

Description

The description of this policy.

public virtual string Description { get; }
Property Value

System.String

Remarks

stability: Stable attribute: true

Document

The policy document.

public virtual PolicyDocument Document { get; }
Property Value

PolicyDocument

Remarks

stability: Stable

ManagedPolicyArn

Returns the ARN of this managed policy.

public virtual string ManagedPolicyArn { get; }
Property Value

System.String

Remarks

stability: Stable attribute: true

ManagedPolicyName

The name of this policy.

public virtual string ManagedPolicyName { get; }
Property Value

System.String

Remarks

stability: Stable attribute: true

Path

The path of this policy.

public virtual string Path { get; }
Property Value

System.String

Remarks

stability: Stable attribute: true

Methods

AddStatements(PolicyStatement[])

Adds a statement to the policy document.

public virtual void AddStatements(params PolicyStatement[] statement)
Parameters
statement PolicyStatement[]
Remarks

stability: Stable

AttachToGroup(IGroup)

Attaches this policy to a group.

public virtual void AttachToGroup(IGroup group)
Parameters
group IGroup
Remarks

stability: Stable

AttachToRole(IRole)

Attaches this policy to a role.

public virtual void AttachToRole(IRole role)
Parameters
role IRole
Remarks

stability: Stable

AttachToUser(IUser)

Attaches this policy to a user.

public virtual void AttachToUser(IUser user)
Parameters
user IUser
Remarks

stability: Stable

FromAwsManagedPolicyName(String)

Construct a managed policy from one of the policies that AWS manages.

public static IManagedPolicy FromAwsManagedPolicyName(string managedPolicyName)
Parameters
managedPolicyName System.String
Returns

IManagedPolicy

Remarks

For this managed policy, you only need to know the name to be able to use it.

Some managed policy names start with "service-role/", some start with "job-function/", and some don't start with anything. Do include the prefix when constructing this object. stability: Stable

FromManagedPolicyName(Construct, String, String)

Construct a customer managed policy from the managedPolicyName.

public static IManagedPolicy FromManagedPolicyName(Construct scope, string id, string managedPolicyName)
Parameters
scope Construct
id System.String
managedPolicyName System.String
Returns

IManagedPolicy

Remarks

For this managed policy, you only need to know the name to be able to use it. stability: Stable

Validate()

Validate the current construct.

protected override string[] Validate()
Returns

System.String[]

Overrides
Construct.Validate()
Remarks

This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis. stability: Stable

Implements

IResource
IConstruct
IDependable
IManagedPolicy
Back to top Generated by DocFX