GitHub v6.3.0 published on Monday, Sep 16, 2024 by Pulumi
github.getRepositoryWebhooks
Explore with Pulumi AI
Use this data source to retrieve webhooks for a given repository.
Example Usage
To retrieve webhooks of a repository:
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const repo = github.getRepositoryWebhooks({
repository: "foo",
});
import pulumi
import pulumi_github as github
repo = github.get_repository_webhooks(repository="foo")
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.GetRepositoryWebhooks(ctx, &github.GetRepositoryWebhooksArgs{
Repository: "foo",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var repo = Github.GetRepositoryWebhooks.Invoke(new()
{
Repository = "foo",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetRepositoryWebhooksArgs;
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) {
final var repo = GithubFunctions.getRepositoryWebhooks(GetRepositoryWebhooksArgs.builder()
.repository("foo")
.build());
}
}
variables:
repo:
fn::invoke:
Function: github:getRepositoryWebhooks
Arguments:
repository: foo
Using getRepositoryWebhooks
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRepositoryWebhooks(args: GetRepositoryWebhooksArgs, opts?: InvokeOptions): Promise<GetRepositoryWebhooksResult>
function getRepositoryWebhooksOutput(args: GetRepositoryWebhooksOutputArgs, opts?: InvokeOptions): Output<GetRepositoryWebhooksResult>
def get_repository_webhooks(repository: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryWebhooksResult
def get_repository_webhooks_output(repository: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryWebhooksResult]
func GetRepositoryWebhooks(ctx *Context, args *GetRepositoryWebhooksArgs, opts ...InvokeOption) (*GetRepositoryWebhooksResult, error)
func GetRepositoryWebhooksOutput(ctx *Context, args *GetRepositoryWebhooksOutputArgs, opts ...InvokeOption) GetRepositoryWebhooksResultOutput
> Note: This function is named GetRepositoryWebhooks
in the Go SDK.
public static class GetRepositoryWebhooks
{
public static Task<GetRepositoryWebhooksResult> InvokeAsync(GetRepositoryWebhooksArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryWebhooksResult> Invoke(GetRepositoryWebhooksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRepositoryWebhooksResult> getRepositoryWebhooks(GetRepositoryWebhooksArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: github:index/getRepositoryWebhooks:getRepositoryWebhooks
arguments:
# arguments dictionary
The following arguments are supported:
- Repository string
- Repository string
- repository String
- repository string
- repository str
- repository String
getRepositoryWebhooks Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository string
- Webhooks
List<Get
Repository Webhooks Webhook> - An Array of GitHub Webhooks. Each
webhook
block consists of the fields documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository string
- Webhooks
[]Get
Repository Webhooks Webhook - An Array of GitHub Webhooks. Each
webhook
block consists of the fields documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- repository String
- webhooks
List<Get
Repository Webhooks Webhook> - An Array of GitHub Webhooks. Each
webhook
block consists of the fields documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- repository string
- webhooks
Get
Repository Webhooks Webhook[] - An Array of GitHub Webhooks. Each
webhook
block consists of the fields documented below.
- id str
- The provider-assigned unique ID for this managed resource.
- repository str
- webhooks
Sequence[Get
Repository Webhooks Webhook] - An Array of GitHub Webhooks. Each
webhook
block consists of the fields documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- repository String
- webhooks List<Property Map>
- An Array of GitHub Webhooks. Each
webhook
block consists of the fields documented below.
Supporting Types
GetRepositoryWebhooksWebhook
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
github
Terraform Provider.