Class CfnHook
Represents a CloudFormation resource.
Inherited Members
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnHook : CfnElement
Syntax (vb)
Public Class CfnHook Inherits CfnElement
Remarks
ExampleMetadata: infused
Examples
CfnInclude cfnTemplate;
// mutating the hook
Role myRole;
var hook = cfnTemplate.GetHook("MyOutput");
var codeDeployHook = (CfnCodeDeployBlueGreenHook)hook;
codeDeployHook.ServiceRole = myRole.RoleArn;
Synopsis
Constructors
CfnHook(Construct, string, ICfnHookProps) | Creates a new Hook object. |
Properties
Type | The type of the hook (for example, "AWS::CodeDeploy::BlueGreen"). |
Methods
RenderProperties(IDictionary<string, object>?) | Represents a CloudFormation resource. |
Constructors
CfnHook(Construct, string, ICfnHookProps)
Creates a new Hook object.
public CfnHook(Construct scope, string id, ICfnHookProps props)
Parameters
- scope Construct
- id string
- props ICfnHookProps
Remarks
ExampleMetadata: infused
Properties
Type
The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
public virtual string Type { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
RenderProperties(IDictionary<string, object>?)
Represents a CloudFormation resource.
protected virtual IDictionary<string, object>? RenderProperties(IDictionary<string, object>? props = null)
Parameters
- props IDictionary<string, object>
Returns
Remarks
ExampleMetadata: infused
Examples
CfnInclude cfnTemplate;
// mutating the hook
Role myRole;
var hook = cfnTemplate.GetHook("MyOutput");
var codeDeployHook = (CfnCodeDeployBlueGreenHook)hook;
codeDeployHook.ServiceRole = myRole.RoleArn;