AWSSDKDocSamples.Amazon.CodePipeline.Generated.CodePipelineSamples.CodePipelineCreateCustomActionType C# (CSharp) Method

CodePipelineCreateCustomActionType() public method

public CodePipelineCreateCustomActionType ( ) : void
return void
        public void CodePipelineCreateCustomActionType()
        {
            #region create-a-custom-action-1449103500903

            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<ActionConfigurationProperty> {
                    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;

            #endregion
        }