class CfnHook (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.CfnHook |
Go | github.com/aws/aws-cdk-go/awscdk/v2#CfnHook |
Java | software.amazon.awscdk.CfnHook |
Python | aws_cdk.CfnHook |
TypeScript (source) | aws-cdk-lib » CfnHook |
Implements
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 | Node | The tree node. |
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:
Node
The tree node.
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 |
LogicalId(newLogicalId)
overridepublic 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.
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
Properties(props?)
protected renderprotected renderProperties(props?: { [string]: any }): { [string]: any }
Parameters
- props
{ [string]: any }
Returns
{ [string]: any }