UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

227 lines • 9.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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.PrivateCloud = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Represents a private cloud resource. Private clouds are zonal resources. * * To get more information about PrivateCloud, see: * * * [API documentation](https://cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.privateClouds) * * ## Example Usage * * ### Vmware Engine Private Cloud Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const pc_nw = new gcp.vmwareengine.Network("pc-nw", { * name: "pc-nw", * location: "global", * type: "STANDARD", * description: "PC network description.", * }); * const vmw_engine_pc = new gcp.vmwareengine.PrivateCloud("vmw-engine-pc", { * location: "us-west1-a", * name: "sample-pc", * description: "Sample test PC.", * networkConfig: { * managementCidr: "192.168.30.0/24", * vmwareEngineNetwork: pc_nw.id, * }, * managementCluster: { * clusterId: "sample-mgmt-cluster", * nodeTypeConfigs: [{ * nodeTypeId: "standard-72", * nodeCount: 3, * }], * }, * }); * ``` * ### Vmware Engine Private Cloud Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const pc_nw = new gcp.vmwareengine.Network("pc-nw", { * name: "pc-nw", * location: "global", * type: "STANDARD", * description: "PC network description.", * }); * const vmw_engine_pc = new gcp.vmwareengine.PrivateCloud("vmw-engine-pc", { * location: "us-west1-a", * name: "sample-pc", * description: "Sample test PC.", * type: "TIME_LIMITED", * networkConfig: { * managementCidr: "192.168.30.0/24", * vmwareEngineNetwork: pc_nw.id, * }, * managementCluster: { * clusterId: "sample-mgmt-cluster", * nodeTypeConfigs: [{ * nodeTypeId: "standard-72", * nodeCount: 1, * customCoreCount: 32, * }], * autoscalingSettings: { * autoscalingPolicies: [{ * autoscalePolicyId: "autoscaling-policy", * nodeTypeId: "standard-72", * scaleOutSize: 1, * cpuThresholds: { * scaleOut: 80, * scaleIn: 15, * }, * consumedMemoryThresholds: { * scaleOut: 75, * scaleIn: 20, * }, * storageThresholds: { * scaleOut: 80, * scaleIn: 20, * }, * }], * minClusterNodeCount: 3, * maxClusterNodeCount: 8, * coolDownPeriod: "1800s", * }, * }, * deletionDelayHours: 0, * sendDeletionDelayHoursIfZero: true, * }); * ``` * * ## Import * * PrivateCloud can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/privateClouds/{{name}}` * * `{{project}}/{{location}}/{{name}}` * * `{{location}}/{{name}}` * * When using the `pulumi import` command, PrivateCloud can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default projects/{{project}}/locations/{{location}}/privateClouds/{{name}} * $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default {{location}}/{{name}} * ``` */ class PrivateCloud extends pulumi.CustomResource { /** * Get an existing PrivateCloud 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 PrivateCloud(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:vmwareengine/privateCloud:PrivateCloud'; /** * Returns true if the given object is an instance of PrivateCloud. 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'] === PrivateCloud.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state?.createTime; resourceInputs["deleteTime"] = state?.deleteTime; resourceInputs["deletionDelayHours"] = state?.deletionDelayHours; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["description"] = state?.description; resourceInputs["expireTime"] = state?.expireTime; resourceInputs["hcxes"] = state?.hcxes; resourceInputs["location"] = state?.location; resourceInputs["managementCluster"] = state?.managementCluster; resourceInputs["name"] = state?.name; resourceInputs["networkConfig"] = state?.networkConfig; resourceInputs["nsxes"] = state?.nsxes; resourceInputs["project"] = state?.project; resourceInputs["sendDeletionDelayHoursIfZero"] = state?.sendDeletionDelayHoursIfZero; resourceInputs["state"] = state?.state; resourceInputs["type"] = state?.type; resourceInputs["uid"] = state?.uid; resourceInputs["updateTime"] = state?.updateTime; resourceInputs["vcenters"] = state?.vcenters; } else { const args = argsOrState; if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.managementCluster === undefined && !opts.urn) { throw new Error("Missing required property 'managementCluster'"); } if (args?.networkConfig === undefined && !opts.urn) { throw new Error("Missing required property 'networkConfig'"); } resourceInputs["deletionDelayHours"] = args?.deletionDelayHours; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["description"] = args?.description; resourceInputs["location"] = args?.location; resourceInputs["managementCluster"] = args?.managementCluster; resourceInputs["name"] = args?.name; resourceInputs["networkConfig"] = args?.networkConfig; resourceInputs["project"] = args?.project; resourceInputs["sendDeletionDelayHoursIfZero"] = args?.sendDeletionDelayHoursIfZero; resourceInputs["type"] = args?.type; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["deleteTime"] = undefined /*out*/; resourceInputs["expireTime"] = undefined /*out*/; resourceInputs["hcxes"] = undefined /*out*/; resourceInputs["nsxes"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["uid"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; resourceInputs["vcenters"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PrivateCloud.__pulumiType, name, resourceInputs, opts); } } exports.PrivateCloud = PrivateCloud; //# sourceMappingURL=privateCloud.js.map