Class CfnGuardHookMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGuardHookMixinProps>
- Enclosing interface:
CfnGuardHookMixinProps
CfnGuardHookMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnGuardHookMixinProps.getAlias()build()Builds the configured instance.executionRole(String executionRole) Sets the value ofCfnGuardHookMixinProps.getExecutionRole()failureMode(String failureMode) Sets the value ofCfnGuardHookMixinProps.getFailureMode()hookStatus(String hookStatus) Sets the value ofCfnGuardHookMixinProps.getHookStatus()Sets the value ofCfnGuardHookMixinProps.getLogBucket()options(IResolvable options) Sets the value ofCfnGuardHookMixinProps.getOptions()Sets the value ofCfnGuardHookMixinProps.getOptions()ruleLocation(IResolvable ruleLocation) Sets the value ofCfnGuardHookMixinProps.getRuleLocation()ruleLocation(CfnGuardHookPropsMixin.S3LocationProperty ruleLocation) Sets the value ofCfnGuardHookMixinProps.getRuleLocation()stackFilters(IResolvable stackFilters) Sets the value ofCfnGuardHookMixinProps.getStackFilters()stackFilters(CfnGuardHookPropsMixin.StackFiltersProperty stackFilters) Sets the value ofCfnGuardHookMixinProps.getStackFilters()targetFilters(IResolvable targetFilters) Sets the value ofCfnGuardHookMixinProps.getTargetFilters()targetFilters(CfnGuardHookPropsMixin.TargetFiltersProperty targetFilters) Sets the value ofCfnGuardHookMixinProps.getTargetFilters()targetOperations(List<String> targetOperations) Sets the value ofCfnGuardHookMixinProps.getTargetOperations()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
alias
Sets the value ofCfnGuardHookMixinProps.getAlias()- Parameters:
alias- The type name alias for the Hook. This alias must be unique per account and Region. The alias must be in the formName1::Name2::Name3and must not begin withAWS. For example,Private::Guard::MyTestHook.- Returns:
this
-
executionRole
Sets the value ofCfnGuardHookMixinProps.getExecutionRole()- Parameters:
executionRole- The IAM role that the Hook assumes to retrieve your Guard rules from S3 and optionally write a detailed Guard output report back.- Returns:
this
-
failureMode
Sets the value ofCfnGuardHookMixinProps.getFailureMode()- Parameters:
failureMode- Specifies how the Hook responds when rules fail their evaluation.FAIL: Prevents the action from proceeding. This is helpful for enforcing strict compliance or security policies.WARN: Issues warnings to users but allows actions to continue. This is useful for non-critical validations or informational checks.
- Returns:
this
-
hookStatus
Sets the value ofCfnGuardHookMixinProps.getHookStatus()- Parameters:
hookStatus- Specifies if the Hook isENABLEDorDISABLED.- Returns:
this
-
logBucket
Sets the value ofCfnGuardHookMixinProps.getLogBucket()- Parameters:
logBucket- Specifies the name of an S3 bucket to store the Guard output report. This report contains the results of your Guard rule validations.- Returns:
this
-
options
Sets the value ofCfnGuardHookMixinProps.getOptions()- Parameters:
options- Specifies the S3 location of your input parameters.- Returns:
this
-
options
@Stability(Stable) public CfnGuardHookMixinProps.Builder options(CfnGuardHookPropsMixin.OptionsProperty options) Sets the value ofCfnGuardHookMixinProps.getOptions()- Parameters:
options- Specifies the S3 location of your input parameters.- Returns:
this
-
ruleLocation
Sets the value ofCfnGuardHookMixinProps.getRuleLocation()- Parameters:
ruleLocation- Specifies the S3 location of your Guard rules.- Returns:
this
-
ruleLocation
@Stability(Stable) public CfnGuardHookMixinProps.Builder ruleLocation(CfnGuardHookPropsMixin.S3LocationProperty ruleLocation) Sets the value ofCfnGuardHookMixinProps.getRuleLocation()- Parameters:
ruleLocation- Specifies the S3 location of your Guard rules.- Returns:
this
-
stackFilters
Sets the value ofCfnGuardHookMixinProps.getStackFilters()- Parameters:
stackFilters- Specifies the stack level filters for the Hook. Example stack level filter in JSON:"StackFilters": {"FilteringCriteria": "ALL", "StackNames": {"Exclude": [ "stack-1", "stack-2"]}}Example stack level filter in YAML:
StackFilters: FilteringCriteria: ALL StackNames: Exclude: - stack-1 - stack-2- Returns:
this
-
stackFilters
@Stability(Stable) public CfnGuardHookMixinProps.Builder stackFilters(CfnGuardHookPropsMixin.StackFiltersProperty stackFilters) Sets the value ofCfnGuardHookMixinProps.getStackFilters()- Parameters:
stackFilters- Specifies the stack level filters for the Hook. Example stack level filter in JSON:"StackFilters": {"FilteringCriteria": "ALL", "StackNames": {"Exclude": [ "stack-1", "stack-2"]}}Example stack level filter in YAML:
StackFilters: FilteringCriteria: ALL StackNames: Exclude: - stack-1 - stack-2- Returns:
this
-
targetFilters
Sets the value ofCfnGuardHookMixinProps.getTargetFilters()- Parameters:
targetFilters- Specifies the target filters for the Hook. Example target filter in JSON:"TargetFilters": {"Actions": [ "CREATE", "UPDATE", "DELETE" ]}Example target filter in YAML:
TargetFilters: Actions: - CREATE - UPDATE - DELETE- Returns:
this
-
targetFilters
@Stability(Stable) public CfnGuardHookMixinProps.Builder targetFilters(CfnGuardHookPropsMixin.TargetFiltersProperty targetFilters) Sets the value ofCfnGuardHookMixinProps.getTargetFilters()- Parameters:
targetFilters- Specifies the target filters for the Hook. Example target filter in JSON:"TargetFilters": {"Actions": [ "CREATE", "UPDATE", "DELETE" ]}Example target filter in YAML:
TargetFilters: Actions: - CREATE - UPDATE - DELETE- Returns:
this
-
targetOperations
@Stability(Stable) public CfnGuardHookMixinProps.Builder targetOperations(List<String> targetOperations) Sets the value ofCfnGuardHookMixinProps.getTargetOperations()- Parameters:
targetOperations- Specifies the list of operations the Hook is run against. For more information, see Hook targets in the CloudFormation Hooks User Guide .Valid values:
STACK|RESOURCE|CHANGE_SET|CLOUD_CONTROL- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnGuardHookMixinProps>- Returns:
- a new instance of
CfnGuardHookMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-