Class CfnUserPolicy
Adds or updates an inline policy document that is embedded in the specified IAM user.
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnUserPolicy : CfnResource, IInspectable, IUserPolicyRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnUserPolicy Inherits CfnResource Implements IInspectable, IUserPolicyRef, IConstruct, IDependable, IEnvironmentAware
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
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 cfnUserPolicy = new CfnUserPolicy(this, "MyCfnUserPolicy", new CfnUserPolicyProps {
PolicyName = "policyName",
UserName = "userName",
// the properties below are optional
PolicyDocument = policyDocument
});
Synopsis
Constructors
| CfnUserPolicy(Construct, string, ICfnUserPolicyProps) | Create a new |
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 user. |
| PolicyDocument | The policy document. |
| PolicyName | The name of the policy document. |
| UserName | The name of the user to associate the policy with. |
| UserPolicyRef | A reference to a UserPolicy resource. |
Methods
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnUserPolicy(object) | Checks whether the given object is a CfnUserPolicy. |
| RenderProperties(IDictionary<string, object>) | Adds or updates an inline policy document that is embedded in the specified IAM user. |
Constructors
CfnUserPolicy(Construct, string, ICfnUserPolicyProps)
Create a new AWS::IAM::UserPolicy.
public CfnUserPolicy(Construct scope, string id, ICfnUserPolicyProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnUserPolicyProps
Resource properties.
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
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
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
ExampleMetadata: fixture=_generated
CfnProperties
Adds or updates an inline policy document that is embedded in the specified IAM user.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
ExampleMetadata: fixture=_generated
PolicyDocument
The policy document.
public virtual object? PolicyDocument { get; set; }
Property Value
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
ExampleMetadata: fixture=_generated
PolicyName
The name of the policy document.
public virtual string PolicyName { get; set; }
Property Value
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
ExampleMetadata: fixture=_generated
UserName
The name of the user to associate the policy with.
public virtual string UserName { get; set; }
Property Value
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
ExampleMetadata: fixture=_generated
UserPolicyRef
A reference to a UserPolicy resource.
public virtual IUserPolicyReference UserPolicyRef { get; }
Property Value
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
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
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
ExampleMetadata: fixture=_generated
IsCfnUserPolicy(object)
Checks whether the given object is a CfnUserPolicy.
public static bool IsCfnUserPolicy(object x)
Parameters
- x object
Returns
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
Adds or updates an inline policy document that is embedded in the specified IAM user.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AWS::IAM::User . 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 in a user, see IAM and AWS STS quotas in the IAM User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html
CloudformationResource: AWS::IAM::UserPolicy
ExampleMetadata: fixture=_generated