Class: AWSCDK::CloudAssemblySchema::ViolatingConstructJson
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudAssemblySchema::ViolatingConstructJson
- Defined in:
- cloud_assembly_schema/violating_construct_json.rb
Overview
A construct that violated a policy rule.
Instance Attribute Summary collapse
-
#cloud_formation_resource ⇒ AWSCDK::CloudAssemblySchema::CloudFormationResourceJson?
readonly
If this construct violation regards a CloudFormation resource, a reference to the resource details.
-
#construct_fqn ⇒ String?
readonly
The fully qualified name of the construct class (includes the library name).
-
#construct_path ⇒ String
readonly
The construct path as defined in the application.
-
#library_version ⇒ String?
readonly
The version of the library that contains this construct.
-
#stack_traces ⇒ Array<String>?
readonly
Stack traces associated with this violation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(construct_path:, cloud_formation_resource: nil, construct_fqn: nil, library_version: nil, stack_traces: nil) ⇒ ViolatingConstructJson
constructor
A new instance of ViolatingConstructJson.
- #to_jsii ⇒ Object
Constructor Details
#initialize(construct_path:, cloud_formation_resource: nil, construct_fqn: nil, library_version: nil, stack_traces: nil) ⇒ ViolatingConstructJson
Returns a new instance of ViolatingConstructJson.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'cloud_assembly_schema/violating_construct_json.rb', line 12 def initialize(construct_path:, cloud_formation_resource: nil, construct_fqn: nil, library_version: nil, stack_traces: nil) @construct_path = construct_path Jsii::Type.check_type(@construct_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "constructPath") @cloud_formation_resource = cloud_formation_resource.is_a?(Hash) ? ::AWSCDK::CloudAssemblySchema::CloudFormationResourceJson.new(**cloud_formation_resource.transform_keys(&:to_sym)) : cloud_formation_resource Jsii::Type.check_type(@cloud_formation_resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuQ2xvdWRGb3JtYXRpb25SZXNvdXJjZUpzb24ifQ==")), "cloudFormationResource") unless @cloud_formation_resource.nil? @construct_fqn = construct_fqn Jsii::Type.check_type(@construct_fqn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "constructFqn") unless @construct_fqn.nil? @library_version = library_version Jsii::Type.check_type(@library_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "libraryVersion") unless @library_version.nil? @stack_traces = stack_traces Jsii::Type.check_type(@stack_traces, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "stackTraces") unless @stack_traces.nil? end |
Instance Attribute Details
#cloud_formation_resource ⇒ AWSCDK::CloudAssemblySchema::CloudFormationResourceJson? (readonly)
If this construct violation regards a CloudFormation resource, a reference to the resource details.
33 34 35 |
# File 'cloud_assembly_schema/violating_construct_json.rb', line 33 def cloud_formation_resource @cloud_formation_resource end |
#construct_fqn ⇒ String? (readonly)
Default: - no construct info
The fully qualified name of the construct class (includes the library name).
38 39 40 |
# File 'cloud_assembly_schema/violating_construct_json.rb', line 38 def construct_fqn @construct_fqn end |
#construct_path ⇒ String (readonly)
Default: - no construct path
The construct path as defined in the application.
29 30 31 |
# File 'cloud_assembly_schema/violating_construct_json.rb', line 29 def construct_path @construct_path end |
#library_version ⇒ String? (readonly)
Default: - no version info
The version of the library that contains this construct.
The library name is the first component of the construct FQN.
45 46 47 |
# File 'cloud_assembly_schema/violating_construct_json.rb', line 45 def library_version @library_version end |
#stack_traces ⇒ Array<String>? (readonly)
Default: - No stack traces
Stack traces associated with this violation.
This can be all the stack traces where a violating property got its value, or just the construct creation stack trace.
Every element of the array is a stack trace, where each stack trace is a \n-delimited string.
55 56 57 |
# File 'cloud_assembly_schema/violating_construct_json.rb', line 55 def stack_traces @stack_traces end |
Class Method Details
.jsii_properties ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'cloud_assembly_schema/violating_construct_json.rb', line 57 def self.jsii_properties { :construct_path => "constructPath", :cloud_formation_resource => "cloudFormationResource", :construct_fqn => "constructFqn", :library_version => "libraryVersion", :stack_traces => "stackTraces", } end |
Instance Method Details
#to_jsii ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 |
# File 'cloud_assembly_schema/violating_construct_json.rb', line 67 def to_jsii result = {} result.merge!({ "constructPath" => @construct_path, "cloudFormationResource" => @cloud_formation_resource, "constructFqn" => @construct_fqn, "libraryVersion" => @library_version, "stackTraces" => @stack_traces, }) result.compact end |