DeploymentLifecycleHookTargetConfig Struct
Configuration for a deployment lifecycle hook target.
| Source | aws-ecs/lib/deployment-lifecycle-hook-target.ts |
|---|---|
| Type last changed |
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,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
from aws_cdk import aws_iam as iam
# role: iam.Role
deployment_lifecycle_hook_target_config = ecs.DeploymentLifecycleHookTargetConfig(
lifecycle_stages=[ecs.DeploymentLifecycleStage.RECONCILE_SERVICE],
target_arn="targetArn",
# the properties below are optional
role=role
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.iam.*;
Role role;
DeploymentLifecycleHookTargetConfig deploymentLifecycleHookTargetConfig = DeploymentLifecycleHookTargetConfig.builder()
.lifecycleStages(List.of(DeploymentLifecycleStage.RECONCILE_SERVICE))
.targetArn("targetArn")
// the properties below are optional
.role(role)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.IAM;
Role role;
var deploymentLifecycleHookTargetConfig = new DeploymentLifecycleHookTargetConfig {
LifecycleStages = new [] { DeploymentLifecycleStage.RECONCILE_SERVICE },
TargetArn = "targetArn",
// the properties below are optional
Role = role
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var role Role
deploymentLifecycleHookTargetConfig := &DeploymentLifecycleHookTargetConfig{
LifecycleStages: []DeploymentLifecycleStage{
awscdk.Aws_ecs.DeploymentLifecycleStage_RECONCILE_SERVICE,
},
TargetArn: jsii.String("targetArn"),
// the properties below are optional
Role: role,
}
Properties
lifecycleStagesDeploymentLifecycleStage[]lifecycle_stagestyping.List[DeploymentLifecycleStage]lifecycleStagesList<DeploymentLifecycleStage>LifecycleStagesDeploymentLifecycleStage[]LifecycleStages*[]DeploymentLifecycleStage required #The lifecycle stages when this hook should be executed.
The IAM role that grants permissions to invoke the target.
Default: a role will be created automatically
The ARN of the target resource.