UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

181 lines 11 kB
"use strict"; // *** 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.OpengaussInstance = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * GaussDB OpenGauss instance management within HuaweiCould. * * ## Example Usage * * ## Import * * OpenGaussDB instance can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:GaussDBforOpenGauss/opengaussInstance:OpengaussInstance test <id> * ``` * * Note that the imported state may not be identical to your resource definition, due to the attribute missing from the API response. The missing attributes include`password`, `ha.0.mode`, `ha.0.instance_mode`, `configuration_id`, `disk_encryption_id`, `enable_force_switch`, `enable_single_float_ip`, `parameters`, `period_unit`, `period` and `auto_renew`. It is generally recommended running `terraform plan` after importing a GaussDB OpenGauss instance. You can then decide if changes should be applied to the GaussDB OpenGauss instance, or the resource definition should be updated to align with the GaussDB OpenGauss instance. Also you can ignore changes as below. hcl resource "huaweicloud_gaussdb_opengauss_instance" "test" { * * ... * * lifecycle { * * ignore_changes = [ * * password, configuration_id, disk_encryption_id, enable_force_switch, enable_single_float_ip, parameters, period_unit, * * period, auto_renew, * * ] * * } } */ class OpengaussInstance extends pulumi.CustomResource { /** * Get an existing OpengaussInstance 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 OpengaussInstance(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of OpengaussInstance. 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'] === OpengaussInstance.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["advanceFeatures"] = state ? state.advanceFeatures : undefined; resourceInputs["autoRenew"] = state ? state.autoRenew : undefined; resourceInputs["availabilityZone"] = state ? state.availabilityZone : undefined; resourceInputs["backupStrategy"] = state ? state.backupStrategy : undefined; resourceInputs["balanceStatus"] = state ? state.balanceStatus : undefined; resourceInputs["chargingMode"] = state ? state.chargingMode : undefined; resourceInputs["configurationId"] = state ? state.configurationId : undefined; resourceInputs["coordinatorNum"] = state ? state.coordinatorNum : undefined; resourceInputs["datastore"] = state ? state.datastore : undefined; resourceInputs["dbUserName"] = state ? state.dbUserName : undefined; resourceInputs["diskEncryptionId"] = state ? state.diskEncryptionId : undefined; resourceInputs["enableForceSwitch"] = state ? state.enableForceSwitch : undefined; resourceInputs["enableSingleFloatIp"] = state ? state.enableSingleFloatIp : undefined; resourceInputs["endpoints"] = state ? state.endpoints : undefined; resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined; resourceInputs["errorLogSwitchStatus"] = state ? state.errorLogSwitchStatus : undefined; resourceInputs["flavor"] = state ? state.flavor : undefined; resourceInputs["forceImport"] = state ? state.forceImport : undefined; resourceInputs["ha"] = state ? state.ha : undefined; resourceInputs["maintenanceWindow"] = state ? state.maintenanceWindow : undefined; resourceInputs["mysqlCompatibilityPort"] = state ? state.mysqlCompatibilityPort : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["nodes"] = state ? state.nodes : undefined; resourceInputs["parameters"] = state ? state.parameters : undefined; resourceInputs["password"] = state ? state.password : undefined; resourceInputs["period"] = state ? state.period : undefined; resourceInputs["periodUnit"] = state ? state.periodUnit : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["privateIps"] = state ? state.privateIps : undefined; resourceInputs["publicIps"] = state ? state.publicIps : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["replicaNum"] = state ? state.replicaNum : undefined; resourceInputs["securityGroupId"] = state ? state.securityGroupId : undefined; resourceInputs["shardingNum"] = state ? state.shardingNum : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["subnetId"] = state ? state.subnetId : undefined; resourceInputs["switchStrategy"] = state ? state.switchStrategy : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["timeZone"] = state ? state.timeZone : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["volume"] = state ? state.volume : undefined; resourceInputs["vpcId"] = state ? state.vpcId : undefined; } else { const args = argsOrState; if ((!args || args.availabilityZone === undefined) && !opts.urn) { throw new Error("Missing required property 'availabilityZone'"); } if ((!args || args.flavor === undefined) && !opts.urn) { throw new Error("Missing required property 'flavor'"); } if ((!args || args.ha === undefined) && !opts.urn) { throw new Error("Missing required property 'ha'"); } if ((!args || args.password === undefined) && !opts.urn) { throw new Error("Missing required property 'password'"); } if ((!args || args.subnetId === undefined) && !opts.urn) { throw new Error("Missing required property 'subnetId'"); } if ((!args || args.volume === undefined) && !opts.urn) { throw new Error("Missing required property 'volume'"); } if ((!args || args.vpcId === undefined) && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } resourceInputs["advanceFeatures"] = args ? args.advanceFeatures : undefined; resourceInputs["autoRenew"] = args ? args.autoRenew : undefined; resourceInputs["availabilityZone"] = args ? args.availabilityZone : undefined; resourceInputs["backupStrategy"] = args ? args.backupStrategy : undefined; resourceInputs["chargingMode"] = args ? args.chargingMode : undefined; resourceInputs["configurationId"] = args ? args.configurationId : undefined; resourceInputs["coordinatorNum"] = args ? args.coordinatorNum : undefined; resourceInputs["datastore"] = args ? args.datastore : undefined; resourceInputs["diskEncryptionId"] = args ? args.diskEncryptionId : undefined; resourceInputs["enableForceSwitch"] = args ? args.enableForceSwitch : undefined; resourceInputs["enableSingleFloatIp"] = args ? args.enableSingleFloatIp : undefined; resourceInputs["enterpriseProjectId"] = args ? args.enterpriseProjectId : undefined; resourceInputs["flavor"] = args ? args.flavor : undefined; resourceInputs["forceImport"] = args ? args.forceImport : undefined; resourceInputs["ha"] = args ? args.ha : undefined; resourceInputs["mysqlCompatibilityPort"] = args ? args.mysqlCompatibilityPort : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["parameters"] = args ? args.parameters : undefined; resourceInputs["password"] = args ? args.password : undefined; resourceInputs["period"] = args ? args.period : undefined; resourceInputs["periodUnit"] = args ? args.periodUnit : undefined; resourceInputs["port"] = args ? args.port : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["replicaNum"] = args ? args.replicaNum : undefined; resourceInputs["securityGroupId"] = args ? args.securityGroupId : undefined; resourceInputs["shardingNum"] = args ? args.shardingNum : undefined; resourceInputs["subnetId"] = args ? args.subnetId : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timeZone"] = args ? args.timeZone : undefined; resourceInputs["volume"] = args ? args.volume : undefined; resourceInputs["vpcId"] = args ? args.vpcId : undefined; resourceInputs["balanceStatus"] = undefined /*out*/; resourceInputs["dbUserName"] = undefined /*out*/; resourceInputs["endpoints"] = undefined /*out*/; resourceInputs["errorLogSwitchStatus"] = undefined /*out*/; resourceInputs["maintenanceWindow"] = undefined /*out*/; resourceInputs["nodes"] = undefined /*out*/; resourceInputs["privateIps"] = undefined /*out*/; resourceInputs["publicIps"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["switchStrategy"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(OpengaussInstance.__pulumiType, name, resourceInputs, opts); } } exports.OpengaussInstance = OpengaussInstance; /** @internal */ OpengaussInstance.__pulumiType = 'huaweicloud:GaussDBforOpenGauss/opengaussInstance:OpengaussInstance'; //# sourceMappingURL=opengaussInstance.js.map