@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
124 lines • 6.96 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.ReadReplicaInstance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manage RDS Read Replica Instance resource.
*
* ## Example Usage
*
* ## Import
*
* RDS read replica instance can be imported by `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Rds/readReplicaInstance:ReadReplicaInstance replica_instance <id>
* ```
*/
class ReadReplicaInstance extends pulumi.CustomResource {
/**
* Get an existing ReadReplicaInstance 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 ReadReplicaInstance(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ReadReplicaInstance. 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'] === ReadReplicaInstance.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["autoRenew"] = state ? state.autoRenew : undefined;
resourceInputs["availabilityZone"] = state ? state.availabilityZone : undefined;
resourceInputs["chargingMode"] = state ? state.chargingMode : undefined;
resourceInputs["db"] = state ? state.db : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined;
resourceInputs["fixedIp"] = state ? state.fixedIp : undefined;
resourceInputs["flavor"] = state ? state.flavor : undefined;
resourceInputs["maintainBegin"] = state ? state.maintainBegin : undefined;
resourceInputs["maintainEnd"] = state ? state.maintainEnd : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["parameters"] = state ? state.parameters : undefined;
resourceInputs["period"] = state ? state.period : undefined;
resourceInputs["periodUnit"] = state ? state.periodUnit : undefined;
resourceInputs["primaryInstanceId"] = state ? state.primaryInstanceId : undefined;
resourceInputs["privateIps"] = state ? state.privateIps : undefined;
resourceInputs["publicIps"] = state ? state.publicIps : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["securityGroupId"] = state ? state.securityGroupId : undefined;
resourceInputs["sslEnable"] = state ? state.sslEnable : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["subnetId"] = state ? state.subnetId : undefined;
resourceInputs["tags"] = state ? state.tags : 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.primaryInstanceId === undefined) && !opts.urn) {
throw new Error("Missing required property 'primaryInstanceId'");
}
if ((!args || args.volume === undefined) && !opts.urn) {
throw new Error("Missing required property 'volume'");
}
resourceInputs["autoRenew"] = args ? args.autoRenew : undefined;
resourceInputs["availabilityZone"] = args ? args.availabilityZone : undefined;
resourceInputs["chargingMode"] = args ? args.chargingMode : undefined;
resourceInputs["db"] = args ? args.db : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["enterpriseProjectId"] = args ? args.enterpriseProjectId : undefined;
resourceInputs["fixedIp"] = args ? args.fixedIp : undefined;
resourceInputs["flavor"] = args ? args.flavor : undefined;
resourceInputs["maintainBegin"] = args ? args.maintainBegin : undefined;
resourceInputs["maintainEnd"] = args ? args.maintainEnd : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["parameters"] = args ? args.parameters : undefined;
resourceInputs["period"] = args ? args.period : undefined;
resourceInputs["periodUnit"] = args ? args.periodUnit : undefined;
resourceInputs["primaryInstanceId"] = args ? args.primaryInstanceId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["securityGroupId"] = args ? args.securityGroupId : undefined;
resourceInputs["sslEnable"] = args ? args.sslEnable : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["volume"] = args ? args.volume : undefined;
resourceInputs["privateIps"] = undefined /*out*/;
resourceInputs["publicIps"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["subnetId"] = undefined /*out*/;
resourceInputs["type"] = undefined /*out*/;
resourceInputs["vpcId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ReadReplicaInstance.__pulumiType, name, resourceInputs, opts);
}
}
exports.ReadReplicaInstance = ReadReplicaInstance;
/** @internal */
ReadReplicaInstance.__pulumiType = 'huaweicloud:Rds/readReplicaInstance:ReadReplicaInstance';
//# sourceMappingURL=readReplicaInstance.js.map