AWS::CodePipeline::CustomActionType
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 Amazon CodePipeline in the Amazon CodePipeline User Guide.
Syntax
To declare this entity in your Amazon 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} }
YAML
Type: AWS::CodePipeline::CustomActionType Properties: Category:StringConfigurationProperties:- ConfigurationPropertiesInputArtifactDetails:ArtifactDetailsOutputArtifactDetails:ArtifactDetailsProvider:StringSettings:SettingsTags:- TagVersion:String
Properties
Category-
The category of the custom action, such as a build action or a test action.
Required: Yes
Type: String
Allowed values:
Approval | Build | Deploy | Invoke | Source | TestUpdate 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, see Create a Custom Action for a Pipeline.
Required: No
Type: List of ConfigurationProperties
Maximum:
10Update 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
Minimum:
1Maximum:
35Pattern:
[0-9A-Za-z_-]+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: List of Tag
Update requires: No interruption
Version-
The version identifier of the custom action.
Required: Yes
Type: String
Minimum:
1Maximum:
9Pattern:
[0-9A-Za-z_-]+Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the custom action name, such as
custo-MyCus-A1BCDEFGHIJ2.
For more information about using the Reffunction, 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": "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}/" }, "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: "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}/" Tags: - Key: Project Value: ProjectA - Key: Team Value: Admins