Class EcsDeployActionProps
Construction properties of EcsDeployAction
.
Inherited Members
Namespace: Amazon.CDK.AWS.CodePipeline.Actions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EcsDeployActionProps : IEcsDeployActionProps, ICommonAwsActionProps, ICommonActionProps
Syntax (vb)
Public Class EcsDeployActionProps Implements IEcsDeployActionProps, ICommonAwsActionProps, ICommonActionProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ECS;
FargateService service;
var pipeline = new Pipeline(this, "MyPipeline");
var buildOutput = new Artifact();
var deployStage = pipeline.AddStage(new StageOptions {
StageName = "Deploy",
Actions = new [] {
new EcsDeployAction(new EcsDeployActionProps {
ActionName = "DeployAction",
Service = 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)
}) }
});
Synopsis
Constructors
EcsDeployActionProps() | Construction properties of |
Properties
ActionName | The physical, human-readable name of the Action. |
DeploymentTimeout | Timeout for the ECS deployment in minutes. |
ImageFile | The name of the JSON image definitions file to use for deployments. |
Input | The input artifact that contains the JSON image definitions file to use for deployments. |
Role | The Role in which context's this Action will be executing in. |
RunOrder | The runOrder property for this Action. |
Service | The ECS Service to deploy. |
VariablesNamespace | The name of the namespace to use for variables emitted by this action. |
Constructors
EcsDeployActionProps()
Construction properties of EcsDeployAction
.
public EcsDeployActionProps()
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ECS;
FargateService service;
var pipeline = new Pipeline(this, "MyPipeline");
var buildOutput = new Artifact();
var deployStage = pipeline.AddStage(new StageOptions {
StageName = "Deploy",
Actions = new [] {
new EcsDeployAction(new EcsDeployActionProps {
ActionName = "DeployAction",
Service = 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)
}) }
});
Properties
ActionName
The physical, human-readable name of the Action.
public string ActionName { get; set; }
Property Value
Remarks
Note that Action names must be unique within a single Stage.
DeploymentTimeout
Timeout for the ECS deployment in minutes.
public Duration? DeploymentTimeout { get; set; }
Property Value
Remarks
Value must be between 1-60.
Default: - 60 minutes
ImageFile
The name of the JSON image definitions file to use for deployments.
public ArtifactPath_? ImageFile { get; set; }
Property Value
Remarks
The JSON file is a list of objects,
each with 2 keys: name
is the name of the container in the Task Definition,
and imageUri
is the Docker image URI you want to update your service with.
Use this property if you want to use a different name for this file than the default 'imagedefinitions.json'.
If you use this property, you don't need to specify the input
property.
Default: - one of this property, or input
, is required
Input
The input artifact that contains the JSON image definitions file to use for deployments.
public Artifact_? Input { get; set; }
Property Value
Remarks
The JSON file is a list of objects,
each with 2 keys: name
is the name of the container in the Task Definition,
and imageUri
is the Docker image URI you want to update your service with.
If you use this property, it's assumed the file is called 'imagedefinitions.json'.
If your build uses a different file, leave this property empty,
and use the imageFile
property instead.
Default: - one of this property, or imageFile
, is required
Role
The Role in which context's this Action will be executing in.
public IRole? Role { get; set; }
Property Value
Remarks
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.
Default: a new Role will be generated
RunOrder
The runOrder property for this Action.
public double? RunOrder { get; set; }
Property Value
Remarks
RunOrder determines the relative order in which multiple Actions in the same Stage execute.
Default: 1
Service
The ECS Service to deploy.
public IBaseService Service { get; set; }
Property Value
Remarks
ExampleMetadata: infused
VariablesNamespace
The name of the namespace to use for variables emitted by this action.
public string? VariablesNamespace { get; set; }
Property Value
Remarks
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