UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

146 lines 5.4 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.ManualFreeze = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for Manual Deployment Freeze Window. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * const example = new harness.platform.ManualFreeze("example", { * identifier: "identifier", * orgId: "orgIdentifier", * projectId: "projectIdentifier", * accountId: "accountIdentifier", * yaml: `freeze: * name: freezeName * identifier: identifier * entityConfigs: * - name: r1 * entities: * - filterType: All * type: Org * - filterType: All * type: Project * - filterType: All * type: Service * - filterType: All * type: EnvType * status: Disabled * description: hi * windows: * - timeZone: Asia/Calcutta * startTime: 2023-05-03 04:16 PM * duration: 30m * recurrence: * type: Daily * notificationRules: [] * tags: {} * `, * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Import an account level freeze * * ```sh * $ pulumi import harness:platform/manualFreeze:ManualFreeze example <freeze_id> * ``` * * Import an organization level freeze * * ```sh * $ pulumi import harness:platform/manualFreeze:ManualFreeze example <org_id>/<freeze_id> * ``` * * Import project level freeze * * ```sh * $ pulumi import harness:platform/manualFreeze:ManualFreeze example <org_id>/<project_id>/<freeze_id> * ``` */ class ManualFreeze extends pulumi.CustomResource { /** * Get an existing ManualFreeze 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 ManualFreeze(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ManualFreeze. 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'] === ManualFreeze.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state?.accountId; resourceInputs["currentOrUpcomingWindows"] = state?.currentOrUpcomingWindows; resourceInputs["description"] = state?.description; resourceInputs["freezeWindows"] = state?.freezeWindows; resourceInputs["identifier"] = state?.identifier; resourceInputs["name"] = state?.name; resourceInputs["orgId"] = state?.orgId; resourceInputs["projectId"] = state?.projectId; resourceInputs["scope"] = state?.scope; resourceInputs["status"] = state?.status; resourceInputs["tags"] = state?.tags; resourceInputs["type"] = state?.type; resourceInputs["yaml"] = state?.yaml; } 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?.yaml === undefined && !opts.urn) { throw new Error("Missing required property 'yaml'"); } resourceInputs["accountId"] = args?.accountId; resourceInputs["identifier"] = args?.identifier; resourceInputs["orgId"] = args?.orgId; resourceInputs["projectId"] = args?.projectId; resourceInputs["yaml"] = args?.yaml; resourceInputs["currentOrUpcomingWindows"] = undefined /*out*/; resourceInputs["description"] = undefined /*out*/; resourceInputs["freezeWindows"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["scope"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ManualFreeze.__pulumiType, name, resourceInputs, opts); } } exports.ManualFreeze = ManualFreeze; /** @internal */ ManualFreeze.__pulumiType = 'harness:platform/manualFreeze:ManualFreeze'; //# sourceMappingURL=manualFreeze.js.map