awscodepipelineactions

package
v2.118.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

README

AWS CodePipeline Actions

This package contains Actions that can be used in a CodePipeline.

import codepipeline "github.com/aws/aws-cdk-go/awscdk"
import codepipeline_actions "github.com/aws/aws-cdk-go/awscdk"

Sources

AWS CodeCommit

To use a CodeCommit Repository in a CodePipeline:

repo := codecommit.NewRepository(this, jsii.String("Repo"), &RepositoryProps{
	RepositoryName: jsii.String("MyRepo"),
})

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"), &PipelineProps{
	PipelineName: jsii.String("MyPipeline"),
})
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("CodeCommit"),
	Repository: repo,
	Output: sourceOutput,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		sourceAction,
	},
})

If you want to use existing role which can be used by on commit event rule. You can specify the role object in eventRole property.

var repo repository
eventRole := iam.Role_FromRoleArn(this, jsii.String("Event-role"), jsii.String("roleArn"))
sourceAction := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("CodeCommit"),
	Repository: repo,
	Output: codepipeline.NewArtifact(),
	EventRole: EventRole,
})

If you want to clone the entire CodeCommit repository (only available for CodeBuild actions), you can set the codeBuildCloneOutput property to true:

var project pipelineProject
var repo repository

sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("CodeCommit"),
	Repository: repo,
	Output: sourceOutput,
	CodeBuildCloneOutput: jsii.Boolean(true),
})

buildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	 // The build action must use the CodeCommitSourceAction output as input.
	Outputs: []artifact{
		codepipeline.NewArtifact(),
	},
})

The CodeCommit source action emits variables:

var project pipelineProject
var repo repository

sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("CodeCommit"),
	Repository: repo,
	Output: sourceOutput,
	VariablesNamespace: jsii.String("MyNamespace"),
})

// later:

// later:
codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"COMMIT_ID": &buildEnvironmentVariable{
			"value": sourceAction.variables.commitId,
		},
	},
})
GitHub

If you want to use a GitHub repository as the source, you must create:

  • A GitHub Access Token, with scopes repo and admin:repo_hook.
  • A Secrets Manager Secret with the value of the GitHub Access Token. Pick whatever name you want (for example my-github-token). This token can be stored either as Plaintext or as a Secret key/value. If you stored the token as Plaintext, set SecretValue.secretsManager('my-github-token') as the value of oauthToken. If you stored it as a Secret key/value, you must set SecretValue.secretsManager('my-github-token', { jsonField : 'my-github-token' }) as the value of oauthToken.

To use GitHub as the source of a CodePipeline:

// Read the secret from Secrets Manager
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewGitHubSourceAction(&GitHubSourceActionProps{
	ActionName: jsii.String("GitHub_Source"),
	Owner: jsii.String("awslabs"),
	Repo: jsii.String("aws-cdk"),
	OauthToken: awscdk.SecretValue_SecretsManager(jsii.String("my-github-token")),
	Output: sourceOutput,
	Branch: jsii.String("develop"),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		sourceAction,
	},
})

The GitHub source action emits variables:

var sourceOutput artifact
var project pipelineProject


sourceAction := codepipeline_actions.NewGitHubSourceAction(&GitHubSourceActionProps{
	ActionName: jsii.String("Github_Source"),
	Output: sourceOutput,
	Owner: jsii.String("my-owner"),
	Repo: jsii.String("my-repo"),
	OauthToken: awscdk.SecretValue_SecretsManager(jsii.String("my-github-token")),
	VariablesNamespace: jsii.String("MyNamespace"),
})

// later:

// later:
codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"COMMIT_URL": &buildEnvironmentVariable{
			"value": sourceAction.variables.commitUrl,
		},
	},
})
BitBucket

CodePipeline can use a BitBucket Git repository as a source:

Note: you have to manually connect CodePipeline through the AWS Console with your BitBucket account. This is a one-time operation for a given AWS account in a given region. The simplest way to do that is to either start creating a new CodePipeline, or edit an existing one, while being logged in to BitBucket. Choose BitBucket as the source, and grant CodePipeline permissions to your BitBucket account. Copy & paste the Connection ARN that you get in the console, or use the codestar-connections list-connections AWS CLI operation to find it. After that, you can safely abort creating or editing the pipeline - the connection has already been created.

sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeStarConnectionsSourceAction(&CodeStarConnectionsSourceActionProps{
	ActionName: jsii.String("BitBucket_Source"),
	Owner: jsii.String("aws"),
	Repo: jsii.String("aws-cdk"),
	Output: sourceOutput,
	ConnectionArn: jsii.String("arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"),
})

You can also use the CodeStarConnectionsSourceAction to connect to GitHub, in the same way (you just have to select GitHub as the source when creating the connection in the console).

Similarly to GitHubSourceAction, CodeStarConnectionsSourceAction also emits the variables:

var project project


sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeStarConnectionsSourceAction(&CodeStarConnectionsSourceActionProps{
	ActionName: jsii.String("BitBucket_Source"),
	Owner: jsii.String("aws"),
	Repo: jsii.String("aws-cdk"),
	Output: sourceOutput,
	ConnectionArn: jsii.String("arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"),
	VariablesNamespace: jsii.String("SomeSpace"),
})

// later:

// later:
codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"COMMIT_ID": &buildEnvironmentVariable{
			"value": sourceAction.variables.commitId,
		},
	},
})
AWS S3 Source

To use an S3 Bucket as a source in CodePipeline:

sourceBucket := s3.NewBucket(this, jsii.String("MyBucket"), &BucketProps{
	Versioned: jsii.Boolean(true),
})

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewS3SourceAction(&S3SourceActionProps{
	ActionName: jsii.String("S3Source"),
	Bucket: sourceBucket,
	BucketKey: jsii.String("path/to/file.zip"),
	Output: sourceOutput,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		sourceAction,
	},
})

The region of the action will be determined by the region the bucket itself is in. When using a newly created bucket, that region will be taken from the stack the bucket belongs to; for an imported bucket, you can specify the region explicitly:

sourceBucket := s3.Bucket_FromBucketAttributes(this, jsii.String("SourceBucket"), &BucketAttributes{
	BucketName: jsii.String("my-bucket"),
	Region: jsii.String("ap-southeast-1"),
})

By default, the Pipeline will poll the Bucket to detect changes. You can change that behavior to use CloudWatch Events by setting the trigger property to S3Trigger.EVENTS (it's S3Trigger.POLL by default). If you do that, make sure the source Bucket is part of an AWS CloudTrail Trail - otherwise, the CloudWatch Events will not be emitted, and your Pipeline will not react to changes in the Bucket. You can do it through the CDK:

import "github.com/aws/aws-cdk-go/awscdk"

var sourceBucket bucket

sourceOutput := codepipeline.NewArtifact()
key := "some/key.zip"
trail := cloudtrail.NewTrail(this, jsii.String("CloudTrail"))
trail.AddS3EventSelector([]s3EventSelector{
	&s3EventSelector{
		Bucket: sourceBucket,
		ObjectPrefix: key,
	},
}, &AddEventSelectorOptions{
	ReadWriteType: cloudtrail.ReadWriteType_WRITE_ONLY,
})
sourceAction := codepipeline_actions.NewS3SourceAction(&S3SourceActionProps{
	ActionName: jsii.String("S3Source"),
	BucketKey: key,
	Bucket: sourceBucket,
	Output: sourceOutput,
	Trigger: codepipeline_actions.S3Trigger_EVENTS,
})

The S3 source action emits variables:

var sourceBucket bucket

// later:
var project pipelineProject
key := "some/key.zip"
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewS3SourceAction(&S3SourceActionProps{
	ActionName: jsii.String("S3Source"),
	BucketKey: key,
	Bucket: sourceBucket,
	Output: sourceOutput,
	VariablesNamespace: jsii.String("MyNamespace"),
})
codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"VERSION_ID": &buildEnvironmentVariable{
			"value": sourceAction.variables.versionId,
		},
	},
})
AWS ECR

To use an ECR Repository as a source in a Pipeline:

import ecr "github.com/aws/aws-cdk-go/awscdk"

var ecrRepository repository

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewEcrSourceAction(&EcrSourceActionProps{
	ActionName: jsii.String("ECR"),
	Repository: ecrRepository,
	ImageTag: jsii.String("some-tag"),
	 // optional, default: 'latest'
	Output: sourceOutput,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		sourceAction,
	},
})

The ECR source action emits variables:

import ecr "github.com/aws/aws-cdk-go/awscdk"
var ecrRepository repository

// later:
var project pipelineProject


sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewEcrSourceAction(&EcrSourceActionProps{
	ActionName: jsii.String("Source"),
	Output: sourceOutput,
	Repository: ecrRepository,
	VariablesNamespace: jsii.String("MyNamespace"),
})
codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"IMAGE_URI": &buildEnvironmentVariable{
			"value": sourceAction.variables.imageUri,
		},
	},
})

Build & test

AWS CodeBuild

Example of a CodeBuild Project used in a Pipeline, alongside CodeCommit:

var project pipelineProject

repository := codecommit.NewRepository(this, jsii.String("MyRepository"), &RepositoryProps{
	RepositoryName: jsii.String("MyRepository"),
})
project := codebuild.NewPipelineProject(this, jsii.String("MyProject"))

sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("CodeCommit"),
	Repository: Repository,
	Output: sourceOutput,
})
buildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	Outputs: []artifact{
		codepipeline.NewArtifact(),
	},
	 // optional
	ExecuteBatchBuild: jsii.Boolean(true),
	 // optional, defaults to false
	CombineBatchBuildArtifacts: jsii.Boolean(true),
})

codepipeline.NewPipeline(this, jsii.String("MyPipeline"), &PipelineProps{
	Stages: []stageProps{
		&stageProps{
			StageName: jsii.String("Source"),
			Actions: []iAction{
				sourceAction,
			},
		},
		&stageProps{
			StageName: jsii.String("Build"),
			Actions: []*iAction{
				buildAction,
			},
		},
	},
})

The default category of the CodeBuild Action is Build; if you want a Test Action instead, override the type property:

var project pipelineProject

sourceOutput := codepipeline.NewArtifact()
testAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("IntegrationTest"),
	Project: Project,
	Input: sourceOutput,
	Type: codepipeline_actions.CodeBuildActionType_TEST,
})
Multiple inputs and outputs

When you want to have multiple inputs and/or outputs for a Project used in a Pipeline, instead of using the secondarySources and secondaryArtifacts properties of the Project class, you need to use the extraInputs and outputs properties of the CodeBuild CodePipeline Actions. Example:

var repository1 repository
var repository2 repository

var project pipelineProject

sourceOutput1 := codepipeline.NewArtifact()
sourceAction1 := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source1"),
	Repository: repository1,
	Output: sourceOutput1,
})
sourceOutput2 := codepipeline.NewArtifact(jsii.String("source2"))
sourceAction2 := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source2"),
	Repository: repository2,
	Output: sourceOutput2,
})
buildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("Build"),
	Project: Project,
	Input: sourceOutput1,
	ExtraInputs: []artifact{
		sourceOutput2,
	},
	Outputs: []*artifact{
		codepipeline.NewArtifact(jsii.String("artifact1")),
		 // for better buildspec readability - see below
		codepipeline.NewArtifact(jsii.String("artifact2")),
	},
})

Note: when a CodeBuild Action in a Pipeline has more than one output, it only uses the secondary-artifacts field of the buildspec, never the primary output specification directly under artifacts. Because of that, it pays to explicitly name all output artifacts of that Action, like we did above, so that you know what name to use in the buildspec.

Example buildspec for the above project:

project := codebuild.NewPipelineProject(this, jsii.String("MyProject"), &PipelineProjectProps{
	BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
		"version": jsii.String("0.2"),
		"phases": map[string]map[string][]interface{}{
			"build": map[string][]interface{}{
				"commands": []interface{}{
				},
			},
		},
		"artifacts": map[string]map[string]map[string]interface{}{
			"secondary-artifacts": map[string]map[string]interface{}{
				"artifact1": map[string]interface{}{
				},
				"artifact2": map[string]interface{}{
				},
			},
		},
	}),
})
Variables

The CodeBuild action emits variables. Unlike many other actions, the variables are not static, but dynamic, defined in the buildspec, in the 'exported-variables' subsection of the 'env' section. Example:

// later:
var project pipelineProject
sourceOutput := codepipeline.NewArtifact()
buildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("Build1"),
	Input: sourceOutput,
	Project: codebuild.NewPipelineProject(this, jsii.String("Project"), &PipelineProjectProps{
		BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
			"version": jsii.String("0.2"),
			"env": map[string][]*string{
				"exported-variables": []*string{
					jsii.String("MY_VAR"),
				},
			},
			"phases": map[string]map[string]*string{
				"build": map[string]*string{
					"commands": jsii.String("export MY_VAR=\"some value\""),
				},
			},
		}),
	}),
	VariablesNamespace: jsii.String("MyNamespace"),
})
codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"MyVar": &buildEnvironmentVariable{
			"value": buildAction.variable(jsii.String("MY_VAR")),
		},
	},
})
Jenkins

In order to use Jenkins Actions in the Pipeline, you first need to create a JenkinsProvider:

jenkinsProvider := codepipeline_actions.NewJenkinsProvider(this, jsii.String("JenkinsProvider"), &JenkinsProviderProps{
	ProviderName: jsii.String("MyJenkinsProvider"),
	ServerUrl: jsii.String("http://my-jenkins.com:8080"),
	Version: jsii.String("2"),
})

If you've registered a Jenkins provider in a different CDK app, or outside the CDK (in the CodePipeline AWS Console, for example), you can import it:

jenkinsProvider := codepipeline_actions.JenkinsProvider_FromJenkinsProviderAttributes(this, jsii.String("JenkinsProvider"), &JenkinsProviderAttributes{
	ProviderName: jsii.String("MyJenkinsProvider"),
	ServerUrl: jsii.String("http://my-jenkins.com:8080"),
	Version: jsii.String("2"),
})

Note that a Jenkins provider (identified by the provider name-category(build/test)-version tuple) must always be registered in the given account, in the given AWS region, before it can be used in CodePipeline.

With a JenkinsProvider, we can create a Jenkins Action:

var jenkinsProvider jenkinsProvider

buildAction := codepipeline_actions.NewJenkinsAction(&JenkinsActionProps{
	ActionName: jsii.String("JenkinsBuild"),
	JenkinsProvider: jenkinsProvider,
	ProjectName: jsii.String("MyProject"),
	Type: codepipeline_actions.JenkinsActionType_BUILD,
})

Deploy

AWS CloudFormation

This module contains Actions that allows you to deploy to CloudFormation from AWS CodePipeline.

For example, the following code fragment defines a pipeline that automatically deploys a CloudFormation template directly from a CodeCommit repository, with a manual approval step in between to confirm the changes:

// Source stage: read from repository
repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
	RepositoryName: jsii.String("template-repo"),
})
sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source"),
	Repository: repo,
	Output: sourceOutput,
	Trigger: cpactions.CodeCommitTrigger_POLL,
})
sourceStage := map[string]interface{}{
	"stageName": jsii.String("Source"),
	"actions": []CodeCommitSourceAction{
		source,
	},
}

// Deployment stage: create and deploy changeset with manual approval
stackName := "OurStack"
changeSetName := "StagedChangeSet"

prodStage := map[string]interface{}{
	"stageName": jsii.String("Deploy"),
	"actions": []interface{}{
		cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
			"actionName": jsii.String("PrepareChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"adminPermissions": jsii.Boolean(true),
			"templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
			"runOrder": jsii.Number(1),
		}),
		cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
			"actionName": jsii.String("ApproveChanges"),
			"runOrder": jsii.Number(2),
		}),
		cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
			"actionName": jsii.String("ExecuteChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"runOrder": jsii.Number(3),
		}),
	},
}

codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		sourceStage,
		prodStage,
	},
})

See the AWS documentation for more details about using CloudFormation in CodePipeline.

Actions for updating individual CloudFormation Stacks

This package contains the following CloudFormation actions:

  • CloudFormationCreateUpdateStackAction - Deploy a CloudFormation template directly from the pipeline. The indicated stack is created, or updated if it already exists. If the stack is in a failure state, deployment will fail (unless replaceOnFailure is set to true, in which case it will be destroyed and recreated).
  • CloudFormationDeleteStackAction - Delete the stack with the given name.
  • CloudFormationCreateReplaceChangeSetAction - Prepare a change set to be applied later. You will typically use change sets if you want to manually verify the changes that are being staged, or if you want to separate the people (or system) preparing the changes from the people (or system) applying the changes.
  • CloudFormationExecuteChangeSetAction - Execute a change set prepared previously.
Actions for deploying CloudFormation StackSets to multiple accounts

You can use CloudFormation StackSets to deploy the same CloudFormation template to multiple accounts in a managed way. If you use AWS Organizations, StackSets can be deployed to all accounts in a particular Organizational Unit (OU), and even automatically to new accounts as soon as they are added to a particular OU. For more information, see the Working with StackSets section of the CloudFormation developer guide.

The actions available for updating StackSets are:

  • CloudFormationDeployStackSetAction - Create or update a CloudFormation StackSet directly from the pipeline, optionally immediately create and update Stack Instances as well.
  • CloudFormationDeployStackInstancesAction - Update outdated Stack Instances using the current version of the StackSet.

Here's an example of using both of these actions:

var pipeline pipeline
var sourceOutput artifact


pipeline.AddStage(&StageOptions{
	StageName: jsii.String("DeployStackSets"),
	Actions: []iAction{
		// First, update the StackSet itself with the newest template
		codepipeline_actions.NewCloudFormationDeployStackSetAction(&CloudFormationDeployStackSetActionProps{
			ActionName: jsii.String("UpdateStackSet"),
			RunOrder: jsii.Number(1),
			StackSetName: jsii.String("MyStackSet"),
			Template: codepipeline_actions.StackSetTemplate_FromArtifactPath(sourceOutput.AtPath(jsii.String("template.yaml"))),

			// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
			DeploymentModel: codepipeline_actions.StackSetDeploymentModel_SelfManaged(),
			// This deploys to a set of accounts
			StackInstances: codepipeline_actions.StackInstances_InAccounts([]*string{
				jsii.String("111111111111"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),

		// Afterwards, update/create additional instances in other accounts
		codepipeline_actions.NewCloudFormationDeployStackInstancesAction(&CloudFormationDeployStackInstancesActionProps{
			ActionName: jsii.String("AddMoreInstances"),
			RunOrder: jsii.Number(2),
			StackSetName: jsii.String("MyStackSet"),
			StackInstances: codepipeline_actions.StackInstances_*InAccounts([]*string{
				jsii.String("222222222222"),
				jsii.String("333333333333"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),
	},
})
Lambda deployed through CodePipeline

If you want to deploy your Lambda through CodePipeline, and you don't use assets (for example, because your CDK code and Lambda code are separate), you can use a special Lambda Code class, CfnParametersCode. Note that your Lambda must be in a different Stack than your Pipeline. The Lambda itself will be deployed, alongside the entire Stack it belongs to, using a CloudFormation CodePipeline Action. Example:

lambdaStack := cdk.NewStack(app, jsii.String("LambdaStack"))
lambdaCode := lambda.Code_FromCfnParameters()
lambda.NewFunction(lambdaStack, jsii.String("Lambda"), &FunctionProps{
	Code: lambdaCode,
	Handler: jsii.String("index.handler"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
})
// other resources that your Lambda needs, added to the lambdaStack...

pipelineStack := cdk.NewStack(app, jsii.String("PipelineStack"))
pipeline := codepipeline.NewPipeline(pipelineStack, jsii.String("Pipeline"))

// add the source code repository containing this code to your Pipeline,
// and the source code of the Lambda Function, if they're separate
cdkSourceOutput := codepipeline.NewArtifact()
cdkSourceAction := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	Repository: codecommit.NewRepository(pipelineStack, jsii.String("CdkCodeRepo"), &RepositoryProps{
		RepositoryName: jsii.String("CdkCodeRepo"),
	}),
	ActionName: jsii.String("CdkCode_Source"),
	Output: cdkSourceOutput,
})
lambdaSourceOutput := codepipeline.NewArtifact()
lambdaSourceAction := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	Repository: codecommit.NewRepository(pipelineStack, jsii.String("LambdaCodeRepo"), &RepositoryProps{
		RepositoryName: jsii.String("LambdaCodeRepo"),
	}),
	ActionName: jsii.String("LambdaCode_Source"),
	Output: lambdaSourceOutput,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		cdkSourceAction,
		lambdaSourceAction,
	},
})

// synthesize the Lambda CDK template, using CodeBuild
// the below values are just examples, assuming your CDK code is in TypeScript/JavaScript -
// adjust the build environment and/or commands accordingly
cdkBuildProject := codebuild.NewProject(pipelineStack, jsii.String("CdkBuildProject"), &ProjectProps{
	Environment: &BuildEnvironment{
		BuildImage: codebuild.LinuxBuildImage_STANDARD_7_0(),
	},
	BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
		"version": jsii.String("0.2"),
		"phases": map[string]map[string]*string{
			"install": map[string]*string{
				"commands": jsii.String("npm install"),
			},
			"build": map[string][]*string{
				"commands": []*string{
					jsii.String("npm run build"),
					jsii.String("npm run cdk synth LambdaStack -- -o ."),
				},
			},
		},
		"artifacts": map[string]*string{
			"files": jsii.String("LambdaStack.template.yaml"),
		},
	}),
})
cdkBuildOutput := codepipeline.NewArtifact()
cdkBuildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CDK_Build"),
	Project: cdkBuildProject,
	Input: cdkSourceOutput,
	Outputs: []artifact{
		cdkBuildOutput,
	},
})

