UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

103 lines 4.92 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.AlarmWebhookIntegration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage tls alarm webhook integration * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.tls.AlarmWebhookIntegration("foo", { * webhookHeaders: [{ * key: "Content-Type", * value: "application/json", * }], * webhookMethod: "PUT", * webhookName: "terraform-tf-webhook", * webhookSecret: "your secret", * webhookType: "lark", * webhookUrl: "http://zijie.com", * }); * ``` * * ## Import * * tls alarm webhook integration can be imported using the alarm_webhook_integration_id, e.g. * * ```sh * $ pulumi import volcengine:tls/alarmWebhookIntegration:AlarmWebhookIntegration default alarm-webhook-integration-123456 * ``` */ class AlarmWebhookIntegration extends pulumi.CustomResource { /** * Get an existing AlarmWebhookIntegration 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 AlarmWebhookIntegration(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AlarmWebhookIntegration. 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'] === AlarmWebhookIntegration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["modifyTime"] = state ? state.modifyTime : undefined; resourceInputs["webhookHeaders"] = state ? state.webhookHeaders : undefined; resourceInputs["webhookMethod"] = state ? state.webhookMethod : undefined; resourceInputs["webhookName"] = state ? state.webhookName : undefined; resourceInputs["webhookSecret"] = state ? state.webhookSecret : undefined; resourceInputs["webhookType"] = state ? state.webhookType : undefined; resourceInputs["webhookUrl"] = state ? state.webhookUrl : undefined; } else { const args = argsOrState; if ((!args || args.webhookName === undefined) && !opts.urn) { throw new Error("Missing required property 'webhookName'"); } if ((!args || args.webhookType === undefined) && !opts.urn) { throw new Error("Missing required property 'webhookType'"); } if ((!args || args.webhookUrl === undefined) && !opts.urn) { throw new Error("Missing required property 'webhookUrl'"); } resourceInputs["webhookHeaders"] = args ? args.webhookHeaders : undefined; resourceInputs["webhookMethod"] = args ? args.webhookMethod : undefined; resourceInputs["webhookName"] = args ? args.webhookName : undefined; resourceInputs["webhookSecret"] = (args === null || args === void 0 ? void 0 : args.webhookSecret) ? pulumi.secret(args.webhookSecret) : undefined; resourceInputs["webhookType"] = args ? args.webhookType : undefined; resourceInputs["webhookUrl"] = args ? args.webhookUrl : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["modifyTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["webhookSecret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(AlarmWebhookIntegration.__pulumiType, name, resourceInputs, opts); } } exports.AlarmWebhookIntegration = AlarmWebhookIntegration; /** @internal */ AlarmWebhookIntegration.__pulumiType = 'volcengine:tls/alarmWebhookIntegration:AlarmWebhookIntegration'; //# sourceMappingURL=alarmWebhookIntegration.js.map