Class: AWSCDK::CloudAssemblySchema::CloudFormationResourceJson

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_assembly_schema/cloud_formation_resource_json.rb

Overview

A node in the construct creation stack trace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logical_id:, template_path:, property_paths: nil) ⇒ CloudFormationResourceJson

Returns a new instance of CloudFormationResourceJson.

Parameters:

  • logical_id (String)

    The logical ID of the resource in the CloudFormation template.

  • template_path (String)

    The path to the CloudFormation template containing this resource.

  • property_paths (Array<String>, nil) (defaults to: nil)

    Properties within the construct where the violation was detected.



10
11
12
13
14
15
16
17
# File 'cloud_assembly_schema/cloud_formation_resource_json.rb', line 10

def initialize(logical_id:, template_path:, property_paths: nil)
  @logical_id = logical_id
  Jsii::Type.check_type(@logical_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logicalId")
  @template_path = template_path
  Jsii::Type.check_type(@template_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templatePath")
  @property_paths = property_paths
  Jsii::Type.check_type(@property_paths, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "propertyPaths") unless @property_paths.nil?
end

Instance Attribute Details

#logical_idString (readonly)

The logical ID of the resource in the CloudFormation template.

Returns:

  • (String)


22
23
24
# File 'cloud_assembly_schema/cloud_formation_resource_json.rb', line 22

def logical_id
  @logical_id
end

#property_pathsArray<String>? (readonly)

Note:

Default: - no locations

Properties within the construct where the violation was detected.

Either a single component, in which case it regards a top-level property name, or a JSON path (starting with $.) to indicate a deeper property.

Returns:

  • (Array<String>, nil)


34
35
36
# File 'cloud_assembly_schema/cloud_formation_resource_json.rb', line 34

def property_paths
  @property_paths
end

#template_pathString (readonly)

The path to the CloudFormation template containing this resource.

Returns:

  • (String)


26
27
28
# File 'cloud_assembly_schema/cloud_formation_resource_json.rb', line 26

def template_path
  @template_path
end

Class Method Details

.jsii_propertiesObject



36
37
38
39
40
41
42
# File 'cloud_assembly_schema/cloud_formation_resource_json.rb', line 36

def self.jsii_properties
  {
    :logical_id => "logicalId",
    :template_path => "templatePath",
    :property_paths => "propertyPaths",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
52
# File 'cloud_assembly_schema/cloud_formation_resource_json.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "logicalId" => @logical_id,
    "templatePath" => @template_path,
    "propertyPaths" => @property_paths,
  })
  result.compact
end