Show / Hide Table of Contents

Class CfnUser

Creates a new IAM user for your AWS account .

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnUser
Implements
IInspectable
IUserRef
IConstruct
IDependable
IEnvironmentAware
ITaggable
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 CfnUser : CfnResource, IInspectable, IUserRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Syntax (vb)
Public Class CfnUser Inherits CfnResource Implements IInspectable, IUserRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

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 cfnUser = new CfnUser(this, "MyCfnUser", new CfnUserProps {
                 Groups = new [] { "groups" },
                 LoginProfile = new LoginProfileProperty {
                     Password = "password",

                     // the properties below are optional
                     PasswordResetRequired = false
                 },
                 ManagedPolicyArns = new [] { "managedPolicyArns" },
                 Path = "path",
                 PermissionsBoundary = "permissionsBoundary",
                 Policies = new [] { new PolicyProperty {
                     PolicyDocument = policyDocument,
                     PolicyName = "policyName"
                 } },
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } },
                 UserName = "userName"
             });

Synopsis

Constructors

CfnUser(Construct, string, ICfnUserProps?)

Create a new AWS::IAM::User.

Properties

AttrArn

Returns the Amazon Resource Name (ARN) for the specified AWS::IAM::User resource.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

Creates a new IAM user for your AWS account .

Groups

A list of group names to which you want to add the user.

LoginProfile

Creates a password for the specified IAM user.

ManagedPolicyArns

A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the user.

Path

The path for the user name.

PermissionsBoundary

The ARN of the managed policy that is used to set the permissions boundary for the user.

Policies

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

Tags

Tag Manager which manages the tags for this resource.

TagsRaw

A list of tags that you want to attach to the new user.

UserName

The name of the user to create.

UserRef

A reference to a User resource.

Methods

ArnForUser(IUserRef)

Creates a new IAM user for your AWS account .

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

IsCfnUser(object)

Checks whether the given object is a CfnUser.

RenderProperties(IDictionary<string, object>)

Creates a new IAM user for your AWS account .

Constructors

CfnUser(Construct, string, ICfnUserProps?)

Create a new AWS::IAM::User.

public CfnUser(Construct scope, string id, ICfnUserProps? props = null)
Parameters
scope Construct

Scope in which this resource is defined.

id string

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

props ICfnUserProps

Resource properties.

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

Properties

AttrArn

Returns the Amazon Resource Name (ARN) for the specified AWS::IAM::User resource.

public virtual string AttrArn { get; }
Property Value

string

Remarks

For example: arn:aws:iam::123456789012:user/mystack-myuser-1CCXAFG2H2U4D .

CloudformationAttribute: Arn

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

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

CfnProperties

Creates a new IAM user for your AWS account .

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

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

Groups

A list of group names to which you want to add the user.

public virtual string[]? Groups { get; set; }
Property Value

string[]

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

LoginProfile

Creates a password for the specified IAM user.

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

object

Remarks

Type union: either IResolvable or CfnUser.ILoginProfileProperty

ManagedPolicyArns

A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the user.

public virtual string[]? ManagedPolicyArns { get; set; }
Property Value

string[]

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

Path

The path for the user name.

public virtual string? Path { get; set; }
Property Value

string

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

PermissionsBoundary

The ARN of the managed policy that is used to set the permissions boundary for the user.

public virtual string? PermissionsBoundary { get; set; }
Property Value

string

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

Policies

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

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

object

Remarks

Type union: either IResolvable or (either IResolvable or CfnUser.IPolicyProperty)[]

Tags

Tag Manager which manages the tags for this resource.

public virtual TagManager Tags { get; }
Property Value

TagManager

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

TagsRaw

A list of tags that you want to attach to the new user.

public virtual ICfnTag[]? TagsRaw { get; set; }
Property Value

ICfnTag[]

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

UserName

The name of the user to create.

public virtual string? UserName { get; set; }
Property Value

string

Remarks

Do not include the path in this value.

UserRef

A reference to a User resource.

public virtual IUserReference UserRef { get; }
Property Value

IUserReference

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

Methods

ArnForUser(IUserRef)

Creates a new IAM user for your AWS account .

public static string ArnForUser(IUserRef resource)
Parameters
resource IUserRef
Returns

string

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

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 cfnUser = new CfnUser(this, "MyCfnUser", new CfnUserProps {
                 Groups = new [] { "groups" },
                 LoginProfile = new LoginProfileProperty {
                     Password = "password",

                     // the properties below are optional
                     PasswordResetRequired = false
                 },
                 ManagedPolicyArns = new [] { "managedPolicyArns" },
                 Path = "path",
                 PermissionsBoundary = "permissionsBoundary",
                 Policies = new [] { new PolicyProperty {
                     PolicyDocument = policyDocument,
                     PolicyName = "policyName"
                 } },
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } },
                 UserName = "userName"
             });

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

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

IsCfnUser(object)

Checks whether the given object is a CfnUser.

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

bool

Remarks

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

Creates a new IAM user for your AWS account .

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

For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .

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

CloudformationResource: AWS::IAM::User

ExampleMetadata: fixture=_generated

Implements

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