// build your Lambda code, using CodeBuild
// again, this example assumes your Lambda is written in TypeScript/JavaScript -
// make sure to adjust the build environment and/or commands if they don't match your specific situation
lambdaBuildProject := codebuild.NewProject(pipelineStack, jsii.String("LambdaBuildProject"), &ProjectProps{
	Environment: &BuildEnvironment{
		BuildImage: codebuild.LinuxBuildImage_STANDARD_7_0(),
	},
	BuildSpec: codebuild.BuildSpec_*FromObject(map[string]interface{}{
		"version": jsii.String("0.2"),
		"phases": map[string]map[string]*string{
			"install": map[string]*string{
				"commands": jsii.String("npm install"),
			},
			"build": map[string]*string{
				"commands": jsii.String("npm run build"),
			},
		},
		"artifacts": map[string][]*string{
			"files": []*string{
				jsii.String("index.js"),
				jsii.String("node_modules/**/*"),
			},
		},
	}),
})
lambdaBuildOutput := codepipeline.NewArtifact()
lambdaBuildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("Lambda_Build"),
	Project: lambdaBuildProject,
	Input: lambdaSourceOutput,
	Outputs: []*artifact{
		lambdaBuildOutput,
	},
})

pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Build"),
	Actions: []*iAction{
		cdkBuildAction,
		lambdaBuildAction,
	},
})

// finally, deploy your Lambda Stack
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []*iAction{
		codepipeline_actions.NewCloudFormationCreateUpdateStackAction(&CloudFormationCreateUpdateStackActionProps{
			ActionName: jsii.String("Lambda_CFN_Deploy"),
			TemplatePath: cdkBuildOutput.AtPath(jsii.String("LambdaStack.template.yaml")),
			StackName: jsii.String("LambdaStackDeployedName"),
			AdminPermissions: jsii.Boolean(true),
			ParameterOverrides: lambdaCode.Assign(lambdaBuildOutput.s3Location),
			ExtraInputs: []*artifact{
				lambdaBuildOutput,
			},
		}),
	},
})
Cross-account actions

If you want to update stacks in a different account, pass the account property when creating the action:

sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewCloudFormationCreateUpdateStackAction(&CloudFormationCreateUpdateStackActionProps{
	ActionName: jsii.String("CloudFormationCreateUpdate"),
	StackName: jsii.String("MyStackName"),
	AdminPermissions: jsii.Boolean(true),
	TemplatePath: sourceOutput.AtPath(jsii.String("template.yaml")),
	Account: jsii.String("123456789012"),
})

This will create a new stack, called <PipelineStackName>-support-123456789012, in your App, that will contain the role that the pipeline will assume in account 123456789012 before executing this action. This support stack will automatically be deployed before the stack containing the pipeline.

You can also pass a role explicitly when creating the action - in that case, the account property is ignored, and the action will operate in the same account the role belongs to:

import "github.com/aws/aws-cdk-go/awscdk"

// in stack for account 123456789012...
var otherAccountStack stack

actionRole := iam.NewRole(otherAccountStack, jsii.String("ActionRole"), &RoleProps{
	AssumedBy: iam.NewAccountPrincipal(jsii.String("123456789012")),
	// the role has to have a physical name set
	RoleName: awscdk.PhysicalName_GENERATE_IF_NEEDED(),
})

// in the pipeline stack...
sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewCloudFormationCreateUpdateStackAction(&CloudFormationCreateUpdateStackActionProps{
	ActionName: jsii.String("CloudFormationCreateUpdate"),
	StackName: jsii.String("MyStackName"),
	AdminPermissions: jsii.Boolean(true),
	TemplatePath: sourceOutput.AtPath(jsii.String("template.yaml")),
	Role: actionRole,
})
AWS CodeDeploy
Server deployments

To use CodeDeploy for EC2/on-premise deployments in a Pipeline:

var deploymentGroup serverDeploymentGroup
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"), &PipelineProps{
	PipelineName: jsii.String("MyPipeline"),
})

// add the source and build Stages to the Pipeline...
buildOutput := codepipeline.NewArtifact()
deployAction := codepipeline_actions.NewCodeDeployServerDeployAction(&CodeDeployServerDeployActionProps{
	ActionName: jsii.String("CodeDeploy"),
	Input: buildOutput,
	DeploymentGroup: DeploymentGroup,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})
Lambda deployments

To use CodeDeploy for blue-green Lambda deployments in a Pipeline:

lambdaCode := lambda.Code_FromCfnParameters()
func := lambda.NewFunction(this, jsii.String("Lambda"), &FunctionProps{
	Code: lambdaCode,
	Handler: jsii.String("index.handler"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
})
// used to make sure each CDK synthesis produces a different Version
version := func.currentVersion
alias := lambda.NewAlias(this, jsii.String("LambdaAlias"), &AliasProps{
	AliasName: jsii.String("Prod"),
	Version: Version,
})

codedeploy.NewLambdaDeploymentGroup(this, jsii.String("DeploymentGroup"), &LambdaDeploymentGroupProps{
	Alias: Alias,
	DeploymentConfig: codedeploy.LambdaDeploymentConfig_LINEAR_10PERCENT_EVERY_1MINUTE(),
})

Then, you need to create your Pipeline Stack, where you will define your Pipeline, and deploy the lambdaStack using a CloudFormation CodePipeline Action (see above for a complete example).

ECS

CodePipeline can deploy an ECS service. The deploy Action receives one input Artifact which contains the image definition file:

import ecs "github.com/aws/aws-cdk-go/awscdk"

var service fargateService

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
buildOutput := codepipeline.NewArtifact()
deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		codepipeline_actions.NewEcsDeployAction(&EcsDeployActionProps{
			ActionName: jsii.String("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(jsii.String("imageDef.json")),
			DeploymentTimeout: awscdk.Duration_Minutes(jsii.Number(60)),
		}),
	},
})
Deploying ECS applications to existing services

CodePipeline can deploy to an existing ECS service which uses the ECS service ARN format that contains the Cluster name. This also works if the service is in a different account and/or region than the pipeline:

import ecs "github.com/aws/aws-cdk-go/awscdk"


service := ecs.BaseService_FromServiceArnWithCluster(this, jsii.String("EcsService"), jsii.String("arn:aws:ecs:us-east-1:123456789012:service/myClusterName/myServiceName"))
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
buildOutput := codepipeline.NewArtifact()
// add source and build stages to the pipeline as usual...
deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		codepipeline_actions.NewEcsDeployAction(&EcsDeployActionProps{
			ActionName: jsii.String("DeployAction"),
			Service: service,
			Input: buildOutput,
		}),
	},
})

When deploying across accounts, especially in a CDK Pipelines self-mutating pipeline, it is recommended to provide the role property to the EcsDeployAction. The Role will need to have permissions assigned to it for ECS deployment. See the CodePipeline documentation for the permissions needed.

Deploying ECS applications stored in a separate source code repository

The idiomatic CDK way of deploying an ECS application is to have your Dockerfiles and your CDK code in the same source code repository, leveraging Docker Assets, and use the CDK Pipelines module.

However, if you want to deploy a Docker application whose source code is kept in a separate version control repository than the CDK code, you can use the TagParameterContainerImage class from the ECS module. Here's an example:

/**
 * These are the construction properties for `EcsAppStack`.
 * They extend the standard Stack properties,
 * but also require providing the ContainerImage that the service will use.
 * That Image will be provided from the Stack containing the CodePipeline.
 */
type ecsAppStackProps struct {
	stackProps
	image containerImage
}

/**
 * This is the Stack containing a simple ECS Service that uses the provided ContainerImage.
 */
type EcsAppStack struct {
	stack
}

func NewEcsAppStack(scope construct, id *string, props ecsAppStackProps) *EcsAppStack {
	this := &EcsAppStack{}
	cdk.NewStack_Override(this, scope, id, props)

	taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TaskDefinition"), &TaskDefinitionProps{
		Compatibility: ecs.Compatibility_FARGATE,
		Cpu: jsii.String("1024"),
		MemoryMiB: jsii.String("2048"),
	})
	taskDefinition.AddContainer(jsii.String("AppContainer"), &ContainerDefinitionOptions{
		Image: props.image,
	})
	ecs.NewFargateService(this, jsii.String("EcsService"), &FargateServiceProps{
		TaskDefinition: TaskDefinition,
		Cluster: ecs.NewCluster(this, jsii.String("Cluster"), &ClusterProps{
			Vpc: ec2.NewVpc(this, jsii.String("Vpc"), &VpcProps{
				MaxAzs: jsii.Number(1),
			}),
		}),
	})
	return this
}

/**
 * This is the Stack containing the CodePipeline definition that deploys an ECS Service.
 */
type PipelineStack struct {
	stack
	tagParameterContainerImage tagParameterContainerImage
}tagParameterContainerImage tagParameterContainerImage

func NewPipelineStack(scope construct, id *string, props stackProps) *PipelineStack {
	this := &PipelineStack{}
	cdk.NewStack_Override(this, scope, id, props)

	/* ********** ECS part **************** */

	// this is the ECR repository where the built Docker image will be pushed
	appEcrRepo := ecr.NewRepository(this, jsii.String("EcsDeployRepository"))
	// the build that creates the Docker image, and pushes it to the ECR repo
	appCodeDockerBuild := codebuild.NewPipelineProject(this, jsii.String("AppCodeDockerImageBuildAndPushProject"), &PipelineProjectProps{
		Environment: &BuildEnvironment{
			// we need to run Docker
			Privileged: jsii.Boolean(true),
		},
		BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
			"version": jsii.String("0.2"),
			"phases": map[string]map[string][]*string{
				"build": map[string][]*string{
					"commands": []*string{
						jsii.String("$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)"),
						jsii.String("docker build -t $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION ."),
					},
				},
				"post_build": map[string][]*string{
					"commands": []*string{
						jsii.String("docker push $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION"),
						jsii.String("export imageTag=$CODEBUILD_RESOLVED_SOURCE_VERSION"),
					},
				},
			},
			"env": map[string][]*string{
				// save the imageTag environment variable as a CodePipeline Variable
				"exported-variables": []*string{
					jsii.String("imageTag"),
				},
			},
		}),
		EnvironmentVariables: map[string]buildEnvironmentVariable{
			"REPOSITORY_URI": &buildEnvironmentVariable{
				"value": appEcrRepo.repositoryUri,
			},
		},
	})
	// needed for `docker push`
	appEcrRepo.GrantPullPush(appCodeDockerBuild)
	// create the ContainerImage used for the ECS application Stack
	this.tagParameterContainerImage = ecs.NewTagParameterContainerImage(appEcrRepo)

	cdkCodeBuild := codebuild.NewPipelineProject(this, jsii.String("CdkCodeBuildProject"), &PipelineProjectProps{
		BuildSpec: codebuild.BuildSpec_*FromObject(map[string]interface{}{
			"version": jsii.String("0.2"),
			"phases": map[string]map[string][]*string{
				"install": map[string][]*string{
					"commands": []*string{
						jsii.String("npm install"),
					},
				},
				"build": map[string][]*string{
					"commands": []*string{
						jsii.String("npx cdk synth --verbose"),
					},
				},
			},
			"artifacts": map[string]*string{
				// store the entire Cloud Assembly as the output artifact
				"base-directory": jsii.String("cdk.out"),
				"files": jsii.String("**/*"),
			},
		}),
	})

	/* ********** Pipeline part **************** */

	appCodeSourceOutput := codepipeline.NewArtifact()
	cdkCodeSourceOutput := codepipeline.NewArtifact()
	cdkCodeBuildOutput := codepipeline.NewArtifact()
	appCodeBuildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
		ActionName: jsii.String("AppCodeDockerImageBuildAndPush"),
		Project: appCodeDockerBuild,
		Input: appCodeSourceOutput,
	})
	codepipeline.NewPipeline(this, jsii.String("CodePipelineDeployingEcsApplication"), &PipelineProps{
		ArtifactBucket: s3.NewBucket(this, jsii.String("ArtifactBucket"), &BucketProps{
			RemovalPolicy: cdk.RemovalPolicy_DESTROY,
		}),
		Stages: []stageProps{
			&stageProps{
				StageName: jsii.String("Source"),
				Actions: []iAction{
					// this is the Action that takes the source of your application code
					codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
						ActionName: jsii.String("AppCodeSource"),
						Repository: codecommit.NewRepository(this, jsii.String("AppCodeSourceRepository"), &RepositoryProps{
							RepositoryName: jsii.String("AppCodeSourceRepository"),
						}),
						Output: appCodeSourceOutput,
					}),
					// this is the Action that takes the source of your CDK code
					// (which would probably include this Pipeline code as well)
					codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
						ActionName: jsii.String("CdkCodeSource"),
						Repository: codecommit.NewRepository(this, jsii.String("CdkCodeSourceRepository"), &RepositoryProps{
							RepositoryName: jsii.String("CdkCodeSourceRepository"),
						}),
						Output: cdkCodeSourceOutput,
					}),
				},
			},
			&stageProps{
				StageName: jsii.String("Build"),
				Actions: []*iAction{
					appCodeBuildAction,
					codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
						ActionName: jsii.String("CdkCodeBuildAndSynth"),
						Project: cdkCodeBuild,
						Input: cdkCodeSourceOutput,
						Outputs: []artifact{
							cdkCodeBuildOutput,
						},
					}),
				},
			},
			&stageProps{
				StageName: jsii.String("Deploy"),
				Actions: []*iAction{
					codepipeline_actions.NewCloudFormationCreateUpdateStackAction(&CloudFormationCreateUpdateStackActionProps{
						ActionName: jsii.String("CFN_Deploy"),
						StackName: jsii.String("SampleEcsStackDeployedFromCodePipeline"),
						// this name has to be the same name as used below in the CDK code for the application Stack
						TemplatePath: cdkCodeBuildOutput.AtPath(jsii.String("EcsStackDeployedInPipeline.template.json")),
						AdminPermissions: jsii.Boolean(true),
						ParameterOverrides: map[string]interface{}{
							// read the tag pushed to the ECR repository from the CodePipeline Variable saved by the application build step,
							// and pass it as the CloudFormation Parameter for the tag
							this.tagParameterContainerImage.tagParameterName: appCodeBuildAction.variable(jsii.String("imageTag")),
						},
					}),
				},
			},
		},
	})
	return this
}

app := cdk.NewApp()

// the CodePipeline Stack needs to be created first
pipelineStack := NewPipelineStack(app, jsii.String("aws-cdk-pipeline-ecs-separate-sources"))
// we supply the image to the ECS application Stack from the CodePipeline Stack
// we supply the image to the ECS application Stack from the CodePipeline Stack
NewEcsAppStack(app, jsii.String("EcsStackDeployedInPipeline"), &ecsAppStackProps{
	image: pipelineStack.tagParameterContainerImage,
})
AWS S3 Deployment

To use an S3 Bucket as a deployment target in CodePipeline:

import kms "github.com/aws/aws-cdk-go/awscdk"


sourceOutput := codepipeline.NewArtifact()
targetBucket := s3.NewBucket(this, jsii.String("MyBucket"))
key := kms.NewKey(this, jsii.String("EnvVarEncryptKey"), &KeyProps{
	Description: jsii.String("sample key"),
})

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
deployAction := codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{
	ActionName: jsii.String("S3Deploy"),
	Bucket: targetBucket,
	Input: sourceOutput,
	EncryptionKey: key,
})
deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})
Invalidating the CloudFront cache when deploying to S3

There is currently no native support in CodePipeline for invalidating a CloudFront cache after deployment. One workaround is to add another build step after the deploy step, and use the AWS CLI to invalidate the cache:

// Create a Cloudfront Web Distribution
import cloudfront "github.com/aws/aws-cdk-go/awscdk"
var distribution distribution


// Create the build project that will invalidate the cache
invalidateBuildProject := codebuild.NewPipelineProject(this, jsii.String("InvalidateProject"), &PipelineProjectProps{
	BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
		"version": jsii.String("0.2"),
		"phases": map[string]map[string][]*string{
			"build": map[string][]*string{
				"commands": []*string{
					jsii.String("aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths \"/*\""),
				},
			},
		},
	}),
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"CLOUDFRONT_ID": &buildEnvironmentVariable{
			"value": distribution.distributionId,
		},
	},
})

// Add Cloudfront invalidation permissions to the project
distributionArn := fmt.Sprintf("arn:aws:cloudfront::%v:distribution/%v", this.Account, distribution.DistributionId)
invalidateBuildProject.addToRolePolicy(iam.NewPolicyStatement(&PolicyStatementProps{
	Resources: []*string{
		distributionArn,
	},
	Actions: []*string{
		jsii.String("cloudfront:CreateInvalidation"),
	},
}))

// Create the pipeline (here only the S3 deploy and Invalidate cache build)
deployBucket := s3.NewBucket(this, jsii.String("DeployBucket"))
deployInput := codepipeline.NewArtifact()
codepipeline.NewPipeline(this, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		&stageProps{
			StageName: jsii.String("Deploy"),
			Actions: []iAction{
				codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{
					ActionName: jsii.String("S3Deploy"),
					Bucket: deployBucket,
					Input: deployInput,
					RunOrder: jsii.Number(1),
				}),
				codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
					ActionName: jsii.String("InvalidateCache"),
					Project: invalidateBuildProject,
					Input: deployInput,
					RunOrder: jsii.Number(2),
				}),
			},
		},
	},
})
Elastic Beanstalk Deployment

To deploy an Elastic Beanstalk Application in CodePipeline:

sourceOutput := codepipeline.NewArtifact()
targetBucket := s3.NewBucket(this, jsii.String("MyBucket"))

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
deployAction := codepipeline_actions.NewElasticBeanstalkDeployAction(&ElasticBeanstalkDeployActionProps{
	ActionName: jsii.String("ElasticBeanstalkDeploy"),
	Input: sourceOutput,
	EnvironmentName: jsii.String("envName"),
	ApplicationName: jsii.String("appName"),
})

deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})
Alexa Skill

You can deploy to Alexa using CodePipeline with the following Action:

// Read the secrets from ParameterStore
clientId := awscdk.SecretValue_SecretsManager(jsii.String("AlexaClientId"))
clientSecret := awscdk.SecretValue_SecretsManager(jsii.String("AlexaClientSecret"))
refreshToken := awscdk.SecretValue_SecretsManager(jsii.String("AlexaRefreshToken"))

// Add deploy action
sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewAlexaSkillDeployAction(&AlexaSkillDeployActionProps{
	ActionName: jsii.String("DeploySkill"),
	RunOrder: jsii.Number(1),
	Input: sourceOutput,
	ClientId: clientId.ToString(),
	ClientSecret: clientSecret,
	RefreshToken: refreshToken,
	SkillId: jsii.String("amzn1.ask.skill.12345678-1234-1234-1234-123456789012"),
})

If you need manifest overrides you can specify them as parameterOverridesArtifact in the action:

// Deploy some CFN change set and store output
executeOutput := codepipeline.NewArtifact(jsii.String("CloudFormation"))
executeChangeSetAction := codepipeline_actions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
	ActionName: jsii.String("ExecuteChangesTest"),
	RunOrder: jsii.Number(2),
	StackName: jsii.String("MyStack"),
	ChangeSetName: jsii.String("MyChangeSet"),
	OutputFileName: jsii.String("overrides.json"),
	Output: executeOutput,
})

// Provide CFN output as manifest overrides
clientId := awscdk.SecretValue_SecretsManager(jsii.String("AlexaClientId"))
clientSecret := awscdk.SecretValue_SecretsManager(jsii.String("AlexaClientSecret"))
refreshToken := awscdk.SecretValue_SecretsManager(jsii.String("AlexaRefreshToken"))
sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewAlexaSkillDeployAction(&AlexaSkillDeployActionProps{
	ActionName: jsii.String("DeploySkill"),
	RunOrder: jsii.Number(1),
	Input: sourceOutput,
	ParameterOverridesArtifact: executeOutput,
	ClientId: clientId.ToString(),
	ClientSecret: clientSecret,
	RefreshToken: refreshToken,
	SkillId: jsii.String("amzn1.ask.skill.12345678-1234-1234-1234-123456789012"),
})
AWS Service Catalog

You can deploy a CloudFormation template to an existing Service Catalog product with the following Action:

cdkBuildOutput := codepipeline.NewArtifact()
serviceCatalogDeployAction := codepipeline_actions.NewServiceCatalogDeployActionBeta1(&ServiceCatalogDeployActionBeta1Props{
	ActionName: jsii.String("ServiceCatalogDeploy"),
	TemplatePath: cdkBuildOutput.AtPath(jsii.String("Sample.template.json")),
	ProductVersionName: jsii.String("Version - " + date.now.toString),
	ProductVersionDescription: jsii.String("This is a version from the pipeline with a new description."),
	ProductId: jsii.String("prod-XXXXXXXX"),
})

Approve & invoke

Manual approval Action

This package contains an Action that stops the Pipeline until someone manually clicks the approve button:

import sns "github.com/aws/aws-cdk-go/awscdk"


pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
approveStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Approve"),
})
manualApprovalAction := codepipeline_actions.NewManualApprovalAction(&ManualApprovalActionProps{
	ActionName: jsii.String("Approve"),
	NotificationTopic: sns.NewTopic(this, jsii.String("Topic")),
	 // optional
	NotifyEmails: []*string{
		jsii.String("some_email@example.com"),
	},
	 // optional
	AdditionalInformation: jsii.String("additional info"),
})
approveStage.AddAction(manualApprovalAction)

If the notificationTopic has not been provided, but notifyEmails were, a new SNS Topic will be created (and accessible through the notificationTopic property of the Action).

If you want to grant a principal permissions to approve the changes, you can invoke the method grantManualApproval passing it a IGrantable:

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
approveStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Approve"),
})
manualApprovalAction := codepipeline_actions.NewManualApprovalAction(&ManualApprovalActionProps{
	ActionName: jsii.String("Approve"),
})
approveStage.AddAction(manualApprovalAction)

role := iam.Role_FromRoleArn(this, jsii.String("Admin"), awscdk.Arn_Format(&ArnComponents{
	Service: jsii.String("iam"),
	Resource: jsii.String("role"),
	ResourceName: jsii.String("Admin"),
}, this))
manualApprovalAction.GrantManualApproval(role)
AWS Lambda

This module contains an Action that allows you to invoke a Lambda function in a Pipeline:

