Struct aws_sdk_codebuild::client::fluent_builders::CreateWebhook
source · pub struct CreateWebhook { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateWebhook
.
For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, enables CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.
If you enable webhooks for an CodeBuild project, and the project is used as a build step in CodePipeline, then two identical builds are created for each commit. One build is triggered through webhooks, and one through CodePipeline. Because billing is on a per-build basis, you are billed for both builds. Therefore, if you are using CodePipeline, we recommend that you disable webhooks in CodeBuild. In the CodeBuild console, clear the Webhook box. For more information, see step 5 in Change a Build Project's Settings.
Implementations§
source§impl CreateWebhook
impl CreateWebhook
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CreateWebhook, AwsResponseRetryClassifier>, SdkError<CreateWebhookError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<CreateWebhook, AwsResponseRetryClassifier>, SdkError<CreateWebhookError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<CreateWebhookOutput, SdkError<CreateWebhookError>>
pub async fn send(
self
) -> Result<CreateWebhookOutput, SdkError<CreateWebhookError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn project_name(self, input: impl Into<String>) -> Self
pub fn project_name(self, input: impl Into<String>) -> Self
The name of the CodeBuild project.
sourcepub fn set_project_name(self, input: Option<String>) -> Self
pub fn set_project_name(self, input: Option<String>) -> Self
The name of the CodeBuild project.
sourcepub fn branch_filter(self, input: impl Into<String>) -> Self
pub fn branch_filter(self, input: impl Into<String>) -> Self
A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter
is empty, then all branches are built.
It is recommended that you use filterGroups
instead of branchFilter
.
sourcepub fn set_branch_filter(self, input: Option<String>) -> Self
pub fn set_branch_filter(self, input: Option<String>) -> Self
A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter
is empty, then all branches are built.
It is recommended that you use filterGroups
instead of branchFilter
.
sourcepub fn filter_groups(self, input: Vec<WebhookFilter>) -> Self
pub fn filter_groups(self, input: Vec<WebhookFilter>) -> Self
Appends an item to filterGroups
.
To override the contents of this collection use set_filter_groups
.
An array of arrays of WebhookFilter
objects used to determine which webhooks are triggered. At least one WebhookFilter
in the array must specify EVENT
as its type
.
For a build to be triggered, at least one filter group in the filterGroups
array must pass. For a filter group to pass, each of its filters must pass.
sourcepub fn set_filter_groups(self, input: Option<Vec<Vec<WebhookFilter>>>) -> Self
pub fn set_filter_groups(self, input: Option<Vec<Vec<WebhookFilter>>>) -> Self
An array of arrays of WebhookFilter
objects used to determine which webhooks are triggered. At least one WebhookFilter
in the array must specify EVENT
as its type
.
For a build to be triggered, at least one filter group in the filterGroups
array must pass. For a filter group to pass, each of its filters must pass.
sourcepub fn build_type(self, input: WebhookBuildType) -> Self
pub fn build_type(self, input: WebhookBuildType) -> Self
Specifies the type of build this webhook will trigger.
sourcepub fn set_build_type(self, input: Option<WebhookBuildType>) -> Self
pub fn set_build_type(self, input: Option<WebhookBuildType>) -> Self
Specifies the type of build this webhook will trigger.
Trait Implementations§
source§impl Clone for CreateWebhook
impl Clone for CreateWebhook
source§fn clone(&self) -> CreateWebhook
fn clone(&self) -> CreateWebhook
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more