Function validateStackResourcesOfType

  • A helper function that returns a strongly-typed stack validation function, used to check only resources of the specified resource class.

    For example:

    validateStack: validateStackResourcesOfType(aws.s3.Bucket, (buckets, args, reportViolation) => {
    for (const bucket of buckets) {
    // ...
    }
    }),

    Type Parameters

    Parameters

    • resourceClass: (new (...rest) => TResource)

      Used to filter this check to only resources of the specified resource class.

    • validate: ((resources, args, reportViolation) => void | Promise<void>)

      A callback function that validates if a stack violates a policy.

    Returns StackValidation

Generated using TypeDoc