UNPKG

pulumi-stripe

Version:

A Pulumi package for creating and managing Stripe resources.

158 lines (157 loc) 7.03 kB
import * as pulumi from "@pulumi/pulumi"; /** * With this resource, you can create a webhook endpoint - [Stripe API webhook endpoint documentation](https://stripe.com/docs/api/webhook_endpoints). * * You can configure webhook endpoints via the API to be notified about events that happen in your Stripe account or connected accounts. * * ## Example Usage * * <!--Start PulumiCodeChooser --> * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as stripe from "pulumi-stripe"; * * const webhook = new stripe.WebhookEndpoint("webhook", { * description: "example of webhook", * enabledEvents: [ * "customer.subscription.created", * "customer.subscription.updated", * ], * url: "https://webhook-url-consumer.com", * }); * ``` * <!--End PulumiCodeChooser --> */ export declare class WebhookEndpoint extends pulumi.CustomResource { /** * Get an existing WebhookEndpoint 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?: WebhookEndpointState, opts?: pulumi.CustomResourceOptions): WebhookEndpoint; /** * Returns true if the given object is an instance of WebhookEndpoint. 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 WebhookEndpoint; /** * String. Events sent to this endpoint will be generated with this Stripe Version instead of your account’s default Stripe Version. */ readonly apiVersion: pulumi.Output<string | undefined>; /** * Bool. Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ readonly connect: pulumi.Output<boolean | undefined>; /** * String. Description of what the webhook is used for. */ readonly description: pulumi.Output<string | undefined>; /** * Bool. Disable the webhook endpoint if set to `true`. Can be used only for modification already existing webhook endpoint. */ readonly disabled: pulumi.Output<boolean | undefined>; /** * List(String). The list of events to enable for this endpoint. `[*]` indicates that all events are enabled, except those that require explicit selection. All supported events listed here: [Stripe event types](https://stripe.com/docs/api/events/types). */ readonly enabledEvents: pulumi.Output<string[]>; /** * Map(String). Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * String. The endpoint’s secret, used to generate webhook signatures. This field is marked as `sensitive`. */ readonly secret: pulumi.Output<string>; /** * String. The URL of the webhook endpoint. */ readonly url: pulumi.Output<string>; /** * Create a WebhookEndpoint 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: WebhookEndpointArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering WebhookEndpoint resources. */ export interface WebhookEndpointState { /** * String. Events sent to this endpoint will be generated with this Stripe Version instead of your account’s default Stripe Version. */ apiVersion?: pulumi.Input<string>; /** * Bool. Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ connect?: pulumi.Input<boolean>; /** * String. Description of what the webhook is used for. */ description?: pulumi.Input<string>; /** * Bool. Disable the webhook endpoint if set to `true`. Can be used only for modification already existing webhook endpoint. */ disabled?: pulumi.Input<boolean>; /** * List(String). The list of events to enable for this endpoint. `[*]` indicates that all events are enabled, except those that require explicit selection. All supported events listed here: [Stripe event types](https://stripe.com/docs/api/events/types). */ enabledEvents?: pulumi.Input<pulumi.Input<string>[]>; /** * Map(String). Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * String. The endpoint’s secret, used to generate webhook signatures. This field is marked as `sensitive`. */ secret?: pulumi.Input<string>; /** * String. The URL of the webhook endpoint. */ url?: pulumi.Input<string>; } /** * The set of arguments for constructing a WebhookEndpoint resource. */ export interface WebhookEndpointArgs { /** * String. Events sent to this endpoint will be generated with this Stripe Version instead of your account’s default Stripe Version. */ apiVersion?: pulumi.Input<string>; /** * Bool. Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ connect?: pulumi.Input<boolean>; /** * String. Description of what the webhook is used for. */ description?: pulumi.Input<string>; /** * Bool. Disable the webhook endpoint if set to `true`. Can be used only for modification already existing webhook endpoint. */ disabled?: pulumi.Input<boolean>; /** * List(String). The list of events to enable for this endpoint. `[*]` indicates that all events are enabled, except those that require explicit selection. All supported events listed here: [Stripe event types](https://stripe.com/docs/api/events/types). */ enabledEvents: pulumi.Input<pulumi.Input<string>[]>; /** * Map(String). Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * String. The URL of the webhook endpoint. */ url: pulumi.Input<string>; }