Package software.amazon.awscdk
Class PolicyViolatingResource.Builder
java.lang.Object
software.amazon.awscdk.PolicyViolatingResource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PolicyViolatingResource>
- Enclosing interface:
PolicyViolatingResource
@Stability(Stable)
public static final class PolicyViolatingResource.Builder
extends Object
implements software.amazon.jsii.Builder<PolicyViolatingResource>
A builder for
PolicyViolatingResource-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.constructPath(String constructPath) Sets the value ofPolicyViolatingResource.getConstructPath()Sets the value ofPolicyViolatingResource.getLocations()resourceLogicalId(String resourceLogicalId) Sets the value ofPolicyViolatingResource.getResourceLogicalId()templatePath(String templatePath) Sets the value ofPolicyViolatingResource.getTemplatePath()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
locations
Sets the value ofPolicyViolatingResource.getLocations()- Parameters:
locations- The locations in the CloudFormation template that pose the violations. This parameter is required.- Returns:
this
-
constructPath
Sets the value ofPolicyViolatingResource.getConstructPath()- Parameters:
constructPath- The construct path of the violating construct. Use this for violations that originate from constructs rather than CloudFormation resources (e.g. annotations added viaAnnotations.of()orValidations.of()). When provided, the report will use this path directly instead of deriving it from the resource logical ID. Mutually exclusive withresourceLogicalId.- Returns:
this
-
resourceLogicalId
@Stability(Stable) public PolicyViolatingResource.Builder resourceLogicalId(String resourceLogicalId) Sets the value ofPolicyViolatingResource.getResourceLogicalId()- Parameters:
resourceLogicalId- The logical ID of the resource in the CloudFormation template. Required for plugin-sourced violations that operate on CloudFormation templates. Mutually exclusive withconstructPath.- Returns:
this
-
templatePath
Sets the value ofPolicyViolatingResource.getTemplatePath()- Parameters:
templatePath- The path to the CloudFormation template that contains this resource.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PolicyViolatingResource>- Returns:
- a new instance of
PolicyViolatingResource - Throws:
NullPointerException- if any required attribute was not provided
-