UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

128 lines 5.1 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.SplunkConnector = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for creating a Splunk connector. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * const test = new harness.platform.SplunkConnector("test", { * identifier: "identifier", * name: "name", * description: "test", * tags: ["foo:bar"], * url: "https://splunk.com/", * delegateSelectors: ["harness-delegate"], * accountId: "splunk_account_id", * username: "username", * passwordRef: "account.secret_id", * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Import account level splunk connector * * ```sh * $ pulumi import harness:platform/splunkConnector:SplunkConnector example <connector_id> * ``` * * Import org level splunk connector * * ```sh * $ pulumi import harness:platform/splunkConnector:SplunkConnector example <ord_id>/<connector_id> * ``` * * Import project level splunk connector * * ```sh * $ pulumi import harness:platform/splunkConnector:SplunkConnector example <org_id>/<project_id>/<connector_id> * ``` */ class SplunkConnector extends pulumi.CustomResource { /** * Get an existing SplunkConnector 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 SplunkConnector(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of SplunkConnector. 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'] === SplunkConnector.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state?.accountId; resourceInputs["delegateSelectors"] = state?.delegateSelectors; resourceInputs["description"] = state?.description; resourceInputs["identifier"] = state?.identifier; resourceInputs["name"] = state?.name; resourceInputs["orgId"] = state?.orgId; resourceInputs["passwordRef"] = state?.passwordRef; resourceInputs["projectId"] = state?.projectId; resourceInputs["tags"] = state?.tags; resourceInputs["url"] = state?.url; resourceInputs["username"] = state?.username; } else { const args = argsOrState; if (args?.accountId === undefined && !opts.urn) { throw new Error("Missing required property 'accountId'"); } if (args?.identifier === undefined && !opts.urn) { throw new Error("Missing required property 'identifier'"); } if (args?.passwordRef === undefined && !opts.urn) { throw new Error("Missing required property 'passwordRef'"); } if (args?.url === undefined && !opts.urn) { throw new Error("Missing required property 'url'"); } if (args?.username === undefined && !opts.urn) { throw new Error("Missing required property 'username'"); } resourceInputs["accountId"] = args?.accountId; resourceInputs["delegateSelectors"] = args?.delegateSelectors; resourceInputs["description"] = args?.description; resourceInputs["identifier"] = args?.identifier; resourceInputs["name"] = args?.name; resourceInputs["orgId"] = args?.orgId; resourceInputs["passwordRef"] = args?.passwordRef; resourceInputs["projectId"] = args?.projectId; resourceInputs["tags"] = args?.tags; resourceInputs["url"] = args?.url; resourceInputs["username"] = args?.username; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SplunkConnector.__pulumiType, name, resourceInputs, opts); } } exports.SplunkConnector = SplunkConnector; /** @internal */ SplunkConnector.__pulumiType = 'harness:platform/splunkConnector:SplunkConnector'; //# sourceMappingURL=splunkConnector.js.map