var fn function

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
lambdaAction := codepipeline_actions.NewLambdaInvokeAction(&LambdaInvokeActionProps{
	ActionName: jsii.String("Lambda"),
	Lambda: fn,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Lambda"),
	Actions: []iAction{
		lambdaAction,
	},
})

The Lambda Action can have up to 5 inputs, and up to 5 outputs:

var fn function

sourceOutput := codepipeline.NewArtifact()
buildOutput := codepipeline.NewArtifact()
lambdaAction := codepipeline_actions.NewLambdaInvokeAction(&LambdaInvokeActionProps{
	ActionName: jsii.String("Lambda"),
	Inputs: []artifact{
		sourceOutput,
		buildOutput,
	},
	Outputs: []*artifact{
		codepipeline.NewArtifact(jsii.String("Out1")),
		codepipeline.NewArtifact(jsii.String("Out2")),
	},
	Lambda: fn,
})

The Lambda Action supports custom user parameters that pipeline will pass to the Lambda function:

var fn function


pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
lambdaAction := codepipeline_actions.NewLambdaInvokeAction(&LambdaInvokeActionProps{
	ActionName: jsii.String("Lambda"),
	Lambda: fn,
	UserParameters: map[string]interface{}{
		"foo": jsii.String("bar"),
		"baz": jsii.String("qux"),
	},
	// OR
	UserParametersString: jsii.String("my-parameter-string"),
})

The Lambda invoke action emits variables. Unlike many other actions, the variables are not static, but dynamic, defined by the function calling the PutJobSuccessResult API with the outputVariables property filled with the map of variables Example:

// later:
var project pipelineProject
lambdaInvokeAction := codepipeline_actions.NewLambdaInvokeAction(&LambdaInvokeActionProps{
	ActionName: jsii.String("Lambda"),
	Lambda: lambda.NewFunction(this, jsii.String("Func"), &FunctionProps{
		Runtime: lambda.Runtime_NODEJS_LATEST(),
		Handler: jsii.String("index.handler"),
		Code: lambda.Code_FromInline(jsii.String(`
		        const { CodePipeline } = require('@aws-sdk/client-codepipeline');

		        exports.handler = async function(event, context) {
		            const codepipeline = new AWS.CodePipeline();
		            await codepipeline.putJobSuccessResult({
		                jobId: event['CodePipeline.job'].id,
		                outputVariables: {
		                    MY_VAR: "some value",
		                },
		            });
		        }
		    `)),
	}),
	VariablesNamespace: jsii.String("MyNamespace"),
})
sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"MyVar": &buildEnvironmentVariable{
			"value": lambdaInvokeAction.variable(jsii.String("MY_VAR")),
		},
	},
})

See the AWS documentation on how to write a Lambda function invoked from CodePipeline.

AWS Step Functions

This module contains an Action that allows you to invoke a Step Function in a Pipeline:

import "github.com/aws/aws-cdk-go/awscdk"

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
startState := stepfunctions.NewPass(this, jsii.String("StartState"))
simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
	Definition: startState,
})
stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
	ActionName: jsii.String("Invoke"),
	StateMachine: simpleStateMachine,
	StateMachineInput: codepipeline_actions.StateMachineInput_Literal(map[string]*bool{
		"IsHelloWorldExample": jsii.Boolean(true),
	}),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("StepFunctions"),
	Actions: []iAction{
		stepFunctionAction,
	},
})

The StateMachineInput can be created with one of 2 static factory methods: literal, which takes an arbitrary map as its only argument, or filePath:

import "github.com/aws/aws-cdk-go/awscdk"


pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
inputArtifact := codepipeline.NewArtifact()
startState := stepfunctions.NewPass(this, jsii.String("StartState"))
simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
	Definition: startState,
})
stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
	ActionName: jsii.String("Invoke"),
	StateMachine: simpleStateMachine,
	StateMachineInput: codepipeline_actions.StateMachineInput_FilePath(inputArtifact.AtPath(jsii.String("assets/input.json"))),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("StepFunctions"),
	Actions: []iAction{
		stepFunctionAction,
	},
})

See the AWS documentation for information on Action structure reference.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseJenkinsProvider_IsConstruct

func BaseJenkinsProvider_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func JenkinsProvider_IsConstruct

func JenkinsProvider_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func NewAction_Override

func NewAction_Override(a Action, actionProperties *awscodepipeline.ActionProperties)

func NewAlexaSkillDeployAction_Override

func NewAlexaSkillDeployAction_Override(a AlexaSkillDeployAction, props *AlexaSkillDeployActionProps)

func NewBaseJenkinsProvider_Override

func NewBaseJenkinsProvider_Override(b BaseJenkinsProvider, scope constructs.Construct, id *string, version *string)

func NewCloudFormationDeployStackInstancesAction_Override added in v2.13.0

func NewCloudFormationDeployStackInstancesAction_Override(c CloudFormationDeployStackInstancesAction, props *CloudFormationDeployStackInstancesActionProps)

func NewCloudFormationDeployStackSetAction_Override added in v2.13.0

func NewCloudFormationDeployStackSetAction_Override(c CloudFormationDeployStackSetAction, props *CloudFormationDeployStackSetActionProps)

func NewCodeBuildAction_Override

func NewCodeBuildAction_Override(c CodeBuildAction, props *CodeBuildActionProps)

func NewCodeCommitSourceAction_Override

func NewCodeCommitSourceAction_Override(c CodeCommitSourceAction, props *CodeCommitSourceActionProps)

func NewCodeDeployEcsDeployAction_Override

func NewCodeDeployEcsDeployAction_Override(c CodeDeployEcsDeployAction, props *CodeDeployEcsDeployActionProps)

func NewEcrSourceAction_Override

func NewEcrSourceAction_Override(e EcrSourceAction, props *EcrSourceActionProps)

func NewEcsDeployAction_Override

func NewEcsDeployAction_Override(e EcsDeployAction, props *EcsDeployActionProps)

func NewElasticBeanstalkDeployAction_Override added in v2.45.0

func NewElasticBeanstalkDeployAction_Override(e ElasticBeanstalkDeployAction, props *ElasticBeanstalkDeployActionProps)

func NewGitHubSourceAction_Override

func NewGitHubSourceAction_Override(g GitHubSourceAction, props *GitHubSourceActionProps)

func NewJenkinsAction_Override

func NewJenkinsAction_Override(j JenkinsAction, props *JenkinsActionProps)

func NewJenkinsProvider_Override

func NewJenkinsProvider_Override(j JenkinsProvider, scope constructs.Construct, id *string, props *JenkinsProviderProps)

func NewLambdaInvokeAction_Override

func NewLambdaInvokeAction_Override(l LambdaInvokeAction, props *LambdaInvokeActionProps)

func NewManualApprovalAction_Override

func NewManualApprovalAction_Override(m ManualApprovalAction, props *ManualApprovalActionProps)

func NewS3DeployAction_Override

func NewS3DeployAction_Override(s S3DeployAction, props *S3DeployActionProps)

func NewS3SourceAction_Override

func NewS3SourceAction_Override(s S3SourceAction, props *S3SourceActionProps)

func NewStackInstances_Override added in v2.13.0

func NewStackInstances_Override(s StackInstances)

func NewStackSetDeploymentModel_Override added in v2.13.0

func NewStackSetDeploymentModel_Override(s StackSetDeploymentModel)

func NewStackSetParameters_Override added in v2.13.0

func NewStackSetParameters_Override(s StackSetParameters)

func NewStackSetTemplate_Override added in v2.13.0

func NewStackSetTemplate_Override(s StackSetTemplate)

func NewStepFunctionInvokeAction_Override

func NewStepFunctionInvokeAction_Override(s StepFunctionInvokeAction, props *StepFunctionsInvokeActionProps)

Types

type Action

type Action interface {
	awscodepipeline.Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Low-level class for generic CodePipeline Actions.

If you're implementing your own IAction, prefer to use the Action class from the codepipeline module.

type AlexaSkillDeployAction

type AlexaSkillDeployAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, _options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Deploys the skill to Alexa.

Example:

// Read the secrets from ParameterStore
clientId := awscdk.SecretValue_SecretsManager(jsii.String("AlexaClientId"))
clientSecret := awscdk.SecretValue_SecretsManager(jsii.String("AlexaClientSecret"))
refreshToken := awscdk.SecretValue_SecretsManager(jsii.String("AlexaRefreshToken"))

// Add deploy action
sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewAlexaSkillDeployAction(&AlexaSkillDeployActionProps{
	ActionName: jsii.String("DeploySkill"),
	RunOrder: jsii.Number(1),
	Input: sourceOutput,
	ClientId: clientId.ToString(),
	ClientSecret: clientSecret,
	RefreshToken: refreshToken,
	SkillId: jsii.String("amzn1.ask.skill.12345678-1234-1234-1234-123456789012"),
})

type AlexaSkillDeployActionProps

type AlexaSkillDeployActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// The client id of the developer console token.
	ClientId *string `field:"required" json:"clientId" yaml:"clientId"`
	// The client secret of the developer console token.
	ClientSecret awscdk.SecretValue `field:"required" json:"clientSecret" yaml:"clientSecret"`
	// The source artifact containing the voice model and skill manifest.
	Input awscodepipeline.Artifact `field:"required" json:"input" yaml:"input"`
	// The refresh token of the developer console token.
	RefreshToken awscdk.SecretValue `field:"required" json:"refreshToken" yaml:"refreshToken"`
	// The Alexa skill id.
	SkillId *string `field:"required" json:"skillId" yaml:"skillId"`
	// An optional artifact containing overrides for the skill manifest.
	ParameterOverridesArtifact awscodepipeline.Artifact `field:"optional" json:"parameterOverridesArtifact" yaml:"parameterOverridesArtifact"`
}

Construction properties of the `AlexaSkillDeployAction Alexa deploy Action`.

Example:

// Read the secrets from ParameterStore
clientId := awscdk.SecretValue_SecretsManager(jsii.String("AlexaClientId"))
clientSecret := awscdk.SecretValue_SecretsManager(jsii.String("AlexaClientSecret"))
refreshToken := awscdk.SecretValue_SecretsManager(jsii.String("AlexaRefreshToken"))

// Add deploy action
sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewAlexaSkillDeployAction(&AlexaSkillDeployActionProps{
	ActionName: jsii.String("DeploySkill"),
	RunOrder: jsii.Number(1),
	Input: sourceOutput,
	ClientId: clientId.ToString(),
	ClientSecret: clientSecret,
	RefreshToken: refreshToken,
	SkillId: jsii.String("amzn1.ask.skill.12345678-1234-1234-1234-123456789012"),
})

type BaseJenkinsProvider

type BaseJenkinsProvider interface {
	constructs.Construct
	IJenkinsProvider
	// The tree node.
	Node() constructs.Node
	ProviderName() *string
	ServerUrl() *string
	Version() *string
	// Returns a string representation of this construct.
	ToString() *string
}

type CacheControl

type CacheControl interface {
	// the actual text value of the created directive.
	Value() *string
	SetValue(val *string)
}

Used for HTTP cache-control header, which influences downstream caches.

Use the provided static factory methods to construct instances of this class. Used in the `S3DeployActionProps.cacheControl` property.

Example:

// 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"

cacheControl := awscdk.Aws_codepipeline_actions.CacheControl_FromString(jsii.String("s"))

See: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

func CacheControl_FromString

func CacheControl_FromString(s *string) CacheControl

Allows you to create an arbitrary cache control directive, in case our support is missing a method for a particular directive.

func CacheControl_Immutable added in v2.118.0

func CacheControl_Immutable() CacheControl

The 'immutable' cache control directive.

func CacheControl_MaxAge

func CacheControl_MaxAge(t awscdk.Duration) CacheControl

The 'max-age' cache control directive.

func CacheControl_MustRevalidate

func CacheControl_MustRevalidate() CacheControl

The 'must-revalidate' cache control directive.

func CacheControl_MustUnderstand added in v2.118.0

func CacheControl_MustUnderstand() CacheControl

The 'must-understand' cache control directive.

func CacheControl_NoCache

func CacheControl_NoCache() CacheControl

The 'no-cache' cache control directive.

func CacheControl_NoStore added in v2.118.0

func CacheControl_NoStore() CacheControl

The 'no-store' cache control directive.

func CacheControl_NoTransform

func CacheControl_NoTransform() CacheControl

The 'no-transform' cache control directive.

func CacheControl_ProxyRevalidate

func CacheControl_ProxyRevalidate() CacheControl

The 'proxy-revalidate' cache control directive.

func CacheControl_SMaxAge

func CacheControl_SMaxAge(t awscdk.Duration) CacheControl

The 's-max-age' cache control directive.

func CacheControl_SetPrivate

func CacheControl_SetPrivate() CacheControl

The 'private' cache control directive.

func CacheControl_SetPublic

func CacheControl_SetPublic() CacheControl

The 'public' cache control directive.

func CacheControl_StaleIfError added in v2.118.0

func CacheControl_StaleIfError(t awscdk.Duration) CacheControl

The 'stale-if-error' cache control directive.

func CacheControl_StaleWhileRevalidate added in v2.118.0

func CacheControl_StaleWhileRevalidate(t awscdk.Duration) CacheControl

The 'stale-while-revalidate' cache control directive.

type CloudFormationCreateReplaceChangeSetAction

type CloudFormationCreateReplaceChangeSetAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	DeploymentRole() awsiam.IRole
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// Add statement to the service role assumed by CloudFormation while executing this action.
	AddToDeploymentRolePolicy(statement awsiam.PolicyStatement) *bool
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline action to prepare a change set.

Creates the change set if it doesn't exist based on the stack name and template that you submit. If the change set exists, AWS CloudFormation deletes it, and then creates a new one.

Example:

// Source stage: read from repository
repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
	RepositoryName: jsii.String("template-repo"),
})
sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source"),
	Repository: repo,
	Output: sourceOutput,
	Trigger: cpactions.CodeCommitTrigger_POLL,
})
sourceStage := map[string]interface{}{
	"stageName": jsii.String("Source"),
	"actions": []CodeCommitSourceAction{
		source,
	},
}

// Deployment stage: create and deploy changeset with manual approval
stackName := "OurStack"
changeSetName := "StagedChangeSet"

prodStage := map[string]interface{}{
	"stageName": jsii.String("Deploy"),
	"actions": []interface{}{
		cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
			"actionName": jsii.String("PrepareChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"adminPermissions": jsii.Boolean(true),
			"templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
			"runOrder": jsii.Number(1),
		}),
		cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
			"actionName": jsii.String("ApproveChanges"),
			"runOrder": jsii.Number(2),
		}),
		cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
			"actionName": jsii.String("ExecuteChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"runOrder": jsii.Number(3),
		}),
	},
}

codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		sourceStage,
		prodStage,
	},
})

type CloudFormationCreateReplaceChangeSetActionProps

type CloudFormationCreateReplaceChangeSetActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Whether to grant full permissions to CloudFormation while deploying this template.
	//
	// Setting this to `true` affects the defaults for `role` and `capabilities`, if you
	// don't specify any alternatives.
	//
	// The default role that will be created for you will have full (i.e., `*`)
	// permissions on all resources, and the deployment will have named IAM
	// capabilities (i.e., able to create all IAM resources).
	//
	// This is a shorthand that you can use if you fully trust the templates that
	// are deployed in this pipeline. If you want more fine-grained permissions,
	// use `addToRolePolicy` and `capabilities` to control what the CloudFormation
	// deployment is allowed to do.
	AdminPermissions *bool `field:"required" json:"adminPermissions" yaml:"adminPermissions"`
	// Name of the change set to create or update.
	ChangeSetName *string `field:"required" json:"changeSetName" yaml:"changeSetName"`
	// The name of the stack to apply this action to.
	StackName *string `field:"required" json:"stackName" yaml:"stackName"`
	// Input artifact with the ChangeSet's CloudFormation template.
	TemplatePath awscodepipeline.ArtifactPath `field:"required" json:"templatePath" yaml:"templatePath"`
	// The AWS account this Action is supposed to operate in.
	//
	// **Note**: if you specify the `role` property,
	// this is ignored - the action will operate in the same region the passed role does.
	// Default: - action resides in the same account as the pipeline.
	//
	Account *string `field:"optional" json:"account" yaml:"account"`
	// Acknowledge certain changes made as part of deployment.
	//
	// For stacks that contain certain resources,
	// explicit acknowledgement is required that AWS CloudFormation might create or update those resources.
	// For example, you must specify `ANONYMOUS_IAM` or `NAMED_IAM` if your stack template contains AWS
	// Identity and Access Management (IAM) resources.
	// For more information, see the link below.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
	//
	// Default: None, unless `adminPermissions` is true.
	//
	CfnCapabilities *[]awscdk.CfnCapabilities `field:"optional" json:"cfnCapabilities" yaml:"cfnCapabilities"`
	// IAM role to assume when deploying changes.
	//
	// If not specified, a fresh role is created. The role is created with zero
	// permissions unless `adminPermissions` is true, in which case the role will have
	// full permissions.
	// Default: A fresh role with full or no permissions (depending on the value of `adminPermissions`).
	//
	DeploymentRole awsiam.IRole `field:"optional" json:"deploymentRole" yaml:"deploymentRole"`
	// The list of additional input Artifacts for this Action.
	//
	// This is especially useful when used in conjunction with the `parameterOverrides` property.
	// For example, if you have:
	//
	//   parameterOverrides: {
	//     'Param1': action1.outputArtifact.bucketName,
	//     'Param2': action2.outputArtifact.objectKey,
	//   }
	//
	// , if the output Artifacts of `action1` and `action2` were not used to
	// set either the `templateConfiguration` or the `templatePath` properties,
	// you need to make sure to include them in the `extraInputs` -
	// otherwise, you'll get an "unrecognized Artifact" error during your Pipeline's execution.
	ExtraInputs *[]awscodepipeline.Artifact `field:"optional" json:"extraInputs" yaml:"extraInputs"`
	// The name of the output artifact to generate.
	//
	// Only applied if `outputFileName` is set as well.
	// Default: Automatically generated artifact name.
	//
	Output awscodepipeline.Artifact `field:"optional" json:"output" yaml:"output"`
	// A name for the filename in the output artifact to store the AWS CloudFormation call's result.
	//
	// The file will contain the result of the call to AWS CloudFormation (for example
	// the call to UpdateStack or CreateChangeSet).
	//
	// AWS CodePipeline adds the file to the output artifact after performing
	// the specified action.
	// Default: No output artifact generated.
	//
	OutputFileName *string `field:"optional" json:"outputFileName" yaml:"outputFileName"`
	// Additional template parameters.
	//
	// Template parameters specified here take precedence over template parameters
	// found in the artifact specified by the `templateConfiguration` property.
	//
	// We recommend that you use the template configuration file to specify
	// most of your parameter values. Use parameter overrides to specify only
	// dynamic parameter values (values that are unknown until you run the
	// pipeline).
	//
	// All parameter names must be present in the stack template.
	//
	// Note: the entire object cannot be more than 1kB.
	// Default: No overrides.
	//
	ParameterOverrides *map[string]interface{} `field:"optional" json:"parameterOverrides" yaml:"parameterOverrides"`
	// The AWS region the given Action resides in.
	//
	// Note that a cross-region Pipeline requires replication buckets to function correctly.
	// You can provide their names with the `PipelineProps#crossRegionReplicationBuckets` property.
	// If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,
	// that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
	// Default: the Action resides in the same region as the Pipeline.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
	// Input artifact to use for template parameters values and stack policy.
	//
	// The template configuration file should contain a JSON object that should look like this:
	// `{ "Parameters": {...}, "Tags": {...}, "StackPolicy": {... }}`. For more information,
	// see [AWS CloudFormation Artifacts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-cfn-artifacts.html).
	//
	// Note that if you include sensitive information, such as passwords, restrict access to this
	// file.
	// Default: No template configuration based on input artifacts.
	//
	TemplateConfiguration awscodepipeline.ArtifactPath `field:"optional" json:"templateConfiguration" yaml:"templateConfiguration"`
}

Properties for the CloudFormationCreateReplaceChangeSetAction.

Example:

// Source stage: read from repository
repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
	RepositoryName: jsii.String("template-repo"),
})
sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source"),
	Repository: repo,
	Output: sourceOutput,
	Trigger: cpactions.CodeCommitTrigger_POLL,
})
sourceStage := map[string]interface{}{
	"stageName": jsii.String("Source"),
	"actions": []CodeCommitSourceAction{
		source,
	},
}

// Deployment stage: create and deploy changeset with manual approval
stackName := "OurStack"
changeSetName := "StagedChangeSet"

prodStage := map[string]interface{}{
	"stageName": jsii.String("Deploy"),
	"actions": []interface{}{
		cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
			"actionName": jsii.String("PrepareChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"adminPermissions": jsii.Boolean(true),
			"templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
			"runOrder": jsii.Number(1),
		}),
		cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
			"actionName": jsii.String("ApproveChanges"),
			"runOrder": jsii.Number(2),
		}),
		cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
			"actionName": jsii.String("ExecuteChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"runOrder": jsii.Number(3),
		}),
	},
}

codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		sourceStage,
		prodStage,
	},
})

type CloudFormationCreateUpdateStackAction

type CloudFormationCreateUpdateStackAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	DeploymentRole() awsiam.IRole
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// Add statement to the service role assumed by CloudFormation while executing this action.
	AddToDeploymentRolePolicy(statement awsiam.PolicyStatement) *bool
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline action to deploy a stack.

Creates the stack if the specified stack doesn't exist. If the stack exists, AWS CloudFormation updates the stack. Use this action to update existing stacks.

AWS CodePipeline won't replace the stack, and will fail deployment if the stack is in a failed state. Use `ReplaceOnFailure` for an action that will delete and recreate the stack to try and recover from failed states.

Use this action to automatically replace failed stacks without recovering or troubleshooting them. You would typically choose this mode for testing.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

// in stack for account 123456789012...
var otherAccountStack stack

actionRole := iam.NewRole(otherAccountStack, jsii.String("ActionRole"), &RoleProps{
	AssumedBy: iam.NewAccountPrincipal(jsii.String("123456789012")),
	// the role has to have a physical name set
	RoleName: awscdk.PhysicalName_GENERATE_IF_NEEDED(),
})

