class EcsDeployAction
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodePipeline.Actions.EcsDeployAction |
Java | software.amazon.awscdk.services.codepipeline.actions.EcsDeployAction |
Python | aws_cdk.aws_codepipeline_actions.EcsDeployAction |
TypeScript (source) | @aws-cdk/aws-codepipeline-actions » EcsDeployAction |
Implements
IAction
Extends
Action
CodePipeline Action to deploy an ECS Service.
Example
import * as ecs from '@aws-cdk/aws-ecs';
declare const service: ecs.FargateService;
const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
const buildOutput = new codepipeline.Artifact();
const deployStage = pipeline.addStage({
stageName: 'Deploy',
actions: [
new codepipeline_actions.EcsDeployAction({
actionName: 'DeployAction',
service,
// if your file is called imagedefinitions.json,
// use the `input` property,
// and leave out the `imageFile` property
input: buildOutput,
// if your file name is _not_ imagedefinitions.json,
// use the `imageFile` property,
// and leave out the `input` property
imageFile: buildOutput.atPath('imageDef.json'),
deploymentTimeout: Duration.minutes(60), // optional, default is 60 minutes
}),
],
});
Initializer
new EcsDeployAction(props: EcsDeployActionProps)
Parameters
- props
Ecs
Deploy Action Props
Properties
Name | Type | Description |
---|---|---|
action | Action | The simple properties of the Action, like its Owner, name, etc. |
actionProperties
Type:
Action
The simple properties of the Action, like its Owner, name, etc.
Note that this accessor will be called before the {@link bind} callback.
Methods
Name | Description |
---|---|
bind(scope, stage, options) | The callback invoked when this Action is added to a Pipeline. |
on | Creates an Event that will be triggered whenever the state of this Action changes. |
protected bound(_scope, _stage, options) | This is a renamed version of the {@link IAction.bind} method. |
bind(scope, stage, options)
public bind(scope: Construct, stage: IStage, options: ActionBindOptions): ActionConfig
Parameters
- scope
Construct
- stage
IStage
- options
Action
Bind Options
Returns
The callback invoked when this Action is added to a Pipeline.
StateChange(name, target?, options?)
onpublic onStateChange(name: string, target?: IRuleTarget, options?: RuleProps): Rule
Parameters
- name
string
- target
IRule
Target - options
Rule
Props
Returns
Creates an Event that will be triggered whenever the state of this Action changes.
protected bound(_scope, _stage, options)
protected bound(_scope: Construct, _stage: IStage, options: ActionBindOptions): ActionConfig
Parameters
- _scope
Construct
- _stage
IStage
- options
Action
Bind Options
Returns
This is a renamed version of the {@link IAction.bind} method.