@Generated(value="software.amazon.awssdk:codegen") public final class WebhookDefinition extends Object implements SdkPojo, Serializable, ToCopyableBuilder<WebhookDefinition.Builder,WebhookDefinition>
Represents information about a webhook and its definition.
Modifier and Type | Class and Description |
---|---|
static interface |
WebhookDefinition.Builder |
Modifier and Type | Method and Description |
---|---|
WebhookAuthenticationType |
authentication()
Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED.
|
String |
authenticationAsString()
Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED.
|
WebhookAuthConfiguration |
authenticationConfiguration()
Properties that configure the authentication applied to incoming webhook trigger requests.
|
static WebhookDefinition.Builder |
builder() |
boolean |
equals(Object obj) |
List<WebhookFilterRule> |
filters()
A list of rules applied to the body/payload sent in the POST request to a webhook URL.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
String |
name()
The name of the webhook.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends WebhookDefinition.Builder> |
serializableBuilderClass() |
String |
targetAction()
The name of the action in a pipeline you want to connect to the webhook.
|
String |
targetPipeline()
The name of the pipeline you want to connect to the webhook.
|
WebhookDefinition.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
copy
public String name()
The name of the webhook.
public String targetPipeline()
The name of the pipeline you want to connect to the webhook.
public String targetAction()
The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline.
public List<WebhookFilterRule> filters()
A list of rules applied to the body/payload sent in the POST request to a webhook URL. All defined rules must pass for the request to be accepted and the pipeline started.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public WebhookAuthenticationType authentication()
Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED.
GITHUB_HMAC implements the authentication scheme described here: https://developer.github.com/webhooks/securing/
IP will reject webhooks trigger requests unless they originate from an IP within the IP range whitelisted in the authentication configuration.
UNAUTHENTICATED will accept all webhook trigger requests regardless of origin.
If the service returns an enum value that is not available in the current SDK version, authentication
will return WebhookAuthenticationType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from authenticationAsString()
.
GITHUB_HMAC implements the authentication scheme described here: https://developer.github.com/webhooks/securing/
IP will reject webhooks trigger requests unless they originate from an IP within the IP range whitelisted in the authentication configuration.
UNAUTHENTICATED will accept all webhook trigger requests regardless of origin.
WebhookAuthenticationType
public String authenticationAsString()
Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED.
GITHUB_HMAC implements the authentication scheme described here: https://developer.github.com/webhooks/securing/
IP will reject webhooks trigger requests unless they originate from an IP within the IP range whitelisted in the authentication configuration.
UNAUTHENTICATED will accept all webhook trigger requests regardless of origin.
If the service returns an enum value that is not available in the current SDK version, authentication
will return WebhookAuthenticationType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from authenticationAsString()
.
GITHUB_HMAC implements the authentication scheme described here: https://developer.github.com/webhooks/securing/
IP will reject webhooks trigger requests unless they originate from an IP within the IP range whitelisted in the authentication configuration.
UNAUTHENTICATED will accept all webhook trigger requests regardless of origin.
WebhookAuthenticationType
public WebhookAuthConfiguration authenticationConfiguration()
Properties that configure the authentication applied to incoming webhook trigger requests. 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.
public WebhookDefinition.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<WebhookDefinition.Builder,WebhookDefinition>
public static WebhookDefinition.Builder builder()
public static Class<? extends WebhookDefinition.Builder> serializableBuilderClass()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.