Class: AWSCDK::CloudAssemblySchema::SuppressedViolationJson
- Inherits:
-
PolicyViolationJson
- Object
- PolicyViolationJson
- AWSCDK::CloudAssemblySchema::SuppressedViolationJson
- Defined in:
- cloud_assembly_schema/suppressed_violation_json.rb
Overview
A violation that was acknowledged/suppressed and excluded from the active violation set.
Instance Attribute Summary collapse
-
#acknowledged_at ⇒ String?
readonly
The construct path where the acknowledgement was declared.
-
#acknowledged_id ⇒ String
readonly
The acknowledgement ID that caused this violation to be suppressed.
-
#acknowledged_stack_trace ⇒ String?
readonly
Stack trace showing where the acknowledgement was declared.
-
#custom_severity ⇒ String?
readonly
If the plugin wants to report using a non-standard severity, put it here.
-
#description ⇒ String
readonly
A description of the violation.
-
#reason ⇒ String?
readonly
The reason given for the acknowledgement, if provided.
-
#rule_metadata ⇒ Hash{String => String}?
readonly
Additional rule-specific metadata.
-
#rule_name ⇒ String
readonly
The name of the rule that was violated.
-
#severity ⇒ String
readonly
The severity of the violation.
-
#suggested_fix ⇒ String?
readonly
How to fix the violation.
-
#violating_constructs ⇒ Array<AWSCDK::CloudAssemblySchema::ViolatingConstructJson>
readonly
Constructs that violated the rule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description:, rule_name:, severity:, violating_constructs:, custom_severity: nil, rule_metadata: nil, suggested_fix: nil, acknowledged_id:, acknowledged_at: nil, acknowledged_stack_trace: nil, reason: nil) ⇒ SuppressedViolationJson
constructor
A new instance of SuppressedViolationJson.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description:, rule_name:, severity:, violating_constructs:, custom_severity: nil, rule_metadata: nil, suggested_fix: nil, acknowledged_id:, acknowledged_at: nil, acknowledged_stack_trace: nil, reason: nil) ⇒ SuppressedViolationJson
Returns a new instance of SuppressedViolationJson.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 30 def initialize(description:, rule_name:, severity:, violating_constructs:, custom_severity: nil, rule_metadata: nil, suggested_fix: nil, acknowledged_id:, acknowledged_at: nil, acknowledged_stack_trace: nil, reason: nil) @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") @rule_name = rule_name Jsii::Type.check_type(@rule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleName") @severity = severity Jsii::Type.check_type(@severity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "severity") @violating_constructs = violating_constructs.is_a?(Array) ? violating_constructs.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CloudAssemblySchema::ViolatingConstructJson.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : violating_constructs Jsii::Type.check_type(@violating_constructs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmNsb3VkX2Fzc2VtYmx5X3NjaGVtYS5WaW9sYXRpbmdDb25zdHJ1Y3RKc29uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "violatingConstructs") @custom_severity = custom_severity Jsii::Type.check_type(@custom_severity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customSeverity") unless @custom_severity.nil? @rule_metadata = Jsii::Type.check_type(@rule_metadata, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "ruleMetadata") unless @rule_metadata.nil? @suggested_fix = suggested_fix Jsii::Type.check_type(@suggested_fix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "suggestedFix") unless @suggested_fix.nil? @acknowledged_id = acknowledged_id Jsii::Type.check_type(@acknowledged_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "acknowledgedId") @acknowledged_at = acknowledged_at Jsii::Type.check_type(@acknowledged_at, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "acknowledgedAt") unless @acknowledged_at.nil? @acknowledged_stack_trace = acknowledged_stack_trace Jsii::Type.check_type(@acknowledged_stack_trace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "acknowledgedStackTrace") unless @acknowledged_stack_trace.nil? @reason = reason Jsii::Type.check_type(@reason, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "reason") unless @reason.nil? end |
Instance Attribute Details
#acknowledged_at ⇒ String? (readonly)
Default: - unknown
The construct path where the acknowledgement was declared.
95 96 97 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 95 def acknowledged_at @acknowledged_at end |
#acknowledged_id ⇒ String (readonly)
The acknowledgement ID that caused this violation to be suppressed.
Format: <plugin-name>::<rule-name> (spaces replaced with hyphens).
90 91 92 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 90 def acknowledged_id @acknowledged_id end |
#acknowledged_stack_trace ⇒ String? (readonly)
Default: - no stack trace
Stack trace showing where the acknowledgement was declared.
A \n-delimited string of stack frames.
102 103 104 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 102 def acknowledged_stack_trace @acknowledged_stack_trace end |
#custom_severity ⇒ String? (readonly)
If the plugin wants to report using a non-standard severity, put it here.
74 75 76 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 74 def custom_severity @custom_severity end |
#description ⇒ String (readonly)
A description of the violation.
58 59 60 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 58 def description @description end |
#reason ⇒ String? (readonly)
Default: - no reason given
The reason given for the acknowledgement, if provided.
107 108 109 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 107 def reason @reason end |
#rule_metadata ⇒ Hash{String => String}? (readonly)
Default: - no metadata
Additional rule-specific metadata.
79 80 81 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 79 def @rule_metadata end |
#rule_name ⇒ String (readonly)
The name of the rule that was violated.
62 63 64 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 62 def rule_name @rule_name end |
#severity ⇒ String (readonly)
The severity of the violation.
66 67 68 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 66 def severity @severity end |
#suggested_fix ⇒ String? (readonly)
Default: - no fix provided
How to fix the violation.
84 85 86 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 84 def suggested_fix @suggested_fix end |
#violating_constructs ⇒ Array<AWSCDK::CloudAssemblySchema::ViolatingConstructJson> (readonly)
Constructs that violated the rule.
70 71 72 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 70 def violating_constructs @violating_constructs end |
Class Method Details
.jsii_properties ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 109 def self.jsii_properties { :description => "description", :rule_name => "ruleName", :severity => "severity", :violating_constructs => "violatingConstructs", :custom_severity => "customSeverity", :rule_metadata => "ruleMetadata", :suggested_fix => "suggestedFix", :acknowledged_id => "acknowledgedId", :acknowledged_at => "acknowledgedAt", :acknowledged_stack_trace => "acknowledgedStackTrace", :reason => "reason", } end |
Instance Method Details
#to_jsii ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'cloud_assembly_schema/suppressed_violation_json.rb', line 125 def to_jsii result = {} result.merge!(super) result.merge!({ "description" => @description, "ruleName" => @rule_name, "severity" => @severity, "violatingConstructs" => @violating_constructs, "customSeverity" => @custom_severity, "ruleMetadata" => @rule_metadata, "suggestedFix" => @suggested_fix, "acknowledgedId" => @acknowledged_id, "acknowledgedAt" => @acknowledged_at, "acknowledgedStackTrace" => @acknowledged_stack_trace, "reason" => @reason, }) result.compact end |