Show / Hide Table of Contents

Class CfnRolePolicy

Adds or updates an inline policy document that is embedded in the specified IAM role.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnRolePolicy
Implements
IInspectable
IRolePolicyRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.Env
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.With(params IMixin[])
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRolePolicy : CfnResource, IInspectable, IRolePolicyRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnRolePolicy Inherits CfnResource Implements IInspectable, IRolePolicyRef, IConstruct, IDependable, IEnvironmentAware
Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

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 cfnRolePolicy = new CfnRolePolicy(this, "MyCfnRolePolicy", new CfnRolePolicyProps {
                 PolicyName = "policyName",
                 RoleName = "roleName",

                 // the properties below are optional
                 PolicyDocument = policyDocument
             });

Synopsis

Constructors

CfnRolePolicy(Construct, string, ICfnRolePolicyProps)

Create a new AWS::IAM::RolePolicy.

Properties

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

Adds or updates an inline policy document that is embedded in the specified IAM role.

PolicyDocument

The policy document.

PolicyName

The name of the policy document.

RoleName

The name of the role to associate the policy with.

RolePolicyRef

A reference to a RolePolicy resource.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

IsCfnRolePolicy(object)

Checks whether the given object is a CfnRolePolicy.

RenderProperties(IDictionary<string, object>)

Adds or updates an inline policy document that is embedded in the specified IAM role.

Constructors

CfnRolePolicy(Construct, string, ICfnRolePolicyProps)

Create a new AWS::IAM::RolePolicy.

public CfnRolePolicy(Construct scope, string id, ICfnRolePolicyProps props)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnRolePolicyProps

Resource properties.

Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

Properties

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

CfnProperties

Adds or updates an inline policy document that is embedded in the specified IAM role.

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

PolicyDocument

The policy document.

public virtual object? PolicyDocument { get; set; }
Property Value

object

Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

PolicyName

The name of the policy document.

public virtual string PolicyName { get; set; }
Property Value

string

Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

RoleName

The name of the role to associate the policy with.

public virtual string RoleName { get; set; }
Property Value

string

Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

RolePolicyRef

A reference to a RolePolicy resource.

public virtual IRolePolicyReference RolePolicyRef { get; }
Property Value

IRolePolicyReference

Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

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

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

IsCfnRolePolicy(object)

Checks whether the given object is a CfnRolePolicy.

public static bool IsCfnRolePolicy(object x)
Parameters
x object
Returns

bool

Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

Adds or updates an inline policy document that is embedded in the specified IAM role.

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For information about roles, see IAM roles in the IAM User Guide .

A role can also have a managed policy attached to it. To attach a managed policy to a role, use AWS::IAM::Role . To create a new managed policy, use AWS::IAM::ManagedPolicy . For information about policies, see Managed policies and inline policies in the IAM User Guide .

For information about the maximum number of inline policies that you can embed with a role, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::RolePolicy

ExampleMetadata: fixture=_generated

Implements

IInspectable
IRolePolicyRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX