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>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • locations

      @Stability(Stable) public PolicyViolatingResource.Builder locations(List<String> locations)
      Parameters:
      locations - The locations in the CloudFormation template that pose the violations. This parameter is required. This is a location in the CloudFormation template, relative to the resource that this violation is about. For example, if the violation is about a property of a resource, this will contain something like Properties.MyProperty. If the violation is about the Stack itself, it will contain something like Parameters.MyParameter.
      Returns:
      this
    • constructPath

      @Stability(Stable) public PolicyViolatingResource.Builder constructPath(String constructPath)
      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 via Annotations.of() or Validations.of()). When provided, the report will use this path directly instead of deriving it from the resource logical ID. Mutually exclusive with resourceLogicalId.
      Returns:
      this
    • resourceLogicalId

      @Stability(Stable) public PolicyViolatingResource.Builder resourceLogicalId(String resourceLogicalId)
      Parameters:
      resourceLogicalId - The logical ID of the resource in the CloudFormation template. Intended for plugin-sourced violations that operate on CloudFormation templates.

      If set, the constructPath will be added later.

      Returns:
      this
    • templatePath

      @Stability(Stable) public PolicyViolatingResource.Builder templatePath(String templatePath)
      Parameters:
      templatePath - The path to the CloudFormation template that contains this resource.
      Returns:
      this
    • build

      @Stability(Stable) public PolicyViolatingResource build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<PolicyViolatingResource>
      Returns:
      a new instance of PolicyViolatingResource
      Throws:
      NullPointerException - if any required attribute was not provided