Class: AWSCDK::CfnResourceProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cfn_resource_props.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, properties: nil) ⇒ CfnResourceProps

Returns a new instance of CfnResourceProps.

Parameters:

  • type (String)

    CloudFormation resource type (e.g. AWS::S3::Bucket).

  • properties (Hash{String => Object}, nil) (defaults to: nil)

    Resource properties.



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

#propertiesHash{String => Object}? (readonly)

Note:

Default: - No resource properties.

Resource properties.

Returns:

  • (Hash{String => Object}, nil)


23
24
25
# File 'cfn_resource_props.rb', line 23

def properties
  @properties
end

#typeString (readonly)

CloudFormation resource type (e.g. AWS::S3::Bucket).

Returns:

  • (String)


18
19
20
# File 'cfn_resource_props.rb', line 18

def type
  @type
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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