Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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.
Synopsis
- data CreateWebhook = CreateWebhook' {}
- newCreateWebhook :: Text -> CreateWebhook
- createWebhook_branchFilter :: Lens' CreateWebhook (Maybe Text)
- createWebhook_filterGroups :: Lens' CreateWebhook (Maybe [[WebhookFilter]])
- createWebhook_buildType :: Lens' CreateWebhook (Maybe WebhookBuildType)
- createWebhook_projectName :: Lens' CreateWebhook Text
- data CreateWebhookResponse = CreateWebhookResponse' {
- webhook :: Maybe Webhook
- httpStatus :: Int
- newCreateWebhookResponse :: Int -> CreateWebhookResponse
- createWebhookResponse_webhook :: Lens' CreateWebhookResponse (Maybe Webhook)
- createWebhookResponse_httpStatus :: Lens' CreateWebhookResponse Int
Creating a Request
data CreateWebhook Source #
See: newCreateWebhook
smart constructor.
CreateWebhook' | |
|
Instances
Create a value of CreateWebhook
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:branchFilter:CreateWebhook'
, createWebhook_branchFilter
- 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
.
$sel:filterGroups:CreateWebhook'
, createWebhook_filterGroups
- 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.
$sel:buildType:CreateWebhook'
, createWebhook_buildType
- Specifies the type of build this webhook will trigger.
$sel:projectName:CreateWebhook'
, createWebhook_projectName
- The name of the CodeBuild project.
Request Lenses
createWebhook_branchFilter :: Lens' CreateWebhook (Maybe Text) Source #
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
.
createWebhook_filterGroups :: Lens' CreateWebhook (Maybe [[WebhookFilter]]) Source #
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.
createWebhook_buildType :: Lens' CreateWebhook (Maybe WebhookBuildType) Source #
Specifies the type of build this webhook will trigger.
createWebhook_projectName :: Lens' CreateWebhook Text Source #
The name of the CodeBuild project.
Destructuring the Response
data CreateWebhookResponse Source #
See: newCreateWebhookResponse
smart constructor.
CreateWebhookResponse' | |
|
Instances
newCreateWebhookResponse Source #
Create a value of CreateWebhookResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:webhook:CreateWebhookResponse'
, createWebhookResponse_webhook
- Information about a webhook that connects repository events to a build
project in CodeBuild.
$sel:httpStatus:CreateWebhookResponse'
, createWebhookResponse_httpStatus
- The response's http status code.
Response Lenses
createWebhookResponse_webhook :: Lens' CreateWebhookResponse (Maybe Webhook) Source #
Information about a webhook that connects repository events to a build project in CodeBuild.
createWebhookResponse_httpStatus :: Lens' CreateWebhookResponse Int Source #
The response's http status code.