class CfnHook (construct)
This page is available in another version. Click here for the v2 documentation.
Language | Type name |
---|---|
![]() | Amazon.CDK.CfnHook |
![]() | software.amazon.awscdk.core.CfnHook |
![]() | aws_cdk.core.CfnHook |
![]() | @aws-cdk/core » CfnHook |
Implements
IConstruct
, IConstruct
, IDependable
Represents a CloudFormation resource.
Example
declare const cfnTemplate: cfn_inc.CfnInclude;
const hook: core.CfnHook = cfnTemplate.getHook('MyOutput');
// mutating the hook
declare const myRole: iam.Role;
const codeDeployHook = hook as core.CfnCodeDeployBlueGreenHook;
codeDeployHook.serviceRole = myRole.roleArn;
Initializer
new CfnHook(scope: Construct, id: string, props: CfnHookProps)
Parameters
- scope
Construct
- id
string
- props
Cfn
Hook Props
Creates a new Hook object.
Construct Props
Name | Type | Description |
---|---|---|
type | string | The type of the hook (for example, "AWS::CodeDeploy::BlueGreen"). |
properties? | { [string]: any } | The properties of the hook. |
type
Type:
string
The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
properties?
Type:
{ [string]: any }
(optional, default: no properties)
The properties of the hook.
Properties
Name | Type | Description |
---|---|---|
creation | string[] | |
logical | string | The logical ID for this CloudFormation stack element. |
node | Construct | The construct tree node associated with this construct. |
stack | Stack | The stack in which this element is defined. |
type | string | The type of the hook (for example, "AWS::CodeDeploy::BlueGreen"). |
creationStack
Type:
string[]
logicalId
Type:
string
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId)
.
node
Type:
Construct
The construct tree node associated with this construct.
stack
Type:
Stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
type
Type:
string
The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
Methods
Name | Description |
---|---|
override | Overrides the auto-generated logical ID with a specific ID. |
to | Returns a string representation of this construct. |
protected render |
overrideLogicalId(newLogicalId)
public overrideLogicalId(newLogicalId: string): void
Parameters
- newLogicalId
string
— The new logical ID to use for this stack element.
Overrides the auto-generated logical ID with a specific ID.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
protected renderProperties(props?)
protected renderProperties(props?: { [string]: any }): { [string]: any }
Parameters
- props
{ [string]: any }
Returns
{ [string]: any }