// in the pipeline stack...
sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewCloudFormationCreateUpdateStackAction(&CloudFormationCreateUpdateStackActionProps{
	ActionName: jsii.String("CloudFormationCreateUpdate"),
	StackName: jsii.String("MyStackName"),
	AdminPermissions: jsii.Boolean(true),
	TemplatePath: sourceOutput.AtPath(jsii.String("template.yaml")),
	Role: actionRole,
})

type CloudFormationCreateUpdateStackActionProps

type CloudFormationCreateUpdateStackActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Whether to grant full permissions to CloudFormation while deploying this template.
	//
	// Setting this to `true` affects the defaults for `role` and `capabilities`, if you
	// don't specify any alternatives.
	//
	// The default role that will be created for you will have full (i.e., `*`)
	// permissions on all resources, and the deployment will have named IAM
	// capabilities (i.e., able to create all IAM resources).
	//
	// This is a shorthand that you can use if you fully trust the templates that
	// are deployed in this pipeline. If you want more fine-grained permissions,
	// use `addToRolePolicy` and `capabilities` to control what the CloudFormation
	// deployment is allowed to do.
	AdminPermissions *bool `field:"required" json:"adminPermissions" yaml:"adminPermissions"`
	// The name of the stack to apply this action to.
	StackName *string `field:"required" json:"stackName" yaml:"stackName"`
	// Input artifact with the CloudFormation template to deploy.
	TemplatePath awscodepipeline.ArtifactPath `field:"required" json:"templatePath" yaml:"templatePath"`
	// The AWS account this Action is supposed to operate in.
	//
	// **Note**: if you specify the `role` property,
	// this is ignored - the action will operate in the same region the passed role does.
	// Default: - action resides in the same account as the pipeline.
	//
	Account *string `field:"optional" json:"account" yaml:"account"`
	// Acknowledge certain changes made as part of deployment.
	//
	// For stacks that contain certain resources,
	// explicit acknowledgement is required that AWS CloudFormation might create or update those resources.
	// For example, you must specify `ANONYMOUS_IAM` or `NAMED_IAM` if your stack template contains AWS
	// Identity and Access Management (IAM) resources.
	// For more information, see the link below.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
	//
	// Default: None, unless `adminPermissions` is true.
	//
	CfnCapabilities *[]awscdk.CfnCapabilities `field:"optional" json:"cfnCapabilities" yaml:"cfnCapabilities"`
	// IAM role to assume when deploying changes.
	//
	// If not specified, a fresh role is created. The role is created with zero
	// permissions unless `adminPermissions` is true, in which case the role will have
	// full permissions.
	// Default: A fresh role with full or no permissions (depending on the value of `adminPermissions`).
	//
	DeploymentRole awsiam.IRole `field:"optional" json:"deploymentRole" yaml:"deploymentRole"`
	// The list of additional input Artifacts for this Action.
	//
	// This is especially useful when used in conjunction with the `parameterOverrides` property.
	// For example, if you have:
	//
	//   parameterOverrides: {
	//     'Param1': action1.outputArtifact.bucketName,
	//     'Param2': action2.outputArtifact.objectKey,
	//   }
	//
	// , if the output Artifacts of `action1` and `action2` were not used to
	// set either the `templateConfiguration` or the `templatePath` properties,
	// you need to make sure to include them in the `extraInputs` -
	// otherwise, you'll get an "unrecognized Artifact" error during your Pipeline's execution.
	ExtraInputs *[]awscodepipeline.Artifact `field:"optional" json:"extraInputs" yaml:"extraInputs"`
	// The name of the output artifact to generate.
	//
	// Only applied if `outputFileName` is set as well.
	// Default: Automatically generated artifact name.
	//
	Output awscodepipeline.Artifact `field:"optional" json:"output" yaml:"output"`
	// A name for the filename in the output artifact to store the AWS CloudFormation call's result.
	//
	// The file will contain the result of the call to AWS CloudFormation (for example
	// the call to UpdateStack or CreateChangeSet).
	//
	// AWS CodePipeline adds the file to the output artifact after performing
	// the specified action.
	// Default: No output artifact generated.
	//
	OutputFileName *string `field:"optional" json:"outputFileName" yaml:"outputFileName"`
	// Additional template parameters.
	//
	// Template parameters specified here take precedence over template parameters
	// found in the artifact specified by the `templateConfiguration` property.
	//
	// We recommend that you use the template configuration file to specify
	// most of your parameter values. Use parameter overrides to specify only
	// dynamic parameter values (values that are unknown until you run the
	// pipeline).
	//
	// All parameter names must be present in the stack template.
	//
	// Note: the entire object cannot be more than 1kB.
	// Default: No overrides.
	//
	ParameterOverrides *map[string]interface{} `field:"optional" json:"parameterOverrides" yaml:"parameterOverrides"`
	// The AWS region the given Action resides in.
	//
	// Note that a cross-region Pipeline requires replication buckets to function correctly.
	// You can provide their names with the `PipelineProps#crossRegionReplicationBuckets` property.
	// If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,
	// that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
	// Default: the Action resides in the same region as the Pipeline.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
	// Replace the stack if it's in a failed state.
	//
	// If this is set to true and the stack is in a failed state (one of
	// ROLLBACK_COMPLETE, ROLLBACK_FAILED, CREATE_FAILED, DELETE_FAILED, or
	// UPDATE_ROLLBACK_FAILED), AWS CloudFormation deletes the stack and then
	// creates a new stack.
	//
	// If this is not set to true and the stack is in a failed state,
	// the deployment fails.
	// Default: false.
	//
	ReplaceOnFailure *bool `field:"optional" json:"replaceOnFailure" yaml:"replaceOnFailure"`
	// Input artifact to use for template parameters values and stack policy.
	//
	// The template configuration file should contain a JSON object that should look like this:
	// `{ "Parameters": {...}, "Tags": {...}, "StackPolicy": {... }}`. For more information,
	// see [AWS CloudFormation Artifacts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-cfn-artifacts.html).
	//
	// Note that if you include sensitive information, such as passwords, restrict access to this
	// file.
	// Default: No template configuration based on input artifacts.
	//
	TemplateConfiguration awscodepipeline.ArtifactPath `field:"optional" json:"templateConfiguration" yaml:"templateConfiguration"`
}

Properties for the CloudFormationCreateUpdateStackAction.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

// in stack for account 123456789012...
var otherAccountStack stack

actionRole := iam.NewRole(otherAccountStack, jsii.String("ActionRole"), &RoleProps{
	AssumedBy: iam.NewAccountPrincipal(jsii.String("123456789012")),
	// the role has to have a physical name set
	RoleName: awscdk.PhysicalName_GENERATE_IF_NEEDED(),
})

// in the pipeline stack...
sourceOutput := codepipeline.NewArtifact()
codepipeline_actions.NewCloudFormationCreateUpdateStackAction(&CloudFormationCreateUpdateStackActionProps{
	ActionName: jsii.String("CloudFormationCreateUpdate"),
	StackName: jsii.String("MyStackName"),
	AdminPermissions: jsii.Boolean(true),
	TemplatePath: sourceOutput.AtPath(jsii.String("template.yaml")),
	Role: actionRole,
})

type CloudFormationDeleteStackAction

type CloudFormationDeleteStackAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	DeploymentRole() awsiam.IRole
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// Add statement to the service role assumed by CloudFormation while executing this action.
	AddToDeploymentRolePolicy(statement awsiam.PolicyStatement) *bool
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline action to delete a stack.

Deletes a stack. If you specify a stack that doesn't exist, the action completes successfully without deleting a stack.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "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 parameterOverrides interface{}
var role role

cloudFormationDeleteStackAction := awscdk.Aws_codepipeline_actions.NewCloudFormationDeleteStackAction(&CloudFormationDeleteStackActionProps{
	ActionName: jsii.String("actionName"),
	AdminPermissions: jsii.Boolean(false),
	StackName: jsii.String("stackName"),

	// the properties below are optional
	Account: jsii.String("account"),
	CfnCapabilities: []cfnCapabilities{
		cdk.*cfnCapabilities_NONE,
	},
	DeploymentRole: role,
	ExtraInputs: []*artifact{
		artifact,
	},
	Output: artifact,
	OutputFileName: jsii.String("outputFileName"),
	ParameterOverrides: map[string]interface{}{
		"parameterOverridesKey": parameterOverrides,
	},
	Region: jsii.String("region"),
	Role: role,
	RunOrder: jsii.Number(123),
	TemplateConfiguration: artifactPath,
	VariablesNamespace: jsii.String("variablesNamespace"),
})

type CloudFormationDeleteStackActionProps

type CloudFormationDeleteStackActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Whether to grant full permissions to CloudFormation while deploying this template.
	//
	// Setting this to `true` affects the defaults for `role` and `capabilities`, if you
	// don't specify any alternatives.
	//
	// The default role that will be created for you will have full (i.e., `*`)
	// permissions on all resources, and the deployment will have named IAM
	// capabilities (i.e., able to create all IAM resources).
	//
	// This is a shorthand that you can use if you fully trust the templates that
	// are deployed in this pipeline. If you want more fine-grained permissions,
	// use `addToRolePolicy` and `capabilities` to control what the CloudFormation
	// deployment is allowed to do.
	AdminPermissions *bool `field:"required" json:"adminPermissions" yaml:"adminPermissions"`
	// The name of the stack to apply this action to.
	StackName *string `field:"required" json:"stackName" yaml:"stackName"`
	// The AWS account this Action is supposed to operate in.
	//
	// **Note**: if you specify the `role` property,
	// this is ignored - the action will operate in the same region the passed role does.
	// Default: - action resides in the same account as the pipeline.
	//
	Account *string `field:"optional" json:"account" yaml:"account"`
	// Acknowledge certain changes made as part of deployment.
	//
	// For stacks that contain certain resources,
	// explicit acknowledgement is required that AWS CloudFormation might create or update those resources.
	// For example, you must specify `ANONYMOUS_IAM` or `NAMED_IAM` if your stack template contains AWS
	// Identity and Access Management (IAM) resources.
	// For more information, see the link below.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
	//
	// Default: None, unless `adminPermissions` is true.
	//
	CfnCapabilities *[]awscdk.CfnCapabilities `field:"optional" json:"cfnCapabilities" yaml:"cfnCapabilities"`
	// IAM role to assume when deploying changes.
	//
	// If not specified, a fresh role is created. The role is created with zero
	// permissions unless `adminPermissions` is true, in which case the role will have
	// full permissions.
	// Default: A fresh role with full or no permissions (depending on the value of `adminPermissions`).
	//
	DeploymentRole awsiam.IRole `field:"optional" json:"deploymentRole" yaml:"deploymentRole"`
	// The list of additional input Artifacts for this Action.
	//
	// This is especially useful when used in conjunction with the `parameterOverrides` property.
	// For example, if you have:
	//
	//   parameterOverrides: {
	//     'Param1': action1.outputArtifact.bucketName,
	//     'Param2': action2.outputArtifact.objectKey,
	//   }
	//
	// , if the output Artifacts of `action1` and `action2` were not used to
	// set either the `templateConfiguration` or the `templatePath` properties,
	// you need to make sure to include them in the `extraInputs` -
	// otherwise, you'll get an "unrecognized Artifact" error during your Pipeline's execution.
	ExtraInputs *[]awscodepipeline.Artifact `field:"optional" json:"extraInputs" yaml:"extraInputs"`
	// The name of the output artifact to generate.
	//
	// Only applied if `outputFileName` is set as well.
	// Default: Automatically generated artifact name.
	//
	Output awscodepipeline.Artifact `field:"optional" json:"output" yaml:"output"`
	// A name for the filename in the output artifact to store the AWS CloudFormation call's result.
	//
	// The file will contain the result of the call to AWS CloudFormation (for example
	// the call to UpdateStack or CreateChangeSet).
	//
	// AWS CodePipeline adds the file to the output artifact after performing
	// the specified action.
	// Default: No output artifact generated.
	//
	OutputFileName *string `field:"optional" json:"outputFileName" yaml:"outputFileName"`
	// Additional template parameters.
	//
	// Template parameters specified here take precedence over template parameters
	// found in the artifact specified by the `templateConfiguration` property.
	//
	// We recommend that you use the template configuration file to specify
	// most of your parameter values. Use parameter overrides to specify only
	// dynamic parameter values (values that are unknown until you run the
	// pipeline).
	//
	// All parameter names must be present in the stack template.
	//
	// Note: the entire object cannot be more than 1kB.
	// Default: No overrides.
	//
	ParameterOverrides *map[string]interface{} `field:"optional" json:"parameterOverrides" yaml:"parameterOverrides"`
	// The AWS region the given Action resides in.
	//
	// Note that a cross-region Pipeline requires replication buckets to function correctly.
	// You can provide their names with the `PipelineProps#crossRegionReplicationBuckets` property.
	// If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,
	// that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
	// Default: the Action resides in the same region as the Pipeline.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
	// Input artifact to use for template parameters values and stack policy.
	//
	// The template configuration file should contain a JSON object that should look like this:
	// `{ "Parameters": {...}, "Tags": {...}, "StackPolicy": {... }}`. For more information,
	// see [AWS CloudFormation Artifacts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-cfn-artifacts.html).
	//
	// Note that if you include sensitive information, such as passwords, restrict access to this
	// file.
	// Default: No template configuration based on input artifacts.
	//
	TemplateConfiguration awscodepipeline.ArtifactPath `field:"optional" json:"templateConfiguration" yaml:"templateConfiguration"`
}

Properties for the CloudFormationDeleteStackAction.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "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 parameterOverrides interface{}
var role role

cloudFormationDeleteStackActionProps := &CloudFormationDeleteStackActionProps{
	ActionName: jsii.String("actionName"),
	AdminPermissions: jsii.Boolean(false),
	StackName: jsii.String("stackName"),

	// the properties below are optional
	Account: jsii.String("account"),
	CfnCapabilities: []cfnCapabilities{
		cdk.*cfnCapabilities_NONE,
	},
	DeploymentRole: role,
	ExtraInputs: []*artifact{
		artifact,
	},
	Output: artifact,
	OutputFileName: jsii.String("outputFileName"),
	ParameterOverrides: map[string]interface{}{
		"parameterOverridesKey": parameterOverrides,
	},
	Region: jsii.String("region"),
	Role: role,
	RunOrder: jsii.Number(123),
	TemplateConfiguration: artifactPath,
	VariablesNamespace: jsii.String("variablesNamespace"),
}

type CloudFormationDeployStackInstancesAction added in v2.13.0

type CloudFormationDeployStackInstancesAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline action to create/update Stack Instances of a StackSet.

After the initial creation of a stack set, you can add new stack instances by using CloudFormationStackInstances. Template parameter values can be overridden at the stack instance level during create or update stack set instance operations.

Each stack set has one template and set of template parameters. When you update the template or template parameters, you update them for the entire set. Then all instance statuses are set to OUTDATED until the changes are deployed to that instance.

Example:

var pipeline pipeline
var sourceOutput artifact

