aws-cdk-lib.aws_codepipeline_actions.CodeDeployEcsDeployActionProps

interface CodeDeployEcsDeployActionProps

LanguageType name
.NETAmazon.CDK.AWS.CodePipeline.Actions.CodeDeployEcsDeployActionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodepipelineactions#CodeDeployEcsDeployActionProps
Javasoftware.amazon.awscdk.services.codepipeline.actions.CodeDeployEcsDeployActionProps
Pythonaws_cdk.aws_codepipeline_actions.CodeDeployEcsDeployActionProps
TypeScript (source)aws-cdk-lib » aws_codepipeline_actions » CodeDeployEcsDeployActionProps

Construction properties of the CodeDeployEcsDeployAction CodeDeploy ECS deploy CodePipeline Action.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codedeploy as codedeploy } from 'aws-cdk-lib';
import { aws_codepipeline as codepipeline } from 'aws-cdk-lib';
import { aws_codepipeline_actions as codepipeline_actions } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const artifact: codepipeline.Artifact;
declare const artifactPath: codepipeline.ArtifactPath;
declare const ecsDeploymentGroup: codedeploy.EcsDeploymentGroup;
declare const role: iam.Role;
const codeDeployEcsDeployActionProps: codepipeline_actions.CodeDeployEcsDeployActionProps = {
  actionName: 'actionName',
  deploymentGroup: ecsDeploymentGroup,

  // the properties below are optional
  appSpecTemplateFile: artifactPath,
  appSpecTemplateInput: artifact,
  containerImageInputs: [{
    input: artifact,

    // the properties below are optional
    taskDefinitionPlaceholder: 'taskDefinitionPlaceholder',
  }],
  role: role,
  runOrder: 123,
  taskDefinitionTemplateFile: artifactPath,
  taskDefinitionTemplateInput: artifact,
  variablesNamespace: 'variablesNamespace',
};

Properties

NameTypeDescription
actionNamestringThe physical, human-readable name of the Action.
deploymentGroupIEcsDeploymentGroupThe CodeDeploy ECS Deployment Group to deploy to.
appSpecTemplateFile?ArtifactPathThe name of the CodeDeploy AppSpec file.
appSpecTemplateInput?ArtifactThe artifact containing the CodeDeploy AppSpec file.
containerImageInputs?CodeDeployEcsContainerImageInput[]Configuration for dynamically updated images in the task definition.
role?IRoleThe Role in which context's this Action will be executing in.
runOrder?numberThe runOrder property for this Action.
taskDefinitionTemplateFile?ArtifactPathThe name of the ECS task definition template file.
taskDefinitionTemplateInput?ArtifactThe artifact containing the ECS task definition template file.
variablesNamespace?stringThe name of the namespace to use for variables emitted by this action.

actionName

Type: string

The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.


deploymentGroup

Type: IEcsDeploymentGroup

The CodeDeploy ECS Deployment Group to deploy to.


appSpecTemplateFile?

Type: ArtifactPath (optional, default: one of this property, or appSpecTemplateInput, is required)

The name of the CodeDeploy AppSpec file.

During deployment, a new task definition will be registered with ECS, and the new task definition ID will be inserted into the CodeDeploy AppSpec file. The AppSpec file contents will be provided to CodeDeploy for the deployment.

Use this property if you want to use a different name for this file than the default 'appspec.yaml'. If you use this property, you don't need to specify the appSpecTemplateInput property.


appSpecTemplateInput?

Type: Artifact (optional, default: one of this property, or appSpecTemplateFile, is required)

The artifact containing the CodeDeploy AppSpec file.

During deployment, a new task definition will be registered with ECS, and the new task definition ID will be inserted into the CodeDeploy AppSpec file. The AppSpec file contents will be provided to CodeDeploy for the deployment.

If you use this property, it's assumed the file is called 'appspec.yaml'. If your AppSpec file uses a different filename, leave this property empty, and use the appSpecTemplateFile property instead.


containerImageInputs?

Type: CodeDeployEcsContainerImageInput[] (optional)

Configuration for dynamically updated images in the task definition.

Provide pairs of an image details input artifact and a placeholder string that will be used to dynamically update the ECS task definition template file prior to deployment. A maximum of 4 images can be given.


role?

Type: IRole (optional, default: a new Role will be generated)

The Role in which context's this Action will be executing in.

The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.


runOrder?

Type: number (optional, default: 1)

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.

See also: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html


taskDefinitionTemplateFile?

Type: ArtifactPath (optional, default: one of this property, or taskDefinitionTemplateInput, is required)

The name of the ECS task definition template file.

During deployment, the task definition template file contents will be registered with ECS.

Use this property if you want to use a different name for this file than the default 'taskdef.json'. If you use this property, you don't need to specify the taskDefinitionTemplateInput property.


taskDefinitionTemplateInput?

Type: Artifact (optional, default: one of this property, or taskDefinitionTemplateFile, is required)

The artifact containing the ECS task definition template file.

During deployment, the task definition template file contents will be registered with ECS.

If you use this property, it's assumed the file is called 'taskdef.json'. If your task definition template uses a different filename, leave this property empty, and use the taskDefinitionTemplateFile property instead.


variablesNamespace?

Type: string (optional, default: a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set)

The name of the namespace to use for variables emitted by this action.