@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
128 lines • 6.78 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.Cluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a CloudTable cluster resource within HuaweiCloud.
*
* ## Import
*
* Clusters can be imported by their `id`. e.g.bash
*
* ```sh
* $ pulumi import huaweicloud:CloudTable/cluster:Cluster test 4c2d38b6-6fb0-480c-8813-5f536b5ba6a4
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`availability_zone`, `network_id`. It is generally recommended running `terraform plan` after importing a cluster. You can then decide if changes should be applied to the cluster, or the resource definition should be updated to align with the cluster. Also you can ignore changes as below. hcl resource "huaweicloud_cloudtable_cluster" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* availability_zone, network_id,
*
* ]
*
* } }
*/
class Cluster extends pulumi.CustomResource {
/**
* Get an existing Cluster 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 Cluster(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Cluster. 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'] === Cluster.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["availabilityZone"] = state ? state.availabilityZone : undefined;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["hbasePublicEndpoint"] = state ? state.hbasePublicEndpoint : undefined;
resourceInputs["hbaseVersion"] = state ? state.hbaseVersion : undefined;
resourceInputs["iamAuthEnabled"] = state ? state.iamAuthEnabled : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["networkId"] = state ? state.networkId : undefined;
resourceInputs["openTsdbLink"] = state ? state.openTsdbLink : undefined;
resourceInputs["opentsdbNum"] = state ? state.opentsdbNum : undefined;
resourceInputs["opentsdbPublicEndpoint"] = state ? state.opentsdbPublicEndpoint : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["rsNum"] = state ? state.rsNum : undefined;
resourceInputs["securityGroupId"] = state ? state.securityGroupId : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["storageSize"] = state ? state.storageSize : undefined;
resourceInputs["storageSizeUsed"] = state ? state.storageSizeUsed : undefined;
resourceInputs["storageType"] = state ? state.storageType : undefined;
resourceInputs["vpcId"] = state ? state.vpcId : undefined;
resourceInputs["zookeeperLink"] = state ? state.zookeeperLink : undefined;
}
else {
const args = argsOrState;
if ((!args || args.availabilityZone === undefined) && !opts.urn) {
throw new Error("Missing required property 'availabilityZone'");
}
if ((!args || args.hbaseVersion === undefined) && !opts.urn) {
throw new Error("Missing required property 'hbaseVersion'");
}
if ((!args || args.networkId === undefined) && !opts.urn) {
throw new Error("Missing required property 'networkId'");
}
if ((!args || args.securityGroupId === undefined) && !opts.urn) {
throw new Error("Missing required property 'securityGroupId'");
}
if ((!args || args.storageType === undefined) && !opts.urn) {
throw new Error("Missing required property 'storageType'");
}
if ((!args || args.vpcId === undefined) && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["availabilityZone"] = args ? args.availabilityZone : undefined;
resourceInputs["hbaseVersion"] = args ? args.hbaseVersion : undefined;
resourceInputs["iamAuthEnabled"] = args ? args.iamAuthEnabled : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["networkId"] = args ? args.networkId : undefined;
resourceInputs["opentsdbNum"] = args ? args.opentsdbNum : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["rsNum"] = args ? args.rsNum : undefined;
resourceInputs["securityGroupId"] = args ? args.securityGroupId : undefined;
resourceInputs["storageType"] = args ? args.storageType : undefined;
resourceInputs["vpcId"] = args ? args.vpcId : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["hbasePublicEndpoint"] = undefined /*out*/;
resourceInputs["openTsdbLink"] = undefined /*out*/;
resourceInputs["opentsdbPublicEndpoint"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["storageSize"] = undefined /*out*/;
resourceInputs["storageSizeUsed"] = undefined /*out*/;
resourceInputs["zookeeperLink"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Cluster.__pulumiType, name, resourceInputs, opts);
}
}
exports.Cluster = Cluster;
/** @internal */
Cluster.__pulumiType = 'huaweicloud:CloudTable/cluster:Cluster';
//# sourceMappingURL=cluster.js.map