Class: AWSCDK::IAM::CfnUserPolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IAM::CfnUserPolicyProps
- Defined in:
- iam/cfn_user_policy_props.rb
Overview
Properties for defining a CfnUserPolicy.
Instance Attribute Summary collapse
-
#policy_document ⇒ Object?
readonly
The policy document.
-
#policy_name ⇒ String
readonly
The name of the policy document.
-
#user_name ⇒ String
readonly
The name of the user to associate the policy with.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(policy_name:, user_name:, policy_document: nil) ⇒ CfnUserPolicyProps
constructor
A new instance of CfnUserPolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(policy_name:, user_name:, policy_document: nil) ⇒ CfnUserPolicyProps
Returns a new instance of CfnUserPolicyProps.
12 13 14 15 16 17 18 19 |
# File 'iam/cfn_user_policy_props.rb', line 12 def initialize(policy_name:, user_name:, policy_document: nil) @policy_name = policy_name Jsii::Type.check_type(@policy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyName") @user_name = user_name Jsii::Type.check_type(@user_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userName") @policy_document = policy_document Jsii::Type.check_type(@policy_document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policyDocument") unless @policy_document.nil? end |
Instance Attribute Details
#policy_document ⇒ Object? (readonly)
The policy document.
You must provide policies in JSON format in IAM. However, for CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.
The regex pattern used to validate this parameter is a string of characters consisting of the following:
- Any printable ASCII character ranging from the space character (
\u0020) through the end of the ASCII character range - The printable characters in the Basic Latin and Latin-1 Supplement character set (through
\u00FF) - The special characters tab (
\u0009), line feed (\u000A), and carriage return (\u000D)
47 48 49 |
# File 'iam/cfn_user_policy_props.rb', line 47 def policy_document @policy_document end |
#policy_name ⇒ String (readonly)
The name of the policy document.
This parameter allows (through 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: _+=,.@-
27 28 29 |
# File 'iam/cfn_user_policy_props.rb', line 27 def policy_name @policy_name end |
#user_name ⇒ String (readonly)
The name of the user to associate the policy with.
This parameter allows (through 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: _+=,.@-
34 35 36 |
# File 'iam/cfn_user_policy_props.rb', line 34 def user_name @user_name end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 |
# File 'iam/cfn_user_policy_props.rb', line 49 def self.jsii_properties { :policy_name => "policyName", :user_name => "userName", :policy_document => "policyDocument", } end |
Instance Method Details
#to_jsii ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'iam/cfn_user_policy_props.rb', line 57 def to_jsii result = {} result.merge!({ "policyName" => @policy_name, "userName" => @user_name, "policyDocument" => @policy_document, }) result.compact end |