Struct cfn_guard::ValidateBuilder
source · pub struct ValidateBuilder { /* private fields */ }
Expand description
.
A builder to help construct the Validate
command
Implementations§
source§impl ValidateBuilder
impl ValidateBuilder
sourcepub fn rules(self, rules: Vec<String>) -> Self
pub fn rules(self, rules: Vec<String>) -> Self
a list of paths that point to rule files, or a directory containing rule files on a local machine. Only files that end with .guard or .ruleset will be evaluated conflicts with payload
sourcepub fn data(self, data: Vec<String>) -> Self
pub fn data(self, data: Vec<String>) -> Self
a list of paths that point to data files, or a directory containing data files for the rules to be evaluated against. Only JSON, or YAML files will be used conflicts with payload
sourcepub fn show_summary(self, args: Vec<ShowSummaryType>) -> Self
pub fn show_summary(self, args: Vec<ShowSummaryType>) -> Self
Controls if the summary table needs to be displayed. –show-summary fail (default) or –show-summary pass,fail (only show rules that did pass/fail) or –show-summary none (to turn it off) or –show-summary all (to show all the rules that pass, fail or skip) default is failed must be set to none if used together with the structured flag
sourcepub fn input_params(self, input_params: Vec<String>) -> Self
pub fn input_params(self, input_params: Vec<String>) -> Self
a list of paths that point to data files, or a directory containing data files to be merged with the data argument and then the rules will be evaluated against them. Only JSON, or YAML files will be used
sourcepub fn output_format(self, output: OutputFormatType) -> Self
pub fn output_format(self, output: OutputFormatType) -> Self
Specify the format in which the output should be displayed
default is single-line-summary
if junit is used, structured
attributed must be set to true
sourcepub fn payload(self, arg: bool) -> Self
pub fn payload(self, arg: bool) -> Self
Tells the command that rules, and data will be passed via a reader, as a json payload. Conflicts with both rules, and data default is false
sourcepub fn alphabetical(self, arg: bool) -> Self
pub fn alphabetical(self, arg: bool) -> Self
Validate files in a directory ordered alphabetically, conflicts with last_modified
field
sourcepub fn last_modified(self, arg: bool) -> Self
pub fn last_modified(self, arg: bool) -> Self
Validate files in a directory ordered by last modified times, conflicts with alphabetical
field
sourcepub fn verbose(self, arg: bool) -> Self
pub fn verbose(self, arg: bool) -> Self
Output verbose logging, conflicts with structured
field
default is false
sourcepub fn print_json(self, arg: bool) -> Self
pub fn print_json(self, arg: bool) -> Self
Print the parse tree in a json format. This can be used to get more details on how the clauses were evaluated
conflicts with the structured
attribute
default is false
sourcepub fn structured(self, arg: bool) -> Self
pub fn structured(self, arg: bool) -> Self
Prints the output which must be specified to JSON/YAML/JUnit in a structured format
Conflicts with the following attributes verbose
, print-json
, output-format
when set
to “single-line-summary”, show-summary when set to anything other than “none”
default is false