AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the CreateCustomActionType operation. Creates a new custom action that can be used in all pipelines associated with the AWS account. Only used for custom actions.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.CodePipeline.AmazonCodePipelineRequest
      Amazon.CodePipeline.Model.CreateCustomActionTypeRequest

Namespace: Amazon.CodePipeline.Model
Assembly: AWSSDK.CodePipeline.dll
Version: 3.x.y.z

Syntax

C#
public class CreateCustomActionTypeRequest : AmazonCodePipelineRequest
         IAmazonWebServiceRequest

The CreateCustomActionTypeRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Category Amazon.CodePipeline.ActionCategory

Gets and sets the property Category.

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

Although Source and Approval are listed as valid values, they are not currently functional. These values are reserved for future use.

Public Property ConfigurationProperties System.Collections.Generic.List<Amazon.CodePipeline.Model.ActionConfigurationProperty>

Gets and sets the property ConfigurationProperties.

The configuration properties for the custom action.

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.

Public Property InputArtifactDetails Amazon.CodePipeline.Model.ArtifactDetails

Gets and sets the property InputArtifactDetails.

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

Public Property OutputArtifactDetails Amazon.CodePipeline.Model.ArtifactDetails

Gets and sets the property OutputArtifactDetails.

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

Public Property Provider System.String

Gets and sets the property Provider.

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

Public Property Settings Amazon.CodePipeline.Model.ActionTypeSettings

Gets and sets the property Settings.

Returns information about the settings for an action type.

Public Property Version System.String

Gets and sets the property Version.

The version identifier of the custom action.

Examples

This example creates a build custom action for AWS CodePipeline for a Jenkins build project. For more information about the requirements for creating a custom action, including the structure of the JSON file commonly used to help create custom actions, see Create a Custom Action in the AWS CodePipeline User Guide. For a walkthrough of creating a custom action in a pipeline, follow the Four-Stage Pipeline Tutorial.

Create a custom action


var response = client.CreateCustomActionType(new CreateCustomActionTypeRequest 
{
    Version = "1", // A new custom action always has a version of 1. This is required.
    Category = "Build",
    ConfigurationProperties = new List {
        new ActionConfigurationProperty {
            Name = "MyJenkinsExampleBuildProject",
            Type = "String",
            Required = true,
            Key = true,
            Description = "The name of the build project must be provided when this action is added to the pipeline.",
            Queryable = false,
            Secret = false
        }
    }, // The text in description will be displayed to your users, and can contain a maximum of 2048 characters. The value for name in configurationProperties is the name of the project, if any.  In this example, this is the name of the build project on the Jenkins server
    InputArtifactDetails = new ArtifactDetails {
        MaximumCount = 1,
        MinimumCount = 0
    }, // This is the minimum and maximum number of artifacts allowed as inputs for the action. For more information about input and output artifacts, see Pipeline Structure Reference in the AWS CodePipeline User Guide.
    OutputArtifactDetails = new ArtifactDetails {
        MaximumCount = 1,
        MinimumCount = 0
    }, // This is the minimum and maximum number of artifacts allowed as outputs for the action. For more information about input and output artifacts, see Pipeline Structure Reference in the AWS CodePipeline User Guide.
    Provider = "MyBuild-ProviderName", // In this example, this is the name given to the provider field when configuring the AWS CodePipeline Plugin for Jenkins. For more information, see the Four-Stage Pipeline Tutorial in the AWS CodePipeline User Guide.
    Settings = new ActionTypeSettings {
        EntityUrlTemplate = "https://192.0.2.4/job/{Config:ProjectName}/",
        ExecutionUrlTemplate = "https://192.0.2.4/job/{Config:ProjectName}/lastSuccessfulBuild/{ExternalExecutionId}/",
        RevisionUrlTemplate = "none"
    } // entityUrlTemplate is the static link that provides information about the service provider for the action. In the example, the build system includes a static link to the Jenkins build project at the specific server address.  Similarly, executionUrlTemplate is the dynamic link that will be updated with information about the current or most recent run of the action.
});

ActionType actionType = response.ActionType;

            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms