@pulumi/f5bigip
Version:
A Pulumi package for creating and managing F5 BigIP resources.
211 lines • 9.34 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Monitor = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* `f5bigip.ltm.Monitor` Configures a custom monitor for use by health checks.
*
* For resources should be named with their `full path`. The full path is the combination of the `partition + name` of the resource. For example `/Common/test-monitor`.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as f5bigip from "@pulumi/f5bigip";
*
* const monitor = new f5bigip.ltm.Monitor("monitor", {
* name: "/Common/terraform_monitor",
* parent: "/Common/http",
* send: "GET /some/path\x0d\n",
* timeout: 999,
* interval: 998,
* destination: "1.2.3.4:1234",
* });
* const test_https_monitor = new f5bigip.ltm.Monitor("test-https-monitor", {
* name: "/Common/terraform_monitor",
* parent: "/Common/http",
* sslProfile: "/Common/serverssl",
* send: "GET /some/path\x0d\n",
* interval: 999,
* timeout: 1000,
* });
* const test_ftp_monitor = new f5bigip.ltm.Monitor("test-ftp-monitor", {
* name: "/Common/ftp-test",
* parent: "/Common/ftp",
* interval: 5,
* timeUntilUp: 0,
* timeout: 16,
* destination: "*:8008",
* filename: "somefile",
* });
* const test_postgresql_monitor = new f5bigip.ltm.Monitor("test-postgresql-monitor", {
* name: "/Common/test-postgresql-monitor",
* parent: "/Common/postgresql",
* send: "SELECT 'Test';",
* receive: "Test",
* interval: 5,
* timeout: 16,
* username: "abcd",
* password: "abcd1234",
* });
* // Step 1: Create custom parent monitor (inherits from built-in)
* const parent_monitor = new f5bigip.ltm.Monitor("parent-monitor", {
* name: "/Common/parent",
* parent: "/Common/http",
* interval: 999,
* timeout: 1000,
* send: "GET /\x0d\n",
* receive: "200",
* });
* // Step 2: Create child monitor that inherits from custom parent
* // Inherited from parent: interval=999, timeout=1000, receive="200"
* const child_monitor = new f5bigip.ltm.Monitor("child-monitor", {
* name: "/Common/child",
* parent: "/Common/http",
* customParent: parent_monitor.name,
* send: "GET /custom\x0d\n",
* });
* ```
*
* ## Importing
*
* An existing monitor can be imported into this resource by supplying monitor Name in `full path` as `id`.
* An example is below:
* ```sh
* $ terraform import bigip_ltm_monitor.monitor /Common/terraform_monitor
* ```
*/
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 });
}
/** @internal */
static __pulumiType = 'f5bigip:ltm/monitor:Monitor';
/**
* 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["adaptive"] = state?.adaptive;
resourceInputs["adaptiveLimit"] = state?.adaptiveLimit;
resourceInputs["base"] = state?.base;
resourceInputs["chaseReferrals"] = state?.chaseReferrals;
resourceInputs["compatibility"] = state?.compatibility;
resourceInputs["customParent"] = state?.customParent;
resourceInputs["database"] = state?.database;
resourceInputs["destination"] = state?.destination;
resourceInputs["domain"] = state?.domain;
resourceInputs["filename"] = state?.filename;
resourceInputs["filter"] = state?.filter;
resourceInputs["interval"] = state?.interval;
resourceInputs["ipDscp"] = state?.ipDscp;
resourceInputs["mandatoryAttributes"] = state?.mandatoryAttributes;
resourceInputs["manualResume"] = state?.manualResume;
resourceInputs["mode"] = state?.mode;
resourceInputs["name"] = state?.name;
resourceInputs["parent"] = state?.parent;
resourceInputs["password"] = state?.password;
resourceInputs["receive"] = state?.receive;
resourceInputs["receiveDisable"] = state?.receiveDisable;
resourceInputs["reverse"] = state?.reverse;
resourceInputs["security"] = state?.security;
resourceInputs["send"] = state?.send;
resourceInputs["sslProfile"] = state?.sslProfile;
resourceInputs["timeUntilUp"] = state?.timeUntilUp;
resourceInputs["timeout"] = state?.timeout;
resourceInputs["transparent"] = state?.transparent;
resourceInputs["upInterval"] = state?.upInterval;
resourceInputs["username"] = state?.username;
}
else {
const args = argsOrState;
if (args?.name === undefined && !opts.urn) {
throw new Error("Missing required property 'name'");
}
if (args?.parent === undefined && !opts.urn) {
throw new Error("Missing required property 'parent'");
}
resourceInputs["adaptive"] = args?.adaptive;
resourceInputs["adaptiveLimit"] = args?.adaptiveLimit;
resourceInputs["base"] = args?.base;
resourceInputs["chaseReferrals"] = args?.chaseReferrals;
resourceInputs["compatibility"] = args?.compatibility;
resourceInputs["customParent"] = args?.customParent;
resourceInputs["database"] = args?.database;
resourceInputs["destination"] = args?.destination;
resourceInputs["domain"] = args?.domain;
resourceInputs["filename"] = args?.filename;
resourceInputs["filter"] = args?.filter;
resourceInputs["interval"] = args?.interval;
resourceInputs["ipDscp"] = args?.ipDscp;
resourceInputs["mandatoryAttributes"] = args?.mandatoryAttributes;
resourceInputs["manualResume"] = args?.manualResume;
resourceInputs["mode"] = args?.mode;
resourceInputs["name"] = args?.name;
resourceInputs["parent"] = args?.parent;
resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
resourceInputs["receive"] = args?.receive;
resourceInputs["receiveDisable"] = args?.receiveDisable;
resourceInputs["reverse"] = args?.reverse;
resourceInputs["security"] = args?.security;
resourceInputs["send"] = args?.send;
resourceInputs["sslProfile"] = args?.sslProfile;
resourceInputs["timeUntilUp"] = args?.timeUntilUp;
resourceInputs["timeout"] = args?.timeout;
resourceInputs["transparent"] = args?.transparent;
resourceInputs["upInterval"] = args?.upInterval;
resourceInputs["username"] = args?.username;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Monitor.__pulumiType, name, resourceInputs, opts);
}
}
exports.Monitor = Monitor;
//# sourceMappingURL=monitor.js.map