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.23.0 published on Thursday, Feb 22, 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.23.0 published on Thursday, Feb 22, 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

    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 = aws_codebuild_project.Example.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 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(aws_codebuild_project.Example.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
    	})
    }
    
    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(aws_codebuild_project.example().name())
                .buildType("BUILD")
                .filterGroups(WebhookFilterGroupArgs.builder()
                    .filters(                
                        WebhookFilterGroupFilterArgs.builder()
                            .type("EVENT")
                            .pattern("PUSH")
                            .build(),
                        WebhookFilterGroupFilterArgs.builder()
                            .type("BASE_REF")
                            .pattern("master")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.codebuild.Webhook("example",
        project_name=aws_codebuild_project["example"]["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",
                ),
            ],
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.codebuild.Webhook("example", {
        projectName: aws_codebuild_project.example.name,
        buildType: "BUILD",
        filterGroups: [{
            filters: [
                {
                    type: "EVENT",
                    pattern: "PUSH",
                },
                {
                    type: "BASE_REF",
                    pattern: "master",
                },
            ],
        }],
    });
    
    resources:
      example:
        type: aws:codebuild:Webhook
        properties:
          projectName: ${aws_codebuild_project.example.name}
          buildType: BUILD
          filterGroups:
            - filters:
                - type: EVENT
                  pattern: PUSH
                - type: BASE_REF
                  pattern: master
    

    GitHub Enterprise

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleWebhook = new Aws.CodeBuild.Webhook("exampleWebhook", new()
        {
            ProjectName = aws_codebuild_project.Example.Name,
        });
    
        var exampleRepositoryWebhook = new Github.RepositoryWebhook("exampleRepositoryWebhook", new()
        {
            Active = true,
            Events = new[]
            {
                "push",
            },
            Repository = github_repository.Example.Name,
            Configuration = new Github.Inputs.RepositoryWebhookConfigurationArgs
            {
                Url = exampleWebhook.PayloadUrl,
                Secret = exampleWebhook.Secret,
                ContentType = "json",
                InsecureSsl = false,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild"
    	"github.com/pulumi/pulumi-github/sdk/v5/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleWebhook, err := codebuild.NewWebhook(ctx, "exampleWebhook", &codebuild.WebhookArgs{
    			ProjectName: pulumi.Any(aws_codebuild_project.Example.Name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = github.NewRepositoryWebhook(ctx, "exampleRepositoryWebhook", &github.RepositoryWebhookArgs{
    			Active: pulumi.Bool(true),
    			Events: pulumi.StringArray{
    				pulumi.String("push"),
    			},
    			Repository: pulumi.Any(github_repository.Example.Name),
    			Configuration: &github.RepositoryWebhookConfigurationArgs{
    				Url:         exampleWebhook.PayloadUrl,
    				Secret:      exampleWebhook.Secret,
    				ContentType: pulumi.String("json"),
    				InsecureSsl: pulumi.Bool(false),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 exampleWebhook = new Webhook("exampleWebhook", WebhookArgs.builder()        
                .projectName(aws_codebuild_project.example().name())
                .build());
    
            var exampleRepositoryWebhook = new RepositoryWebhook("exampleRepositoryWebhook", RepositoryWebhookArgs.builder()        
                .active(true)
                .events("push")
                .repository(github_repository.example().name())
                .configuration(RepositoryWebhookConfigurationArgs.builder()
                    .url(exampleWebhook.payloadUrl())
                    .secret(exampleWebhook.secret())
                    .contentType("json")
                    .insecureSsl(false)
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_github as github
    
    example_webhook = aws.codebuild.Webhook("exampleWebhook", project_name=aws_codebuild_project["example"]["name"])
    example_repository_webhook = github.RepositoryWebhook("exampleRepositoryWebhook",
        active=True,
        events=["push"],
        repository=github_repository["example"]["name"],
        configuration=github.RepositoryWebhookConfigurationArgs(
            url=example_webhook.payload_url,
            secret=example_webhook.secret,
            content_type="json",
            insecure_ssl=False,
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as github from "@pulumi/github";
    
    const exampleWebhook = new aws.codebuild.Webhook("exampleWebhook", {projectName: aws_codebuild_project.example.name});
    const exampleRepositoryWebhook = new github.RepositoryWebhook("exampleRepositoryWebhook", {
        active: true,
        events: ["push"],
        repository: github_repository.example.name,
        configuration: {
            url: exampleWebhook.payloadUrl,
            secret: exampleWebhook.secret,
            contentType: "json",
            insecureSsl: false,
        },
    });
    
    resources:
      exampleWebhook:
        type: aws:codebuild:Webhook
        properties:
          projectName: ${aws_codebuild_project.example.name}
      exampleRepositoryWebhook:
        type: github:RepositoryWebhook
        properties:
          active: true
          events:
            - push
          repository: ${github_repository.example.name}
          configuration:
            url: ${exampleWebhook.payloadUrl}
            secret: ${exampleWebhook.secret}
            contentType: json
            insecureSsl: false
    

    Create Webhook Resource

    new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
    @overload
    def Webhook(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                branch_filter: Optional[str] = None,
                build_type: Optional[str] = None,
                filter_groups: Optional[Sequence[WebhookFilterGroupArgs]] = None,
                project_name: Optional[str] = None)
    @overload
    def Webhook(resource_name: str,
                args: WebhookArgs,
                opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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
    

    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.23.0 published on Thursday, Feb 22, 2024 by Pulumi