pipeline.AddStage(&StageOptions{
	StageName: jsii.String("DeployStackSets"),
	Actions: []iAction{
		// First, update the StackSet itself with the newest template
		codepipeline_actions.NewCloudFormationDeployStackSetAction(&CloudFormationDeployStackSetActionProps{
			ActionName: jsii.String("UpdateStackSet"),
			RunOrder: jsii.Number(1),
			StackSetName: jsii.String("MyStackSet"),
			Template: codepipeline_actions.StackSetTemplate_FromArtifactPath(sourceOutput.AtPath(jsii.String("template.yaml"))),

			// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
			DeploymentModel: codepipeline_actions.StackSetDeploymentModel_SelfManaged(),
			// This deploys to a set of accounts
			StackInstances: codepipeline_actions.StackInstances_InAccounts([]*string{
				jsii.String("111111111111"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),

		// Afterwards, update/create additional instances in other accounts
		codepipeline_actions.NewCloudFormationDeployStackInstancesAction(&CloudFormationDeployStackInstancesActionProps{
			ActionName: jsii.String("AddMoreInstances"),
			RunOrder: jsii.Number(2),
			StackSetName: jsii.String("MyStackSet"),
			StackInstances: codepipeline_actions.StackInstances_*InAccounts([]*string{
				jsii.String("222222222222"),
				jsii.String("333333333333"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),
	},
})

type CloudFormationDeployStackInstancesActionProps added in v2.13.0

type CloudFormationDeployStackInstancesActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The percentage of accounts per Region for which this stack operation can fail before AWS CloudFormation stops the operation in that Region.
	//
	// If
	// the operation is stopped in a Region, AWS CloudFormation doesn't attempt the operation in subsequent Regions. When calculating the number
	// of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number.
	// Default: 0%.
	//
	FailureTolerancePercentage *float64 `field:"optional" json:"failureTolerancePercentage" yaml:"failureTolerancePercentage"`
	// The maximum percentage of accounts in which to perform this operation at one time.
	//
	// When calculating the number of accounts based on the specified
	// percentage, AWS CloudFormation rounds down to the next whole number. If rounding down would result in zero, AWS CloudFormation sets the number as
	// one instead. Although you use this setting to specify the maximum, for large deployments the actual number of accounts acted upon concurrently
	// may be lower due to service throttling.
	// Default: 1%.
	//
	MaxAccountConcurrencyPercentage *float64 `field:"optional" json:"maxAccountConcurrencyPercentage" yaml:"maxAccountConcurrencyPercentage"`
	// The AWS Region the StackSet is in.
	//
	// Note that a cross-region Pipeline requires replication buckets to function correctly.
	// You can provide their names with the `PipelineProps.crossRegionReplicationBuckets` property.
	// If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,
	// that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
	// Default: - same region as the Pipeline.
	//
	StackSetRegion *string `field:"optional" json:"stackSetRegion" yaml:"stackSetRegion"`
	// Specify where to create or update Stack Instances.
	//
	// You can specify either AWS Accounts Ids or AWS Organizations Organizational Units.
	StackInstances StackInstances `field:"required" json:"stackInstances" yaml:"stackInstances"`
	// The name of the StackSet we are adding instances to.
	StackSetName *string `field:"required" json:"stackSetName" yaml:"stackSetName"`
	// Parameter values that only apply to the current Stack Instances.
	//
	// These parameters are shared between all instances added by this action.
	// Default: - no parameters will be overridden.
	//
	ParameterOverrides StackSetParameters `field:"optional" json:"parameterOverrides" yaml:"parameterOverrides"`
}

Properties for the CloudFormationDeployStackInstancesAction.

Example:

var pipeline pipeline
var sourceOutput artifact

pipeline.AddStage(&StageOptions{
	StageName: jsii.String("DeployStackSets"),
	Actions: []iAction{
		// First, update the StackSet itself with the newest template
		codepipeline_actions.NewCloudFormationDeployStackSetAction(&CloudFormationDeployStackSetActionProps{
			ActionName: jsii.String("UpdateStackSet"),
			RunOrder: jsii.Number(1),
			StackSetName: jsii.String("MyStackSet"),
			Template: codepipeline_actions.StackSetTemplate_FromArtifactPath(sourceOutput.AtPath(jsii.String("template.yaml"))),

			// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
			DeploymentModel: codepipeline_actions.StackSetDeploymentModel_SelfManaged(),
			// This deploys to a set of accounts
			StackInstances: codepipeline_actions.StackInstances_InAccounts([]*string{
				jsii.String("111111111111"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),

		// Afterwards, update/create additional instances in other accounts
		codepipeline_actions.NewCloudFormationDeployStackInstancesAction(&CloudFormationDeployStackInstancesActionProps{
			ActionName: jsii.String("AddMoreInstances"),
			RunOrder: jsii.Number(2),
			StackSetName: jsii.String("MyStackSet"),
			StackInstances: codepipeline_actions.StackInstances_*InAccounts([]*string{
				jsii.String("222222222222"),
				jsii.String("333333333333"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),
	},
})

type CloudFormationDeployStackSetAction added in v2.13.0

type CloudFormationDeployStackSetAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline action to deploy a stackset.

CodePipeline offers the ability to perform AWS CloudFormation StackSets operations as part of your CI/CD process. You use a stack set to create stacks in AWS accounts across AWS Regions by using a single AWS CloudFormation template. All the resources included in each stack are defined by the stack set’s AWS CloudFormation template. When you create the stack set, you specify the template to use, as well as any parameters and capabilities that the template requires.

For more information about concepts for AWS CloudFormation StackSets, see [StackSets concepts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html) in the AWS CloudFormation User Guide.

If you use this action to make an update that includes adding stack instances, the new instances are deployed first and the update is completed last. The new instances first receive the old version, and then the update is applied to all instances.

As a best practice, you should construct your pipeline so that the stack set is created and initially deploys to a subset or a single instance. After you test your deployment and view the generated stack set, then add the CloudFormationStackInstances action so that the remaining instances are created and updated.

Example:

var pipeline pipeline
var sourceOutput artifact

pipeline.AddStage(&StageOptions{
	StageName: jsii.String("DeployStackSets"),
	Actions: []iAction{
		// First, update the StackSet itself with the newest template
		codepipeline_actions.NewCloudFormationDeployStackSetAction(&CloudFormationDeployStackSetActionProps{
			ActionName: jsii.String("UpdateStackSet"),
			RunOrder: jsii.Number(1),
			StackSetName: jsii.String("MyStackSet"),
			Template: codepipeline_actions.StackSetTemplate_FromArtifactPath(sourceOutput.AtPath(jsii.String("template.yaml"))),

			// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
			DeploymentModel: codepipeline_actions.StackSetDeploymentModel_SelfManaged(),
			// This deploys to a set of accounts
			StackInstances: codepipeline_actions.StackInstances_InAccounts([]*string{
				jsii.String("111111111111"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),

		// Afterwards, update/create additional instances in other accounts
		codepipeline_actions.NewCloudFormationDeployStackInstancesAction(&CloudFormationDeployStackInstancesActionProps{
			ActionName: jsii.String("AddMoreInstances"),
			RunOrder: jsii.Number(2),
			StackSetName: jsii.String("MyStackSet"),
			StackInstances: codepipeline_actions.StackInstances_*InAccounts([]*string{
				jsii.String("222222222222"),
				jsii.String("333333333333"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),
	},
})

func NewCloudFormationDeployStackSetAction added in v2.13.0

func NewCloudFormationDeployStackSetAction(props *CloudFormationDeployStackSetActionProps) CloudFormationDeployStackSetAction

type CloudFormationDeployStackSetActionProps added in v2.13.0

type CloudFormationDeployStackSetActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The percentage of accounts per Region for which this stack operation can fail before AWS CloudFormation stops the operation in that Region.
	//
	// If
	// the operation is stopped in a Region, AWS CloudFormation doesn't attempt the operation in subsequent Regions. When calculating the number
	// of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number.
	// Default: 0%.
	//
	FailureTolerancePercentage *float64 `field:"optional" json:"failureTolerancePercentage" yaml:"failureTolerancePercentage"`
	// The maximum percentage of accounts in which to perform this operation at one time.
	//
	// When calculating the number of accounts based on the specified
	// percentage, AWS CloudFormation rounds down to the next whole number. If rounding down would result in zero, AWS CloudFormation sets the number as
	// one instead. Although you use this setting to specify the maximum, for large deployments the actual number of accounts acted upon concurrently
	// may be lower due to service throttling.
	// Default: 1%.
	//
	MaxAccountConcurrencyPercentage *float64 `field:"optional" json:"maxAccountConcurrencyPercentage" yaml:"maxAccountConcurrencyPercentage"`
	// The AWS Region the StackSet is in.
	//
	// Note that a cross-region Pipeline requires replication buckets to function correctly.
	// You can provide their names with the `PipelineProps.crossRegionReplicationBuckets` property.
	// If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,
	// that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
	// Default: - same region as the Pipeline.
	//
	StackSetRegion *string `field:"optional" json:"stackSetRegion" yaml:"stackSetRegion"`
	// The name to associate with the stack set.
	//
	// This name must be unique in the Region where it is created.
	//
	// The name may only contain alphanumeric and hyphen characters. It must begin with an alphabetic character and be 128 characters or fewer.
	StackSetName *string `field:"required" json:"stackSetName" yaml:"stackSetName"`
	// The location of the template that defines the resources in the stack set.
	//
	// This must point to a template with a maximum size of 460,800 bytes.
	//
	// Enter the path to the source artifact name and template file.
	Template StackSetTemplate `field:"required" json:"template" yaml:"template"`
	// Indicates that the template can create and update resources, depending on the types of resources in the template.
	//
	// You must use this property if you have IAM resources in your stack template or you create a stack directly from a template containing macros.
	// Default: - the StackSet will have no IAM capabilities.
	//
	CfnCapabilities *[]awscdk.CfnCapabilities `field:"optional" json:"cfnCapabilities" yaml:"cfnCapabilities"`
	// Determines how IAM roles are created and managed.
	//
	// The choices are:
	//
	// - Self Managed: you create IAM roles with the required permissions
	//   in the administration account and all target accounts.
	// - Service Managed: only available if the account and target accounts
	//   are part of an AWS Organization. The necessary roles will be created
	//   for you.
	//
	// If you want to deploy to all accounts that are a member of AWS
	// Organizations Organizational Units (OUs), you must select Service Managed
	// permissions.
	//
	// Note: This parameter can only be changed when no stack instances exist in
	// the stack set.
	// Default: StackSetDeploymentModel.selfManaged()
	//
	DeploymentModel StackSetDeploymentModel `field:"optional" json:"deploymentModel" yaml:"deploymentModel"`
	// A description of the stack set.
	//
	// You can use this to describe the stack set’s purpose or other relevant information.
	// Default: - no description.
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The template parameters for your stack set.
	//
	// These parameters are shared between all instances of the stack set.
	// Default: - no parameters will be used.
	//
	Parameters StackSetParameters `field:"optional" json:"parameters" yaml:"parameters"`
	// Specify where to create or update Stack Instances.
	//
	// You can specify either AWS Accounts Ids or AWS Organizations Organizational Units.
	// Default: - don't create or update any Stack Instances.
	//
	StackInstances StackInstances `field:"optional" json:"stackInstances" yaml:"stackInstances"`
}

Properties for the CloudFormationDeployStackSetAction.

Example:

var pipeline pipeline
var sourceOutput artifact

pipeline.AddStage(&StageOptions{
	StageName: jsii.String("DeployStackSets"),
	Actions: []iAction{
		// First, update the StackSet itself with the newest template
		codepipeline_actions.NewCloudFormationDeployStackSetAction(&CloudFormationDeployStackSetActionProps{
			ActionName: jsii.String("UpdateStackSet"),
			RunOrder: jsii.Number(1),
			StackSetName: jsii.String("MyStackSet"),
			Template: codepipeline_actions.StackSetTemplate_FromArtifactPath(sourceOutput.AtPath(jsii.String("template.yaml"))),

			// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
			DeploymentModel: codepipeline_actions.StackSetDeploymentModel_SelfManaged(),
			// This deploys to a set of accounts
			StackInstances: codepipeline_actions.StackInstances_InAccounts([]*string{
				jsii.String("111111111111"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),

		// Afterwards, update/create additional instances in other accounts
		codepipeline_actions.NewCloudFormationDeployStackInstancesAction(&CloudFormationDeployStackInstancesActionProps{
			ActionName: jsii.String("AddMoreInstances"),
			RunOrder: jsii.Number(2),
			StackSetName: jsii.String("MyStackSet"),
			StackInstances: codepipeline_actions.StackInstances_*InAccounts([]*string{
				jsii.String("222222222222"),
				jsii.String("333333333333"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),
	},
})

type CloudFormationExecuteChangeSetAction

type CloudFormationExecuteChangeSetAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline action to execute a prepared change set.

Example:

// Source stage: read from repository
repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
	RepositoryName: jsii.String("template-repo"),
})
sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source"),
	Repository: repo,
	Output: sourceOutput,
	Trigger: cpactions.CodeCommitTrigger_POLL,
})
sourceStage := map[string]interface{}{
	"stageName": jsii.String("Source"),
	"actions": []CodeCommitSourceAction{
		source,
	},
}

// Deployment stage: create and deploy changeset with manual approval
stackName := "OurStack"
changeSetName := "StagedChangeSet"

prodStage := map[string]interface{}{
	"stageName": jsii.String("Deploy"),
	"actions": []interface{}{
		cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
			"actionName": jsii.String("PrepareChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"adminPermissions": jsii.Boolean(true),
			"templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
			"runOrder": jsii.Number(1),
		}),
		cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
			"actionName": jsii.String("ApproveChanges"),
			"runOrder": jsii.Number(2),
		}),
		cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
			"actionName": jsii.String("ExecuteChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"runOrder": jsii.Number(3),
		}),
	},
}

codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		sourceStage,
		prodStage,
	},
})

type CloudFormationExecuteChangeSetActionProps

type CloudFormationExecuteChangeSetActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Name of the change set to execute.
	ChangeSetName *string `field:"required" json:"changeSetName" yaml:"changeSetName"`
	// The name of the stack to apply this action to.
	StackName *string `field:"required" json:"stackName" yaml:"stackName"`
	// The AWS account this Action is supposed to operate in.
	//
	// **Note**: if you specify the `role` property,
	// this is ignored - the action will operate in the same region the passed role does.
	// Default: - action resides in the same account as the pipeline.
	//
	Account *string `field:"optional" json:"account" yaml:"account"`
	// The name of the output artifact to generate.
	//
	// Only applied if `outputFileName` is set as well.
	// Default: Automatically generated artifact name.
	//
	Output awscodepipeline.Artifact `field:"optional" json:"output" yaml:"output"`
	// A name for the filename in the output artifact to store the AWS CloudFormation call's result.
	//
	// The file will contain the result of the call to AWS CloudFormation (for example
	// the call to UpdateStack or CreateChangeSet).
	//
	// AWS CodePipeline adds the file to the output artifact after performing
	// the specified action.
	// Default: No output artifact generated.
	//
	OutputFileName *string `field:"optional" json:"outputFileName" yaml:"outputFileName"`
	// The AWS region the given Action resides in.
	//
	// Note that a cross-region Pipeline requires replication buckets to function correctly.
	// You can provide their names with the `PipelineProps#crossRegionReplicationBuckets` property.
	// If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,
	// that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
	// Default: the Action resides in the same region as the Pipeline.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
}

Properties for the CloudFormationExecuteChangeSetAction.

Example:

// Source stage: read from repository
repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
	RepositoryName: jsii.String("template-repo"),
})
sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source"),
	Repository: repo,
	Output: sourceOutput,
	Trigger: cpactions.CodeCommitTrigger_POLL,
})
sourceStage := map[string]interface{}{
	"stageName": jsii.String("Source"),
	"actions": []CodeCommitSourceAction{
		source,
	},
}

// Deployment stage: create and deploy changeset with manual approval
stackName := "OurStack"
changeSetName := "StagedChangeSet"

prodStage := map[string]interface{}{
	"stageName": jsii.String("Deploy"),
	"actions": []interface{}{
		cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
			"actionName": jsii.String("PrepareChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"adminPermissions": jsii.Boolean(true),
			"templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
			"runOrder": jsii.Number(1),
		}),
		cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
			"actionName": jsii.String("ApproveChanges"),
			"runOrder": jsii.Number(2),
		}),
		cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
			"actionName": jsii.String("ExecuteChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"runOrder": jsii.Number(3),
		}),
	},
}

codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		sourceStage,
		prodStage,
	},
})

type CodeBuildAction

type CodeBuildAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	// Reference a CodePipeline variable defined by the CodeBuild project this action points to.
	//
	// Variables in CodeBuild actions are defined using the 'exported-variables' subsection of the 'env'
	// section of the buildspec.
	// See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-syntax
	//
	Variable(variableName *string) *string
	VariableExpression(variableName *string) *string
}

CodePipeline build action that uses AWS CodeBuild.

Example:

// Create a Cloudfront Web Distribution
import cloudfront "github.com/aws/aws-cdk-go/awscdk"
var distribution distribution

// Create the build project that will invalidate the cache
invalidateBuildProject := codebuild.NewPipelineProject(this, jsii.String("InvalidateProject"), &PipelineProjectProps{
	BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
		"version": jsii.String("0.2"),
		"phases": map[string]map[string][]*string{
			"build": map[string][]*string{
				"commands": []*string{
					jsii.String("aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths \"/*\""),
				},
			},
		},
	}),
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"CLOUDFRONT_ID": &buildEnvironmentVariable{
			"value": distribution.distributionId,
		},
	},
})

// Add Cloudfront invalidation permissions to the project
distributionArn := fmt.Sprintf("arn:aws:cloudfront::%v:distribution/%v", this.Account, distribution.DistributionId)
invalidateBuildProject.addToRolePolicy(iam.NewPolicyStatement(&PolicyStatementProps{
	Resources: []*string{
		distributionArn,
	},
	Actions: []*string{
		jsii.String("cloudfront:CreateInvalidation"),
	},
}))

// Create the pipeline (here only the S3 deploy and Invalidate cache build)
deployBucket := s3.NewBucket(this, jsii.String("DeployBucket"))
deployInput := codepipeline.NewArtifact()
codepipeline.NewPipeline(this, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		&stageProps{
			StageName: jsii.String("Deploy"),
			Actions: []iAction{
				codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{
					ActionName: jsii.String("S3Deploy"),
					Bucket: deployBucket,
					Input: deployInput,
					RunOrder: jsii.Number(1),
				}),
				codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
					ActionName: jsii.String("InvalidateCache"),
					Project: invalidateBuildProject,
					Input: deployInput,
					RunOrder: jsii.Number(2),
				}),
			},
		},
	},
})

func NewCodeBuildAction

func NewCodeBuildAction(props *CodeBuildActionProps) CodeBuildAction

type CodeBuildActionProps

type CodeBuildActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The source to use as input for this action.
	Input awscodepipeline.Artifact `field:"required" json:"input" yaml:"input"`
	// The action's Project.
	Project awscodebuild.IProject `field:"required" json:"project" yaml:"project"`
	// Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable.
	// Default: true.
	//
	CheckSecretsInPlainTextEnvVariables *bool `field:"optional" json:"checkSecretsInPlainTextEnvVariables" yaml:"checkSecretsInPlainTextEnvVariables"`
	// Combine the build artifacts for a batch builds.
	//
	// Enabling this will combine the build artifacts into the same location for batch builds.
	// If `executeBatchBuild` is not set to `true`, this property is ignored.
	// Default: false.
	//
	CombineBatchBuildArtifacts *bool `field:"optional" json:"combineBatchBuildArtifacts" yaml:"combineBatchBuildArtifacts"`
	// The environment variables to pass to the CodeBuild project when this action executes.
	//
	// If a variable with the same name was set both on the project level, and here,
	// this value will take precedence.
	// Default: - No additional environment variables are specified.
	//
	EnvironmentVariables *map[string]*awscodebuild.BuildEnvironmentVariable `field:"optional" json:"environmentVariables" yaml:"environmentVariables"`
	// Trigger a batch build.
	//
	// Enabling this will enable batch builds on the CodeBuild project.
	// Default: false.
	//
	ExecuteBatchBuild *bool `field:"optional" json:"executeBatchBuild" yaml:"executeBatchBuild"`
	// The list of additional input Artifacts for this action.
	//
	// The directories the additional inputs will be available at are available
	// during the project's build in the CODEBUILD_SRC_DIR_<artifact-name> environment variables.
	// The project's build always starts in the directory with the primary input artifact checked out,
	// the one pointed to by the `input` property.
	// For more information,
	// see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html .
	ExtraInputs *[]awscodepipeline.Artifact `field:"optional" json:"extraInputs" yaml:"extraInputs"`
	// The list of output Artifacts for this action.
	//
	// **Note**: if you specify more than one output Artifact here,
	// you cannot use the primary 'artifacts' section of the buildspec;
	// you have to use the 'secondary-artifacts' section instead.
	// See https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html
	// for details.
	// Default: the action will not have any outputs.
	//
	Outputs *[]awscodepipeline.Artifact `field:"optional" json:"outputs" yaml:"outputs"`
	// The type of the action that determines its CodePipeline Category - Build, or Test.
	// Default: CodeBuildActionType.BUILD
	//
	Type CodeBuildActionType `field:"optional" json:"type" yaml:"type"`
}

Construction properties of the `CodeBuildAction CodeBuild build CodePipeline action`.

Example:

// Create a Cloudfront Web Distribution
import cloudfront "github.com/aws/aws-cdk-go/awscdk"
var distribution distribution

// Create the build project that will invalidate the cache
invalidateBuildProject := codebuild.NewPipelineProject(this, jsii.String("InvalidateProject"), &PipelineProjectProps{
	BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
		"version": jsii.String("0.2"),
		"phases": map[string]map[string][]*string{
			"build": map[string][]*string{
				"commands": []*string{
					jsii.String("aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths \"/*\""),
				},
			},
		},
	}),
	EnvironmentVariables: map[string]buildEnvironmentVariable{
		"CLOUDFRONT_ID": &buildEnvironmentVariable{
			"value": distribution.distributionId,
		},
	},
})

// Add Cloudfront invalidation permissions to the project
distributionArn := fmt.Sprintf("arn:aws:cloudfront::%v:distribution/%v", this.Account, distribution.DistributionId)
invalidateBuildProject.addToRolePolicy(iam.NewPolicyStatement(&PolicyStatementProps{
	Resources: []*string{
		distributionArn,
	},
	Actions: []*string{
		jsii.String("cloudfront:CreateInvalidation"),
	},
}))

// Create the pipeline (here only the S3 deploy and Invalidate cache build)
deployBucket := s3.NewBucket(this, jsii.String("DeployBucket"))
deployInput := codepipeline.NewArtifact()
codepipeline.NewPipeline(this, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		&stageProps{
			StageName: jsii.String("Deploy"),
			Actions: []iAction{
				codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{
					ActionName: jsii.String("S3Deploy"),
					Bucket: deployBucket,
					Input: deployInput,
					RunOrder: jsii.Number(1),
				}),
				codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
					ActionName: jsii.String("InvalidateCache"),
					Project: invalidateBuildProject,
					Input: deployInput,
					RunOrder: jsii.Number(2),
				}),
			},
		},
	},
})

type CodeBuildActionType

type CodeBuildActionType string

The type of the CodeBuild action that determines its CodePipeline Category - Build, or Test.

The default is Build.

Example:

var project pipelineProject

sourceOutput := codepipeline.NewArtifact()
testAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("IntegrationTest"),
	Project: Project,
	Input: sourceOutput,
	Type: codepipeline_actions.CodeBuildActionType_TEST,
})
const (
	// The action will have the Build Category.
	//
	// This is the default.
	CodeBuildActionType_BUILD CodeBuildActionType = "BUILD"
	// The action will have the Test Category.
	CodeBuildActionType_TEST CodeBuildActionType = "TEST"
)

type CodeCommitSourceAction

type CodeCommitSourceAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The variables emitted by this action.
	Variables() *CodeCommitSourceVariables
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline Source that is provided by an AWS CodeCommit repository.

If the CodeCommit repository is in a different account, you must use `CodeCommitTrigger.EVENTS` to trigger the pipeline.

(That is because the Pipeline structure normally only has a `RepositoryName` field, and that is not enough for the pipeline to locate the repository's source account. However, if the pipeline is triggered via an EventBridge event, the event itself has the full repository ARN in there, allowing the pipeline to locate the repository).

Example:

// Source stage: read from repository
repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
	RepositoryName: jsii.String("template-repo"),
})
sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source"),
	Repository: repo,
	Output: sourceOutput,
	Trigger: cpactions.CodeCommitTrigger_POLL,
})
sourceStage := map[string]interface{}{
	"stageName": jsii.String("Source"),
	"actions": []CodeCommitSourceAction{
		source,
	},
}

// Deployment stage: create and deploy changeset with manual approval
stackName := "OurStack"
changeSetName := "StagedChangeSet"

prodStage := map[string]interface{}{
	"stageName": jsii.String("Deploy"),
	"actions": []interface{}{
		cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
			"actionName": jsii.String("PrepareChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"adminPermissions": jsii.Boolean(true),
			"templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
			"runOrder": jsii.Number(1),
		}),
		cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
			"actionName": jsii.String("ApproveChanges"),
			"runOrder": jsii.Number(2),
		}),
		cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
			"actionName": jsii.String("ExecuteChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"runOrder": jsii.Number(3),
		}),
	},
}

codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		sourceStage,
		prodStage,
	},
})

type CodeCommitSourceActionProps

type CodeCommitSourceActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role   awsiam.IRole             `field:"optional" json:"role" yaml:"role"`
	Output awscodepipeline.Artifact `field:"required" json:"output" yaml:"output"`
	// The CodeCommit repository.
	Repository awscodecommit.IRepository `field:"required" json:"repository" yaml:"repository"`
	// Default: 'master'.
	//
	Branch *string `field:"optional" json:"branch" yaml:"branch"`
	// Whether the output should be the contents of the repository (which is the default), or a link that allows CodeBuild to clone the repository before building.
	//
	// **Note**: if this option is true,
	// then only CodeBuild actions can use the resulting `output`.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-CodeCommit.html
	//
	// Default: false.
	//
	CodeBuildCloneOutput *bool `field:"optional" json:"codeBuildCloneOutput" yaml:"codeBuildCloneOutput"`
	// Role to be used by on commit event rule.
	//
	// Used only when trigger value is CodeCommitTrigger.EVENTS.
	// Default: a new role will be created.
	//
	EventRole awsiam.IRole `field:"optional" json:"eventRole" yaml:"eventRole"`
	// How should CodePipeline detect source changes for this Action.
	// Default: CodeCommitTrigger.EVENTS
	//
	Trigger CodeCommitTrigger `field:"optional" json:"trigger" yaml:"trigger"`
}

Construction properties of the `CodeCommitSourceAction CodeCommit source CodePipeline Action`.

Example:

// Source stage: read from repository
repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
	RepositoryName: jsii.String("template-repo"),
})
sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source"),
	Repository: repo,
	Output: sourceOutput,
	Trigger: cpactions.CodeCommitTrigger_POLL,
})
sourceStage := map[string]interface{}{
	"stageName": jsii.String("Source"),
	"actions": []CodeCommitSourceAction{
		source,
	},
}

// Deployment stage: create and deploy changeset with manual approval
stackName := "OurStack"
changeSetName := "StagedChangeSet"

prodStage := map[string]interface{}{
	"stageName": jsii.String("Deploy"),
	"actions": []interface{}{
		cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
			"actionName": jsii.String("PrepareChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"adminPermissions": jsii.Boolean(true),
			"templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
			"runOrder": jsii.Number(1),
		}),
		cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
			"actionName": jsii.String("ApproveChanges"),
			"runOrder": jsii.Number(2),
		}),
		cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
			"actionName": jsii.String("ExecuteChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"runOrder": jsii.Number(3),
		}),
	},
}

codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		sourceStage,
		prodStage,
	},
})

type CodeCommitSourceVariables

type CodeCommitSourceVariables struct {
	// The date the currently last commit on the tracked branch was authored, in ISO-8601 format.
	AuthorDate *string `field:"required" json:"authorDate" yaml:"authorDate"`
	// The name of the branch this action tracks.
	BranchName *string `field:"required" json:"branchName" yaml:"branchName"`
	// The SHA1 hash of the currently last commit on the tracked branch.
	CommitId *string `field:"required" json:"commitId" yaml:"commitId"`
	// The message of the currently last commit on the tracked branch.
	CommitMessage *string `field:"required" json:"commitMessage" yaml:"commitMessage"`
	// The date the currently last commit on the tracked branch was committed, in ISO-8601 format.
	CommitterDate *string `field:"required" json:"committerDate" yaml:"committerDate"`
	// The name of the repository this action points to.
	RepositoryName *string `field:"required" json:"repositoryName" yaml:"repositoryName"`
}

