java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-21T06:34:04.501Z") @Stability(Stable) public class CfnGuardHook extends CfnResource implements IInspectable
This is a CloudFormation resource for activating the first-party AWS::Hooks::GuardHook.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.cloudformation.*;
 CfnGuardHook cfnGuardHook = CfnGuardHook.Builder.create(this, "MyCfnGuardHook")
         .alias("alias")
         .executionRole("executionRole")
         .failureMode("failureMode")
         .hookStatus("hookStatus")
         .ruleLocation(S3LocationProperty.builder()
                 .uri("uri")
                 // the properties below are optional
                 .versionId("versionId")
                 .build())
         .targetOperations(List.of("targetOperations"))
         // the properties below are optional
         .logBucket("logBucket")
         .options(OptionsProperty.builder()
                 .inputParams(S3LocationProperty.builder()
                         .uri("uri")
                         // the properties below are optional
                         .versionId("versionId")
                         .build())
                 .build())
         .stackFilters(StackFiltersProperty.builder()
                 .filteringCriteria("filteringCriteria")
                 // the properties below are optional
                 .stackNames(StackNamesProperty.builder()
                         .exclude(List.of("exclude"))
                         .include(List.of("include"))
                         .build())
                 .stackRoles(StackRolesProperty.builder()
                         .exclude(List.of("exclude"))
                         .include(List.of("include"))
                         .build())
                 .build())
         .targetFilters(TargetFiltersProperty.builder()
                 .actions(List.of("actions"))
                 .invocationPoints(List.of("invocationPoints"))
                 .targetNames(List.of("targetNames"))
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnGuardHook

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

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

      @Stability(Stable) public CfnGuardHook(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnGuardHookProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrHookArn

      @Stability(Stable) @NotNull public String getAttrHookArn()
      The Amazon Resource Name (ARN) of the activated hook.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getAlias

      @Stability(Stable) @NotNull public String getAlias()
      The typename alias for the hook.
    • setAlias

      @Stability(Stable) public void setAlias(@NotNull String value)
      The typename alias for the hook.
    • getExecutionRole

      @Stability(Stable) @NotNull public String getExecutionRole()
      IAM Role ARN.
    • setExecutionRole

      @Stability(Stable) public void setExecutionRole(@NotNull String value)
      IAM Role ARN.
    • getFailureMode

      @Stability(Stable) @NotNull public String getFailureMode()
      Attribute to specify CloudFormation behavior on hook failure.
    • setFailureMode

      @Stability(Stable) public void setFailureMode(@NotNull String value)
      Attribute to specify CloudFormation behavior on hook failure.
    • getHookStatus

      @Stability(Stable) @NotNull public String getHookStatus()
      Attribute to specify which stacks this hook applies to or should get invoked for.
    • setHookStatus

      @Stability(Stable) public void setHookStatus(@NotNull String value)
      Attribute to specify which stacks this hook applies to or should get invoked for.
    • getRuleLocation

      @Stability(Stable) @NotNull public Object getRuleLocation()
      S3 Source Location for the Guard files.
    • setRuleLocation

      @Stability(Stable) public void setRuleLocation(@NotNull IResolvable value)
      S3 Source Location for the Guard files.
    • setRuleLocation

      @Stability(Stable) public void setRuleLocation(@NotNull CfnGuardHook.S3LocationProperty value)
      S3 Source Location for the Guard files.
    • getTargetOperations

      @Stability(Stable) @NotNull public List<String> getTargetOperations()
      Which operations should this Hook run against?
    • setTargetOperations

      @Stability(Stable) public void setTargetOperations(@NotNull List<String> value)
      Which operations should this Hook run against?
    • getLogBucket

      @Stability(Stable) @Nullable public String getLogBucket()
      S3 Bucket where the guard validate report will be uploaded to.
    • setLogBucket

      @Stability(Stable) public void setLogBucket(@Nullable String value)
      S3 Bucket where the guard validate report will be uploaded to.
    • getOptions

      @Stability(Stable) @Nullable public Object getOptions()
    • setOptions

      @Stability(Stable) public void setOptions(@Nullable IResolvable value)
    • setOptions

      @Stability(Stable) public void setOptions(@Nullable CfnGuardHook.OptionsProperty value)
    • getStackFilters

      @Stability(Stable) @Nullable public Object getStackFilters()
      Filters to allow hooks to target specific stack attributes.
    • setStackFilters

      @Stability(Stable) public void setStackFilters(@Nullable IResolvable value)
      Filters to allow hooks to target specific stack attributes.
    • setStackFilters

      @Stability(Stable) public void setStackFilters(@Nullable CfnGuardHook.StackFiltersProperty value)
      Filters to allow hooks to target specific stack attributes.
    • getTargetFilters

      @Stability(Stable) @Nullable public Object getTargetFilters()
    • setTargetFilters

      @Stability(Stable) public void setTargetFilters(@Nullable IResolvable value)
    • setTargetFilters

      @Stability(Stable) public void setTargetFilters(@Nullable CfnGuardHook.TargetFiltersProperty value)