"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.CloudServer = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage veenedge cloud server
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.veenedge.CloudServer("foo", {
 *     billingConfig: {
 *         bandwidthBillingMethod: "MonthlyP95",
 *         computingBillingMethod: "MonthlyPeak",
 *     },
 *     cloudserverName: "tf-test",
 *     defaultAreaName: "C******na",
 *     defaultIsp: "CMCC",
 *     imageId: "image*****viqm",
 *     networkConfig: {
 *         bandwidthPeak: "5",
 *     },
 *     scheduleStrategy: {
 *         networkStrategy: "region",
 *         priceStrategy: "high_priority",
 *         scheduleStrategy: "dispersion",
 *     },
 *     secretData: "sshkey-47*****wgc",
 *     secretType: "KeyPair",
 *     serverAreaLevel: "region",
 *     specName: "veEN****rge",
 *     storageConfig: {
 *         dataDiskLists: [{
 *             capacity: "20",
 *             storageType: "CloudBlockSSD",
 *         }],
 *         systemDisk: {
 *             capacity: "40",
 *             storageType: "CloudBlockSSD",
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * CloudServer can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:veenedge/cloudServer:CloudServer default cloudserver-n769ewmjjqyqh5dv
 * ```
 *
 * After the veenedge cloud server is created, a default edge instance will be created, we recommend managing this default instance as follows
 *
 * resource "volcengine_veenedge_instance" "foo1" {
 *
 *   instance_id = volcengine_veenedge_cloud_server.foo.default_instance_id
 *
 * }
 */
class CloudServer extends pulumi.CustomResource {
    /**
     * Get an existing CloudServer 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 CloudServer(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of CloudServer.  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'] === CloudServer.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["billingConfig"] = state ? state.billingConfig : undefined;
            resourceInputs["cloudserverName"] = state ? state.cloudserverName : undefined;
            resourceInputs["customData"] = state ? state.customData : undefined;
            resourceInputs["defaultAreaName"] = state ? state.defaultAreaName : undefined;
            resourceInputs["defaultClusterName"] = state ? state.defaultClusterName : undefined;
            resourceInputs["defaultInstanceId"] = state ? state.defaultInstanceId : undefined;
            resourceInputs["defaultIsp"] = state ? state.defaultIsp : undefined;
            resourceInputs["imageId"] = state ? state.imageId : undefined;
            resourceInputs["networkConfig"] = state ? state.networkConfig : undefined;
            resourceInputs["scheduleStrategy"] = state ? state.scheduleStrategy : undefined;
            resourceInputs["secretData"] = state ? state.secretData : undefined;
            resourceInputs["secretType"] = state ? state.secretType : undefined;
            resourceInputs["serverAreaLevel"] = state ? state.serverAreaLevel : undefined;
            resourceInputs["specName"] = state ? state.specName : undefined;
            resourceInputs["storageConfig"] = state ? state.storageConfig : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.cloudserverName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'cloudserverName'");
            }
            if ((!args || args.defaultAreaName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'defaultAreaName'");
            }
            if ((!args || args.defaultIsp === undefined) && !opts.urn) {
                throw new Error("Missing required property 'defaultIsp'");
            }
            if ((!args || args.imageId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'imageId'");
            }
            if ((!args || args.networkConfig === undefined) && !opts.urn) {
                throw new Error("Missing required property 'networkConfig'");
            }
            if ((!args || args.scheduleStrategy === undefined) && !opts.urn) {
                throw new Error("Missing required property 'scheduleStrategy'");
            }
            if ((!args || args.secretType === undefined) && !opts.urn) {
                throw new Error("Missing required property 'secretType'");
            }
            if ((!args || args.serverAreaLevel === undefined) && !opts.urn) {
                throw new Error("Missing required property 'serverAreaLevel'");
            }
            if ((!args || args.specName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'specName'");
            }
            if ((!args || args.storageConfig === undefined) && !opts.urn) {
                throw new Error("Missing required property 'storageConfig'");
            }
            resourceInputs["billingConfig"] = args ? args.billingConfig : undefined;
            resourceInputs["cloudserverName"] = args ? args.cloudserverName : undefined;
            resourceInputs["customData"] = args ? args.customData : undefined;
            resourceInputs["defaultAreaName"] = args ? args.defaultAreaName : undefined;
            resourceInputs["defaultClusterName"] = args ? args.defaultClusterName : undefined;
            resourceInputs["defaultIsp"] = args ? args.defaultIsp : undefined;
            resourceInputs["imageId"] = args ? args.imageId : undefined;
            resourceInputs["networkConfig"] = args ? args.networkConfig : undefined;
            resourceInputs["scheduleStrategy"] = args ? args.scheduleStrategy : undefined;
            resourceInputs["secretData"] = args ? args.secretData : undefined;
            resourceInputs["secretType"] = args ? args.secretType : undefined;
            resourceInputs["serverAreaLevel"] = args ? args.serverAreaLevel : undefined;
            resourceInputs["specName"] = args ? args.specName : undefined;
            resourceInputs["storageConfig"] = args ? args.storageConfig : undefined;
            resourceInputs["defaultInstanceId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(CloudServer.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CloudServer = CloudServer;
/** @internal */
CloudServer.__pulumiType = 'volcengine:veenedge/cloudServer:CloudServer';
//# sourceMappingURL=cloudServer.js.map