@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
174 lines • 10.6 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.RabbitmqInstance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manage DMS RabbitMQ instance resources within HuaweiCloud.
*
* ## Example Usage
*
* ## Import
*
* DMS RabbitMQ instance can be imported using the instance id, e.g.
*
* ```sh
* $ pulumi import huaweicloud:Dms/rabbitmqInstance:RabbitmqInstance huaweicloud_dms_rabbitmq_instance.instance_1 8d3c7938-dc47-4937-a30f-c80de381c5e3
* ```
*
* 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`password`, `auto_renew`, `period` and `period_unit`. It is generally recommended running `terraform plan` after importing a DMS RabbitMQ instance. You can then decide if changes should be applied to the instance, or the resource definition should be updated to align with the instance. Also you can ignore changes as below. hcl resource "huaweicloud_dms_rabbitmq_instance" "instance_1" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* password, auto_renew, period, period_unit,
*
* ]
*
* } }
*/
class RabbitmqInstance extends pulumi.CustomResource {
/**
* Get an existing RabbitmqInstance 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 RabbitmqInstance(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of RabbitmqInstance. 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'] === RabbitmqInstance.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessUser"] = state ? state.accessUser : undefined;
resourceInputs["autoRenew"] = state ? state.autoRenew : undefined;
resourceInputs["availabilityZones"] = state ? state.availabilityZones : undefined;
resourceInputs["availableZones"] = state ? state.availableZones : undefined;
resourceInputs["brokerNum"] = state ? state.brokerNum : undefined;
resourceInputs["chargingMode"] = state ? state.chargingMode : undefined;
resourceInputs["connectAddress"] = state ? state.connectAddress : undefined;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["enableAcl"] = state ? state.enableAcl : undefined;
resourceInputs["enablePublicIp"] = state ? state.enablePublicIp : undefined;
resourceInputs["engine"] = state ? state.engine : undefined;
resourceInputs["engineVersion"] = state ? state.engineVersion : undefined;
resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined;
resourceInputs["extendTimes"] = state ? state.extendTimes : undefined;
resourceInputs["flavorId"] = state ? state.flavorId : undefined;
resourceInputs["isLogicalVolume"] = state ? state.isLogicalVolume : undefined;
resourceInputs["maintainBegin"] = state ? state.maintainBegin : undefined;
resourceInputs["maintainEnd"] = state ? state.maintainEnd : undefined;
resourceInputs["managementConnectAddress"] = state ? state.managementConnectAddress : undefined;
resourceInputs["manegementConnectAddress"] = state ? state.manegementConnectAddress : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["networkId"] = state ? state.networkId : 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["productId"] = state ? state.productId : undefined;
resourceInputs["publicIpAddress"] = state ? state.publicIpAddress : undefined;
resourceInputs["publicIpId"] = state ? state.publicIpId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["resourceSpecCode"] = state ? state.resourceSpecCode : undefined;
resourceInputs["securityGroupId"] = state ? state.securityGroupId : undefined;
resourceInputs["specification"] = state ? state.specification : undefined;
resourceInputs["sslEnable"] = state ? state.sslEnable : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["storageSpace"] = state ? state.storageSpace : undefined;
resourceInputs["storageSpecCode"] = state ? state.storageSpecCode : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["usedStorageSpace"] = state ? state.usedStorageSpace : undefined;
resourceInputs["userId"] = state ? state.userId : undefined;
resourceInputs["userName"] = state ? state.userName : undefined;
resourceInputs["vpcId"] = state ? state.vpcId : undefined;
}
else {
const args = argsOrState;
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.storageSpecCode === undefined) && !opts.urn) {
throw new Error("Missing required property 'storageSpecCode'");
}
if ((!args || args.vpcId === undefined) && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["accessUser"] = args ? args.accessUser : undefined;
resourceInputs["autoRenew"] = args ? args.autoRenew : undefined;
resourceInputs["availabilityZones"] = args ? args.availabilityZones : undefined;
resourceInputs["availableZones"] = args ? args.availableZones : undefined;
resourceInputs["brokerNum"] = args ? args.brokerNum : undefined;
resourceInputs["chargingMode"] = args ? args.chargingMode : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["enableAcl"] = args ? args.enableAcl : undefined;
resourceInputs["engineVersion"] = args ? args.engineVersion : undefined;
resourceInputs["enterpriseProjectId"] = args ? args.enterpriseProjectId : undefined;
resourceInputs["flavorId"] = args ? args.flavorId : undefined;
resourceInputs["maintainBegin"] = args ? args.maintainBegin : undefined;
resourceInputs["maintainEnd"] = args ? args.maintainEnd : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["networkId"] = args ? args.networkId : undefined;
resourceInputs["password"] = args ? args.password : undefined;
resourceInputs["period"] = args ? args.period : undefined;
resourceInputs["periodUnit"] = args ? args.periodUnit : undefined;
resourceInputs["productId"] = args ? args.productId : undefined;
resourceInputs["publicIpId"] = args ? args.publicIpId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["securityGroupId"] = args ? args.securityGroupId : undefined;
resourceInputs["sslEnable"] = args ? args.sslEnable : undefined;
resourceInputs["storageSpace"] = args ? args.storageSpace : undefined;
resourceInputs["storageSpecCode"] = args ? args.storageSpecCode : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["vpcId"] = args ? args.vpcId : undefined;
resourceInputs["connectAddress"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["enablePublicIp"] = undefined /*out*/;
resourceInputs["engine"] = undefined /*out*/;
resourceInputs["extendTimes"] = undefined /*out*/;
resourceInputs["isLogicalVolume"] = undefined /*out*/;
resourceInputs["managementConnectAddress"] = undefined /*out*/;
resourceInputs["manegementConnectAddress"] = undefined /*out*/;
resourceInputs["port"] = undefined /*out*/;
resourceInputs["publicIpAddress"] = undefined /*out*/;
resourceInputs["resourceSpecCode"] = undefined /*out*/;
resourceInputs["specification"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["type"] = undefined /*out*/;
resourceInputs["usedStorageSpace"] = undefined /*out*/;
resourceInputs["userId"] = undefined /*out*/;
resourceInputs["userName"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RabbitmqInstance.__pulumiType, name, resourceInputs, opts);
}
}
exports.RabbitmqInstance = RabbitmqInstance;
/** @internal */
RabbitmqInstance.__pulumiType = 'huaweicloud:Dms/rabbitmqInstance:RabbitmqInstance';
//# sourceMappingURL=rabbitmqInstance.js.map