# CodeDeployEcsDeployAction

Extends: Action › Action › CodeDeployEcsDeployAction
Implements: IAction

- Source: [`aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts#L111)

## Example

```ts
// 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 codeDeployEcsDeployAction = new codepipeline_actions.CodeDeployEcsDeployAction({
  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',
});
```

## Initializer

```ts
new CodeDeployEcsDeployAction(props: CodeDeployEcsDeployActionProps)
```

## Properties

- `actionProperties`: [ActionProperties](/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.ActionProperties.html) — The simple properties of the Action, like its Owner, name, etc.

  Note that this accessor will be called before the `bind` callback.

## Methods

- `bind(scope: Construct, stage: IStage, options: ActionBindOptions): ActionConfig` — The callback invoked when this Action is added to a Pipeline.

- `onStateChange(name: string, target?: IRuleTarget, options?: RuleProps): Rule` — Creates an Event that will be triggered whenever the state of this Action changes.
