UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

102 lines 4.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.Overrides = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for creating a Harness Override V2. * * ## Import * * The `pulumi import` command can be used, for example: * * Import account level override * * ```sh * $ pulumi import harness:platform/overrides:Overrides example <override_id> * ``` * * Import org level override * * ```sh * $ pulumi import harness:platform/overrides:Overrides example <org_id>/<override_id> * ``` * * Import project level override * * ```sh * $ pulumi import harness:platform/overrides:Overrides example <org_id>/<project_id>/<override_id> * ``` */ class Overrides extends pulumi.CustomResource { /** * Get an existing Overrides 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 Overrides(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Overrides. 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'] === Overrides.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clusterId"] = state?.clusterId; resourceInputs["envId"] = state?.envId; resourceInputs["gitDetails"] = state?.gitDetails; resourceInputs["identifier"] = state?.identifier; resourceInputs["importFromGit"] = state?.importFromGit; resourceInputs["infraId"] = state?.infraId; resourceInputs["isForceImport"] = state?.isForceImport; resourceInputs["orgId"] = state?.orgId; resourceInputs["projectId"] = state?.projectId; resourceInputs["serviceId"] = state?.serviceId; resourceInputs["type"] = state?.type; resourceInputs["yaml"] = state?.yaml; } else { const args = argsOrState; if (args?.envId === undefined && !opts.urn) { throw new Error("Missing required property 'envId'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["clusterId"] = args?.clusterId; resourceInputs["envId"] = args?.envId; resourceInputs["gitDetails"] = args?.gitDetails; resourceInputs["identifier"] = args?.identifier; resourceInputs["importFromGit"] = args?.importFromGit; resourceInputs["infraId"] = args?.infraId; resourceInputs["isForceImport"] = args?.isForceImport; resourceInputs["orgId"] = args?.orgId; resourceInputs["projectId"] = args?.projectId; resourceInputs["serviceId"] = args?.serviceId; resourceInputs["type"] = args?.type; resourceInputs["yaml"] = args?.yaml; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Overrides.__pulumiType, name, resourceInputs, opts); } } exports.Overrides = Overrides; /** @internal */ Overrides.__pulumiType = 'harness:platform/overrides:Overrides'; //# sourceMappingURL=overrides.js.map