Class: AWSCDK::IAM::CfnUserProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IAM::CfnUserProps
- Defined in:
- iam/cfn_user_props.rb
Overview
Properties for defining a CfnUser.
Instance Attribute Summary collapse
-
#groups ⇒ Array<String, AWSCDK::Interfaces::AWSIAM::IGroupRef>?
readonly
A list of group names to which you want to add the user.
-
#login_profile ⇒ AWSCDK::IResolvable, ...
readonly
Creates a password for the specified IAM user.
-
#managed_policy_arns ⇒ Array<String, AWSCDK::Interfaces::AWSIAM::IManagedPolicyRef>?
readonly
A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the user.
-
#path ⇒ String?
readonly
The path for the user name.
-
#permissions_boundary ⇒ String, ...
readonly
The ARN of the managed policy that is used to set the permissions boundary for the user.
-
#policies ⇒ AWSCDK::IResolvable, ...
readonly
Adds or updates an inline policy document that is embedded in the specified IAM user.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A list of tags that you want to attach to the new user.
-
#user_name ⇒ String?
readonly
The name of the user to create.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(groups: nil, login_profile: nil, managed_policy_arns: nil, path: nil, permissions_boundary: nil, policies: nil, tags: nil, user_name: nil) ⇒ CfnUserProps
constructor
A new instance of CfnUserProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(groups: nil, login_profile: nil, managed_policy_arns: nil, path: nil, permissions_boundary: nil, policies: nil, tags: nil, user_name: nil) ⇒ CfnUserProps
Returns a new instance of CfnUserProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'iam/cfn_user_props.rb', line 17 def initialize(groups: nil, login_profile: nil, managed_policy_arns: nil, path: nil, permissions_boundary: nil, policies: nil, tags: nil, user_name: nil) @groups = groups Jsii::Type.check_type(@groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2lhbS5JR3JvdXBSZWYifV19fSwia2luZCI6ImFycmF5In19")), "groups") unless @groups.nil? @login_profile = login_profile.is_a?(Hash) ? ::AWSCDK::IAM::CfnUser::LoginProfileProperty.new(**login_profile.transform_keys(&:to_sym)) : login_profile Jsii::Type.check_type(@login_profile, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pYW0uQ2ZuVXNlci5Mb2dpblByb2ZpbGVQcm9wZXJ0eSJ9XX19")), "loginProfile") unless @login_profile.nil? @managed_policy_arns = managed_policy_arns Jsii::Type.check_type(@managed_policy_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2lhbS5JTWFuYWdlZFBvbGljeVJlZiJ9XX19LCJraW5kIjoiYXJyYXkifX0=")), "managedPolicyArns") unless @managed_policy_arns.nil? @path = path Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil? @permissions_boundary = Jsii::Type.check_type(@permissions_boundary, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSU1hbmFnZWRQb2xpY3lSZWYifV19fQ==")), "permissionsBoundary") unless @permissions_boundary.nil? @policies = policies Jsii::Type.check_type(@policies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLkNmblVzZXIuUG9saWN5UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "policies") unless @policies.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @user_name = user_name Jsii::Type.check_type(@user_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userName") unless @user_name.nil? end |
Instance Attribute Details
#groups ⇒ Array<String, AWSCDK::Interfaces::AWSIAM::IGroupRef>? (readonly)
A list of group names to which you want to add the user.
40 41 42 |
# File 'iam/cfn_user_props.rb', line 40 def groups @groups end |
#login_profile ⇒ AWSCDK::IResolvable, ... (readonly)
Creates a password for the specified IAM user.
A password allows an IAM user to access AWS services through the AWS Management Console .
You can use the AWS CLI , the AWS API, or the Users page in the IAM console to create a password for any IAM user. Use ChangePassword to update your own existing password in the My Security Credentials page in the AWS Management Console .
For more information about managing passwords, see Managing passwords in the IAM User Guide .
51 52 53 |
# File 'iam/cfn_user_props.rb', line 51 def login_profile @login_profile end |
#managed_policy_arns ⇒ Array<String, AWSCDK::Interfaces::AWSIAM::IManagedPolicyRef>? (readonly)
A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the user.
For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .
58 59 60 |
# File 'iam/cfn_user_props.rb', line 58 def managed_policy_arns @managed_policy_arns end |
#path ⇒ String? (readonly)
The path for the user name.
For more information about paths, see IAM identifiers in the IAM User Guide .
This parameter is optional. If it is not included, it defaults to a slash (/).
This parameter allows (through its regex pattern ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), including most punctuation characters, digits, and upper and lowercased letters.
69 70 71 |
# File 'iam/cfn_user_props.rb', line 69 def path @path end |
#permissions_boundary ⇒ String, ... (readonly)
The ARN of the managed policy that is used to set the permissions boundary for the user.
A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see Permissions boundaries for IAM entities in the IAM User Guide .
For more information about policy types, see Policy types in the IAM User Guide .
78 79 80 |
# File 'iam/cfn_user_props.rb', line 78 def @permissions_boundary end |
#policies ⇒ AWSCDK::IResolvable, ... (readonly)
Adds or updates an inline policy document that is embedded in the specified IAM user.
To view AWS::IAM::User snippets, see Declaring an IAM User Resource .
The name of each policy for a role, user, or group must be unique. If you don't choose unique names, updates to the IAM identity will fail.
For information about limits on the number of inline policies that you can embed in a user, see Limitations on IAM Entities in the IAM User Guide .
89 90 91 |
# File 'iam/cfn_user_props.rb', line 89 def policies @policies end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A list of tags that you want to attach to the new user.
Each tag consists of a key name and an associated value. For more information about tagging, see Tagging IAM resources in the IAM User Guide .
If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.
98 99 100 |
# File 'iam/cfn_user_props.rb', line 98 def @tags end |
#user_name ⇒ String? (readonly)
The name of the user to create. Do not include the path in this value.
This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The user name must be unique within the account. User names are not distinguished by case. For example, you cannot create users named both "John" and "john".
If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the user name.
If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in CloudFormation Templates .
Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using
Fn::JoinandAWS::Regionto create a Region-specific name, as in the following example:{"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]}.
111 112 113 |
# File 'iam/cfn_user_props.rb', line 111 def user_name @user_name end |
Class Method Details
.jsii_properties ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'iam/cfn_user_props.rb', line 113 def self.jsii_properties { :groups => "groups", :login_profile => "loginProfile", :managed_policy_arns => "managedPolicyArns", :path => "path", :permissions_boundary => "permissionsBoundary", :policies => "policies", :tags => "tags", :user_name => "userName", } end |
Instance Method Details
#to_jsii ⇒ Object
126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'iam/cfn_user_props.rb', line 126 def to_jsii result = {} result.merge!({ "groups" => @groups, "loginProfile" => @login_profile, "managedPolicyArns" => @managed_policy_arns, "path" => @path, "permissionsBoundary" => @permissions_boundary, "policies" => @policies, "tags" => @tags, "userName" => @user_name, }) result.compact end |