libZSservicesZSamazonka-codebuildZSamazonka-codebuild
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CodeBuild.CreateWebhook

Description

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

Creating a Request

data CreateWebhook Source #

See: newCreateWebhook smart constructor.

Constructors

CreateWebhook' 

Fields

  • branchFilter :: Maybe Text

    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.

  • filterGroups :: Maybe [[WebhookFilter]]

    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.

  • buildType :: Maybe WebhookBuildType

    Specifies the type of build this webhook will trigger.

  • projectName :: Text

    The name of the CodeBuild project.

Instances

Instances details
Eq CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Read CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Show CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Generic CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Associated Types

type Rep CreateWebhook :: Type -> Type #

NFData CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Methods

rnf :: CreateWebhook -> () #

Hashable CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

ToJSON CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

AWSRequest CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Associated Types

type AWSResponse CreateWebhook #

ToHeaders CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

ToPath CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

ToQuery CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

type Rep CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

type Rep CreateWebhook = D1 ('MetaData "CreateWebhook" "Amazonka.CodeBuild.CreateWebhook" "libZSservicesZSamazonka-codebuildZSamazonka-codebuild" 'False) (C1 ('MetaCons "CreateWebhook'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "branchFilter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "filterGroups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [[WebhookFilter]]))) :*: (S1 ('MetaSel ('Just "buildType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WebhookBuildType)) :*: S1 ('MetaSel ('Just "projectName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse CreateWebhook Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

newCreateWebhook Source #

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.

Constructors

CreateWebhookResponse' 

Fields

  • webhook :: Maybe Webhook

    Information about a webhook that connects repository events to a build project in CodeBuild.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CreateWebhookResponse Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Read CreateWebhookResponse Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Show CreateWebhookResponse Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Generic CreateWebhookResponse Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Associated Types

type Rep CreateWebhookResponse :: Type -> Type #

NFData CreateWebhookResponse Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

Methods

rnf :: CreateWebhookResponse -> () #

type Rep CreateWebhookResponse Source # 
Instance details

Defined in Amazonka.CodeBuild.CreateWebhook

type Rep CreateWebhookResponse = D1 ('MetaData "CreateWebhookResponse" "Amazonka.CodeBuild.CreateWebhook" "libZSservicesZSamazonka-codebuildZSamazonka-codebuild" 'False) (C1 ('MetaCons "CreateWebhookResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "webhook") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Webhook)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.