Class PolicyViolationJson.Builder
- java.lang.Object
-
- software.amazon.awscdk.cloudassembly.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 forPolicyViolationJson
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
description
@Stability(Stable) public PolicyViolationJson.Builder description(String description)
Sets the value ofPolicyViolationJson.getDescription()- Parameters:
description- A description of the violation. This parameter is required.- Returns:
this
-
ruleName
@Stability(Stable) public PolicyViolationJson.Builder ruleName(String ruleName)
Sets the value ofPolicyViolationJson.getRuleName()- Parameters:
ruleName- The name of the rule that was violated. This parameter is required. This may include a namespace:'<namespace>::<rule-name>'. If it does not, the plugin name will be used as the namespace.The namespace must be included when acknowledging the violation.
- Returns:
this
-
severity
@Stability(Stable) public PolicyViolationJson.Builder severity(String 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
@Stability(Stable) public PolicyViolationJson.Builder customSeverity(String 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
@Stability(Stable) public PolicyViolationJson.Builder ruleMetadata(Map<String,String> ruleMetadata)
Sets the value ofPolicyViolationJson.getRuleMetadata()- Parameters:
ruleMetadata- Additional rule-specific metadata.- Returns:
this
-
suggestedFix
@Stability(Stable) public PolicyViolationJson.Builder suggestedFix(String suggestedFix)
Sets the value ofPolicyViolationJson.getSuggestedFix()- Parameters:
suggestedFix- How to fix the violation.- Returns:
this
-
build
@Stability(Stable) public PolicyViolationJson 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
-
-