@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
137 lines (136 loc) • 5.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* This resource allows you to create and manage webhooks for repositories within your
* GitHub organization or personal account.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* const repo = new github.Repository("repo", {
* name: "foo",
* description: "Terraform acceptance tests",
* homepageUrl: "http://example.com/",
* visibility: "public",
* });
* const foo = new github.RepositoryWebhook("foo", {
* repository: repo.name,
* configuration: {
* url: "https://google.de/",
* contentType: "form",
* insecureSsl: false,
* },
* active: false,
* events: ["issues"],
* });
* ```
*
* ## Import
*
* Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character.
* The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`.
*
* Importing uses the name of the repository, as well as the ID of the webhook, e.g.
*
* ```sh
* $ pulumi import github:index/repositoryWebhook:RepositoryWebhook terraform terraform/11235813
* ```
* If secret is populated in the webhook's configuration, the value will be imported as "********".
*/
export declare class RepositoryWebhook extends pulumi.CustomResource {
/**
* Get an existing RepositoryWebhook resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryWebhookState, opts?: pulumi.CustomResourceOptions): RepositoryWebhook;
/**
* Returns true if the given object is an instance of RepositoryWebhook. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is RepositoryWebhook;
/**
* Indicate if the webhook should receive events. Defaults to `true`.
*/
readonly active: pulumi.Output<boolean | undefined>;
/**
* Configuration block for the webhook. Detailed below.
*/
readonly configuration: pulumi.Output<outputs.RepositoryWebhookConfiguration | undefined>;
readonly etag: pulumi.Output<string>;
/**
* A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/).
*/
readonly events: pulumi.Output<string[]>;
/**
* The repository of the webhook.
*/
readonly repository: pulumi.Output<string>;
/**
* URL of the webhook. This is a sensitive attribute because it may include basic auth credentials.
*/
readonly url: pulumi.Output<string>;
/**
* Create a RepositoryWebhook resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: RepositoryWebhookArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RepositoryWebhook resources.
*/
export interface RepositoryWebhookState {
/**
* Indicate if the webhook should receive events. Defaults to `true`.
*/
active?: pulumi.Input<boolean>;
/**
* Configuration block for the webhook. Detailed below.
*/
configuration?: pulumi.Input<inputs.RepositoryWebhookConfiguration>;
etag?: pulumi.Input<string>;
/**
* A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/).
*/
events?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The repository of the webhook.
*/
repository?: pulumi.Input<string>;
/**
* URL of the webhook. This is a sensitive attribute because it may include basic auth credentials.
*/
url?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a RepositoryWebhook resource.
*/
export interface RepositoryWebhookArgs {
/**
* Indicate if the webhook should receive events. Defaults to `true`.
*/
active?: pulumi.Input<boolean>;
/**
* Configuration block for the webhook. Detailed below.
*/
configuration?: pulumi.Input<inputs.RepositoryWebhookConfiguration>;
/**
* A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/).
*/
events: pulumi.Input<pulumi.Input<string>[]>;
/**
* The repository of the webhook.
*/
repository: pulumi.Input<string>;
}