aws_sdk_codebuild/client/create_webhook.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateWebhook`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`project_name(impl Into<String>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::project_name) / [`set_project_name(Option<String>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::set_project_name):<br>required: **true**<br><p>The name of the CodeBuild project.</p><br>
7 /// - [`branch_filter(impl Into<String>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::branch_filter) / [`set_branch_filter(Option<String>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::set_branch_filter):<br>required: **false**<br><p>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 <code>branchFilter</code> is empty, then all branches are built.</p><note> <p>It is recommended that you use <code>filterGroups</code> instead of <code>branchFilter</code>.</p> </note><br>
8 /// - [`filter_groups(Vec::<WebhookFilter>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::filter_groups) / [`set_filter_groups(Option<Vec::<Vec::<WebhookFilter>>>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::set_filter_groups):<br>required: **false**<br><p>An array of arrays of <code>WebhookFilter</code> objects used to determine which webhooks are triggered. At least one <code>WebhookFilter</code> in the array must specify <code>EVENT</code> as its <code>type</code>.</p> <p>For a build to be triggered, at least one filter group in the <code>filterGroups</code> array must pass. For a filter group to pass, each of its filters must pass.</p><br>
9 /// - [`build_type(WebhookBuildType)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::build_type) / [`set_build_type(Option<WebhookBuildType>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::set_build_type):<br>required: **false**<br><p>Specifies the type of build this webhook will trigger.</p><note> <p><code>RUNNER_BUILDKITE_BUILD</code> is only available for <code>NO_SOURCE</code> source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/sample-runner-buildkite.html">Tutorial: Configure a CodeBuild-hosted Buildkite runner</a> in the <i>CodeBuild user guide</i>.</p> </note><br>
10 /// - [`manual_creation(bool)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::manual_creation) / [`set_manual_creation(Option<bool>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::set_manual_creation):<br>required: **false**<br><p>If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead returns <code>payloadUrl</code> and <code>secret</code> values for the webhook. The <code>payloadUrl</code> and <code>secret</code> values in the output can be used to manually create a webhook within GitHub.</p><note> <p><code>manualCreation</code> is only available for GitHub webhooks.</p> </note><br>
11 /// - [`scope_configuration(ScopeConfiguration)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::scope_configuration) / [`set_scope_configuration(Option<ScopeConfiguration>)`](crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::set_scope_configuration):<br>required: **false**<br><p>The scope configuration for global or organization webhooks.</p><note> <p>Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.</p> </note><br>
12 /// - On success, responds with [`CreateWebhookOutput`](crate::operation::create_webhook::CreateWebhookOutput) with field(s):
13 /// - [`webhook(Option<Webhook>)`](crate::operation::create_webhook::CreateWebhookOutput::webhook): <p>Information about a webhook that connects repository events to a build project in CodeBuild.</p>
14 /// - On failure, responds with [`SdkError<CreateWebhookError>`](crate::operation::create_webhook::CreateWebhookError)
15 pub fn create_webhook(&self) -> crate::operation::create_webhook::builders::CreateWebhookFluentBuilder {
16 crate::operation::create_webhook::builders::CreateWebhookFluentBuilder::new(self.handle.clone())
17 }
18}