UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

105 lines 4.54 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.ServiceNowConnector = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for creating a Service Now connector. * * ## Import * * The `pulumi import` command can be used, for example: * * Import account level service now connector * * ```sh * $ pulumi import harness:platform/serviceNowConnector:ServiceNowConnector example <connector_id> * ``` * * Import org level service now connector * * ```sh * $ pulumi import harness:platform/serviceNowConnector:ServiceNowConnector example <ord_id>/<connector_id> * ``` * * Import project level service now connector * * ```sh * $ pulumi import harness:platform/serviceNowConnector:ServiceNowConnector example <org_id>/<project_id>/<connector_id> * ``` */ class ServiceNowConnector extends pulumi.CustomResource { /** * Get an existing ServiceNowConnector 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 ServiceNowConnector(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ServiceNowConnector. 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'] === ServiceNowConnector.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["auth"] = state?.auth; 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["serviceNowUrl"] = state?.serviceNowUrl; resourceInputs["tags"] = state?.tags; resourceInputs["username"] = state?.username; resourceInputs["usernameRef"] = state?.usernameRef; } else { const args = argsOrState; if (args?.auth === undefined && !opts.urn) { throw new Error("Missing required property 'auth'"); } if (args?.identifier === undefined && !opts.urn) { throw new Error("Missing required property 'identifier'"); } if (args?.serviceNowUrl === undefined && !opts.urn) { throw new Error("Missing required property 'serviceNowUrl'"); } resourceInputs["auth"] = args?.auth; 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["serviceNowUrl"] = args?.serviceNowUrl; resourceInputs["tags"] = args?.tags; resourceInputs["username"] = args?.username; resourceInputs["usernameRef"] = args?.usernameRef; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServiceNowConnector.__pulumiType, name, resourceInputs, opts); } } exports.ServiceNowConnector = ServiceNowConnector; /** @internal */ ServiceNowConnector.__pulumiType = 'harness:platform/serviceNowConnector:ServiceNowConnector'; //# sourceMappingURL=serviceNowConnector.js.map