@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
252 lines (251 loc) • 11 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/outgoing_webhooks/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const myTeam = grafana.oss.getTeam({
* name: "my team",
* });
* const myTeamGetTeam = myTeam.then(myTeam => grafana.onCall.getTeam({
* name: myTeam.name,
* }));
* const test_acc_outgoingWebhook = new grafana.oncall.OutgoingWebhook("test-acc-outgoing_webhook", {
* name: "my outgoing webhook",
* url: "https://example.com/",
* teamId: myTeamGetTeam.then(myTeamGetTeam => myTeamGetTeam.id),
* });
* const test_acc_outgoingWebhook_incident = new grafana.oncall.OutgoingWebhook("test-acc-outgoing_webhook-incident", {
* name: "my outgoing incident webhook",
* preset: "incident_webhook",
* httpMethod: "POST",
* url: "https://example.com/",
* triggerType: "incident declared",
* });
* ```
*
* ## Import
*
* ```sh
* terraform import grafana_oncall_outgoing_webhook.name "{{ id }}"
* ```
*/
export declare class OutgoingWebhook extends pulumi.CustomResource {
/**
* Get an existing OutgoingWebhook 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?: OutgoingWebhookState, opts?: pulumi.CustomResourceOptions): OutgoingWebhook;
/**
* Returns true if the given object is an instance of OutgoingWebhook. 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 OutgoingWebhook;
/**
* The auth data of the webhook. Used in Authorization header instead of user/password auth.
*/
readonly authorizationHeader: pulumi.Output<string | undefined>;
/**
* The data of the webhook.
*/
readonly data: pulumi.Output<string | undefined>;
/**
* Toggle to send the entire webhook payload instead of using the values in the Data field.
*/
readonly forwardWholePayload: pulumi.Output<boolean | undefined>;
/**
* Headers to add to the outgoing webhook request.
*/
readonly headers: pulumi.Output<string | undefined>;
/**
* The HTTP method used in the request made by the outgoing webhook. Defaults to `POST`.
*/
readonly httpMethod: pulumi.Output<string | undefined>;
/**
* Restricts the outgoing webhook to only trigger if the event came from a selected integration. If no integrations are selected the outgoing webhook will trigger for any integration.
*/
readonly integrationFilters: pulumi.Output<string[] | undefined>;
/**
* Controls whether the outgoing webhook will trigger or is ignored. Defaults to `true`.
*/
readonly isWebhookEnabled: pulumi.Output<boolean | undefined>;
/**
* The name of the outgoing webhook.
*/
readonly name: pulumi.Output<string>;
/**
* The auth data of the webhook. Used for Basic authentication
*/
readonly password: pulumi.Output<string | undefined>;
/**
* The preset of the outgoing webhook. Possible values are: `simpleWebhook`, `advancedWebhook`, `grafanaSift`, `grafanaAssistant`, `incidentWebhook`. If no preset is set, the default preset is `advancedWebhook`.
*/
readonly preset: pulumi.Output<string | undefined>;
/**
* The ID of the OnCall team (using the `grafana.onCall.getTeam` datasource).
*/
readonly teamId: pulumi.Output<string | undefined>;
/**
* A template used to dynamically determine whether the webhook should execute based on the content of the payload.
*/
readonly triggerTemplate: pulumi.Output<string | undefined>;
/**
* The type of event that will cause this outgoing webhook to execute. The events available will depend on the preset used. For alert group webhooks, the possible triggers are: `escalation`, `alert group created`, `status change`, `acknowledge`, `resolve`, `silence`, `unsilence`, `unresolve`, `unacknowledge`, `resolution note added`, `personal notification`; for incident webhooks: `incident declared`, `incident changed`, `incident resolved`. Defaults to `escalation`.
*/
readonly triggerType: pulumi.Output<string | undefined>;
/**
* The webhook URL. Required when not using a preset that controls this field.
*/
readonly url: pulumi.Output<string | undefined>;
/**
* Username to use when making the outgoing webhook request.
*/
readonly user: pulumi.Output<string | undefined>;
/**
* Create a OutgoingWebhook 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?: OutgoingWebhookArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering OutgoingWebhook resources.
*/
export interface OutgoingWebhookState {
/**
* The auth data of the webhook. Used in Authorization header instead of user/password auth.
*/
authorizationHeader?: pulumi.Input<string>;
/**
* The data of the webhook.
*/
data?: pulumi.Input<string>;
/**
* Toggle to send the entire webhook payload instead of using the values in the Data field.
*/
forwardWholePayload?: pulumi.Input<boolean>;
/**
* Headers to add to the outgoing webhook request.
*/
headers?: pulumi.Input<string>;
/**
* The HTTP method used in the request made by the outgoing webhook. Defaults to `POST`.
*/
httpMethod?: pulumi.Input<string>;
/**
* Restricts the outgoing webhook to only trigger if the event came from a selected integration. If no integrations are selected the outgoing webhook will trigger for any integration.
*/
integrationFilters?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Controls whether the outgoing webhook will trigger or is ignored. Defaults to `true`.
*/
isWebhookEnabled?: pulumi.Input<boolean>;
/**
* The name of the outgoing webhook.
*/
name?: pulumi.Input<string>;
/**
* The auth data of the webhook. Used for Basic authentication
*/
password?: pulumi.Input<string>;
/**
* The preset of the outgoing webhook. Possible values are: `simpleWebhook`, `advancedWebhook`, `grafanaSift`, `grafanaAssistant`, `incidentWebhook`. If no preset is set, the default preset is `advancedWebhook`.
*/
preset?: pulumi.Input<string>;
/**
* The ID of the OnCall team (using the `grafana.onCall.getTeam` datasource).
*/
teamId?: pulumi.Input<string>;
/**
* A template used to dynamically determine whether the webhook should execute based on the content of the payload.
*/
triggerTemplate?: pulumi.Input<string>;
/**
* The type of event that will cause this outgoing webhook to execute. The events available will depend on the preset used. For alert group webhooks, the possible triggers are: `escalation`, `alert group created`, `status change`, `acknowledge`, `resolve`, `silence`, `unsilence`, `unresolve`, `unacknowledge`, `resolution note added`, `personal notification`; for incident webhooks: `incident declared`, `incident changed`, `incident resolved`. Defaults to `escalation`.
*/
triggerType?: pulumi.Input<string>;
/**
* The webhook URL. Required when not using a preset that controls this field.
*/
url?: pulumi.Input<string>;
/**
* Username to use when making the outgoing webhook request.
*/
user?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a OutgoingWebhook resource.
*/
export interface OutgoingWebhookArgs {
/**
* The auth data of the webhook. Used in Authorization header instead of user/password auth.
*/
authorizationHeader?: pulumi.Input<string>;
/**
* The data of the webhook.
*/
data?: pulumi.Input<string>;
/**
* Toggle to send the entire webhook payload instead of using the values in the Data field.
*/
forwardWholePayload?: pulumi.Input<boolean>;
/**
* Headers to add to the outgoing webhook request.
*/
headers?: pulumi.Input<string>;
/**
* The HTTP method used in the request made by the outgoing webhook. Defaults to `POST`.
*/
httpMethod?: pulumi.Input<string>;
/**
* Restricts the outgoing webhook to only trigger if the event came from a selected integration. If no integrations are selected the outgoing webhook will trigger for any integration.
*/
integrationFilters?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Controls whether the outgoing webhook will trigger or is ignored. Defaults to `true`.
*/
isWebhookEnabled?: pulumi.Input<boolean>;
/**
* The name of the outgoing webhook.
*/
name?: pulumi.Input<string>;
/**
* The auth data of the webhook. Used for Basic authentication
*/
password?: pulumi.Input<string>;
/**
* The preset of the outgoing webhook. Possible values are: `simpleWebhook`, `advancedWebhook`, `grafanaSift`, `grafanaAssistant`, `incidentWebhook`. If no preset is set, the default preset is `advancedWebhook`.
*/
preset?: pulumi.Input<string>;
/**
* The ID of the OnCall team (using the `grafana.onCall.getTeam` datasource).
*/
teamId?: pulumi.Input<string>;
/**
* A template used to dynamically determine whether the webhook should execute based on the content of the payload.
*/
triggerTemplate?: pulumi.Input<string>;
/**
* The type of event that will cause this outgoing webhook to execute. The events available will depend on the preset used. For alert group webhooks, the possible triggers are: `escalation`, `alert group created`, `status change`, `acknowledge`, `resolve`, `silence`, `unsilence`, `unresolve`, `unacknowledge`, `resolution note added`, `personal notification`; for incident webhooks: `incident declared`, `incident changed`, `incident resolved`. Defaults to `escalation`.
*/
triggerType?: pulumi.Input<string>;
/**
* The webhook URL. Required when not using a preset that controls this field.
*/
url?: pulumi.Input<string>;
/**
* Username to use when making the outgoing webhook request.
*/
user?: pulumi.Input<string>;
}