Class CfnUser
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.iam.CfnUser
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:32.214Z")
@Stability(Stable)
public class CfnUser
extends CfnResource
implements IInspectable, ITaggable
Creates a new IAM user for your AWS account .
For information about quotas for the number of IAM users you can create, see IAM and AWS STS quotas in the IAM User Guide .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.iam.*; Object policyDocument; CfnUser cfnUser = CfnUser.Builder.create(this, "MyCfnUser") .groups(List.of("groups")) .loginProfile(LoginProfileProperty.builder() .password("password") // the properties below are optional .passwordResetRequired(false) .build()) .managedPolicyArns(List.of("managedPolicyArns")) .path("path") .permissionsBoundary("permissionsBoundary") .policies(List.of(PolicyProperty.builder() .policyDocument(policyDocument) .policyName("policyName") .build())) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .userName("userName") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnUser
.static interface
Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console .static interface
Contains information about an attached policy.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnUser
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnUser
(software.amazon.jsii.JsiiObjectRef objRef) CfnUser
(software.constructs.Construct scope, String id, CfnUserProps props) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Amazon Resource Name (ARN) for the specifiedAWS::IAM::User
resource.A list of group names to which you want to add the user.Creates a password for the specified IAM user.A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the user.getPath()
The path for the user name.The ARN of the managed policy that is used to set the permissions boundary for the user.Adds or updates an inline policy document that is embedded in the specified IAM user.getTags()
Tag Manager which manages the tags for this resource.A list of tags that you want to attach to the new user.The name of the user to create.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
A list of group names to which you want to add the user.void
setLoginProfile
(IResolvable value) Creates a password for the specified IAM user.void
Creates a password for the specified IAM user.void
setManagedPolicyArns
(List<String> value) A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the user.void
The path for the user name.void
setPermissionsBoundary
(String value) The ARN of the managed policy that is used to set the permissions boundary for the user.void
setPolicies
(List<Object> value) Adds or updates an inline policy document that is embedded in the specified IAM user.void
setPolicies
(IResolvable value) Adds or updates an inline policy document that is embedded in the specified IAM user.void
setTagsRaw
(List<CfnTag> value) A list of tags that you want to attach to the new user.void
setUserName
(String value) The name of the user to create.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnUser
protected CfnUser(software.amazon.jsii.JsiiObjectRef objRef) -
CfnUser
protected CfnUser(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnUser
@Stability(Stable) public CfnUser(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnUserProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties.
-
CfnUser
- Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) for the specifiedAWS::IAM::User
resource.For example:
arn:aws:iam::123456789012:user/mystack-myuser-1CCXAFG2H2U4D
. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getGroups
A list of group names to which you want to add the user. -
setGroups
A list of group names to which you want to add the user. -
getLoginProfile
Creates a password for the specified IAM user. -
setLoginProfile
Creates a password for the specified IAM user. -
setLoginProfile
Creates a password for the specified IAM user. -
getManagedPolicyArns
A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the user. -
setManagedPolicyArns
A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the user. -
getPath
The path for the user name. -
setPath
The path for the user name. -
getPermissionsBoundary
The ARN of the managed policy that is used to set the permissions boundary for the user. -
setPermissionsBoundary
The ARN of the managed policy that is used to set the permissions boundary for the user. -
getPolicies
Adds or updates an inline policy document that is embedded in the specified IAM user. -
setPolicies
Adds or updates an inline policy document that is embedded in the specified IAM user. -
setPolicies
Adds or updates an inline policy document that is embedded in the specified IAM user. -
getTagsRaw
A list of tags that you want to attach to the new user. -
setTagsRaw
A list of tags that you want to attach to the new user. -
getUserName
The name of the user to create.Do not include the path in this value.
-
setUserName
The name of the user to create.Do not include the path in this value.
-