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, ITaggable
Syntax (vb)
Public Class CfnUser
Inherits CfnResource
Implements IInspectable, 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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnUser(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnUser(Construct, String, ICfnUserProps) |
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 | |
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. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnUser(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnUser(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnUser(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnUser(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnUser(Construct, String, ICfnUserProps)
public CfnUser(Construct scope, string id, ICfnUserProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnUserProps
Resource properties.
Properties
AttrArn
Returns the Amazon Resource Name (ARN) for the specified AWS::IAM::User
resource.
public virtual string AttrArn { get; }
Property Value
System.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
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Groups
A list of group names to which you want to add the user.
public virtual string[] Groups { get; set; }
Property Value
System.String[]
LoginProfile
Creates a password for the specified IAM user.
public virtual object LoginProfile { get; set; }
Property Value
System.Object
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
System.String[]
Path
The path for the user name.
public virtual string Path { get; set; }
Property Value
System.String
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
System.String
Policies
Adds or updates an inline policy document that is embedded in the specified IAM user.
public virtual object Policies { get; set; }
Property Value
System.Object
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
A list of tags that you want to attach to the new user.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
UserName
The name of the user to create.
public virtual string UserName { get; set; }
Property Value
System.String
Remarks
Do not include the path in this value.
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.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>