UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

123 lines 5.24 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Monitor = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V2 monitor resource within OpenStack. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const monitor1 = new openstack.loadbalancer.Monitor("monitor_1", { * poolId: pool1.id, * type: "PING", * delay: 20, * timeout: 10, * maxRetries: 5, * }); * ``` * * ## Import * * Load Balancer Pool Monitor can be imported using the Monitor ID, e.g.: * * ```sh * $ pulumi import openstack:loadbalancer/monitor:Monitor monitor_1 47c26fc3-2403-427a-8c79-1589bd0533c2 * ``` * In case of using OpenContrail, the import may not work properly. If you face an issue, try to import the monitor providing its parent pool ID: * * ```sh * $ pulumi import openstack:loadbalancer/monitor:Monitor monitor_1 47c26fc3-2403-427a-8c79-1589bd0533c2/708bc224-0f8c-4981-ac82-97095fe051b6 * ``` */ class Monitor extends pulumi.CustomResource { /** * Get an existing Monitor 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 Monitor(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Monitor. 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'] === Monitor.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["adminStateUp"] = state?.adminStateUp; resourceInputs["delay"] = state?.delay; resourceInputs["domainName"] = state?.domainName; resourceInputs["expectedCodes"] = state?.expectedCodes; resourceInputs["httpMethod"] = state?.httpMethod; resourceInputs["httpVersion"] = state?.httpVersion; resourceInputs["maxRetries"] = state?.maxRetries; resourceInputs["maxRetriesDown"] = state?.maxRetriesDown; resourceInputs["name"] = state?.name; resourceInputs["poolId"] = state?.poolId; resourceInputs["region"] = state?.region; resourceInputs["tenantId"] = state?.tenantId; resourceInputs["timeout"] = state?.timeout; resourceInputs["type"] = state?.type; resourceInputs["urlPath"] = state?.urlPath; } else { const args = argsOrState; if (args?.delay === undefined && !opts.urn) { throw new Error("Missing required property 'delay'"); } if (args?.maxRetries === undefined && !opts.urn) { throw new Error("Missing required property 'maxRetries'"); } if (args?.poolId === undefined && !opts.urn) { throw new Error("Missing required property 'poolId'"); } if (args?.timeout === undefined && !opts.urn) { throw new Error("Missing required property 'timeout'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["adminStateUp"] = args?.adminStateUp; resourceInputs["delay"] = args?.delay; resourceInputs["domainName"] = args?.domainName; resourceInputs["expectedCodes"] = args?.expectedCodes; resourceInputs["httpMethod"] = args?.httpMethod; resourceInputs["httpVersion"] = args?.httpVersion; resourceInputs["maxRetries"] = args?.maxRetries; resourceInputs["maxRetriesDown"] = args?.maxRetriesDown; resourceInputs["name"] = args?.name; resourceInputs["poolId"] = args?.poolId; resourceInputs["region"] = args?.region; resourceInputs["tenantId"] = args?.tenantId; resourceInputs["timeout"] = args?.timeout; resourceInputs["type"] = args?.type; resourceInputs["urlPath"] = args?.urlPath; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Monitor.__pulumiType, name, resourceInputs, opts); } } exports.Monitor = Monitor; /** @internal */ Monitor.__pulumiType = 'openstack:loadbalancer/monitor:Monitor'; //# sourceMappingURL=monitor.js.map