ValidationResult

class aws_cdk.core.ValidationResult(error_message=None, results=None)

Bases: object

Representation of validation results.

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

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.core as cdk

# validation_results: cdk.ValidationResults

validation_result = cdk.ValidationResult("errorMessage", validation_results)
Parameters

Methods

assert_success()

Turn a failed validation into an exception.

Return type

None

error_tree()

Return a string rendering of the tree of validation failures.

Return type

str

prefix(message)

Wrap this result with an error message, if it concerns an error.

Parameters

message (str) –

Return type

ValidationResult

Attributes

error_message
Return type

str

is_success
Return type

bool

results
Return type

ValidationResults