Skip to content
v2.274.0

DeploymentLifecycleHookTargetConfig Struct ​

Configuration for a deployment lifecycle hook target.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const role: iam.Role;
const deploymentLifecycleHookTargetConfig: ecs.DeploymentLifecycleHookTargetConfig = {
  lifecycleStages: [ecs.DeploymentLifecycleStage.RECONCILE_SERVICE],
  targetArn: 'targetArn',

  // the properties below are optional
  role: role,
};

Properties ​

lifecycleStagesDeploymentLifecycleStage[]lifecycle_stagestyping.List[DeploymentLifecycleStage]lifecycleStagesList<DeploymentLifecycleStage>LifecycleStagesDeploymentLifecycleStage[]LifecycleStages*[]DeploymentLifecycleStagerequired#
The lifecycle stages when this hook should be executed.
roleIRoleroleIRoleroleIRoleRoleIRoleRoleIRole#
The IAM role that grants permissions to invoke the target.

Default: a role will be created automatically

targetArnstringtarget_arnstrtargetArnStringTargetArnstringTargetArn*stringrequired#
The ARN of the target resource.