Class CfnWebhook
- All Implemented Interfaces:
 IEnvironmentAware,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 Summary
Nested 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.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.codepipeline.IWebhookRef
IWebhookRef.Jsii$Default, IWebhookRef.Jsii$Proxy - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnWebhook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnWebhook(software.amazon.jsii.JsiiObjectRef objRef) CfnWebhook(software.constructs.Construct scope, String id, CfnWebhookProps props)  - 
Method Summary
Modifier 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.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson 
- 
Field Details
- 
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class. 
 - 
 - 
Constructor Details
- 
CfnWebhook
protected CfnWebhook(software.amazon.jsii.JsiiObjectRef objRef)  - 
CfnWebhook
protected 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
- 
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
 inspectin interfaceIInspectable- 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 classCfnResource- Parameters:
 props- This parameter is required.
 - 
getAttrId
logical id of the webhook. - 
getAttrUrl
The webhook URL generated by AWS CodePipeline , such ashttps://eu-central-1.webhooks.aws/trigger123456. - 
getCfnProperties
- Overrides:
 getCfnPropertiesin classCfnResource
 - 
getWebhookRef
A reference to a Webhook resource.- Specified by:
 getWebhookRefin interfaceIWebhookRef
 - 
getAuthentication
Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED. - 
setAuthentication
Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED. - 
getAuthenticationConfiguration
Properties that configure the authentication applied to incoming webhook trigger requests.Returns union: either
IResolvableorCfnWebhook.WebhookAuthConfigurationProperty - 
setAuthenticationConfiguration
Properties 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. - 
getFilters
A 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> - 
setFilters
A list of rules applied to the body/payload sent in the POST request to a webhook URL. - 
setFilters
A list of rules applied to the body/payload sent in the POST request to a webhook URL. - 
getTargetAction
The name of the action in a pipeline you want to connect to the webhook. - 
setTargetAction
The name of the action in a pipeline you want to connect to the webhook. - 
getTargetPipeline
The name of the pipeline you want to connect to the webhook. - 
setTargetPipeline
The name of the pipeline you want to connect to the webhook. - 
getName
The name of the webhook. - 
setName
The name of the webhook. - 
getRegisterWithThirdParty
Configures a connection between the webhook that was created and the external tool with events to be detected.Returns union: either
BooleanorIResolvable - 
setRegisterWithThirdParty
Configures a connection between the webhook that was created and the external tool with events to be detected. - 
setRegisterWithThirdParty
Configures a connection between the webhook that was created and the external tool with events to be detected. - 
getTargetPipelineVersion
The version number of the pipeline to be connected to the trigger request. - 
setTargetPipelineVersion
The version number of the pipeline to be connected to the trigger request. 
 -