Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::CodePipeline::CustomActionType

The AWS::CodePipeline::CustomActionType resource creates a custom action for activities that aren't included in the AWS CodePipeline default actions, such as running an internally developed build process or a test suite. You can use these custom actions in the stage of a pipeline. For more information, see Create and Add a Custom Action in AWS CodePipeline in the AWS CodePipeline User Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Type" : "AWS::CodePipeline::CustomActionType", "Properties" : { "Category" : String, "ConfigurationProperties" : [ ConfigurationProperties, ... ], "InputArtifactDetails" : ArtifactDetails, "OutputArtifactDetails" : ArtifactDetails, "Provider" : String, "Settings" : Settings, "Version" : String } }

YAML

Copy
Type: "AWS::CodePipeline::CustomActionType" Properties: Category: String, ConfigurationProperties: - ConfigurationProperties InputArtifactDetails: ArtifactDetails OutputArtifactDetails: ArtifactDetails Provider: String Settings: Settings Version: String

Properties

Category

The category of the custom action, such as a source action or a build action. For valid values, see CreateCustomActionType in the AWS CodePipeline API Reference.

Required: Yes

Type: String

Update requires: Replacement

ConfigurationProperties

The configuration properties for the custom action.

Required: No

Type: List of AWS CodePipeline CustomActionType ConfigurationProperties

Update requires: Replacement

InputArtifactDetails

The input artifact details for this custom action.

Required: Yes

Type: AWS CodePipeline CustomActionType ArtifactDetails

Update requires: Replacement

OutputArtifactDetails

The output artifact details for this custom action.

Required: Yes

Type: AWS CodePipeline CustomActionType ArtifactDetails

Update requires: Replacement

Provider

The name of the service provider that AWS CodePipeline uses for this custom action.

Required: Yes

Type: String

Update requires: Replacement

Settings

URLs that provide users information about this custom action.

Required: No

Type: AWS CodePipeline CustomActionType Settings

Update requires: Replacement

Version

The version number of this custom action.

Required: No

Type: String

Update requires: Replacement

Return Value

Ref

When you pass the logical ID of an AWS::CodePipeline::CustomActionType resource to the intrinsic Ref function, the function returns the custom action name, such as custo-MyCus-A1BCDEFGHIJ2.

For more information about using the Ref function, see Ref.

Example

The following example is a custom build action that requires users to specify one property: a project name.

JSON

Copy
"MyCustomActionType": { "Type": "AWS::CodePipeline::CustomActionType", "Properties": { "Category": "Build", "Provider": "My-Build-Provider-Name", "Version": { "Ref" : "Version" }, "ConfigurationProperties": [ { "Description": "The name of the build project must be provided when this action is added to the pipeline.", "Key": "true", "Name": "MyProjectName", "Queryable": "false", "Required": "true", "Secret": "false", "Type": "String" } ], "InputArtifactDetails": { "MaximumCount": "1", "MinimumCount": "1" }, "OutputArtifactDetails": { "MaximumCount": { "Ref" : "MaximumCountForOutputArtifactDetails" }, "MinimumCount": "0" }, "Settings": { "EntityUrlTemplate": "https://my-build-instance/job/{Config:ProjectName}/", "ExecutionUrlTemplate": "https://my-build-instance/job/{Config:ProjectName}/lastSuccessfulBuild/{ExternalExecutionId}/" } } }

YAML

Copy
MyCustomActionType: Type: "AWS::CodePipeline::CustomActionType" Properties: Category: Build Provider: "My-Build-Provider-Name" Version: Ref: Version ConfigurationProperties: - Description: "The name of the build project must be provided when this action is added to the pipeline." Key: true Name: MyProjectName Queryable: false Required: true Secret: false Type: String InputArtifactDetails: MaximumCount: 1 MinimumCount: 1 OutputArtifactDetails: MaximumCount: Ref: MaximumCountForOutputArtifactDetails MinimumCount: 0 Settings: EntityUrlTemplate: "https://my-build-instance/job/{Config:ProjectName}/" ExecutionUrlTemplate: "https://my-build-instance/job/{Config:ProjectName}/lastSuccessfulBuild/{ExternalExecutionId}/"