Class ValidationResult

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.ValidationResult
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-06T14:43:13.049Z") @Stability(Stable) public class ValidationResult extends software.amazon.jsii.JsiiObject
Representation of validation results.

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 ValidationResults validationResults;
 ValidationResult validationResult = new ValidationResult("errorMessage", validationResults);
 
  • Constructor Details

    • ValidationResult

      protected ValidationResult(software.amazon.jsii.JsiiObjectRef objRef)
    • ValidationResult

      protected ValidationResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ValidationResult

      @Stability(Stable) public ValidationResult(@Nullable String errorMessage, @Nullable ValidationResults results)
      Parameters:
      errorMessage -
      results -
    • ValidationResult

      @Stability(Stable) public ValidationResult(@Nullable String errorMessage)
      Parameters:
      errorMessage -
    • ValidationResult

      @Stability(Stable) public ValidationResult()
  • Method Details

    • assertSuccess

      @Stability(Stable) public void assertSuccess()
      Turn a failed validation into an exception.
    • errorTree

      @Stability(Stable) @NotNull public String errorTree()
      Return a string rendering of the tree of validation failures.
    • prefix

      @Stability(Stable) @NotNull public ValidationResult prefix(@NotNull String message)
      Wrap this result with an error message, if it concerns an error.

      Parameters:
      message - This parameter is required.
    • getErrorMessage

      @Stability(Stable) @NotNull public String getErrorMessage()
    • getIsSuccess

      @Stability(Stable) @NotNull public Boolean getIsSuccess()
    • getResults

      @Stability(Stable) @NotNull public ValidationResults getResults()