Class CfnWebhook
- All Implemented Interfaces:
IInspectable
,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") .targetPipelineVersion(123) // the properties below are optional .name("name") .registerWithThirdParty(false) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnWebhook
.static interface
The authentication applied to incoming webhook trigger requests.static interface
The 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.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnWebhook
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnWebhook
(software.amazon.jsii.JsiiObjectRef objRef) CfnWebhook
(software.constructs.Construct scope, String id, CfnWebhookProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe 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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAuthentication
(String value) Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.void
Properties that configure the authentication applied to incoming webhook trigger requests.void
Properties that configure the authentication applied to incoming webhook trigger requests.void
setFilters
(List<Object> value) A list of rules applied to the body/payload sent in the POST request to a webhook URL.void
setFilters
(IResolvable value) A list of rules applied to the body/payload sent in the POST request to a webhook URL.void
The name of the webhook.void
setRegisterWithThirdParty
(Boolean value) Configures a connection between the webhook that was created and the external tool with events to be detected.void
Configures a connection between the webhook that was created and the external tool with events to be detected.void
setTargetAction
(String value) The name of the action in a pipeline you want to connect to the webhook.void
setTargetPipeline
(String value) The name of the pipeline you want to connect to the webhook.void
setTargetPipelineVersion
(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, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getAttrUrl
The webhook URL generated by AWS CodePipeline , such ashttps://eu-central-1.webhooks.aws/trigger123456
. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
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. -
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. -
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. -
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. -
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. -
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.
-