AWS::CodePipeline::CustomActionType - AWS CloudFormation (original) (raw)

The AWS::CodePipeline::CustomActionType resource creates a custom action for activities that aren't included in the 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

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

Properties

Category

The category of the custom action, such as a build action or a test action.

Required: Yes

Type: String

Allowed values: Source | Build | Deploy | Test | Invoke | Approval | Compute

Update requires: Replacement

ConfigurationProperties

The configuration properties for the custom action.

Note

You can refer to a name in the configuration properties of the custom action within the URL templates by following the format of {Config:name}, as long as the configuration property is both required and not secret. For more information, seeCreate a Custom Action for a Pipeline.

Required: No

Type: Array of ConfigurationProperties

Maximum: 10

Update requires: Replacement

InputArtifactDetails

The details of the input artifact for the action, such as its commit ID.

Required: Yes

Type: ArtifactDetails

Update requires: Replacement

OutputArtifactDetails

The details of the output artifact of the action, such as its commit ID.

Required: Yes

Type: ArtifactDetails

Update requires: Replacement

Provider

The provider of the service used in the custom action, such as CodeDeploy.

Required: Yes

Type: String

Pattern: [0-9A-Za-z_-]+

Minimum: 1

Maximum: 35

Update requires: Replacement

Settings

URLs that provide users information about this custom action.

Required: No

Type: Settings

Update requires: Replacement

Tags

The tags for the custom action.

Required: No

Type: Array of Tag

Update requires: No interruption

Version

The version identifier of the custom action.

Required: Yes

Type: String

Pattern: [0-9A-Za-z_-]+

Minimum: 1

Maximum: 9

Update requires: Replacement

Return values

Ref

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

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

Fn::GetAtt

Examples

Custom Action Type Resource Configuration

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

JSON

"MyCustomActionType":
{
    "Type": "AWS::CodePipeline::CustomActionType",
    "Properties": {
        "Category": "Build",
        "Provider": "My-Build-Provider-Name",
        "Version": {
            "Ref": "Version"
        },
        "ConfigurationProperties": [
            {
                "Description": "Description",
                "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}/"
        },
        "Tags": [
            {
                "Key": "Project",
                "Value": "ProjectA"
            },
            {
                "Key": "Team",
                "Value": "Admins"
            }
        ]
    }
}

YAML

MyCustomActionType:
Type: AWS::CodePipeline::CustomActionType
Properties:
  Category: Build
  Provider: My-Build-Provider-Name
  Version:
    Ref: Version
  ConfigurationProperties:
  - Description: Description
    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}/
  Tags:
  - Key: Project
    Value: ProjectA
  - Key: Team
    Value: Admins