@pulumi/f5bigip
Version:
A Pulumi package for creating and managing F5 BigIP resources.
169 lines • 8.68 kB
JavaScript
;
// *** 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.Monitor = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = 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",
* });
* ```
*
* ## 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, Object.assign(Object.assign({}, 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["adaptive"] = state ? state.adaptive : undefined;
resourceInputs["adaptiveLimit"] = state ? state.adaptiveLimit : undefined;
resourceInputs["base"] = state ? state.base : undefined;
resourceInputs["chaseReferrals"] = state ? state.chaseReferrals : undefined;
resourceInputs["compatibility"] = state ? state.compatibility : undefined;
resourceInputs["customParent"] = state ? state.customParent : undefined;
resourceInputs["database"] = state ? state.database : undefined;
resourceInputs["destination"] = state ? state.destination : undefined;
resourceInputs["filename"] = state ? state.filename : undefined;
resourceInputs["filter"] = state ? state.filter : undefined;
resourceInputs["interval"] = state ? state.interval : undefined;
resourceInputs["ipDscp"] = state ? state.ipDscp : undefined;
resourceInputs["mandatoryAttributes"] = state ? state.mandatoryAttributes : undefined;
resourceInputs["manualResume"] = state ? state.manualResume : undefined;
resourceInputs["mode"] = state ? state.mode : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["parent"] = state ? state.parent : undefined;
resourceInputs["password"] = state ? state.password : undefined;
resourceInputs["receive"] = state ? state.receive : undefined;
resourceInputs["receiveDisable"] = state ? state.receiveDisable : undefined;
resourceInputs["reverse"] = state ? state.reverse : undefined;
resourceInputs["security"] = state ? state.security : undefined;
resourceInputs["send"] = state ? state.send : undefined;
resourceInputs["sslProfile"] = state ? state.sslProfile : undefined;
resourceInputs["timeUntilUp"] = state ? state.timeUntilUp : undefined;
resourceInputs["timeout"] = state ? state.timeout : undefined;
resourceInputs["transparent"] = state ? state.transparent : undefined;
resourceInputs["upInterval"] = state ? state.upInterval : undefined;
resourceInputs["username"] = state ? state.username : undefined;
}
else {
const args = argsOrState;
if ((!args || args.name === undefined) && !opts.urn) {
throw new Error("Missing required property 'name'");
}
if ((!args || args.parent === undefined) && !opts.urn) {
throw new Error("Missing required property 'parent'");
}
resourceInputs["adaptive"] = args ? args.adaptive : undefined;
resourceInputs["adaptiveLimit"] = args ? args.adaptiveLimit : undefined;
resourceInputs["base"] = args ? args.base : undefined;
resourceInputs["chaseReferrals"] = args ? args.chaseReferrals : undefined;
resourceInputs["compatibility"] = args ? args.compatibility : undefined;
resourceInputs["customParent"] = args ? args.customParent : undefined;
resourceInputs["database"] = args ? args.database : undefined;
resourceInputs["destination"] = args ? args.destination : undefined;
resourceInputs["filename"] = args ? args.filename : undefined;
resourceInputs["filter"] = args ? args.filter : undefined;
resourceInputs["interval"] = args ? args.interval : undefined;
resourceInputs["ipDscp"] = args ? args.ipDscp : undefined;
resourceInputs["mandatoryAttributes"] = args ? args.mandatoryAttributes : undefined;
resourceInputs["manualResume"] = args ? args.manualResume : undefined;
resourceInputs["mode"] = args ? args.mode : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["parent"] = args ? args.parent : undefined;
resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
resourceInputs["receive"] = args ? args.receive : undefined;
resourceInputs["receiveDisable"] = args ? args.receiveDisable : undefined;
resourceInputs["reverse"] = args ? args.reverse : undefined;
resourceInputs["security"] = args ? args.security : undefined;
resourceInputs["send"] = args ? args.send : undefined;
resourceInputs["sslProfile"] = args ? args.sslProfile : undefined;
resourceInputs["timeUntilUp"] = args ? args.timeUntilUp : undefined;
resourceInputs["timeout"] = args ? args.timeout : undefined;
resourceInputs["transparent"] = args ? args.transparent : undefined;
resourceInputs["upInterval"] = args ? args.upInterval : undefined;
resourceInputs["username"] = args ? args.username : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Monitor.__pulumiType, name, resourceInputs, opts);
}
}
exports.Monitor = Monitor;
/** @internal */
Monitor.__pulumiType = 'f5bigip:ltm/monitor:Monitor';
//# sourceMappingURL=monitor.js.map