Package software.amazon.awscdk
Class PolicyViolation.Builder
java.lang.Object
software.amazon.awscdk.PolicyViolation.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PolicyViolation>
- Enclosing interface:
PolicyViolation
@Stability(Stable)
public static final class PolicyViolation.Builder
extends Object
implements software.amazon.jsii.Builder<PolicyViolation>
A builder for
PolicyViolation-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofPolicyViolation.getDescription()Sets the value ofPolicyViolation.getFix()ruleMetadata(Map<String, String> ruleMetadata) Sets the value ofPolicyViolation.getRuleMetadata()Sets the value ofPolicyViolation.getRuleName()Sets the value ofPolicyViolation.getSeverity()violatingResources(List<? extends PolicyViolatingResource> violatingResources) Sets the value ofPolicyViolation.getViolatingResources()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
description
Sets the value ofPolicyViolation.getDescription()- Parameters:
description- The description of the violation. This parameter is required.- Returns:
this
-
ruleName
Sets the value ofPolicyViolation.getRuleName()- Parameters:
ruleName- The name of the rule. This parameter is required.- Returns:
this
-
violatingResources
@Stability(Stable) public PolicyViolation.Builder violatingResources(List<? extends PolicyViolatingResource> violatingResources) Sets the value ofPolicyViolation.getViolatingResources()- Parameters:
violatingResources- The resources violating this rule. This parameter is required.- Returns:
this
-
fix
Sets the value ofPolicyViolation.getFix()- Parameters:
fix- How to fix the violation.- Returns:
this
-
ruleMetadata
Sets the value ofPolicyViolation.getRuleMetadata()- Parameters:
ruleMetadata- Additional metadata to include with the rule results. This can be used to provide additional information that is plugin specific. The data provided here will be rendered as is.- Returns:
this
-
severity
Sets the value ofPolicyViolation.getSeverity()- Parameters:
severity- The severity of the violation, only used for reporting purposes. This is useful for helping the user discriminate between warnings, errors, information, etc.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PolicyViolation>- Returns:
- a new instance of
PolicyViolation - Throws:
NullPointerException- if any required attribute was not provided
-