The CodePipeline variables emitted by the CodeCommit source Action.

Example:

// 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"

codeCommitSourceVariables := &CodeCommitSourceVariables{
	AuthorDate: jsii.String("authorDate"),
	BranchName: jsii.String("branchName"),
	CommitId: jsii.String("commitId"),
	CommitMessage: jsii.String("commitMessage"),
	CommitterDate: jsii.String("committerDate"),
	RepositoryName: jsii.String("repositoryName"),
}

type CodeCommitTrigger

type CodeCommitTrigger string

How should the CodeCommit Action detect changes.

This is the type of the `CodeCommitSourceAction.trigger` property.

Example:

// Source stage: read from repository
repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
	RepositoryName: jsii.String("template-repo"),
})
sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("Source"),
	Repository: repo,
	Output: sourceOutput,
	Trigger: cpactions.CodeCommitTrigger_POLL,
})
sourceStage := map[string]interface{}{
	"stageName": jsii.String("Source"),
	"actions": []CodeCommitSourceAction{
		source,
	},
}

// Deployment stage: create and deploy changeset with manual approval
stackName := "OurStack"
changeSetName := "StagedChangeSet"

prodStage := map[string]interface{}{
	"stageName": jsii.String("Deploy"),
	"actions": []interface{}{
		cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
			"actionName": jsii.String("PrepareChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"adminPermissions": jsii.Boolean(true),
			"templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
			"runOrder": jsii.Number(1),
		}),
		cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
			"actionName": jsii.String("ApproveChanges"),
			"runOrder": jsii.Number(2),
		}),
		cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
			"actionName": jsii.String("ExecuteChanges"),
			"stackName": jsii.String(stackName),
			"changeSetName": jsii.String(changeSetName),
			"runOrder": jsii.Number(3),
		}),
	},
}

codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
	Stages: []stageProps{
		sourceStage,
		prodStage,
	},
})
const (
	// The Action will never detect changes - the Pipeline it's part of will only begin a run when explicitly started.
	CodeCommitTrigger_NONE CodeCommitTrigger = "NONE"
	// CodePipeline will poll the repository to detect changes.
	CodeCommitTrigger_POLL CodeCommitTrigger = "POLL"
	// CodePipeline will use CloudWatch Events to be notified of changes.
	//
	// This is the default method of detecting changes.
	CodeCommitTrigger_EVENTS CodeCommitTrigger = "EVENTS"
)

type CodeDeployEcsContainerImageInput

type CodeDeployEcsContainerImageInput struct {
	// The artifact that contains an `imageDetails.json` file with the image URI.
	//
	// The artifact's `imageDetails.json` file must be a JSON file containing an
	// `ImageURI` property.  For example:
	// `{ "ImageURI": "ACCOUNTID.dkr.ecr.us-west-2.amazonaws.com/dk-image-repo@sha256:example3" }`
	Input awscodepipeline.Artifact `field:"required" json:"input" yaml:"input"`
	// The placeholder string in the ECS task definition template file that will be replaced with the image URI.
	//
	// The placeholder string must be surrounded by angle brackets in the template file.
	// For example, if the task definition template file contains a placeholder like
	// `"image": "<PLACEHOLDER>"`, then the `taskDefinitionPlaceholder` value should
	// be `PLACEHOLDER`.
	// Default: IMAGE.
	//
	TaskDefinitionPlaceholder *string `field:"optional" json:"taskDefinitionPlaceholder" yaml:"taskDefinitionPlaceholder"`
}

Configuration for replacing a placeholder string in the ECS task definition template file with an image URI.

Example:

// 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"

var artifact artifact

codeDeployEcsContainerImageInput := &CodeDeployEcsContainerImageInput{
	Input: artifact,

	// the properties below are optional
	TaskDefinitionPlaceholder: jsii.String("taskDefinitionPlaceholder"),
}

type CodeDeployEcsDeployAction

type CodeDeployEcsDeployAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Example:

// 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

codeDeployEcsDeployAction := awscdk.Aws_codepipeline_actions.NewCodeDeployEcsDeployAction(&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"),
})

type CodeDeployEcsDeployActionProps

type CodeDeployEcsDeployActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The CodeDeploy ECS Deployment Group to deploy to.
	DeploymentGroup awscodedeploy.IEcsDeploymentGroup `field:"required" json:"deploymentGroup" yaml:"deploymentGroup"`
	// 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.
	// Default: - one of this property, or `appSpecTemplateInput`, is required.
	//
	AppSpecTemplateFile awscodepipeline.ArtifactPath `field:"optional" json:"appSpecTemplateFile" yaml:"appSpecTemplateFile"`
	// 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.
	// Default: - one of this property, or `appSpecTemplateFile`, is required.
	//
	AppSpecTemplateInput awscodepipeline.Artifact `field:"optional" json:"appSpecTemplateInput" yaml:"appSpecTemplateInput"`
	// 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.
	ContainerImageInputs *[]*CodeDeployEcsContainerImageInput `field:"optional" json:"containerImageInputs" yaml:"containerImageInputs"`
	// 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.
	// Default: - one of this property, or `taskDefinitionTemplateInput`, is required.
	//
	TaskDefinitionTemplateFile awscodepipeline.ArtifactPath `field:"optional" json:"taskDefinitionTemplateFile" yaml:"taskDefinitionTemplateFile"`
	// 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.
	// Default: - one of this property, or `taskDefinitionTemplateFile`, is required.
	//
	TaskDefinitionTemplateInput awscodepipeline.Artifact `field:"optional" json:"taskDefinitionTemplateInput" yaml:"taskDefinitionTemplateInput"`
}

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 "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"),
}

type CodeDeployServerDeployAction

type CodeDeployServerDeployAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Example:

var deploymentGroup serverDeploymentGroup
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"), &PipelineProps{
	PipelineName: jsii.String("MyPipeline"),
})

// add the source and build Stages to the Pipeline...
buildOutput := codepipeline.NewArtifact()
deployAction := codepipeline_actions.NewCodeDeployServerDeployAction(&CodeDeployServerDeployActionProps{
	ActionName: jsii.String("CodeDeploy"),
	Input: buildOutput,
	DeploymentGroup: DeploymentGroup,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})

type CodeDeployServerDeployActionProps

type CodeDeployServerDeployActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The CodeDeploy server Deployment Group to deploy to.
	DeploymentGroup awscodedeploy.IServerDeploymentGroup `field:"required" json:"deploymentGroup" yaml:"deploymentGroup"`
	// The source to use as input for deployment.
	Input awscodepipeline.Artifact `field:"required" json:"input" yaml:"input"`
}

Construction properties of the `CodeDeployServerDeployAction CodeDeploy server deploy CodePipeline Action`.

Example:

var deploymentGroup serverDeploymentGroup
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"), &PipelineProps{
	PipelineName: jsii.String("MyPipeline"),
})

// add the source and build Stages to the Pipeline...
buildOutput := codepipeline.NewArtifact()
deployAction := codepipeline_actions.NewCodeDeployServerDeployAction(&CodeDeployServerDeployActionProps{
	ActionName: jsii.String("CodeDeploy"),
	Input: buildOutput,
	DeploymentGroup: DeploymentGroup,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})

type CodeStarConnectionsSourceAction

type CodeStarConnectionsSourceAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The variables emitted by this action.
	Variables() *CodeStarSourceVariables
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

A CodePipeline source action for the CodeStar Connections source, which allows connecting to GitHub and BitBucket.

Example:

sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeStarConnectionsSourceAction(&CodeStarConnectionsSourceActionProps{
	ActionName: jsii.String("BitBucket_Source"),
	Owner: jsii.String("aws"),
	Repo: jsii.String("aws-cdk"),
	Output: sourceOutput,
	ConnectionArn: jsii.String("arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"),
})

type CodeStarConnectionsSourceActionProps

type CodeStarConnectionsSourceActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The ARN of the CodeStar Connection created in the AWS console that has permissions to access this GitHub or BitBucket repository.
	//
	// Example:
	//   "arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"
	//
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/connections-create.html
	//
	ConnectionArn *string `field:"required" json:"connectionArn" yaml:"connectionArn"`
	// The output artifact that this action produces.
	//
	// Can be used as input for further pipeline actions.
	Output awscodepipeline.Artifact `field:"required" json:"output" yaml:"output"`
	// The owning user or organization of the repository.
	//
	// Example:
	//   "aws"
	//
	Owner *string `field:"required" json:"owner" yaml:"owner"`
	// The name of the repository.
	//
	// Example:
	//   "aws-cdk"
	//
	Repo *string `field:"required" json:"repo" yaml:"repo"`
	// The branch to build.
	// Default: 'master'.
	//
	Branch *string `field:"optional" json:"branch" yaml:"branch"`
	// Whether the output should be the contents of the repository (which is the default), or a link that allows CodeBuild to clone the repository before building.
	//
	// **Note**: if this option is true,
	// then only CodeBuild actions can use the resulting `output`.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-CodestarConnectionSource.html#action-reference-CodestarConnectionSource-config
	//
	// Default: false.
	//
	CodeBuildCloneOutput *bool `field:"optional" json:"codeBuildCloneOutput" yaml:"codeBuildCloneOutput"`
	// Controls automatically starting your pipeline when a new commit is made on the configured repository and branch.
	//
	// If unspecified,
	// the default value is true, and the field does not display by default.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-CodestarConnectionSource.html
	//
	// Default: true.
	//
	TriggerOnPush *bool `field:"optional" json:"triggerOnPush" yaml:"triggerOnPush"`
}

Construction properties for `CodeStarConnectionsSourceAction`.

Example:

sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeStarConnectionsSourceAction(&CodeStarConnectionsSourceActionProps{
	ActionName: jsii.String("BitBucket_Source"),
	Owner: jsii.String("aws"),
	Repo: jsii.String("aws-cdk"),
	Output: sourceOutput,
	ConnectionArn: jsii.String("arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"),
})

type CodeStarSourceVariables added in v2.4.0

type CodeStarSourceVariables struct {
	// The date the currently last commit on the tracked branch was authored, in ISO-8601 format.
	AuthorDate *string `field:"required" json:"authorDate" yaml:"authorDate"`
	// The name of the branch this action tracks.
	BranchName *string `field:"required" json:"branchName" yaml:"branchName"`
	// The SHA1 hash of the currently last commit on the tracked branch.
	CommitId *string `field:"required" json:"commitId" yaml:"commitId"`
	// The message of the currently last commit on the tracked branch.
	CommitMessage *string `field:"required" json:"commitMessage" yaml:"commitMessage"`
	// The connection ARN this source uses.
	ConnectionArn *string `field:"required" json:"connectionArn" yaml:"connectionArn"`
	// The name of the repository this action points to.
	FullRepositoryName *string `field:"required" json:"fullRepositoryName" yaml:"fullRepositoryName"`
}

The CodePipeline variables emitted by CodeStar source Action.

Example:

// 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"

codeStarSourceVariables := &CodeStarSourceVariables{
	AuthorDate: jsii.String("authorDate"),
	BranchName: jsii.String("branchName"),
	CommitId: jsii.String("commitId"),
	CommitMessage: jsii.String("commitMessage"),
	ConnectionArn: jsii.String("connectionArn"),
	FullRepositoryName: jsii.String("fullRepositoryName"),
}

type CommonCloudFormationStackSetOptions added in v2.13.0

type CommonCloudFormationStackSetOptions struct {
	// The percentage of accounts per Region for which this stack operation can fail before AWS CloudFormation stops the operation in that Region.
	//
	// If
	// the operation is stopped in a Region, AWS CloudFormation doesn't attempt the operation in subsequent Regions. When calculating the number
	// of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number.
	// Default: 0%.
	//
	FailureTolerancePercentage *float64 `field:"optional" json:"failureTolerancePercentage" yaml:"failureTolerancePercentage"`
	// The maximum percentage of accounts in which to perform this operation at one time.
	//
	// When calculating the number of accounts based on the specified
	// percentage, AWS CloudFormation rounds down to the next whole number. If rounding down would result in zero, AWS CloudFormation sets the number as
	// one instead. Although you use this setting to specify the maximum, for large deployments the actual number of accounts acted upon concurrently
	// may be lower due to service throttling.
	// Default: 1%.
	//
	MaxAccountConcurrencyPercentage *float64 `field:"optional" json:"maxAccountConcurrencyPercentage" yaml:"maxAccountConcurrencyPercentage"`
	// The AWS Region the StackSet is in.
	//
	// Note that a cross-region Pipeline requires replication buckets to function correctly.
	// You can provide their names with the `PipelineProps.crossRegionReplicationBuckets` property.
	// If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,
	// that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
	// Default: - same region as the Pipeline.
	//
	StackSetRegion *string `field:"optional" json:"stackSetRegion" yaml:"stackSetRegion"`
}

Options in common between both StackSet actions.

Example:

// 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"

commonCloudFormationStackSetOptions := &CommonCloudFormationStackSetOptions{
	FailureTolerancePercentage: jsii.Number(123),
	MaxAccountConcurrencyPercentage: jsii.Number(123),
	StackSetRegion: jsii.String("stackSetRegion"),
}

type EcrSourceAction

type EcrSourceAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The variables emitted by this action.
	Variables() *EcrSourceVariables
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

The ECR Repository source CodePipeline Action.

Will trigger the pipeline as soon as the target tag in the repository changes, but only if there is a CloudTrail Trail in the account that captures the ECR event.

Example:

import ecr "github.com/aws/aws-cdk-go/awscdk"

var ecrRepository repository

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewEcrSourceAction(&EcrSourceActionProps{
	ActionName: jsii.String("ECR"),
	Repository: ecrRepository,
	ImageTag: jsii.String("some-tag"),
	 // optional, default: 'latest'
	Output: sourceOutput,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		sourceAction,
	},
})

func NewEcrSourceAction

func NewEcrSourceAction(props *EcrSourceActionProps) EcrSourceAction

type EcrSourceActionProps

type EcrSourceActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role   awsiam.IRole             `field:"optional" json:"role" yaml:"role"`
	Output awscodepipeline.Artifact `field:"required" json:"output" yaml:"output"`
	// The repository that will be watched for changes.
	Repository awsecr.IRepository `field:"required" json:"repository" yaml:"repository"`
	// The image tag that will be checked for changes.
	//
	// It is not possible to trigger on changes to more than one tag.
	// Default: 'latest'.
	//
	ImageTag *string `field:"optional" json:"imageTag" yaml:"imageTag"`
}

Construction properties of `EcrSourceAction`.

Example:

import ecr "github.com/aws/aws-cdk-go/awscdk"

var ecrRepository repository

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewEcrSourceAction(&EcrSourceActionProps{
	ActionName: jsii.String("ECR"),
	Repository: ecrRepository,
	ImageTag: jsii.String("some-tag"),
	 // optional, default: 'latest'
	Output: sourceOutput,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		sourceAction,
	},
})

type EcrSourceVariables

type EcrSourceVariables struct {
	// The digest of the current image, in the form '<digest type>:<digest value>'.
	ImageDigest *string `field:"required" json:"imageDigest" yaml:"imageDigest"`
	// The Docker tag of the current image.
	ImageTag *string `field:"required" json:"imageTag" yaml:"imageTag"`
	// The full ECR Docker URI of the current image.
	ImageUri *string `field:"required" json:"imageUri" yaml:"imageUri"`
	// The identifier of the registry.
	//
	// In ECR, this is usually the ID of the AWS account owning it.
	RegistryId *string `field:"required" json:"registryId" yaml:"registryId"`
	// The physical name of the repository that this action tracks.
	RepositoryName *string `field:"required" json:"repositoryName" yaml:"repositoryName"`
}

The CodePipeline variables emitted by the ECR source Action.

Example:

// 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"

ecrSourceVariables := &EcrSourceVariables{
	ImageDigest: jsii.String("imageDigest"),
	ImageTag: jsii.String("imageTag"),
	ImageUri: jsii.String("imageUri"),
	RegistryId: jsii.String("registryId"),
	RepositoryName: jsii.String("repositoryName"),
}

type EcsDeployAction

type EcsDeployAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline Action to deploy an ECS Service.

Example:

import ecs "github.com/aws/aws-cdk-go/awscdk"

var service fargateService

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
buildOutput := codepipeline.NewArtifact()
deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		codepipeline_actions.NewEcsDeployAction(&EcsDeployActionProps{
			ActionName: jsii.String("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(jsii.String("imageDef.json")),
			DeploymentTimeout: awscdk.Duration_Minutes(jsii.Number(60)),
		}),
	},
})

func NewEcsDeployAction

func NewEcsDeployAction(props *EcsDeployActionProps) EcsDeployAction

type EcsDeployActionProps

type EcsDeployActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The ECS Service to deploy.
	Service awsecs.IBaseService `field:"required" json:"service" yaml:"service"`
	// Timeout for the ECS deployment in minutes.
	//
	// Value must be between 1-60.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-ECS.html
	//
	// Default: - 60 minutes.
	//
	DeploymentTimeout awscdk.Duration `field:"optional" json:"deploymentTimeout" yaml:"deploymentTimeout"`
	// The name of the JSON image definitions file to use for deployments.
	//
	// 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.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions
	//
	// Default: - one of this property, or `input`, is required.
	//
	ImageFile awscodepipeline.ArtifactPath `field:"optional" json:"imageFile" yaml:"imageFile"`
	// The input artifact that contains the JSON image definitions file to use for deployments.
	//
	// 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.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions
	//
	// Default: - one of this property, or `imageFile`, is required.
	//
	Input awscodepipeline.Artifact `field:"optional" json:"input" yaml:"input"`
}

Construction properties of `EcsDeployAction`.

Example:

import ecs "github.com/aws/aws-cdk-go/awscdk"

var service fargateService

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
buildOutput := codepipeline.NewArtifact()
deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		codepipeline_actions.NewEcsDeployAction(&EcsDeployActionProps{
			ActionName: jsii.String("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(jsii.String("imageDef.json")),
			DeploymentTimeout: awscdk.Duration_Minutes(jsii.Number(60)),
		}),
	},
})

type ElasticBeanstalkDeployAction added in v2.45.0

type ElasticBeanstalkDeployAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline action to deploy an AWS ElasticBeanstalk Application.

Example:

sourceOutput := codepipeline.NewArtifact()
targetBucket := s3.NewBucket(this, jsii.String("MyBucket"))

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
deployAction := codepipeline_actions.NewElasticBeanstalkDeployAction(&ElasticBeanstalkDeployActionProps{
	ActionName: jsii.String("ElasticBeanstalkDeploy"),
	Input: sourceOutput,
	EnvironmentName: jsii.String("envName"),
	ApplicationName: jsii.String("appName"),
})

deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})

func NewElasticBeanstalkDeployAction added in v2.45.0

func NewElasticBeanstalkDeployAction(props *ElasticBeanstalkDeployActionProps) ElasticBeanstalkDeployAction

type ElasticBeanstalkDeployActionProps added in v2.45.0

type ElasticBeanstalkDeployActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The name of the AWS Elastic Beanstalk application to deploy.
	ApplicationName *string `field:"required" json:"applicationName" yaml:"applicationName"`
	// The name of the AWS Elastic Beanstalk environment to deploy to.
	EnvironmentName *string `field:"required" json:"environmentName" yaml:"environmentName"`
	// The source to use as input for deployment.
	Input awscodepipeline.Artifact `field:"required" json:"input" yaml:"input"`
}

Construction properties of the `ElasticBeanstalkDeployAction Elastic Beanstalk deploy CodePipeline Action`.

Example:

sourceOutput := codepipeline.NewArtifact()
targetBucket := s3.NewBucket(this, jsii.String("MyBucket"))

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
deployAction := codepipeline_actions.NewElasticBeanstalkDeployAction(&ElasticBeanstalkDeployActionProps{
	ActionName: jsii.String("ElasticBeanstalkDeploy"),
	Input: sourceOutput,
	EnvironmentName: jsii.String("envName"),
	ApplicationName: jsii.String("appName"),
})

deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})

type GitHubSourceAction

type GitHubSourceAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The variables emitted by this action.
	Variables() *GitHubSourceVariables
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, stage awscodepipeline.IStage, _options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Source that is provided by a GitHub repository.

Example:

// Read the secret from Secrets Manager
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewGitHubSourceAction(&GitHubSourceActionProps{
	ActionName: jsii.String("GitHub_Source"),
	Owner: jsii.String("awslabs"),
	Repo: jsii.String("aws-cdk"),
	OauthToken: awscdk.SecretValue_SecretsManager(jsii.String("my-github-token")),
	Output: sourceOutput,
	Branch: jsii.String("develop"),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		sourceAction,
	},
})

func NewGitHubSourceAction

func NewGitHubSourceAction(props *GitHubSourceActionProps) GitHubSourceAction

type GitHubSourceActionProps

type GitHubSourceActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// A GitHub OAuth token to use for authentication.
	//
	// It is recommended to use a Secrets Manager `Secret` to obtain the token:
	//
	//   const oauth = cdk.SecretValue.secretsManager('my-github-token');
	//   new GitHubSourceAction(this, 'GitHubAction', { oauthToken: oauth, ... });
	//
	// If you rotate the value in the Secret, you must also change at least one property
	// of the CodePipeline to force CloudFormation to re-read the secret.
	//
	// The GitHub Personal Access Token should have these scopes:
	//
	// * **repo** - to read the repository
	// * **admin:repo_hook** - if you plan to use webhooks (true by default).
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/appendix-github-oauth.html#GitHub-create-personal-token-CLI
	//
	OauthToken awscdk.SecretValue       `field:"required" json:"oauthToken" yaml:"oauthToken"`
	Output     awscodepipeline.Artifact `field:"required" json:"output" yaml:"output"`
	// The GitHub account/user that owns the repo.
	Owner *string `field:"required" json:"owner" yaml:"owner"`
	// The name of the repo, without the username.
	Repo *string `field:"required" json:"repo" yaml:"repo"`
	// The branch to use.
	// Default: "master".
	//
	Branch *string `field:"optional" json:"branch" yaml:"branch"`
	// How AWS CodePipeline should be triggered.
	//
	// With the default value "WEBHOOK", a webhook is created in GitHub that triggers the action
	// With "POLL", CodePipeline periodically checks the source for changes
	// With "None", the action is not triggered through changes in the source
	//
	// To use `WEBHOOK`, your GitHub Personal Access Token should have
	// **admin:repo_hook** scope (in addition to the regular **repo** scope).
	// Default: GitHubTrigger.WEBHOOK
	//
	Trigger GitHubTrigger `field:"optional" json:"trigger" yaml:"trigger"`
}

