Class: AWSCDK::IAM::CfnRolePolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IAM::CfnRolePolicyProps
- Defined in:
- iam/cfn_role_policy_props.rb
Overview
Properties for defining a CfnRolePolicy.
Instance Attribute Summary collapse
-
#policy_document ⇒ Object?
readonly
The policy document.
-
#policy_name ⇒ String
readonly
The name of the policy document.
-
#role_name ⇒ String
readonly
The name of the role to associate the policy with.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(policy_name:, role_name:, policy_document: nil) ⇒ CfnRolePolicyProps
constructor
A new instance of CfnRolePolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(policy_name:, role_name:, policy_document: nil) ⇒ CfnRolePolicyProps
Returns a new instance of CfnRolePolicyProps.
12 13 14 15 16 17 18 19 |
# File 'iam/cfn_role_policy_props.rb', line 12 def initialize(policy_name:, role_name:, policy_document: nil) @policy_name = policy_name Jsii::Type.check_type(@policy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyName") @role_name = role_name Jsii::Type.check_type(@role_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleName") @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_role_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_role_policy_props.rb', line 27 def policy_name @policy_name end |
#role_name ⇒ String (readonly)
The name of the role 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_role_policy_props.rb', line 34 def role_name @role_name end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 |
# File 'iam/cfn_role_policy_props.rb', line 49 def self.jsii_properties { :policy_name => "policyName", :role_name => "roleName", :policy_document => "policyDocument", } end |
Instance Method Details
#to_jsii ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'iam/cfn_role_policy_props.rb', line 57 def to_jsii result = {} result.merge!({ "policyName" => @policy_name, "roleName" => @role_name, "policyDocument" => @policy_document, }) result.compact end |