Class PolicyViolationJson.Builder
java.lang.Object
software.amazon.awscdk.cloud_assembly_schema.PolicyViolationJson.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PolicyViolationJson>
- Enclosing interface:
PolicyViolationJson
@Stability(Stable)
public static final class PolicyViolationJson.Builder
extends Object
implements software.amazon.jsii.Builder<PolicyViolationJson>
A builder for
PolicyViolationJson-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.customSeverity(String customSeverity) Sets the value ofPolicyViolationJson.getCustomSeverity()description(String description) Sets the value ofPolicyViolationJson.getDescription()ruleMetadata(Map<String, String> ruleMetadata) Sets the value ofPolicyViolationJson.getRuleMetadata()Sets the value ofPolicyViolationJson.getRuleName()Sets the value ofPolicyViolationJson.getSeverity()suggestedFix(String suggestedFix) Sets the value ofPolicyViolationJson.getSuggestedFix()violatingConstructs(List<? extends ViolatingConstructJson> violatingConstructs) Sets the value ofPolicyViolationJson.getViolatingConstructs()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
description
Sets the value ofPolicyViolationJson.getDescription()- Parameters:
description- A description of the violation. This parameter is required.- Returns:
this
-
ruleName
Sets the value ofPolicyViolationJson.getRuleName()- Parameters:
ruleName- The name of the rule that was violated. This parameter is required.- Returns:
this
-
severity
Sets the value ofPolicyViolationJson.getSeverity()- Parameters:
severity- The severity of the violation. This parameter is required.- Returns:
this
-
violatingConstructs
@Stability(Stable) public PolicyViolationJson.Builder violatingConstructs(List<? extends ViolatingConstructJson> violatingConstructs) Sets the value ofPolicyViolationJson.getViolatingConstructs()- Parameters:
violatingConstructs- Constructs that violated the rule. This parameter is required.- Returns:
this
-
customSeverity
Sets the value ofPolicyViolationJson.getCustomSeverity()- Parameters:
customSeverity- If the plugin wants to report using a non-standard severity, put it here.- Returns:
this
-
ruleMetadata
Sets the value ofPolicyViolationJson.getRuleMetadata()- Parameters:
ruleMetadata- Additional rule-specific metadata.- Returns:
this
-
suggestedFix
Sets the value ofPolicyViolationJson.getSuggestedFix()- Parameters:
suggestedFix- How to fix the violation.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PolicyViolationJson>- Returns:
- a new instance of
PolicyViolationJson - Throws:
NullPointerException- if any required attribute was not provided
-