Class CfnUser
Creates a new IAM user for your AWS account .
Inherited Members
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 |
Properties
| AttrArn | Returns the Amazon Resource Name (ARN) for the specified |
| 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
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
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
Overrides
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
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
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
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
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
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
Remarks
Do not include the path in this value.
UserRef
A reference to a User resource.
public virtual IUserReference UserRef { get; }
Property Value
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
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
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
Overrides
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