Class CfnWebhook
A CloudFormation AWS::CodePipeline::Webhook
.
Inherited Members
Namespace: Amazon.CDK.AWS.CodePipeline
Assembly: Amazon.CDK.AWS.CodePipeline.dll
Syntax (csharp)
public class CfnWebhook : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnWebhook
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::CodePipeline::Webhook
resource creates and registers your webhook. After the webhook is created and registered, it triggers your pipeline to start every time an external event occurs. For more information, see Migrate polling pipelines to use event-based change detection in the AWS CodePipeline User Guide .
We strongly recommend that you use AWS Secrets Manager to store your credentials. If you use Secrets Manager, you must have already configured and stored your secret parameters in Secrets Manager. For more information, see Using Dynamic References to Specify Template Values .
When passing secret parameters, do not enter the value directly into the template. The value is rendered as plaintext and is therefore readable. For security reasons, do not use plaintext in your AWS CloudFormation template to store your credentials.
CloudformationResource: AWS::CodePipeline::Webhook
Link: 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 cfnWebhook = new CfnWebhook(this, "MyCfnWebhook", 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
CfnWebhook(Construct, String, ICfnWebhookProps) | Create a new |
CfnWebhook(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnWebhook(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrUrl | The webhook URL generated by AWS CodePipeline , such as |
Authentication | Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED. |
AuthenticationConfiguration | Properties that configure the authentication applied to incoming webhook trigger requests. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnWebhook(Construct, String, ICfnWebhookProps)
Create a new AWS::CodePipeline::Webhook
.
public CfnWebhook(Construct scope, string id, ICfnWebhookProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnWebhookProps
- resource properties.
CfnWebhook(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnWebhook(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnWebhook(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnWebhook(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrUrl
The webhook URL generated by AWS CodePipeline , such as https://eu-central-1.webhooks.aws/trigger123456
.
public virtual string AttrUrl { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Url
Authentication
Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.
public virtual string Authentication { get; set; }
Property Value
System.String
Remarks
AuthenticationConfiguration
Properties that configure the authentication applied to incoming webhook trigger requests.
public virtual 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.
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Filters
A list of rules applied to the body/payload sent in the POST request to a webhook URL.
public virtual 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 virtual 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 virtual 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 virtual 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 virtual string TargetPipeline { get; set; }
Property Value
System.String
Remarks
TargetPipelineVersion
The version number of the pipeline to be connected to the trigger request.
public virtual double TargetPipelineVersion { get; set; }
Property Value
System.Double
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>