Class CfnWebhook
The AWS::CodePipeline::Webhook
resource creates and registers your webhook.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CodePipeline
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnWebhook : CfnResource, IInspectable
Syntax (vb)
Public Class CfnWebhook
Inherits CfnResource
Implements IInspectable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-webhook.html
CloudformationResource: AWS::CodePipeline::Webhook
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(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 |
CfnWebhook(Construct, String, ICfnWebhookProps) |
Properties
AttrId | |
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(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
CfnWebhook(Construct, String, ICfnWebhookProps)
public CfnWebhook(Construct scope, string id, ICfnWebhookProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnWebhookProps
Resource properties.
Properties
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
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
AuthenticationConfiguration
Properties that configure the authentication applied to incoming webhook trigger requests.
public virtual object AuthenticationConfiguration { get; set; }
Property Value
System.Object
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
Name
The name of the webhook.
public virtual string Name { get; set; }
Property Value
System.String
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
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
TargetPipeline
The name of the pipeline you want to connect to the webhook.
public virtual string TargetPipeline { get; set; }
Property Value
System.String
TargetPipelineVersion
The version number of the pipeline to be connected to the trigger request.
public virtual double TargetPipelineVersion { get; set; }
Property Value
System.Double
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>