UNPKG

@pulumi/meraki

Version:

A Pulumi package for creating and managing Cisco Meraki resources. Based on terraform-provider-meraki: version v0.2.0

95 lines 4.41 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.WebhooksPayloadTemplates = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as meraki from "@pulumi/meraki"; * * const example = new meraki.networks.WebhooksPayloadTemplates("example", { * body: "{'event_type':'{{alertTypeId}}','client_payload':{'text':'{{alertData}}'}}", * bodyFile: "Qm9keSBGaWxl", * headers: [{ * name: "Authorization", * template: "Bearer {{sharedSecret}}", * }], * headersFile: "SGVhZGVycyBGaWxl", * name: "Custom Template", * networkId: "string", * }); * export const merakiNetworksWebhooksPayloadTemplatesExample = example; * ``` * * ## Import * * ```sh * $ pulumi import meraki:networks/webhooksPayloadTemplates:WebhooksPayloadTemplates example "network_id,payload_template_id" * ``` */ class WebhooksPayloadTemplates extends pulumi.CustomResource { /** * Get an existing WebhooksPayloadTemplates 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 WebhooksPayloadTemplates(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of WebhooksPayloadTemplates. 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'] === WebhooksPayloadTemplates.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["body"] = state ? state.body : undefined; resourceInputs["bodyFile"] = state ? state.bodyFile : undefined; resourceInputs["headers"] = state ? state.headers : undefined; resourceInputs["headersFile"] = state ? state.headersFile : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkId"] = state ? state.networkId : undefined; resourceInputs["payloadTemplateId"] = state ? state.payloadTemplateId : undefined; resourceInputs["sharing"] = state ? state.sharing : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.networkId === undefined) && !opts.urn) { throw new Error("Missing required property 'networkId'"); } resourceInputs["body"] = args ? args.body : undefined; resourceInputs["bodyFile"] = args ? args.bodyFile : undefined; resourceInputs["headers"] = args ? args.headers : undefined; resourceInputs["headersFile"] = args ? args.headersFile : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkId"] = args ? args.networkId : undefined; resourceInputs["payloadTemplateId"] = args ? args.payloadTemplateId : undefined; resourceInputs["sharing"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(WebhooksPayloadTemplates.__pulumiType, name, resourceInputs, opts); } } exports.WebhooksPayloadTemplates = WebhooksPayloadTemplates; /** @internal */ WebhooksPayloadTemplates.__pulumiType = 'meraki:networks/webhooksPayloadTemplates:WebhooksPayloadTemplates'; //# sourceMappingURL=webhooksPayloadTemplates.js.map