Construction properties of the `GitHubSourceAction GitHub source action`.

Example:

// Read the secret from Secrets Manager
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewGitHubSourceAction(&GitHubSourceActionProps{
	ActionName: jsii.String("GitHub_Source"),
	Owner: jsii.String("awslabs"),
	Repo: jsii.String("aws-cdk"),
	OauthToken: awscdk.SecretValue_SecretsManager(jsii.String("my-github-token")),
	Output: sourceOutput,
	Branch: jsii.String("develop"),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Source"),
	Actions: []iAction{
		sourceAction,
	},
})

type GitHubSourceVariables

type GitHubSourceVariables struct {
	// The date the currently last commit on the tracked branch was authored, in ISO-8601 format.
	AuthorDate *string `field:"required" json:"authorDate" yaml:"authorDate"`
	// The name of the branch this action tracks.
	BranchName *string `field:"required" json:"branchName" yaml:"branchName"`
	// The SHA1 hash of the currently last commit on the tracked branch.
	CommitId *string `field:"required" json:"commitId" yaml:"commitId"`
	// The message of the currently last commit on the tracked branch.
	CommitMessage *string `field:"required" json:"commitMessage" yaml:"commitMessage"`
	// The date the currently last commit on the tracked branch was committed, in ISO-8601 format.
	CommitterDate *string `field:"required" json:"committerDate" yaml:"committerDate"`
	// The GitHub API URL of the currently last commit on the tracked branch.
	CommitUrl *string `field:"required" json:"commitUrl" yaml:"commitUrl"`
	// The name of the repository this action points to.
	RepositoryName *string `field:"required" json:"repositoryName" yaml:"repositoryName"`
}

The CodePipeline variables emitted by GitHub source Action.

Example:

// 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"

gitHubSourceVariables := &GitHubSourceVariables{
	AuthorDate: jsii.String("authorDate"),
	BranchName: jsii.String("branchName"),
	CommitId: jsii.String("commitId"),
	CommitMessage: jsii.String("commitMessage"),
	CommitterDate: jsii.String("committerDate"),
	CommitUrl: jsii.String("commitUrl"),
	RepositoryName: jsii.String("repositoryName"),
}

type GitHubTrigger

type GitHubTrigger string

If and how the GitHub source action should be triggered.

const (
	GitHubTrigger_NONE    GitHubTrigger = "NONE"
	GitHubTrigger_POLL    GitHubTrigger = "POLL"
	GitHubTrigger_WEBHOOK GitHubTrigger = "WEBHOOK"
)

type IJenkinsProvider

type IJenkinsProvider interface {
	constructs.IConstruct
	ProviderName() *string
	ServerUrl() *string
	Version() *string
}

A Jenkins provider.

If you want to create a new Jenkins provider managed alongside your CDK code, instantiate the `JenkinsProvider` class directly.

If you want to reference an already registered provider, use the `JenkinsProvider#fromJenkinsProviderAttributes` method.

func JenkinsProvider_FromJenkinsProviderAttributes

func JenkinsProvider_FromJenkinsProviderAttributes(scope constructs.Construct, id *string, attrs *JenkinsProviderAttributes) IJenkinsProvider

Import a Jenkins provider registered either outside the CDK, or in a different CDK Stack.

Returns: a new Construct representing a reference to an existing Jenkins provider.

type JenkinsAction

type JenkinsAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, _options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Jenkins build CodePipeline Action.

Example:

var jenkinsProvider jenkinsProvider

buildAction := codepipeline_actions.NewJenkinsAction(&JenkinsActionProps{
	ActionName: jsii.String("JenkinsBuild"),
	JenkinsProvider: jenkinsProvider,
	ProjectName: jsii.String("MyProject"),
	Type: codepipeline_actions.JenkinsActionType_BUILD,
})

See: https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-four-stage-pipeline.html

func NewJenkinsAction

func NewJenkinsAction(props *JenkinsActionProps) JenkinsAction

type JenkinsActionProps

type JenkinsActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// The Jenkins Provider for this Action.
	JenkinsProvider IJenkinsProvider `field:"required" json:"jenkinsProvider" yaml:"jenkinsProvider"`
	// The name of the project (sometimes also called job, or task) on your Jenkins installation that will be invoked by this Action.
	//
	// Example:
	//   "MyJob"
	//
	ProjectName *string `field:"required" json:"projectName" yaml:"projectName"`
	// The type of the Action - Build, or Test.
	Type JenkinsActionType `field:"required" json:"type" yaml:"type"`
	// The source to use as input for this build.
	Inputs  *[]awscodepipeline.Artifact `field:"optional" json:"inputs" yaml:"inputs"`
	Outputs *[]awscodepipeline.Artifact `field:"optional" json:"outputs" yaml:"outputs"`
}

Construction properties of `JenkinsAction`.

Example:

var jenkinsProvider jenkinsProvider

buildAction := codepipeline_actions.NewJenkinsAction(&JenkinsActionProps{
	ActionName: jsii.String("JenkinsBuild"),
	JenkinsProvider: jenkinsProvider,
	ProjectName: jsii.String("MyProject"),
	Type: codepipeline_actions.JenkinsActionType_BUILD,
})

type JenkinsActionType

type JenkinsActionType string

The type of the Jenkins Action that determines its CodePipeline Category - Build, or Test.

Note that a Jenkins provider, even if it has the same name, must be separately registered for each type.

Example:

var jenkinsProvider jenkinsProvider

buildAction := codepipeline_actions.NewJenkinsAction(&JenkinsActionProps{
	ActionName: jsii.String("JenkinsBuild"),
	JenkinsProvider: jenkinsProvider,
	ProjectName: jsii.String("MyProject"),
	Type: codepipeline_actions.JenkinsActionType_BUILD,
})
const (
	// The Action will have the Build Category.
	JenkinsActionType_BUILD JenkinsActionType = "BUILD"
	// The Action will have the Test Category.
	JenkinsActionType_TEST JenkinsActionType = "TEST"
)

type JenkinsProvider

type JenkinsProvider interface {
	BaseJenkinsProvider
	// The tree node.
	Node() constructs.Node
	ProviderName() *string
	ServerUrl() *string
	Version() *string
	// Returns a string representation of this construct.
	ToString() *string
}

A class representing Jenkins providers.

Example:

jenkinsProvider := codepipeline_actions.NewJenkinsProvider(this, jsii.String("JenkinsProvider"), &JenkinsProviderProps{
	ProviderName: jsii.String("MyJenkinsProvider"),
	ServerUrl: jsii.String("http://my-jenkins.com:8080"),
	Version: jsii.String("2"),
})

See: #import.

func NewJenkinsProvider

func NewJenkinsProvider(scope constructs.Construct, id *string, props *JenkinsProviderProps) JenkinsProvider

type JenkinsProviderAttributes

type JenkinsProviderAttributes struct {
	// The name of the Jenkins provider that you set in the AWS CodePipeline plugin configuration of your Jenkins project.
	//
	// Example:
	//   "MyJenkinsProvider"
	//
	ProviderName *string `field:"required" json:"providerName" yaml:"providerName"`
	// The base URL of your Jenkins server.
	//
	// Example:
	//   "http://myjenkins.com:8080"
	//
	ServerUrl *string `field:"required" json:"serverUrl" yaml:"serverUrl"`
	// The version of your provider.
	// Default: '1'.
	//
	Version *string `field:"optional" json:"version" yaml:"version"`
}

Properties for importing an existing Jenkins provider.

Example:

jenkinsProvider := codepipeline_actions.JenkinsProvider_FromJenkinsProviderAttributes(this, jsii.String("JenkinsProvider"), &JenkinsProviderAttributes{
	ProviderName: jsii.String("MyJenkinsProvider"),
	ServerUrl: jsii.String("http://my-jenkins.com:8080"),
	Version: jsii.String("2"),
})

type JenkinsProviderProps

type JenkinsProviderProps struct {
	// The name of the Jenkins provider that you set in the AWS CodePipeline plugin configuration of your Jenkins project.
	//
	// Example:
	//   "MyJenkinsProvider"
	//
	ProviderName *string `field:"required" json:"providerName" yaml:"providerName"`
	// The base URL of your Jenkins server.
	//
	// Example:
	//   "http://myjenkins.com:8080"
	//
	ServerUrl *string `field:"required" json:"serverUrl" yaml:"serverUrl"`
	// Whether to immediately register a Jenkins Provider for the build category.
	//
	// The Provider will always be registered if you create a `JenkinsAction`.
	// Default: false.
	//
	ForBuild *bool `field:"optional" json:"forBuild" yaml:"forBuild"`
	// Whether to immediately register a Jenkins Provider for the test category.
	//
	// The Provider will always be registered if you create a `JenkinsTestAction`.
	// Default: false.
	//
	ForTest *bool `field:"optional" json:"forTest" yaml:"forTest"`
	// The version of your provider.
	// Default: '1'.
	//
	Version *string `field:"optional" json:"version" yaml:"version"`
}

Example:

jenkinsProvider := codepipeline_actions.NewJenkinsProvider(this, jsii.String("JenkinsProvider"), &JenkinsProviderProps{
	ProviderName: jsii.String("MyJenkinsProvider"),
	ServerUrl: jsii.String("http://my-jenkins.com:8080"),
	Version: jsii.String("2"),
})

type LambdaInvokeAction

type LambdaInvokeAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	// Reference a CodePipeline variable defined by the Lambda function this action points to.
	//
	// Variables in Lambda invoke actions are defined by calling the PutJobSuccessResult CodePipeline API call
	// with the 'outputVariables' property filled.
	// See: https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PutJobSuccessResult.html
	//
	Variable(variableName *string) *string
	VariableExpression(variableName *string) *string
}

CodePipeline invoke Action that is provided by an AWS Lambda function.

Example:

var fn function

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
lambdaAction := codepipeline_actions.NewLambdaInvokeAction(&LambdaInvokeActionProps{
	ActionName: jsii.String("Lambda"),
	Lambda: fn,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Lambda"),
	Actions: []iAction{
		lambdaAction,
	},
})

See: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html

func NewLambdaInvokeAction

func NewLambdaInvokeAction(props *LambdaInvokeActionProps) LambdaInvokeAction

type LambdaInvokeActionProps

type LambdaInvokeActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The lambda function to invoke.
	Lambda awslambda.IFunction `field:"required" json:"lambda" yaml:"lambda"`
	// The optional input Artifacts of the Action.
	//
	// A Lambda Action can have up to 5 inputs.
	// The inputs will appear in the event passed to the Lambda,
	// under the `'CodePipeline.job'.data.inputArtifacts` path.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html#actions-invoke-lambda-function-json-event-example
	//
	// Default: the Action will not have any inputs.
	//
	Inputs *[]awscodepipeline.Artifact `field:"optional" json:"inputs" yaml:"inputs"`
	// The optional names of the output Artifacts of the Action.
	//
	// A Lambda Action can have up to 5 outputs.
	// The outputs will appear in the event passed to the Lambda,
	// under the `'CodePipeline.job'.data.outputArtifacts` path.
	// It is the responsibility of the Lambda to upload ZIP files with the Artifact contents to the provided locations.
	// Default: the Action will not have any outputs.
	//
	Outputs *[]awscodepipeline.Artifact `field:"optional" json:"outputs" yaml:"outputs"`
	// A set of key-value pairs that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with.
	//
	// Only one of `userParameters` or `userParametersString` can be specified.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html#actions-invoke-lambda-function-json-event-example
	//
	// Default: - no user parameters will be passed.
	//
	UserParameters *map[string]interface{} `field:"optional" json:"userParameters" yaml:"userParameters"`
	// The string representation of the user parameters that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with.
	//
	// Only one of `userParametersString` or `userParameters` can be specified.
	// Default: - no user parameters will be passed.
	//
	UserParametersString *string `field:"optional" json:"userParametersString" yaml:"userParametersString"`
}

Construction properties of the `LambdaInvokeAction Lambda invoke CodePipeline Action`.

Example:

var fn function

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
lambdaAction := codepipeline_actions.NewLambdaInvokeAction(&LambdaInvokeActionProps{
	ActionName: jsii.String("Lambda"),
	Lambda: fn,
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Lambda"),
	Actions: []iAction{
		lambdaAction,
	},
})

type ManualApprovalAction

type ManualApprovalAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	NotificationTopic() awssns.ITopic
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// grant the provided principal the permissions to approve or reject this manual approval action.
	//
	// For more info see:
	// https://docs.aws.amazon.com/codepipeline/latest/userguide/approvals-iam-permissions.html
	GrantManualApproval(grantable awsiam.IGrantable)
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Manual approval action.

Example:

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
approveStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Approve"),
})
manualApprovalAction := codepipeline_actions.NewManualApprovalAction(&ManualApprovalActionProps{
	ActionName: jsii.String("Approve"),
})
approveStage.AddAction(manualApprovalAction)

role := iam.Role_FromRoleArn(this, jsii.String("Admin"), awscdk.Arn_Format(&ArnComponents{
	Service: jsii.String("iam"),
	Resource: jsii.String("role"),
	ResourceName: jsii.String("Admin"),
}, this))
manualApprovalAction.GrantManualApproval(role)

func NewManualApprovalAction

func NewManualApprovalAction(props *ManualApprovalActionProps) ManualApprovalAction

type ManualApprovalActionProps

type ManualApprovalActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Any additional information that you want to include in the notification email message.
	AdditionalInformation *string `field:"optional" json:"additionalInformation" yaml:"additionalInformation"`
	// URL you want to provide to the reviewer as part of the approval request.
	// Default: - the approval request will not have an external link.
	//
	ExternalEntityLink *string `field:"optional" json:"externalEntityLink" yaml:"externalEntityLink"`
	// Optional SNS topic to send notifications to when an approval is pending.
	NotificationTopic awssns.ITopic `field:"optional" json:"notificationTopic" yaml:"notificationTopic"`
	// A list of email addresses to subscribe to notifications when this Action is pending approval.
	//
	// If this has been provided, but not `notificationTopic`,
	// a new Topic will be created.
	NotifyEmails *[]*string `field:"optional" json:"notifyEmails" yaml:"notifyEmails"`
}

Construction properties of the `ManualApprovalAction`.

Example:

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
approveStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Approve"),
})
manualApprovalAction := codepipeline_actions.NewManualApprovalAction(&ManualApprovalActionProps{
	ActionName: jsii.String("Approve"),
})
approveStage.AddAction(manualApprovalAction)

role := iam.Role_FromRoleArn(this, jsii.String("Admin"), awscdk.Arn_Format(&ArnComponents{
	Service: jsii.String("iam"),
	Resource: jsii.String("role"),
	ResourceName: jsii.String("Admin"),
}, this))
manualApprovalAction.GrantManualApproval(role)

type OrganizationsDeploymentProps added in v2.13.0

type OrganizationsDeploymentProps struct {
	// Automatically deploy to new accounts added to Organizational Units.
	//
	// Whether AWS CloudFormation StackSets automatically deploys to AWS
	// Organizations accounts that are added to a target organization or
	// organizational unit (OU).
	// Default: Disabled.
	//
	AutoDeployment StackSetOrganizationsAutoDeployment `field:"optional" json:"autoDeployment" yaml:"autoDeployment"`
}

Properties for configuring service-managed (Organizations) permissions.

Example:

// 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"

organizationsDeploymentProps := &OrganizationsDeploymentProps{
	AutoDeployment: awscdk.Aws_codepipeline_actions.StackSetOrganizationsAutoDeployment_ENABLED,
}

type S3DeployAction

type S3DeployAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Deploys the sourceArtifact to Amazon S3.

Example:

import kms "github.com/aws/aws-cdk-go/awscdk"

sourceOutput := codepipeline.NewArtifact()
targetBucket := s3.NewBucket(this, jsii.String("MyBucket"))
key := kms.NewKey(this, jsii.String("EnvVarEncryptKey"), &KeyProps{
	Description: jsii.String("sample key"),
})

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
deployAction := codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{
	ActionName: jsii.String("S3Deploy"),
	Bucket: targetBucket,
	Input: sourceOutput,
	EncryptionKey: key,
})
deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})

func NewS3DeployAction

func NewS3DeployAction(props *S3DeployActionProps) S3DeployAction

type S3DeployActionProps

type S3DeployActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The Amazon S3 bucket that is the deploy target.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// The input Artifact to deploy to Amazon S3.
	Input awscodepipeline.Artifact `field:"required" json:"input" yaml:"input"`
	// The specified canned ACL to objects deployed to Amazon S3.
	//
	// This overwrites any existing ACL that was applied to the object.
	// Default: - the original object ACL.
	//
	AccessControl awss3.BucketAccessControl `field:"optional" json:"accessControl" yaml:"accessControl"`
	// The caching behavior for requests/responses for objects in the bucket.
	//
	// The final cache control property will be the result of joining all of the provided array elements with a comma
	// (plus a space after the comma).
	// Default: - none, decided by the HTTP client.
	//
	CacheControl *[]CacheControl `field:"optional" json:"cacheControl" yaml:"cacheControl"`
	// The AWS KMS encryption key for the host bucket.
	//
	// The encryptionKey parameter encrypts uploaded artifacts with the provided AWS KMS key.
	// Default: - none.
	//
	EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"`
	// Should the deploy action extract the artifact before deploying to Amazon S3.
	// Default: true.
	//
	Extract *bool `field:"optional" json:"extract" yaml:"extract"`
	// The key of the target object.
	//
	// This is required if extract is false.
	ObjectKey *string `field:"optional" json:"objectKey" yaml:"objectKey"`
}

Construction properties of the `S3DeployAction S3 deploy Action`.

Example:

import kms "github.com/aws/aws-cdk-go/awscdk"

sourceOutput := codepipeline.NewArtifact()
targetBucket := s3.NewBucket(this, jsii.String("MyBucket"))
key := kms.NewKey(this, jsii.String("EnvVarEncryptKey"), &KeyProps{
	Description: jsii.String("sample key"),
})

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
deployAction := codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{
	ActionName: jsii.String("S3Deploy"),
	Bucket: targetBucket,
	Input: sourceOutput,
	EncryptionKey: key,
})
deployStage := pipeline.AddStage(&StageOptions{
	StageName: jsii.String("Deploy"),
	Actions: []iAction{
		deployAction,
	},
})

type S3SourceAction

type S3SourceAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The variables emitted by this action.
	Variables() *S3SourceVariables
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

Source that is provided by a specific Amazon S3 object.

Will trigger the pipeline as soon as the S3 object changes, but only if there is a CloudTrail Trail in the account that captures the S3 event.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

var sourceBucket bucket

sourceOutput := codepipeline.NewArtifact()
key := "some/key.zip"
trail := cloudtrail.NewTrail(this, jsii.String("CloudTrail"))
trail.AddS3EventSelector([]s3EventSelector{
	&s3EventSelector{
		Bucket: sourceBucket,
		ObjectPrefix: key,
	},
}, &AddEventSelectorOptions{
	ReadWriteType: cloudtrail.ReadWriteType_WRITE_ONLY,
})
sourceAction := codepipeline_actions.NewS3SourceAction(&S3SourceActionProps{
	ActionName: jsii.String("S3Source"),
	BucketKey: key,
	Bucket: sourceBucket,
	Output: sourceOutput,
	Trigger: codepipeline_actions.S3Trigger_EVENTS,
})

func NewS3SourceAction

func NewS3SourceAction(props *S3SourceActionProps) S3SourceAction

type S3SourceActionProps

type S3SourceActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The Amazon S3 bucket that stores the source code.
	//
	// If you import an encrypted bucket in your stack, please specify
	// the encryption key at import time by using `Bucket.fromBucketAttributes()` method.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// The key within the S3 bucket that stores the source code.
	//
	// Example:
	//   "path/to/file.zip"
	//
	BucketKey *string                  `field:"required" json:"bucketKey" yaml:"bucketKey"`
	Output    awscodepipeline.Artifact `field:"required" json:"output" yaml:"output"`
	// How should CodePipeline detect source changes for this Action.
	//
	// Note that if this is S3Trigger.EVENTS, you need to make sure to include the source Bucket in a CloudTrail Trail,
	// as otherwise the CloudWatch Events will not be emitted.
	// See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/log-s3-data-events.html
	//
	// Default: S3Trigger.POLL
	//
	Trigger S3Trigger `field:"optional" json:"trigger" yaml:"trigger"`
}

Construction properties of the `S3SourceAction S3 source Action`.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

var sourceBucket bucket

sourceOutput := codepipeline.NewArtifact()
key := "some/key.zip"
trail := cloudtrail.NewTrail(this, jsii.String("CloudTrail"))
trail.AddS3EventSelector([]s3EventSelector{
	&s3EventSelector{
		Bucket: sourceBucket,
		ObjectPrefix: key,
	},
}, &AddEventSelectorOptions{
	ReadWriteType: cloudtrail.ReadWriteType_WRITE_ONLY,
})
sourceAction := codepipeline_actions.NewS3SourceAction(&S3SourceActionProps{
	ActionName: jsii.String("S3Source"),
	BucketKey: key,
	Bucket: sourceBucket,
	Output: sourceOutput,
	Trigger: codepipeline_actions.S3Trigger_EVENTS,
})

type S3SourceVariables

type S3SourceVariables struct {
	// The e-tag of the S3 version of the object that triggered the build.
	ETag *string `field:"required" json:"eTag" yaml:"eTag"`
	// The identifier of the S3 version of the object that triggered the build.
	VersionId *string `field:"required" json:"versionId" yaml:"versionId"`
}

The CodePipeline variables emitted by the S3 source Action.

