Class: AWSCDK::CfnResourceProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CfnResourceProps
- Defined in:
- cfn_resource_props.rb
Instance Attribute Summary collapse
-
#properties ⇒ Hash{String => Object}?
readonly
Resource properties.
-
#type ⇒ String
readonly
CloudFormation resource type (e.g.
AWS::S3::Bucket).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, properties: nil) ⇒ CfnResourceProps
constructor
A new instance of CfnResourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, properties: nil) ⇒ CfnResourceProps
Returns a new instance of CfnResourceProps.
8 9 10 11 12 13 |
# File 'cfn_resource_props.rb', line 8 def initialize(type:, properties: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @properties = properties Jsii::Type.check_type(@properties, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "properties") unless @properties.nil? end |
Instance Attribute Details
#properties ⇒ Hash{String => Object}? (readonly)
Note:
Default: - No resource properties.
Resource properties.
23 24 25 |
# File 'cfn_resource_props.rb', line 23 def properties @properties end |
#type ⇒ String (readonly)
CloudFormation resource type (e.g. AWS::S3::Bucket).
18 19 20 |
# File 'cfn_resource_props.rb', line 18 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
25 26 27 28 29 30 |
# File 'cfn_resource_props.rb', line 25 def self.jsii_properties { :type => "type", :properties => "properties", } end |
Instance Method Details
#to_jsii ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'cfn_resource_props.rb', line 32 def to_jsii result = {} result.merge!({ "type" => @type, "properties" => @properties, }) result.compact end |