Class CfnWebhookProps
Properties for defining a CfnWebhook
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CodePipeline
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnWebhookProps : Object, ICfnWebhookProps
Syntax (vb)
Public Class CfnWebhookProps
Inherits Object
Implements ICfnWebhookProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-webhook.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodePipeline;
var cfnWebhookProps = new CfnWebhookProps {
Authentication = "authentication",
AuthenticationConfiguration = new WebhookAuthConfigurationProperty {
AllowedIpRange = "allowedIpRange",
SecretToken = "secretToken"
},
Filters = new [] { new WebhookFilterRuleProperty {
JsonPath = "jsonPath",
// the properties below are optional
MatchEquals = "matchEquals"
} },
TargetAction = "targetAction",
TargetPipeline = "targetPipeline",
TargetPipelineVersion = 123,
// the properties below are optional
Name = "name",
RegisterWithThirdParty = false
};
Synopsis
Constructors
CfnWebhookProps() |
Properties
Authentication | Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED. |
AuthenticationConfiguration | Properties that configure the authentication applied to incoming webhook trigger requests. |
Filters | A list of rules applied to the body/payload sent in the POST request to a webhook URL. |
Name | The name of the webhook. |
RegisterWithThirdParty | Configures a connection between the webhook that was created and the external tool with events to be detected. |
TargetAction | The name of the action in a pipeline you want to connect to the webhook. |
TargetPipeline | The name of the pipeline you want to connect to the webhook. |
TargetPipelineVersion | The version number of the pipeline to be connected to the trigger request. |
Constructors
CfnWebhookProps()
public CfnWebhookProps()
Properties
Authentication
Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.
public string Authentication { get; set; }
Property Value
System.String
Remarks
When creating CodePipeline webhooks, do not use your own credentials or reuse the same secret token across multiple webhooks. For optimal security, generate a unique secret token for each webhook you create. The secret token is an arbitrary string that you provide, which GitHub uses to compute and sign the webhook payloads sent to CodePipeline, for protecting the integrity and authenticity of the webhook payloads. Using your own credentials or reusing the same token across multiple webhooks can lead to security vulnerabilities. > If a secret token was provided, it will be redacted in the response.
AuthenticationConfiguration
Properties that configure the authentication applied to incoming webhook trigger requests.
public object AuthenticationConfiguration { get; set; }
Property Value
System.Object
Remarks
The required properties depend on the authentication type. For GITHUB_HMAC, only the SecretToken
property must be set. For IP, only the AllowedIPRange
property must be set to a valid CIDR range. For UNAUTHENTICATED, no properties can be set.
Filters
A list of rules applied to the body/payload sent in the POST request to a webhook URL.
public object Filters { get; set; }
Property Value
System.Object
Remarks
All defined rules must pass for the request to be accepted and the pipeline started.
Name
The name of the webhook.
public string Name { get; set; }
Property Value
System.String
Remarks
RegisterWithThirdParty
Configures a connection between the webhook that was created and the external tool with events to be detected.
public object RegisterWithThirdParty { get; set; }
Property Value
System.Object
Remarks
TargetAction
The name of the action in a pipeline you want to connect to the webhook.
public string TargetAction { get; set; }
Property Value
System.String
Remarks
The action must be from the source (first) stage of the pipeline.
TargetPipeline
The name of the pipeline you want to connect to the webhook.
public string TargetPipeline { get; set; }
Property Value
System.String
Remarks
TargetPipelineVersion
The version number of the pipeline to be connected to the trigger request.
public double TargetPipelineVersion { get; set; }
Property Value
System.Double