1. Packages
  2. AWS Classic
  3. API Docs
  4. codebuild
  5. Webhook

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

aws.codebuild.Webhook

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

    Manages a CodeBuild webhook, which is an endpoint accepted by the CodeBuild service to trigger builds from source code repositories. Depending on the source type of the CodeBuild project, the CodeBuild service may also automatically create and delete the actual repository webhook as well.

    Example Usage

    Bitbucket and GitHub

    When working with Bitbucket and GitHub source CodeBuild webhooks, the CodeBuild service will automatically create (on aws.codebuild.Webhook resource creation) and delete (on aws.codebuild.Webhook resource deletion) the Bitbucket/GitHub repository webhook using its granted OAuth permissions. This behavior cannot be controlled by this provider.

    Note: The AWS account that this provider uses to create this resource must have authorized CodeBuild to access Bitbucket/GitHub’s OAuth API in each applicable region. This is a manual step that must be done before creating webhooks with this resource. If OAuth is not configured, AWS will return an error similar to ResourceNotFoundException: Could not find access token for server type github. More information can be found in the CodeBuild User Guide for Bitbucket and GitHub.

    Note: Further managing the automatically created Bitbucket/GitHub webhook with the bitbucket_hook/github_repository_webhook resource is only possible with importing that resource after creation of the aws.codebuild.Webhook resource. The CodeBuild API does not ever provide the secret attribute for the aws.codebuild.Webhook resource in this scenario.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.codebuild.Webhook("example", {
        projectName: exampleAwsCodebuildProject.name,
        buildType: "BUILD",
        filterGroups: [{
            filters: [
                {
                    type: "EVENT",
                    pattern: "PUSH",
                },
                {
                    type: "BASE_REF",
                    pattern: "master",
                },
            ],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.codebuild.Webhook("example",
        project_name=example_aws_codebuild_project["name"],
        build_type="BUILD",
        filter_groups=[aws.codebuild.WebhookFilterGroupArgs(
            filters=[
                aws.codebuild.WebhookFilterGroupFilterArgs(
                    type="EVENT",
                    pattern="PUSH",
                ),
                aws.codebuild.WebhookFilterGroupFilterArgs(
                    type="BASE_REF",
                    pattern="master",
                ),
            ],
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codebuild.NewWebhook(ctx, "example", &codebuild.WebhookArgs{
    			ProjectName: pulumi.Any(exampleAwsCodebuildProject.Name),
    			BuildType:   pulumi.String("BUILD"),
    			FilterGroups: codebuild.WebhookFilterGroupArray{
    				&codebuild.WebhookFilterGroupArgs{
    					Filters: codebuild.WebhookFilterGroupFilterArray{
    						&codebuild.WebhookFilterGroupFilterArgs{
    							Type:    pulumi.String("EVENT"),
    							Pattern: pulumi.String("PUSH"),
    						},
    						&codebuild.WebhookFilterGroupFilterArgs{
    							Type:    pulumi.String("BASE_REF"),
    							Pattern: pulumi.String("master"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.CodeBuild.Webhook("example", new()
        {
            ProjectName = exampleAwsCodebuildProject.Name,
            BuildType = "BUILD",
            FilterGroups = new[]
            {
                new Aws.CodeBuild.Inputs.WebhookFilterGroupArgs
                {
                    Filters = new[]
                    {
                        new Aws.CodeBuild.Inputs.WebhookFilterGroupFilterArgs
                        {
                            Type = "EVENT",
                            Pattern = "PUSH",
                        },
                        new Aws.CodeBuild.Inputs.WebhookFilterGroupFilterArgs
                        {
                            Type = "BASE_REF",
                            Pattern = "master",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.codebuild.Webhook;
    import com.pulumi.aws.codebuild.WebhookArgs;
    import com.pulumi.aws.codebuild.inputs.WebhookFilterGroupArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Webhook("example", WebhookArgs.builder()        
                .projectName(exampleAwsCodebuildProject.name())
                .buildType("BUILD")
                .filterGroups(WebhookFilterGroupArgs.builder()
                    .filters(                
                        WebhookFilterGroupFilterArgs.builder()
                            .type("EVENT")
                            .pattern("PUSH")
                            .build(),
                        WebhookFilterGroupFilterArgs.builder()
                            .type("BASE_REF")
                            .pattern("master")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:codebuild:Webhook
        properties:
          projectName: ${exampleAwsCodebuildProject.name}
          buildType: BUILD
          filterGroups:
            - filters:
                - type: EVENT
                  pattern: PUSH
                - type: BASE_REF
                  pattern: master
    

    GitHub Enterprise

    When working with GitHub Enterprise source CodeBuild webhooks, the GHE repository webhook must be separately managed (e.g., manually or with the github_repository_webhook resource).

    More information creating webhooks with GitHub Enterprise can be found in the CodeBuild User Guide.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.codebuild.Webhook;
    import com.pulumi.aws.codebuild.WebhookArgs;
    import com.pulumi.github.RepositoryWebhook;
    import com.pulumi.github.RepositoryWebhookArgs;
    import com.pulumi.github.inputs.RepositoryWebhookConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Webhook("example", WebhookArgs.builder()        
                .projectName(exampleAwsCodebuildProject.name())
                .build());
    
            var exampleRepositoryWebhook = new RepositoryWebhook("exampleRepositoryWebhook", RepositoryWebhookArgs.builder()        
                .active(true)
                .events("push")
                .name("example")
                .repository(exampleGithubRepository.name())
                .configuration(RepositoryWebhookConfigurationArgs.builder()
                    .url(example.payloadUrl())
                    .secret(example.secret())
                    .contentType("json")
                    .insecureSsl(false)
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:codebuild:Webhook
        properties:
          projectName: ${exampleAwsCodebuildProject.name}
      exampleRepositoryWebhook:
        type: github:RepositoryWebhook
        name: example
        properties:
          active: true
          events:
            - push
          name: example
          repository: ${exampleGithubRepository.name}
          configuration:
            url: ${example.payloadUrl}
            secret: ${example.secret}
            contentType: json
            insecureSsl: false
    

    Create Webhook Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
    @overload
    def Webhook(resource_name: str,
                args: WebhookArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Webhook(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                project_name: Optional[str] = None,
                branch_filter: Optional[str] = None,
                build_type: Optional[str] = None,
                filter_groups: Optional[Sequence[WebhookFilterGroupArgs]] = None)
    func NewWebhook(ctx *Context, name string, args WebhookArgs, opts ...ResourceOption) (*Webhook, error)
    public Webhook(string name, WebhookArgs args, CustomResourceOptions? opts = null)
    public Webhook(String name, WebhookArgs args)
    public Webhook(String name, WebhookArgs args, CustomResourceOptions options)
    
    type: aws:codebuild:Webhook
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var awsWebhookResource = new Aws.CodeBuild.Webhook("awsWebhookResource", new()
    {
        ProjectName = "string",
        BranchFilter = "string",
        BuildType = "string",
        FilterGroups = new[]
        {
            new Aws.CodeBuild.Inputs.WebhookFilterGroupArgs
            {
                Filters = new[]
                {
                    new Aws.CodeBuild.Inputs.WebhookFilterGroupFilterArgs
                    {
                        Pattern = "string",
                        Type = "string",
                        ExcludeMatchedPattern = false,
                    },
                },
            },
        },
    });
    
    example, err := codebuild.NewWebhook(ctx, "awsWebhookResource", &codebuild.WebhookArgs{
    	ProjectName:  pulumi.String("string"),
    	BranchFilter: pulumi.String("string"),
    	BuildType:    pulumi.String("string"),
    	FilterGroups: codebuild.WebhookFilterGroupArray{
    		&codebuild.WebhookFilterGroupArgs{
    			Filters: codebuild.WebhookFilterGroupFilterArray{
    				&codebuild.WebhookFilterGroupFilterArgs{
    					Pattern:               pulumi.String("string"),
    					Type:                  pulumi.String("string"),
    					ExcludeMatchedPattern: pulumi.Bool(false),
    				},
    			},
    		},
    	},
    })
    
    var awsWebhookResource = new Webhook("awsWebhookResource", WebhookArgs.builder()        
        .projectName("string")
        .branchFilter("string")
        .buildType("string")
        .filterGroups(WebhookFilterGroupArgs.builder()
            .filters(WebhookFilterGroupFilterArgs.builder()
                .pattern("string")
                .type("string")
                .excludeMatchedPattern(false)
                .build())
            .build())
        .build());
    
    aws_webhook_resource = aws.codebuild.Webhook("awsWebhookResource",
        project_name="string",
        branch_filter="string",
        build_type="string",
        filter_groups=[aws.codebuild.WebhookFilterGroupArgs(
            filters=[aws.codebuild.WebhookFilterGroupFilterArgs(
                pattern="string",
                type="string",
                exclude_matched_pattern=False,
            )],
        )])
    
    const awsWebhookResource = new aws.codebuild.Webhook("awsWebhookResource", {
        projectName: "string",
        branchFilter: "string",
        buildType: "string",
        filterGroups: [{
            filters: [{
                pattern: "string",
                type: "string",
                excludeMatchedPattern: false,
            }],
        }],
    });
    
    type: aws:codebuild:Webhook
    properties:
        branchFilter: string
        buildType: string
        filterGroups:
            - filters:
                - excludeMatchedPattern: false
                  pattern: string
                  type: string
        projectName: string
    

    Webhook Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Webhook resource accepts the following input properties:

    ProjectName string
    The name of the build project.
    BranchFilter string
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    BuildType string
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    FilterGroups List<WebhookFilterGroup>
    Information about the webhook's trigger. Filter group blocks are documented below.
    ProjectName string
    The name of the build project.
    BranchFilter string
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    BuildType string
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    FilterGroups []WebhookFilterGroupArgs
    Information about the webhook's trigger. Filter group blocks are documented below.
    projectName String
    The name of the build project.
    branchFilter String
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    buildType String
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    filterGroups List<WebhookFilterGroup>
    Information about the webhook's trigger. Filter group blocks are documented below.
    projectName string
    The name of the build project.
    branchFilter string
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    buildType string
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    filterGroups WebhookFilterGroup[]
    Information about the webhook's trigger. Filter group blocks are documented below.
    project_name str
    The name of the build project.
    branch_filter str
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    build_type str
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    filter_groups Sequence[WebhookFilterGroupArgs]
    Information about the webhook's trigger. Filter group blocks are documented below.
    projectName String
    The name of the build project.
    branchFilter String
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    buildType String
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    filterGroups List<Property Map>
    Information about the webhook's trigger. Filter group blocks are documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Webhook resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PayloadUrl string
    The CodeBuild endpoint where webhook events are sent.
    Secret string
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    Url string
    The URL to the webhook.
    Id string
    The provider-assigned unique ID for this managed resource.
    PayloadUrl string
    The CodeBuild endpoint where webhook events are sent.
    Secret string
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    Url string
    The URL to the webhook.
    id String
    The provider-assigned unique ID for this managed resource.
    payloadUrl String
    The CodeBuild endpoint where webhook events are sent.
    secret String
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    url String
    The URL to the webhook.
    id string
    The provider-assigned unique ID for this managed resource.
    payloadUrl string
    The CodeBuild endpoint where webhook events are sent.
    secret string
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    url string
    The URL to the webhook.
    id str
    The provider-assigned unique ID for this managed resource.
    payload_url str
    The CodeBuild endpoint where webhook events are sent.
    secret str
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    url str
    The URL to the webhook.
    id String
    The provider-assigned unique ID for this managed resource.
    payloadUrl String
    The CodeBuild endpoint where webhook events are sent.
    secret String
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    url String
    The URL to the webhook.

    Look up Existing Webhook Resource

    Get an existing Webhook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: WebhookState, opts?: CustomResourceOptions): Webhook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            branch_filter: Optional[str] = None,
            build_type: Optional[str] = None,
            filter_groups: Optional[Sequence[WebhookFilterGroupArgs]] = None,
            payload_url: Optional[str] = None,
            project_name: Optional[str] = None,
            secret: Optional[str] = None,
            url: Optional[str] = None) -> Webhook
    func GetWebhook(ctx *Context, name string, id IDInput, state *WebhookState, opts ...ResourceOption) (*Webhook, error)
    public static Webhook Get(string name, Input<string> id, WebhookState? state, CustomResourceOptions? opts = null)
    public static Webhook get(String name, Output<String> id, WebhookState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BranchFilter string
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    BuildType string
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    FilterGroups List<WebhookFilterGroup>
    Information about the webhook's trigger. Filter group blocks are documented below.
    PayloadUrl string
    The CodeBuild endpoint where webhook events are sent.
    ProjectName string
    The name of the build project.
    Secret string
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    Url string
    The URL to the webhook.
    BranchFilter string
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    BuildType string
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    FilterGroups []WebhookFilterGroupArgs
    Information about the webhook's trigger. Filter group blocks are documented below.
    PayloadUrl string
    The CodeBuild endpoint where webhook events are sent.
    ProjectName string
    The name of the build project.
    Secret string
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    Url string
    The URL to the webhook.
    branchFilter String
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    buildType String
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    filterGroups List<WebhookFilterGroup>
    Information about the webhook's trigger. Filter group blocks are documented below.
    payloadUrl String
    The CodeBuild endpoint where webhook events are sent.
    projectName String
    The name of the build project.
    secret String
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    url String
    The URL to the webhook.
    branchFilter string
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    buildType string
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    filterGroups WebhookFilterGroup[]
    Information about the webhook's trigger. Filter group blocks are documented below.
    payloadUrl string
    The CodeBuild endpoint where webhook events are sent.
    projectName string
    The name of the build project.
    secret string
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    url string
    The URL to the webhook.
    branch_filter str
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    build_type str
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    filter_groups Sequence[WebhookFilterGroupArgs]
    Information about the webhook's trigger. Filter group blocks are documented below.
    payload_url str
    The CodeBuild endpoint where webhook events are sent.
    project_name str
    The name of the build project.
    secret str
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    url str
    The URL to the webhook.
    branchFilter String
    A regular expression used to determine which branches get built. Default is all branches are built. We recommend using filter_group over branch_filter.
    buildType String
    The type of build this webhook will trigger. Valid values for this parameter are: BUILD, BUILD_BATCH.
    filterGroups List<Property Map>
    Information about the webhook's trigger. Filter group blocks are documented below.
    payloadUrl String
    The CodeBuild endpoint where webhook events are sent.
    projectName String
    The name of the build project.
    secret String
    The secret token of the associated repository. Not returned by the CodeBuild API for all source types.
    url String
    The URL to the webhook.

    Supporting Types

    WebhookFilterGroup, WebhookFilterGroupArgs

    Filters List<WebhookFilterGroupFilter>
    A webhook filter for the group. Filter blocks are documented below.
    Filters []WebhookFilterGroupFilter
    A webhook filter for the group. Filter blocks are documented below.
    filters List<WebhookFilterGroupFilter>
    A webhook filter for the group. Filter blocks are documented below.
    filters WebhookFilterGroupFilter[]
    A webhook filter for the group. Filter blocks are documented below.
    filters Sequence[WebhookFilterGroupFilter]
    A webhook filter for the group. Filter blocks are documented below.
    filters List<Property Map>
    A webhook filter for the group. Filter blocks are documented below.

    WebhookFilterGroupFilter, WebhookFilterGroupFilterArgs

    Pattern string
    For a filter that uses EVENT type, a comma-separated string that specifies one event: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED. PULL_REQUEST_MERGED works with GitHub & GitHub Enterprise only. For a filter that uses any of the other filter types, a regular expression.
    Type string
    The webhook filter group's type. Valid values for this parameter are: EVENT, BASE_REF, HEAD_REF, ACTOR_ACCOUNT_ID, FILE_PATH, COMMIT_MESSAGE. At least one filter group must specify EVENT as its type.
    ExcludeMatchedPattern bool
    If set to true, the specified filter does not trigger a build. Defaults to false.
    Pattern string
    For a filter that uses EVENT type, a comma-separated string that specifies one event: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED. PULL_REQUEST_MERGED works with GitHub & GitHub Enterprise only. For a filter that uses any of the other filter types, a regular expression.
    Type string
    The webhook filter group's type. Valid values for this parameter are: EVENT, BASE_REF, HEAD_REF, ACTOR_ACCOUNT_ID, FILE_PATH, COMMIT_MESSAGE. At least one filter group must specify EVENT as its type.
    ExcludeMatchedPattern bool
    If set to true, the specified filter does not trigger a build. Defaults to false.
    pattern String
    For a filter that uses EVENT type, a comma-separated string that specifies one event: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED. PULL_REQUEST_MERGED works with GitHub & GitHub Enterprise only. For a filter that uses any of the other filter types, a regular expression.
    type String
    The webhook filter group's type. Valid values for this parameter are: EVENT, BASE_REF, HEAD_REF, ACTOR_ACCOUNT_ID, FILE_PATH, COMMIT_MESSAGE. At least one filter group must specify EVENT as its type.
    excludeMatchedPattern Boolean
    If set to true, the specified filter does not trigger a build. Defaults to false.
    pattern string
    For a filter that uses EVENT type, a comma-separated string that specifies one event: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED. PULL_REQUEST_MERGED works with GitHub & GitHub Enterprise only. For a filter that uses any of the other filter types, a regular expression.
    type string
    The webhook filter group's type. Valid values for this parameter are: EVENT, BASE_REF, HEAD_REF, ACTOR_ACCOUNT_ID, FILE_PATH, COMMIT_MESSAGE. At least one filter group must specify EVENT as its type.
    excludeMatchedPattern boolean
    If set to true, the specified filter does not trigger a build. Defaults to false.
    pattern str
    For a filter that uses EVENT type, a comma-separated string that specifies one event: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED. PULL_REQUEST_MERGED works with GitHub & GitHub Enterprise only. For a filter that uses any of the other filter types, a regular expression.
    type str
    The webhook filter group's type. Valid values for this parameter are: EVENT, BASE_REF, HEAD_REF, ACTOR_ACCOUNT_ID, FILE_PATH, COMMIT_MESSAGE. At least one filter group must specify EVENT as its type.
    exclude_matched_pattern bool
    If set to true, the specified filter does not trigger a build. Defaults to false.
    pattern String
    For a filter that uses EVENT type, a comma-separated string that specifies one event: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED. PULL_REQUEST_MERGED works with GitHub & GitHub Enterprise only. For a filter that uses any of the other filter types, a regular expression.
    type String
    The webhook filter group's type. Valid values for this parameter are: EVENT, BASE_REF, HEAD_REF, ACTOR_ACCOUNT_ID, FILE_PATH, COMMIT_MESSAGE. At least one filter group must specify EVENT as its type.
    excludeMatchedPattern Boolean
    If set to true, the specified filter does not trigger a build. Defaults to false.

    Import

    Using pulumi import, import CodeBuild Webhooks using the CodeBuild Project name. For example:

    $ pulumi import aws:codebuild/webhook:Webhook example MyProjectName
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi