Class CfnWebhook
- All Implemented Interfaces:
- IInspectable,- IWebhookRef,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct,- software.constructs.IDependable
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.
Example:
 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.codepipeline.*;
 CfnWebhook cfnWebhook = CfnWebhook.Builder.create(this, "MyCfnWebhook")
         .authentication("authentication")
         .authenticationConfiguration(WebhookAuthConfigurationProperty.builder()
                 .allowedIpRange("allowedIpRange")
                 .secretToken("secretToken")
                 .build())
         .filters(List.of(WebhookFilterRuleProperty.builder()
                 .jsonPath("jsonPath")
                 // the properties below are optional
                 .matchEquals("matchEquals")
                 .build()))
         .targetAction("targetAction")
         .targetPipeline("targetPipeline")
         // the properties below are optional
         .name("name")
         .registerWithThirdParty(false)
         .targetPipelineVersion(123)
         .build();
 - See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnWebhook.static interfaceThe authentication applied to incoming webhook trigger requests.static interfaceThe event criteria that specify when a webhook notification is sent to your URL.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.codepipeline.IWebhookRefIWebhookRef.Jsii$Default, IWebhookRef.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedCfnWebhook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnWebhook(software.amazon.jsii.JsiiObjectRef objRef) CfnWebhook(software.constructs.Construct scope, String id, CfnWebhookProps props) 
- 
Method SummaryModifier and TypeMethodDescriptionlogical id of the webhook.The webhook URL generated by AWS CodePipeline , such ashttps://eu-central-1.webhooks.aws/trigger123456.Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.Properties that configure the authentication applied to incoming webhook trigger requests.A list of rules applied to the body/payload sent in the POST request to a webhook URL.getName()The name of the webhook.Configures a connection between the webhook that was created and the external tool with events to be detected.The name of the action in a pipeline you want to connect to the webhook.The name of the pipeline you want to connect to the webhook.The version number of the pipeline to be connected to the trigger request.A reference to a Webhook resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAuthentication(String value) Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.voidProperties that configure the authentication applied to incoming webhook trigger requests.voidProperties that configure the authentication applied to incoming webhook trigger requests.voidsetFilters(List<Object> value) A list of rules applied to the body/payload sent in the POST request to a webhook URL.voidsetFilters(IResolvable value) A list of rules applied to the body/payload sent in the POST request to a webhook URL.voidThe name of the webhook.voidsetRegisterWithThirdParty(Boolean value) Configures a connection between the webhook that was created and the external tool with events to be detected.voidConfigures a connection between the webhook that was created and the external tool with events to be detected.voidsetTargetAction(String value) The name of the action in a pipeline you want to connect to the webhook.voidsetTargetPipeline(String value) The name of the pipeline you want to connect to the webhook.voidsetTargetPipelineVersion(Number value) The version number of the pipeline to be connected to the trigger request.Methods inherited from class software.amazon.awscdk.CfnResourceaddDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.ConstructgetNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstructgetNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnWebhookprotected CfnWebhook(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnWebhookprotected CfnWebhook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
CfnWebhook@Stability(Stable) public CfnWebhook(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnWebhookProps props) - Parameters:
- scope- Scope in which this resource is defined. This parameter is required.
- id- Construct identifier for this resource (unique in its scope). This parameter is required.
- props- Resource properties. This parameter is required.
 
 
- 
- 
Method Details- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin interface- IInspectable
- Parameters:
- inspector- tree inspector to collect and process attributes. This parameter is required.
 
- 
renderProperties@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
- renderPropertiesin class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getAttrIdlogical id of the webhook.
- 
getAttrUrlThe webhook URL generated by AWS CodePipeline , such ashttps://eu-central-1.webhooks.aws/trigger123456.
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getWebhookRefA reference to a Webhook resource.- Specified by:
- getWebhookRefin interface- IWebhookRef
 
- 
getAuthenticationSupported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.
- 
setAuthenticationSupported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.
- 
getAuthenticationConfigurationProperties that configure the authentication applied to incoming webhook trigger requests.Returns union: either IResolvableorCfnWebhook.WebhookAuthConfigurationProperty
- 
setAuthenticationConfigurationProperties that configure the authentication applied to incoming webhook trigger requests.
- 
setAuthenticationConfiguration@Stability(Stable) public void setAuthenticationConfiguration(@NotNull CfnWebhook.WebhookAuthConfigurationProperty value) Properties that configure the authentication applied to incoming webhook trigger requests.
- 
getFiltersA list of rules applied to the body/payload sent in the POST request to a webhook URL.Returns union: either IResolvableor Listinvalid input: '<'eitherIResolvableorCfnWebhook.WebhookFilterRuleProperty>
- 
setFiltersA list of rules applied to the body/payload sent in the POST request to a webhook URL.
- 
setFiltersA list of rules applied to the body/payload sent in the POST request to a webhook URL.
- 
getTargetActionThe name of the action in a pipeline you want to connect to the webhook.
- 
setTargetActionThe name of the action in a pipeline you want to connect to the webhook.
- 
getTargetPipelineThe name of the pipeline you want to connect to the webhook.
- 
setTargetPipelineThe name of the pipeline you want to connect to the webhook.
- 
getNameThe name of the webhook.
- 
setNameThe name of the webhook.
- 
getRegisterWithThirdPartyConfigures a connection between the webhook that was created and the external tool with events to be detected.Returns union: either BooleanorIResolvable
- 
setRegisterWithThirdPartyConfigures a connection between the webhook that was created and the external tool with events to be detected.
- 
setRegisterWithThirdPartyConfigures a connection between the webhook that was created and the external tool with events to be detected.
- 
getTargetPipelineVersionThe version number of the pipeline to be connected to the trigger request.
- 
setTargetPipelineVersionThe version number of the pipeline to be connected to the trigger request.
 
-