CodeDeployEcsDeployActionProps Struct
Construction properties of the CodeDeployEcsDeployAction CodeDeploy ECS deploy CodePipeline Action.
| Source | aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts |
|---|
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',
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codedeploy as codedeploy
from aws_cdk import aws_codepipeline as codepipeline
from aws_cdk import aws_codepipeline_actions as codepipeline_actions
from aws_cdk import aws_iam as iam
# artifact: codepipeline.Artifact
# artifact_path: codepipeline.ArtifactPath
# ecs_deployment_group: codedeploy.EcsDeploymentGroup
# role: iam.Role
code_deploy_ecs_deploy_action_props = codepipeline_actions.CodeDeployEcsDeployActionProps(
action_name="actionName",
deployment_group=ecs_deployment_group,
# the properties below are optional
app_spec_template_file=artifact_path,
app_spec_template_input=artifact,
container_image_inputs=[codepipeline_actions.CodeDeployEcsContainerImageInput(
input=artifact,
# the properties below are optional
task_definition_placeholder="taskDefinitionPlaceholder"
)],
role=role,
run_order=123,
task_definition_template_file=artifact_path,
task_definition_template_input=artifact,
variables_namespace="variablesNamespace"
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codedeploy.*;
import software.amazon.awscdk.services.codepipeline.*;
import software.amazon.awscdk.services.codepipeline.actions.*;
import software.amazon.awscdk.services.iam.*;
Artifact artifact;
ArtifactPath artifactPath;
EcsDeploymentGroup ecsDeploymentGroup;
Role role;
CodeDeployEcsDeployActionProps codeDeployEcsDeployActionProps = CodeDeployEcsDeployActionProps.builder()
.actionName("actionName")
.deploymentGroup(ecsDeploymentGroup)
// the properties below are optional
.appSpecTemplateFile(artifactPath)
.appSpecTemplateInput(artifact)
.containerImageInputs(List.of(CodeDeployEcsContainerImageInput.builder()
.input(artifact)
// the properties below are optional
.taskDefinitionPlaceholder("taskDefinitionPlaceholder")
.build()))
.role(role)
.runOrder(123)
.taskDefinitionTemplateFile(artifactPath)
.taskDefinitionTemplateInput(artifact)
.variablesNamespace("variablesNamespace")
.build();
// 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.CodeDeploy;
using Amazon.CDK.AWS.CodePipeline;
using Amazon.CDK.AWS.CodePipeline.Actions;
using Amazon.CDK.AWS.IAM;
Artifact artifact;
ArtifactPath artifactPath;
EcsDeploymentGroup ecsDeploymentGroup;
Role role;
var codeDeployEcsDeployActionProps = new CodeDeployEcsDeployActionProps {
ActionName = "actionName",
DeploymentGroup = ecsDeploymentGroup,
// the properties below are optional
AppSpecTemplateFile = artifactPath,
AppSpecTemplateInput = artifact,
ContainerImageInputs = new [] { new CodeDeployEcsContainerImageInput {
Input = artifact,
// the properties below are optional
TaskDefinitionPlaceholder = "taskDefinitionPlaceholder"
} },
Role = role,
RunOrder = 123,
TaskDefinitionTemplateFile = artifactPath,
TaskDefinitionTemplateInput = artifact,
VariablesNamespace = "variablesNamespace"
};
// 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"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var artifact Artifact
var artifactPath ArtifactPath
var ecsDeploymentGroup EcsDeploymentGroup
var role Role
codeDeployEcsDeployActionProps := &CodeDeployEcsDeployActionProps{
ActionName: jsii.String("actionName"),
DeploymentGroup: ecsDeploymentGroup,
// the properties below are optional
AppSpecTemplateFile: artifactPath,
AppSpecTemplateInput: artifact,
ContainerImageInputs: []CodeDeployEcsContainerImageInput{
&CodeDeployEcsContainerImageInput{
Input: artifact,
// the properties below are optional
TaskDefinitionPlaceholder: jsii.String("taskDefinitionPlaceholder"),
},
},
Role: role,
RunOrder: jsii.Number(123),
TaskDefinitionTemplateFile: artifactPath,
TaskDefinitionTemplateInput: artifact,
VariablesNamespace: jsii.String("variablesNamespace"),
}
Properties
Note that Action names must be unique within a single Stage.
appSpecTemplateFileoptionalArtifactPathapp_spec_template_fileoptionalArtifactPathappSpecTemplateFileoptionalArtifactPathAppSpecTemplateFileoptionalArtifactPathAppSpecTemplateFileoptionalArtifactPath #Default: one of this property, or appSpecTemplateInput, is required
notes
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.
appSpecTemplateInputoptionalArtifactapp_spec_template_inputoptionalArtifactappSpecTemplateInputoptionalArtifactAppSpecTemplateInputoptionalArtifactAppSpecTemplateInputoptionalArtifact #Default: one of this property, or appSpecTemplateFile, is required
notes
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.
containerImageInputsoptionalCodeDeployEcsContainerImageInput[]container_image_inputsoptionaltyping.List[CodeDeployEcsContainerImageInput]containerImageInputsoptionalList<CodeDeployEcsContainerImageInput>ContainerImageInputsoptionalCodeDeployEcsContainerImageInput[]ContainerImageInputsoptional*[]CodeDeployEcsContainerImageInput #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.
deploymentGroupIEcsDeploymentGroupdeployment_groupIEcsDeploymentGroupdeploymentGroupIEcsDeploymentGroupDeploymentGroupIEcsDeploymentGroupDeploymentGroupIEcsDeploymentGroup required #Default: a new Role will be generated
notes
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.
runOrderoptionalnumberrun_orderoptionalint | floatrunOrderoptionalNumberRunOrderoptionaldoubleRunOrderoptional*float64 = 1 #RunOrder determines the relative order in which multiple Actions in the same Stage execute.
taskDefinitionTemplateFileoptionalArtifactPathtask_definition_template_fileoptionalArtifactPathtaskDefinitionTemplateFileoptionalArtifactPathTaskDefinitionTemplateFileoptionalArtifactPathTaskDefinitionTemplateFileoptionalArtifactPath #Default: one of this property, or taskDefinitionTemplateInput, is required
notes
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.
taskDefinitionTemplateInputoptionalArtifacttask_definition_template_inputoptionalArtifacttaskDefinitionTemplateInputoptionalArtifactTaskDefinitionTemplateInputoptionalArtifactTaskDefinitionTemplateInputoptionalArtifact #Default: one of this property, or taskDefinitionTemplateFile, is required
notes
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.
variablesNamespaceoptionalstringvariables_namespaceoptionalstrvariablesNamespaceoptionalStringVariablesNamespaceoptionalstringVariablesNamespaceoptional*string #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