Show / Hide Table of Contents

Class CfnGuardHookProps

Properties for defining a CfnGuardHook.

Inheritance
object
CfnGuardHookProps
Implements
ICfnGuardHookProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnGuardHookProps : ICfnGuardHookProps
Syntax (vb)
Public Class CfnGuardHookProps Implements ICfnGuardHookProps
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html

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 CfnGuardHook.

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 ENABLED or DISABLED .

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

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html

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

string

Remarks

The alias must be in the form Name1::Name2::Name3 and must not begin with AWS . For example, Private::Guard::MyTestHook .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-alias

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

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-executionrole

FailureMode

Specifies how the Hook responds when rules fail their evaluation.

public string FailureMode { get; set; }
Property Value

string

Remarks

    Default: - "WARN"

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-failuremode

    HookStatus

    Specifies if the Hook is ENABLED or DISABLED .

    public string HookStatus { get; set; }
    Property Value

    string

    Remarks

    Default: - "DISABLED"

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-hookstatus

    LogBucket

    Specifies the name of an S3 bucket to store the Guard output report.

    public string? LogBucket { get; set; }
    Property Value

    string

    Remarks

    This report contains the results of your Guard rule validations.

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-logbucket

    Options

    Specifies the S3 location of your input parameters.

    public object? Options { get; set; }
    Property Value

    object

    Remarks

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-options

    Type union: either IResolvable or CfnGuardHook.IOptionsProperty

    RuleLocation

    Specifies the S3 location of your Guard rules.

    public object RuleLocation { get; set; }
    Property Value

    object

    Remarks

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-rulelocation

    Type union: either IResolvable or CfnGuardHook.IS3LocationProperty

    StackFilters

    Specifies the stack level filters for the Hook.

    public object? StackFilters { get; set; }
    Property Value

    object

    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

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-stackfilters

    Type union: either IResolvable or CfnGuardHook.IStackFiltersProperty

    TargetFilters

    Specifies the target filters for the Hook.

    public object? TargetFilters { get; set; }
    Property Value

    object

    Remarks

    Example target filter in JSON:

    "TargetFilters": {"Actions": [ "CREATE", "UPDATE", "DELETE" ]}

    Example target filter in YAML:

    TargetFilters: Actions: - CREATE - UPDATE - DELETE

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-targetfilters

    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

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-guardhook.html#cfn-cloudformation-guardhook-targetoperations

    Implements

    ICfnGuardHookProps
    Back to top Generated by DocFX