Example:

// 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"

s3SourceVariables := &S3SourceVariables{
	ETag: jsii.String("eTag"),
	VersionId: jsii.String("versionId"),
}

type S3Trigger

type S3Trigger string

How should the S3 Action detect changes.

This is the type of the `S3SourceAction.trigger` property.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

var sourceBucket bucket

sourceOutput := codepipeline.NewArtifact()
key := "some/key.zip"
trail := cloudtrail.NewTrail(this, jsii.String("CloudTrail"))
trail.AddS3EventSelector([]s3EventSelector{
	&s3EventSelector{
		Bucket: sourceBucket,
		ObjectPrefix: key,
	},
}, &AddEventSelectorOptions{
	ReadWriteType: cloudtrail.ReadWriteType_WRITE_ONLY,
})
sourceAction := codepipeline_actions.NewS3SourceAction(&S3SourceActionProps{
	ActionName: jsii.String("S3Source"),
	BucketKey: key,
	Bucket: sourceBucket,
	Output: sourceOutput,
	Trigger: codepipeline_actions.S3Trigger_EVENTS,
})
const (
	// The Action will never detect changes - the Pipeline it's part of will only begin a run when explicitly started.
	S3Trigger_NONE S3Trigger = "NONE"
	// CodePipeline will poll S3 to detect changes.
	//
	// This is the default method of detecting changes.
	S3Trigger_POLL S3Trigger = "POLL"
	// CodePipeline will use CloudWatch Events to be notified of changes.
	//
	// Note that the Bucket that the Action uses needs to be part of a CloudTrail Trail
	// for the events to be delivered.
	S3Trigger_EVENTS S3Trigger = "EVENTS"
)

type SelfManagedDeploymentProps added in v2.13.0

type SelfManagedDeploymentProps struct {
	// The IAM role in the administrator account used to assume execution roles in the target accounts.
	//
	// You must create this role before using the StackSet action.
	//
	// The role needs to be assumable by CloudFormation, and it needs to be able
	// to `sts:AssumeRole` each of the execution roles (whose names are specified
	// in the `executionRoleName` parameter) in each of the target accounts.
	//
	// If you do not specify the role, we assume you have created a role named
	// `AWSCloudFormationStackSetAdministrationRole`.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html
	//
	// Default: - Assume an existing role named `AWSCloudFormationStackSetAdministrationRole` in the same account as the pipeline.
	//
	AdministrationRole awsiam.IRole `field:"optional" json:"administrationRole" yaml:"administrationRole"`
	// The name of the IAM role in the target accounts used to perform stack set operations.
	//
	// You must create these roles in each of the target accounts before using the
	// StackSet action.
	//
	// The roles need to be assumable by by the `administrationRole`, and need to
	// have the permissions necessary to successfully create and modify the
	// resources that the subsequent CloudFormation deployments need.
	// Administrator permissions would be commonly granted to these, but if you can
	// scope the permissions down frome there you would be safer.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html
	//
	// Default: AWSCloudFormationStackSetExecutionRole.
	//
	ExecutionRoleName *string `field:"optional" json:"executionRoleName" yaml:"executionRoleName"`
}

Properties for configuring self-managed permissions.

Example:

existingAdminRole := iam.Role_FromRoleName(this, jsii.String("AdminRole"), jsii.String("AWSCloudFormationStackSetAdministrationRole"))

deploymentModel := codepipeline_actions.StackSetDeploymentModel_SelfManaged(&SelfManagedDeploymentProps{
	// Use an existing Role. Leave this out to create a new Role.
	AdministrationRole: existingAdminRole,
})

type ServiceCatalogDeployActionBeta1

type ServiceCatalogDeployActionBeta1 interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

CodePipeline action to connect to an existing ServiceCatalog product.

**Note**: this class is still experimental, and may have breaking changes in the future!

Example:

cdkBuildOutput := codepipeline.NewArtifact()
serviceCatalogDeployAction := codepipeline_actions.NewServiceCatalogDeployActionBeta1(&ServiceCatalogDeployActionBeta1Props{
	ActionName: jsii.String("ServiceCatalogDeploy"),
	TemplatePath: cdkBuildOutput.AtPath(jsii.String("Sample.template.json")),
	ProductVersionName: jsii.String("Version - " + date.now.toString),
	ProductVersionDescription: jsii.String("This is a version from the pipeline with a new description."),
	ProductId: jsii.String("prod-XXXXXXXX"),
})

type ServiceCatalogDeployActionBeta1Props

type ServiceCatalogDeployActionBeta1Props struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The identifier of the product in the Service Catalog.
	//
	// This product must already exist.
	ProductId *string `field:"required" json:"productId" yaml:"productId"`
	// The name of the version of the Service Catalog product to be deployed.
	ProductVersionName *string `field:"required" json:"productVersionName" yaml:"productVersionName"`
	// The path to the cloudformation artifact.
	TemplatePath awscodepipeline.ArtifactPath `field:"required" json:"templatePath" yaml:"templatePath"`
	// The optional description of this version of the Service Catalog product.
	// Default: ”.
	//
	ProductVersionDescription *string `field:"optional" json:"productVersionDescription" yaml:"productVersionDescription"`
}

Construction properties of the `ServiceCatalogDeployActionBeta1 ServiceCatalog deploy CodePipeline Action`.

Example:

cdkBuildOutput := codepipeline.NewArtifact()
serviceCatalogDeployAction := codepipeline_actions.NewServiceCatalogDeployActionBeta1(&ServiceCatalogDeployActionBeta1Props{
	ActionName: jsii.String("ServiceCatalogDeploy"),
	TemplatePath: cdkBuildOutput.AtPath(jsii.String("Sample.template.json")),
	ProductVersionName: jsii.String("Version - " + date.now.toString),
	ProductVersionDescription: jsii.String("This is a version from the pipeline with a new description."),
	ProductId: jsii.String("prod-XXXXXXXX"),
})

type StackInstances added in v2.13.0

type StackInstances interface {
}

Where Stack Instances will be created from the StackSet.

Example:

var pipeline pipeline
var sourceOutput artifact

pipeline.AddStage(&StageOptions{
	StageName: jsii.String("DeployStackSets"),
	Actions: []iAction{
		// First, update the StackSet itself with the newest template
		codepipeline_actions.NewCloudFormationDeployStackSetAction(&CloudFormationDeployStackSetActionProps{
			ActionName: jsii.String("UpdateStackSet"),
			RunOrder: jsii.Number(1),
			StackSetName: jsii.String("MyStackSet"),
			Template: codepipeline_actions.StackSetTemplate_FromArtifactPath(sourceOutput.AtPath(jsii.String("template.yaml"))),

			// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
			DeploymentModel: codepipeline_actions.StackSetDeploymentModel_SelfManaged(),
			// This deploys to a set of accounts
			StackInstances: codepipeline_actions.StackInstances_InAccounts([]*string{
				jsii.String("111111111111"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),

		// Afterwards, update/create additional instances in other accounts
		codepipeline_actions.NewCloudFormationDeployStackInstancesAction(&CloudFormationDeployStackInstancesActionProps{
			ActionName: jsii.String("AddMoreInstances"),
			RunOrder: jsii.Number(2),
			StackSetName: jsii.String("MyStackSet"),
			StackInstances: codepipeline_actions.StackInstances_*InAccounts([]*string{
				jsii.String("222222222222"),
				jsii.String("333333333333"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),
	},
})

func StackInstances_FromArtifactPath added in v2.13.0

func StackInstances_FromArtifactPath(artifactPath awscodepipeline.ArtifactPath, regions *[]*string) StackInstances

Create stack instances in a set of accounts or organizational units taken from the pipeline artifacts, and a set of regions The file must be a JSON file containing a list of strings.

For example:

```json [

"111111111111",
"222222222222",
"333333333333"

] ```

Stack Instances will be created in every combination of region and account, or region and Organizational Units (OUs).

If this is set of Organizational Units, you must have selected `StackSetDeploymentModel.organizations()` as deployment model.

func StackInstances_InAccounts added in v2.13.0

func StackInstances_InAccounts(accounts *[]*string, regions *[]*string) StackInstances

Create stack instances in a set of accounts and regions passed as literal lists.

Stack Instances will be created in every combination of region and account.

> NOTE: `StackInstances.inAccounts()` and `StackInstances.inOrganizationalUnits()` > have exactly the same behavior, and you can use them interchangeably if you want. > The only difference between them is that your code clearly indicates what entity > it's working with.

func StackInstances_InOrganizationalUnits added in v2.13.0

func StackInstances_InOrganizationalUnits(ous *[]*string, regions *[]*string) StackInstances

Create stack instances in all accounts in a set of Organizational Units (OUs) and regions passed as literal lists.

If you want to deploy to Organization Units, you must choose have created the StackSet with `deploymentModel: DeploymentModel.organizations()`.

Stack Instances will be created in every combination of region and account.

> NOTE: `StackInstances.inAccounts()` and `StackInstances.inOrganizationalUnits()` > have exactly the same behavior, and you can use them interchangeably if you want. > The only difference between them is that your code clearly indicates what entity > it's working with.

type StackSetDeploymentModel added in v2.13.0

type StackSetDeploymentModel interface {
}

Determines how IAM roles are created and managed.

Example:

var pipeline pipeline
var sourceOutput artifact

pipeline.AddStage(&StageOptions{
	StageName: jsii.String("DeployStackSets"),
	Actions: []iAction{
		// First, update the StackSet itself with the newest template
		codepipeline_actions.NewCloudFormationDeployStackSetAction(&CloudFormationDeployStackSetActionProps{
			ActionName: jsii.String("UpdateStackSet"),
			RunOrder: jsii.Number(1),
			StackSetName: jsii.String("MyStackSet"),
			Template: codepipeline_actions.StackSetTemplate_FromArtifactPath(sourceOutput.AtPath(jsii.String("template.yaml"))),

			// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
			DeploymentModel: codepipeline_actions.StackSetDeploymentModel_SelfManaged(),
			// This deploys to a set of accounts
			StackInstances: codepipeline_actions.StackInstances_InAccounts([]*string{
				jsii.String("111111111111"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),

		// Afterwards, update/create additional instances in other accounts
		codepipeline_actions.NewCloudFormationDeployStackInstancesAction(&CloudFormationDeployStackInstancesActionProps{
			ActionName: jsii.String("AddMoreInstances"),
			RunOrder: jsii.Number(2),
			StackSetName: jsii.String("MyStackSet"),
			StackInstances: codepipeline_actions.StackInstances_*InAccounts([]*string{
				jsii.String("222222222222"),
				jsii.String("333333333333"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),
	},
})

func StackSetDeploymentModel_Organizations added in v2.13.0

func StackSetDeploymentModel_Organizations(props *OrganizationsDeploymentProps) StackSetDeploymentModel

Deploy to AWS Organizations accounts.

AWS CloudFormation StackSets automatically creates the IAM roles required to deploy to accounts managed by AWS Organizations. This requires an account to be a member of an Organization.

Using this deployment model, you can specify either AWS Account Ids or Organization Unit Ids in the `stackInstances` parameter.

func StackSetDeploymentModel_SelfManaged added in v2.13.0

func StackSetDeploymentModel_SelfManaged(props *SelfManagedDeploymentProps) StackSetDeploymentModel

Deploy to AWS Accounts not managed by AWS Organizations.

You are responsible for creating Execution Roles in every account you will be deploying to in advance to create the actual stack instances. Unless you specify overrides, StackSets expects the execution roles you create to have the default name `AWSCloudFormationStackSetExecutionRole`. See the [Grant self-managed permissions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html) section of the CloudFormation documentation.

The CDK will automatically create the central Administration Role in the Pipeline account which will be used to assume the Execution Role in each of the target accounts.

If you wish to use a pre-created Administration Role, use `Role.fromRoleName()` or `Role.fromRoleArn()` to import it, and pass it to this function:

```ts const existingAdminRole = iam.Role.fromRoleName(this, 'AdminRole', 'AWSCloudFormationStackSetAdministrationRole');

const deploymentModel = codepipeline_actions.StackSetDeploymentModel.selfManaged({
  // Use an existing Role. Leave this out to create a new Role.
  administrationRole: existingAdminRole,
});

```

Using this deployment model, you can only specify AWS Account Ids in the `stackInstances` parameter. See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html

type StackSetOrganizationsAutoDeployment added in v2.13.0

type StackSetOrganizationsAutoDeployment string

Describes whether AWS CloudFormation StackSets automatically deploys to AWS Organizations accounts that are added to a target organization or organizational unit (OU).

const (
	// StackSets automatically deploys additional stack instances to AWS Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions.
	//
	// If an account is removed from a target organization or OU, AWS CloudFormation StackSets
	// deletes stack instances from the account in the specified Regions.
	StackSetOrganizationsAutoDeployment_ENABLED StackSetOrganizationsAutoDeployment = "ENABLED"
	// StackSets does not automatically deploy additional stack instances to AWS Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions.
	StackSetOrganizationsAutoDeployment_DISABLED StackSetOrganizationsAutoDeployment = "DISABLED"
	// Stack resources are retained when an account is removed from a target organization or OU.
	StackSetOrganizationsAutoDeployment_ENABLED_WITH_STACK_RETENTION StackSetOrganizationsAutoDeployment = "ENABLED_WITH_STACK_RETENTION"
)

type StackSetParameters added in v2.13.0

type StackSetParameters interface {
}

Base parameters for the StackSet.

Example:

parameters := codepipeline_actions.StackSetParameters_FromLiteral(map[string]*string{
	"BucketName": jsii.String("my-bucket"),
	"Asset1": jsii.String("true"),
})

func StackSetParameters_FromArtifactPath added in v2.13.0

func StackSetParameters_FromArtifactPath(artifactPath awscodepipeline.ArtifactPath) StackSetParameters

Read the parameters from a JSON file from one of the pipeline's artifacts.

The file needs to contain a list of `{ ParameterKey, ParameterValue, UsePreviousValue }` objects, like this:

``` [

{
    "ParameterKey": "BucketName",
    "ParameterValue": "my-bucket"
},
{
    "ParameterKey": "Asset1",
    "ParameterValue": "true"
},
{
    "ParameterKey": "Asset2",
    "UsePreviousValue": true
}

] ```

You must specify all template parameters. Parameters you don't specify will revert to their `Default` values as specified in the template.

For of parameters you want to retain their existing values without specifying what those values are, set `UsePreviousValue: true`. Use of this feature is discouraged. CDK is for specifying desired-state infrastructure, and use of this feature makes the parameter values unmanaged.

func StackSetParameters_FromLiteral added in v2.13.0

func StackSetParameters_FromLiteral(parameters *map[string]*string, usePreviousValues *[]*string) StackSetParameters

A list of template parameters for your stack set.

You must specify all template parameters. Parameters you don't specify will revert to their `Default` values as specified in the template.

Specify the names of parameters you want to retain their existing values, without specifying what those values are, in an array in the second argument to this function. Use of this feature is discouraged. CDK is for specifying desired-state infrastructure, and use of this feature makes the parameter values unmanaged.

Example:

parameters := codepipeline_actions.StackSetParameters_FromLiteral(map[string]*string{
	"BucketName": jsii.String("my-bucket"),
	"Asset1": jsii.String("true"),
})

type StackSetTemplate added in v2.13.0

type StackSetTemplate interface {
}

The source of a StackSet template.

Example:

var pipeline pipeline
var sourceOutput artifact

pipeline.AddStage(&StageOptions{
	StageName: jsii.String("DeployStackSets"),
	Actions: []iAction{
		// First, update the StackSet itself with the newest template
		codepipeline_actions.NewCloudFormationDeployStackSetAction(&CloudFormationDeployStackSetActionProps{
			ActionName: jsii.String("UpdateStackSet"),
			RunOrder: jsii.Number(1),
			StackSetName: jsii.String("MyStackSet"),
			Template: codepipeline_actions.StackSetTemplate_FromArtifactPath(sourceOutput.AtPath(jsii.String("template.yaml"))),

			// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
			DeploymentModel: codepipeline_actions.StackSetDeploymentModel_SelfManaged(),
			// This deploys to a set of accounts
			StackInstances: codepipeline_actions.StackInstances_InAccounts([]*string{
				jsii.String("111111111111"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),

		// Afterwards, update/create additional instances in other accounts
		codepipeline_actions.NewCloudFormationDeployStackInstancesAction(&CloudFormationDeployStackInstancesActionProps{
			ActionName: jsii.String("AddMoreInstances"),
			RunOrder: jsii.Number(2),
			StackSetName: jsii.String("MyStackSet"),
			StackInstances: codepipeline_actions.StackInstances_*InAccounts([]*string{
				jsii.String("222222222222"),
				jsii.String("333333333333"),
			}, []*string{
				jsii.String("us-east-1"),
				jsii.String("eu-west-1"),
			}),
		}),
	},
})

func StackSetTemplate_FromArtifactPath added in v2.13.0

func StackSetTemplate_FromArtifactPath(artifactPath awscodepipeline.ArtifactPath) StackSetTemplate

Use a file in an artifact as Stack Template.

type StateMachineInput

type StateMachineInput interface {
	// When InputType is set to Literal (default), the Input field is used directly as the input for the state machine execution.
	//
	// Otherwise, the state machine is invoked with an empty JSON object {}.
	//
	// When InputType is set to FilePath, this field is required.
	// An input artifact is also required when InputType is set to FilePath.
	// Default: - none.
	//
	Input() interface{}
	// The optional input Artifact of the Action.
	//
	// If InputType is set to FilePath, this artifact is required
	// and is used to source the input for the state machine execution.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-StepFunctions.html#action-reference-StepFunctions-example
	//
	// Default: - the Action will not have any inputs.
	//
	InputArtifact() awscodepipeline.Artifact
	// Optional StateMachine InputType InputType can be Literal or FilePath.
	// Default: - Literal.
	//
	InputType() *string
}

Represents the input for the StateMachine.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
startState := stepfunctions.NewPass(this, jsii.String("StartState"))
simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
	Definition: startState,
})
stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
	ActionName: jsii.String("Invoke"),
	StateMachine: simpleStateMachine,
	StateMachineInput: codepipeline_actions.StateMachineInput_Literal(map[string]*bool{
		"IsHelloWorldExample": jsii.Boolean(true),
	}),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("StepFunctions"),
	Actions: []iAction{
		stepFunctionAction,
	},
})

func StateMachineInput_FilePath

func StateMachineInput_FilePath(inputFile awscodepipeline.ArtifactPath) StateMachineInput

When the input type is FilePath, input artifact and filepath must be specified.

func StateMachineInput_Literal

func StateMachineInput_Literal(object *map[string]interface{}) StateMachineInput

When the input type is Literal, input value is passed directly to the state machine input.

type StepFunctionInvokeAction

type StepFunctionInvokeAction interface {
	Action
	// The simple properties of the Action, like its Owner, name, etc.
	//
	// Note that this accessor will be called before the `bind` callback.
	ActionProperties() *awscodepipeline.ActionProperties
	// This is a renamed version of the `IAction.actionProperties` property.
	ProvidedActionProperties() *awscodepipeline.ActionProperties
	// The callback invoked when this Action is added to a Pipeline.
	Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// This is a renamed version of the `IAction.bind` method.
	Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	// Creates an Event that will be triggered whenever the state of this Action changes.
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	VariableExpression(variableName *string) *string
}

StepFunctionInvokeAction that is provided by an AWS CodePipeline.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
startState := stepfunctions.NewPass(this, jsii.String("StartState"))
simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
	Definition: startState,
})
stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
	ActionName: jsii.String("Invoke"),
	StateMachine: simpleStateMachine,
	StateMachineInput: codepipeline_actions.StateMachineInput_Literal(map[string]*bool{
		"IsHelloWorldExample": jsii.Boolean(true),
	}),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("StepFunctions"),
	Actions: []iAction{
		stepFunctionAction,
	},
})

type StepFunctionsInvokeActionProps

type StepFunctionsInvokeActionProps struct {
	// The physical, human-readable name of the Action.
	//
	// Note that Action names must be unique within a single Stage.
	ActionName *string `field:"required" json:"actionName" yaml:"actionName"`
	// The runOrder property for this Action.
	//
	// RunOrder determines the relative order in which multiple Actions in the same Stage execute.
	// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
	//
	// Default: 1.
	//
	RunOrder *float64 `field:"optional" json:"runOrder" yaml:"runOrder"`
	// The name of the namespace to use for variables emitted by this action.
	// 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.
	//
	VariablesNamespace *string `field:"optional" json:"variablesNamespace" yaml:"variablesNamespace"`
	// 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.
	// Default: a new Role will be generated.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The state machine to invoke.
	StateMachine awsstepfunctions.IStateMachine `field:"required" json:"stateMachine" yaml:"stateMachine"`
	// Prefix (optional).
	//
	// By default, the action execution ID is used as the state machine execution name.
	// If a prefix is provided, it is prepended to the action execution ID with a hyphen and
	// together used as the state machine execution name.
	// Default: - action execution ID.
	//
	ExecutionNamePrefix *string `field:"optional" json:"executionNamePrefix" yaml:"executionNamePrefix"`
	// The optional output Artifact of the Action.
	// Default: the Action will not have any outputs.
	//
	Output awscodepipeline.Artifact `field:"optional" json:"output" yaml:"output"`
	// Represents the input to the StateMachine.
	//
	// This includes input artifact, input type and the statemachine input.
	// Default: - none.
	//
	StateMachineInput StateMachineInput `field:"optional" json:"stateMachineInput" yaml:"stateMachineInput"`
}

Construction properties of the `StepFunctionsInvokeAction StepFunction Invoke Action`.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
startState := stepfunctions.NewPass(this, jsii.String("StartState"))
simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
	Definition: startState,
})
stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
	ActionName: jsii.String("Invoke"),
	StateMachine: simpleStateMachine,
	StateMachineInput: codepipeline_actions.StateMachineInput_Literal(map[string]*bool{
		"IsHelloWorldExample": jsii.Boolean(true),
	}),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("StepFunctions"),
	Actions: []iAction{
		stepFunctionAction,
	},
})

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL