UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

111 lines 6.47 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Webhook = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * This resource manages Org Webhooks. * * A Webhook is a configuration that allows real-time events and data from the Org to be pushed to a provided url.\ * It enables the collection of information about various topics such as device events, alarms, and audits updates at the org level.\ * The Webhook can be set up and customized using the Mist API, allowing users to receive and analyze specific data from a particular site. * * ## Import * * Using `pulumi import`, import `mist_org_webhook` with: * * Org Webhook can be imported by specifying the org_id and the webhook_id * * ```sh * $ pulumi import junipermist:org/webhook:Webhook webhook_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309 * ``` */ class Webhook extends pulumi.CustomResource { /** * Get an existing Webhook 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, id, state, opts) { return new Webhook(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Webhook. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Webhook.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["headers"] = state ? state.headers : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["oauth2ClientId"] = state ? state.oauth2ClientId : undefined; resourceInputs["oauth2ClientSecret"] = state ? state.oauth2ClientSecret : undefined; resourceInputs["oauth2GrantType"] = state ? state.oauth2GrantType : undefined; resourceInputs["oauth2Password"] = state ? state.oauth2Password : undefined; resourceInputs["oauth2Scopes"] = state ? state.oauth2Scopes : undefined; resourceInputs["oauth2TokenUrl"] = state ? state.oauth2TokenUrl : undefined; resourceInputs["oauth2Username"] = state ? state.oauth2Username : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["secret"] = state ? state.secret : undefined; resourceInputs["singleEventPerMessage"] = state ? state.singleEventPerMessage : undefined; resourceInputs["splunkToken"] = state ? state.splunkToken : undefined; resourceInputs["topics"] = state ? state.topics : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["url"] = state ? state.url : undefined; resourceInputs["verifyCert"] = state ? state.verifyCert : undefined; } else { const args = argsOrState; if ((!args || args.orgId === undefined) && !opts.urn) { throw new Error("Missing required property 'orgId'"); } if ((!args || args.topics === undefined) && !opts.urn) { throw new Error("Missing required property 'topics'"); } if ((!args || args.url === undefined) && !opts.urn) { throw new Error("Missing required property 'url'"); } resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["headers"] = args ? args.headers : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["oauth2ClientId"] = args ? args.oauth2ClientId : undefined; resourceInputs["oauth2ClientSecret"] = (args === null || args === void 0 ? void 0 : args.oauth2ClientSecret) ? pulumi.secret(args.oauth2ClientSecret) : undefined; resourceInputs["oauth2GrantType"] = args ? args.oauth2GrantType : undefined; resourceInputs["oauth2Password"] = (args === null || args === void 0 ? void 0 : args.oauth2Password) ? pulumi.secret(args.oauth2Password) : undefined; resourceInputs["oauth2Scopes"] = args ? args.oauth2Scopes : undefined; resourceInputs["oauth2TokenUrl"] = args ? args.oauth2TokenUrl : undefined; resourceInputs["oauth2Username"] = args ? args.oauth2Username : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["secret"] = (args === null || args === void 0 ? void 0 : args.secret) ? pulumi.secret(args.secret) : undefined; resourceInputs["singleEventPerMessage"] = args ? args.singleEventPerMessage : undefined; resourceInputs["splunkToken"] = (args === null || args === void 0 ? void 0 : args.splunkToken) ? pulumi.secret(args.splunkToken) : undefined; resourceInputs["topics"] = args ? args.topics : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["url"] = args ? args.url : undefined; resourceInputs["verifyCert"] = args ? args.verifyCert : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["oauth2ClientSecret", "oauth2Password", "secret", "splunkToken"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Webhook.__pulumiType, name, resourceInputs, opts); } } exports.Webhook = Webhook; /** @internal */ Webhook.__pulumiType = 'junipermist:org/webhook:Webhook'; //# sourceMappingURL=webhook.js.map