Class CfnGuardHookProps
Properties for defining a CfnGuardHook.
Implements
Inherited Members
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnGuardHookProps : ICfnGuardHookProps
Syntax (vb)
Public Class CfnGuardHookProps Implements ICfnGuardHookProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var cfnGuardHookProps = new CfnGuardHookProps {
Alias = "alias",
ExecutionRole = "executionRole",
FailureMode = "failureMode",
HookStatus = "hookStatus",
RuleLocation = new S3LocationProperty {
Uri = "uri",
// the properties below are optional
VersionId = "versionId"
},
TargetOperations = new [] { "targetOperations" },
// the properties below are optional
LogBucket = "logBucket",
Options = new OptionsProperty {
InputParams = new S3LocationProperty {
Uri = "uri",
// the properties below are optional
VersionId = "versionId"
}
},
StackFilters = new StackFiltersProperty {
FilteringCriteria = "filteringCriteria",
// the properties below are optional
StackNames = new StackNamesProperty {
Exclude = new [] { "exclude" },
Include = new [] { "include" }
},
StackRoles = new StackRolesProperty {
Exclude = new [] { "exclude" },
Include = new [] { "include" }
}
},
TargetFilters = new TargetFiltersProperty {
Targets = new [] { new HookTargetProperty {
Action = "action",
InvocationPoint = "invocationPoint",
TargetName = "targetName"
} },
// the properties below are optional
Actions = new [] { "actions" },
InvocationPoints = new [] { "invocationPoints" },
TargetNames = new [] { "targetNames" }
}
};
Synopsis
Constructors
| CfnGuardHookProps() | Properties for defining a |
Properties
| Alias | The type name alias for the Hook. This alias must be unique per account and Region. |
| ExecutionRole | The IAM role that the Hook assumes to retrieve your Guard rules from S3 and optionally write a detailed Guard output report back. |
| FailureMode | Specifies how the Hook responds when rules fail their evaluation. |
| HookStatus | Specifies if the Hook is |
| LogBucket | Specifies the name of an S3 bucket to store the Guard output report. |
| Options | Specifies the S3 location of your input parameters. |
| RuleLocation | Specifies the S3 location of your Guard rules. |
| StackFilters | Specifies the stack level filters for the Hook. |
| TargetFilters | Specifies the target filters for the Hook. |
| TargetOperations | Specifies the list of operations the Hook is run against. |
Constructors
CfnGuardHookProps()
Properties for defining a CfnGuardHook.
public CfnGuardHookProps()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var cfnGuardHookProps = new CfnGuardHookProps {
Alias = "alias",
ExecutionRole = "executionRole",
FailureMode = "failureMode",
HookStatus = "hookStatus",
RuleLocation = new S3LocationProperty {
Uri = "uri",
// the properties below are optional
VersionId = "versionId"
},
TargetOperations = new [] { "targetOperations" },
// the properties below are optional
LogBucket = "logBucket",
Options = new OptionsProperty {
InputParams = new S3LocationProperty {
Uri = "uri",
// the properties below are optional
VersionId = "versionId"
}
},
StackFilters = new StackFiltersProperty {
FilteringCriteria = "filteringCriteria",
// the properties below are optional
StackNames = new StackNamesProperty {
Exclude = new [] { "exclude" },
Include = new [] { "include" }
},
StackRoles = new StackRolesProperty {
Exclude = new [] { "exclude" },
Include = new [] { "include" }
}
},
TargetFilters = new TargetFiltersProperty {
Targets = new [] { new HookTargetProperty {
Action = "action",
InvocationPoint = "invocationPoint",
TargetName = "targetName"
} },
// the properties below are optional
Actions = new [] { "actions" },
InvocationPoints = new [] { "invocationPoints" },
TargetNames = new [] { "targetNames" }
}
};
Properties
Alias
The type name alias for the Hook. This alias must be unique per account and Region.
public string Alias { get; set; }
Property Value
Remarks
The alias must be in the form Name1::Name2::Name3 and must not begin with AWS . For example, Private::Guard::MyTestHook .
ExecutionRole
The IAM role that the Hook assumes to retrieve your Guard rules from S3 and optionally write a detailed Guard output report back.
public string ExecutionRole { get; set; }
Property Value
Remarks
FailureMode
Specifies how the Hook responds when rules fail their evaluation.
public string FailureMode { get; set; }
Property Value
Remarks
HookStatus
Specifies if the Hook is ENABLED or DISABLED .
public string HookStatus { get; set; }
Property Value
Remarks
LogBucket
Specifies the name of an S3 bucket to store the Guard output report.
public string? LogBucket { get; set; }
Property Value
Remarks
This report contains the results of your Guard rule validations.
Options
Specifies the S3 location of your input parameters.
public object? Options { get; set; }
Property Value
Remarks
RuleLocation
Specifies the S3 location of your Guard rules.
public object RuleLocation { get; set; }
Property Value
Remarks
StackFilters
Specifies the stack level filters for the Hook.
public object? StackFilters { get; set; }
Property Value
Remarks
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
Type union: either IResolvable or CfnGuardHook.IStackFiltersProperty
TargetFilters
Specifies the target filters for the Hook.
public object? TargetFilters { get; set; }
Property Value
Remarks
Example target filter in JSON:
"TargetFilters": {"Actions": [ "CREATE", "UPDATE", "DELETE" ]}
Example target filter in YAML:
TargetFilters: Actions: - CREATE - UPDATE - DELETE
Type union: either IResolvable or CfnGuardHook.ITargetFiltersProperty
TargetOperations
Specifies the list of operations the Hook is run against.
public string[] TargetOperations { get; set; }
Property Value
string[]
Remarks
For more information, see Hook targets in the CloudFormation Hooks User Guide .
Valid values: STACK | RESOURCE | CHANGE_SET | CLOUD_CONTROL