Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class CreatePipelineCommandProtected

Creates a pipeline.

In the pipeline structure, you must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.

Example

Use a bare-bones client and the command you need to make an API call.

import { CodePipelineClient, CreatePipelineCommand } from "@aws-sdk/client-codepipeline"; // ES Modules import
// const { CodePipelineClient, CreatePipelineCommand } = require("@aws-sdk/client-codepipeline"); // CommonJS import
const client = new CodePipelineClient(config);
const input = { // CreatePipelineInput
pipeline: { // PipelineDeclaration
name: "STRING_VALUE", // required
roleArn: "STRING_VALUE", // required
artifactStore: { // ArtifactStore
type: "S3", // required
location: "STRING_VALUE", // required
encryptionKey: { // EncryptionKey
id: "STRING_VALUE", // required
type: "KMS", // required
},
},
artifactStores: { // ArtifactStoreMap
"<keys>": {
type: "S3", // required
location: "STRING_VALUE", // required
encryptionKey: {
id: "STRING_VALUE", // required
type: "KMS", // required
},
},
},
stages: [ // PipelineStageDeclarationList // required
{ // StageDeclaration
name: "STRING_VALUE", // required
blockers: [ // StageBlockerDeclarationList
{ // BlockerDeclaration
name: "STRING_VALUE", // required
type: "Schedule", // required
},
],
actions: [ // StageActionDeclarationList // required
{ // ActionDeclaration
name: "STRING_VALUE", // required
actionTypeId: { // ActionTypeId
category: "Source" || "Build" || "Deploy" || "Test" || "Invoke" || "Approval", // required
owner: "AWS" || "ThirdParty" || "Custom", // required
provider: "STRING_VALUE", // required
version: "STRING_VALUE", // required
},
runOrder: Number("int"),
configuration: { // ActionConfigurationMap
"<keys>": "STRING_VALUE",
},
outputArtifacts: [ // OutputArtifactList
{ // OutputArtifact
name: "STRING_VALUE", // required
},
],
inputArtifacts: [ // InputArtifactList
{ // InputArtifact
name: "STRING_VALUE", // required
},
],
roleArn: "STRING_VALUE",
region: "STRING_VALUE",
namespace: "STRING_VALUE",
},
],
},
],
version: Number("int"),
},
tags: [ // TagList
{ // Tag
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
};
const command = new CreatePipelineCommand(input);
const response = await client.send(command);
// { // CreatePipelineOutput
// pipeline: { // PipelineDeclaration
// name: "STRING_VALUE", // required
// roleArn: "STRING_VALUE", // required
// artifactStore: { // ArtifactStore
// type: "S3", // required
// location: "STRING_VALUE", // required
// encryptionKey: { // EncryptionKey
// id: "STRING_VALUE", // required
// type: "KMS", // required
// },
// },
// artifactStores: { // ArtifactStoreMap
// "<keys>": {
// type: "S3", // required
// location: "STRING_VALUE", // required
// encryptionKey: {
// id: "STRING_VALUE", // required
// type: "KMS", // required
// },
// },
// },
// stages: [ // PipelineStageDeclarationList // required
// { // StageDeclaration
// name: "STRING_VALUE", // required
// blockers: [ // StageBlockerDeclarationList
// { // BlockerDeclaration
// name: "STRING_VALUE", // required
// type: "Schedule", // required
// },
// ],
// actions: [ // StageActionDeclarationList // required
// { // ActionDeclaration
// name: "STRING_VALUE", // required
// actionTypeId: { // ActionTypeId
// category: "Source" || "Build" || "Deploy" || "Test" || "Invoke" || "Approval", // required
// owner: "AWS" || "ThirdParty" || "Custom", // required
// provider: "STRING_VALUE", // required
// version: "STRING_VALUE", // required
// },
// runOrder: Number("int"),
// configuration: { // ActionConfigurationMap
// "<keys>": "STRING_VALUE",
// },
// outputArtifacts: [ // OutputArtifactList
// { // OutputArtifact
// name: "STRING_VALUE", // required
// },
// ],
// inputArtifacts: [ // InputArtifactList
// { // InputArtifact
// name: "STRING_VALUE", // required
// },
// ],
// roleArn: "STRING_VALUE",
// region: "STRING_VALUE",
// namespace: "STRING_VALUE",
// },
// ],
// },
// ],
// version: Number("int"),
// },
// tags: [ // TagList
// { // Tag
// key: "STRING_VALUE", // required
// value: "STRING_VALUE", // required
// },
// ],
// };

Param

CreatePipelineCommandInput

Returns

CreatePipelineCommandOutput

See

Throws

ConcurrentModificationException (client fault)

Unable to modify the tag due to a simultaneous update request.

Throws

InvalidActionDeclarationException (client fault)

The action declaration was specified in an invalid format.

Throws

InvalidBlockerDeclarationException (client fault)

Reserved for future use.

Throws

InvalidStageDeclarationException (client fault)

The stage declaration was specified in an invalid format.

Throws

InvalidStructureException (client fault)

The structure was specified in an invalid format.

Throws

InvalidTagsException (client fault)

The specified resource tags are invalid.

Throws

LimitExceededException (client fault)

The number of pipelines associated with the Amazon Web Services account has exceeded the limit allowed for the account.

Throws

PipelineNameInUseException (client fault)

The specified pipeline name is already in use.

Throws

TooManyTagsException (client fault)

The tags limit for a resource has been exceeded.

Throws

ValidationException (client fault)

The validation was specified in an invalid format.

Throws

CodePipelineServiceException

Base exception class for all service exceptions from CodePipeline service.

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<CreatePipelineCommandInput, CreatePipelineCommandOutput>

Methods