Class: AWSCDK::IoT::CfnPolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoT::CfnPolicyProps
- Defined in:
- io_t/cfn_policy_props.rb
Overview
Properties for defining a CfnPolicy.
Instance Attribute Summary collapse
-
#policy_document ⇒ Object
readonly
The JSON document that describes the policy.
-
#policy_name ⇒ String?
readonly
The policy name.
- #tags ⇒ Array<AWSCDK::CfnTag>? readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(policy_document:, policy_name: nil, tags: nil) ⇒ CfnPolicyProps
constructor
A new instance of CfnPolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(policy_document:, policy_name: nil, tags: nil) ⇒ CfnPolicyProps
Returns a new instance of CfnPolicyProps.
12 13 14 15 16 17 18 19 |
# File 'io_t/cfn_policy_props.rb', line 12 def initialize(policy_document:, policy_name: nil, tags: nil) @policy_document = policy_document Jsii::Type.check_type(@policy_document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policyDocument") @policy_name = policy_name Jsii::Type.check_type(@policy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyName") unless @policy_name.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? end |
Instance Attribute Details
#policy_document ⇒ Object (readonly)
The JSON document that describes the policy.
25 26 27 |
# File 'io_t/cfn_policy_props.rb', line 25 def policy_document @policy_document end |
#policy_name ⇒ String? (readonly)
The policy name.
30 31 32 |
# File 'io_t/cfn_policy_props.rb', line 30 def policy_name @policy_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
33 34 35 |
# File 'io_t/cfn_policy_props.rb', line 33 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 41 |
# File 'io_t/cfn_policy_props.rb', line 35 def self.jsii_properties { :policy_document => "policyDocument", :policy_name => "policyName", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'io_t/cfn_policy_props.rb', line 43 def to_jsii result = {} result.merge!({ "policyDocument" => @policy_document, "policyName" => @policy_name, "tags" => @tags, }) result.compact end |