"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.RocketMQInstance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage rocketmq instance
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooZones = volcengine.ecs.getZones({});
 * const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
 *     vpcName: "acc-test-vpc",
 *     cidrBlock: "172.16.0.0/16",
 * });
 * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
 *     subnetName: "acc-test-subnet",
 *     cidrBlock: "172.16.0.0/24",
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *     vpcId: fooVpc.id,
 * });
 * const fooRocketMQInstance = new volcengine.rocketmq.RocketMQInstance("fooRocketMQInstance", {
 *     zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)],
 *     subnetId: fooSubnet.id,
 *     version: "4.8",
 *     computeSpec: "rocketmq.n1.x2.micro",
 *     storageSpace: 300,
 *     autoScaleQueue: true,
 *     fileReservedTime: 10,
 *     instanceName: "acc-test-rocketmq",
 *     instanceDescription: "acc-test",
 *     projectName: "default",
 *     chargeInfo: {
 *         chargeType: "PostPaid",
 *     },
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * RocketmqInstance can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:rocketmq/rocketMQInstance:RocketMQInstance default resource_id
 * ```
 */
class RocketMQInstance extends pulumi.CustomResource {
    /**
     * Get an existing RocketMQInstance 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 RocketMQInstance(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of RocketMQInstance.  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'] === RocketMQInstance.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accountId"] = state ? state.accountId : undefined;
            resourceInputs["applyPrivateDnsToPublic"] = state ? state.applyPrivateDnsToPublic : undefined;
            resourceInputs["autoScaleQueue"] = state ? state.autoScaleQueue : undefined;
            resourceInputs["availableQueueNumber"] = state ? state.availableQueueNumber : undefined;
            resourceInputs["chargeInfo"] = state ? state.chargeInfo : undefined;
            resourceInputs["computeSpec"] = state ? state.computeSpec : undefined;
            resourceInputs["connectionInfos"] = state ? state.connectionInfos : undefined;
            resourceInputs["createTime"] = state ? state.createTime : undefined;
            resourceInputs["eipId"] = state ? state.eipId : undefined;
            resourceInputs["enableSsl"] = state ? state.enableSsl : undefined;
            resourceInputs["fileReservedTime"] = state ? state.fileReservedTime : undefined;
            resourceInputs["instanceDescription"] = state ? state.instanceDescription : undefined;
            resourceInputs["instanceName"] = state ? state.instanceName : undefined;
            resourceInputs["instanceStatus"] = state ? state.instanceStatus : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["regionId"] = state ? state.regionId : undefined;
            resourceInputs["sslMode"] = state ? state.sslMode : undefined;
            resourceInputs["storageSpace"] = state ? state.storageSpace : undefined;
            resourceInputs["subnetId"] = state ? state.subnetId : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["usedGroupNumber"] = state ? state.usedGroupNumber : undefined;
            resourceInputs["usedQueueNumber"] = state ? state.usedQueueNumber : undefined;
            resourceInputs["usedStorageSpace"] = state ? state.usedStorageSpace : undefined;
            resourceInputs["usedTopicNumber"] = state ? state.usedTopicNumber : undefined;
            resourceInputs["version"] = state ? state.version : undefined;
            resourceInputs["vpcId"] = state ? state.vpcId : undefined;
            resourceInputs["zoneIds"] = state ? state.zoneIds : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.chargeInfo === undefined) && !opts.urn) {
                throw new Error("Missing required property 'chargeInfo'");
            }
            if ((!args || args.computeSpec === undefined) && !opts.urn) {
                throw new Error("Missing required property 'computeSpec'");
            }
            if ((!args || args.fileReservedTime === undefined) && !opts.urn) {
                throw new Error("Missing required property 'fileReservedTime'");
            }
            if ((!args || args.storageSpace === undefined) && !opts.urn) {
                throw new Error("Missing required property 'storageSpace'");
            }
            if ((!args || args.subnetId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            if ((!args || args.version === undefined) && !opts.urn) {
                throw new Error("Missing required property 'version'");
            }
            if ((!args || args.zoneIds === undefined) && !opts.urn) {
                throw new Error("Missing required property 'zoneIds'");
            }
            resourceInputs["autoScaleQueue"] = args ? args.autoScaleQueue : undefined;
            resourceInputs["chargeInfo"] = args ? args.chargeInfo : undefined;
            resourceInputs["computeSpec"] = args ? args.computeSpec : undefined;
            resourceInputs["fileReservedTime"] = args ? args.fileReservedTime : undefined;
            resourceInputs["instanceDescription"] = args ? args.instanceDescription : undefined;
            resourceInputs["instanceName"] = args ? args.instanceName : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["storageSpace"] = args ? args.storageSpace : undefined;
            resourceInputs["subnetId"] = args ? args.subnetId : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["version"] = args ? args.version : undefined;
            resourceInputs["zoneIds"] = args ? args.zoneIds : undefined;
            resourceInputs["accountId"] = undefined /*out*/;
            resourceInputs["applyPrivateDnsToPublic"] = undefined /*out*/;
            resourceInputs["availableQueueNumber"] = undefined /*out*/;
            resourceInputs["connectionInfos"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["eipId"] = undefined /*out*/;
            resourceInputs["enableSsl"] = undefined /*out*/;
            resourceInputs["instanceStatus"] = undefined /*out*/;
            resourceInputs["regionId"] = undefined /*out*/;
            resourceInputs["sslMode"] = undefined /*out*/;
            resourceInputs["usedGroupNumber"] = undefined /*out*/;
            resourceInputs["usedQueueNumber"] = undefined /*out*/;
            resourceInputs["usedStorageSpace"] = undefined /*out*/;
            resourceInputs["usedTopicNumber"] = undefined /*out*/;
            resourceInputs["vpcId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(RocketMQInstance.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RocketMQInstance = RocketMQInstance;
/** @internal */
RocketMQInstance.__pulumiType = 'volcengine:rocketmq/rocketMQInstance:RocketMQInstance';
//# sourceMappingURL=rocketMQInstance.js.map