@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
153 lines • 8.58 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodeAttach = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Add a node from an existing ECS server to a CCE cluster.
*
* ## Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const clusterId = config.requireObject("clusterId");
* const serverId = config.requireObject("serverId");
* const keypairName = config.requireObject("keypairName");
* const test = new huaweicloud.cce.NodeAttach("test", {
* clusterId: clusterId,
* serverId: serverId,
* keyPair: keypairName,
* os: "EulerOS 2.5",
* tags: {
* foo: "bar",
* key: "value",
* },
* });
* ```
*/
class NodeAttach extends pulumi.CustomResource {
/**
* Get an existing NodeAttach 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 NodeAttach(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of NodeAttach. 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'] === NodeAttach.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["availabilityZone"] = state ? state.availabilityZone : undefined;
resourceInputs["chargingMode"] = state ? state.chargingMode : undefined;
resourceInputs["clusterId"] = state ? state.clusterId : undefined;
resourceInputs["dataVolumes"] = state ? state.dataVolumes : undefined;
resourceInputs["dockerBaseSize"] = state ? state.dockerBaseSize : undefined;
resourceInputs["ecsGroupId"] = state ? state.ecsGroupId : undefined;
resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined;
resourceInputs["extensionNics"] = state ? state.extensionNics : undefined;
resourceInputs["flavorId"] = state ? state.flavorId : undefined;
resourceInputs["hostnameConfig"] = state ? state.hostnameConfig : undefined;
resourceInputs["imageId"] = state ? state.imageId : undefined;
resourceInputs["initializedConditions"] = state ? state.initializedConditions : undefined;
resourceInputs["keyPair"] = state ? state.keyPair : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["lvmConfig"] = state ? state.lvmConfig : undefined;
resourceInputs["maxPods"] = state ? state.maxPods : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["nicMultiQueue"] = state ? state.nicMultiQueue : undefined;
resourceInputs["nicThreshold"] = state ? state.nicThreshold : undefined;
resourceInputs["os"] = state ? state.os : undefined;
resourceInputs["password"] = state ? state.password : undefined;
resourceInputs["postinstall"] = state ? state.postinstall : undefined;
resourceInputs["preinstall"] = state ? state.preinstall : undefined;
resourceInputs["privateIp"] = state ? state.privateIp : undefined;
resourceInputs["privateKey"] = state ? state.privateKey : undefined;
resourceInputs["publicIp"] = state ? state.publicIp : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["rootVolumes"] = state ? state.rootVolumes : undefined;
resourceInputs["runtime"] = state ? state.runtime : undefined;
resourceInputs["serverId"] = state ? state.serverId : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["storage"] = state ? state.storage : undefined;
resourceInputs["subnetId"] = state ? state.subnetId : undefined;
resourceInputs["systemDiskKmsKeyId"] = state ? state.systemDiskKmsKeyId : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["taints"] = state ? state.taints : undefined;
}
else {
const args = argsOrState;
if ((!args || args.clusterId === undefined) && !opts.urn) {
throw new Error("Missing required property 'clusterId'");
}
if ((!args || args.os === undefined) && !opts.urn) {
throw new Error("Missing required property 'os'");
}
if ((!args || args.serverId === undefined) && !opts.urn) {
throw new Error("Missing required property 'serverId'");
}
resourceInputs["clusterId"] = args ? args.clusterId : undefined;
resourceInputs["dockerBaseSize"] = args ? args.dockerBaseSize : undefined;
resourceInputs["hostnameConfig"] = args ? args.hostnameConfig : undefined;
resourceInputs["imageId"] = args ? args.imageId : undefined;
resourceInputs["initializedConditions"] = args ? args.initializedConditions : undefined;
resourceInputs["keyPair"] = args ? args.keyPair : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["lvmConfig"] = args ? args.lvmConfig : undefined;
resourceInputs["maxPods"] = args ? args.maxPods : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["nicMultiQueue"] = args ? args.nicMultiQueue : undefined;
resourceInputs["nicThreshold"] = args ? args.nicThreshold : undefined;
resourceInputs["os"] = args ? args.os : undefined;
resourceInputs["password"] = args ? args.password : undefined;
resourceInputs["postinstall"] = args ? args.postinstall : undefined;
resourceInputs["preinstall"] = args ? args.preinstall : undefined;
resourceInputs["privateKey"] = args ? args.privateKey : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["runtime"] = args ? args.runtime : undefined;
resourceInputs["serverId"] = args ? args.serverId : undefined;
resourceInputs["storage"] = args ? args.storage : undefined;
resourceInputs["systemDiskKmsKeyId"] = args ? args.systemDiskKmsKeyId : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["taints"] = args ? args.taints : undefined;
resourceInputs["availabilityZone"] = undefined /*out*/;
resourceInputs["chargingMode"] = undefined /*out*/;
resourceInputs["dataVolumes"] = undefined /*out*/;
resourceInputs["ecsGroupId"] = undefined /*out*/;
resourceInputs["enterpriseProjectId"] = undefined /*out*/;
resourceInputs["extensionNics"] = undefined /*out*/;
resourceInputs["flavorId"] = undefined /*out*/;
resourceInputs["privateIp"] = undefined /*out*/;
resourceInputs["publicIp"] = undefined /*out*/;
resourceInputs["rootVolumes"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["subnetId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(NodeAttach.__pulumiType, name, resourceInputs, opts);
}
}
exports.NodeAttach = NodeAttach;
/** @internal */
NodeAttach.__pulumiType = 'huaweicloud:Cce/nodeAttach:NodeAttach';
//# sourceMappingURL=nodeAttach.js.map