"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.ScalingConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## 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 fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
 *     securityGroupName: "acc-test-security-group",
 *     vpcId: fooVpc.id,
 * });
 * const fooImages = volcengine.ecs.getImages({
 *     osType: "Linux",
 *     visibility: "public",
 *     instanceTypeId: "ecs.g1.large",
 * });
 * const fooScalingGroup = new volcengine.autoscaling.ScalingGroup("fooScalingGroup", {
 *     scalingGroupName: "acc-test-scaling-group",
 *     subnetIds: [fooSubnet.id],
 *     multiAzPolicy: "BALANCE",
 *     desireInstanceNumber: 0,
 *     minInstanceNumber: 0,
 *     maxInstanceNumber: 1,
 *     instanceTerminatePolicy: "OldestInstance",
 *     defaultCooldown: 10,
 * });
 * const fooScalingConfiguration = new volcengine.autoscaling.ScalingConfiguration("fooScalingConfiguration", {
 *     scalingConfigurationName: "tf-test",
 *     scalingGroupId: fooScalingGroup.id,
 *     imageId: fooImages.then(fooImages => fooImages.images?.[0]?.imageId),
 *     instanceTypes: ["ecs.g2i.large"],
 *     instanceName: "tf-test",
 *     instanceDescription: "",
 *     hostName: "",
 *     password: "",
 *     keyPairName: "tf-keypair",
 *     securityEnhancementStrategy: "InActive",
 *     volumes: [
 *         {
 *             volumeType: "ESSD_PL0",
 *             size: 20,
 *             deleteWithInstance: false,
 *         },
 *         {
 *             volumeType: "ESSD_PL0",
 *             size: 50,
 *             deleteWithInstance: true,
 *         },
 *     ],
 *     securityGroupIds: [fooSecurityGroup.id],
 *     eipBandwidth: 10,
 *     eipIsp: "ChinaMobile",
 *     eipBillingType: "PostPaidByBandwidth",
 *     userData: "IyEvYmluL2Jhc2gKZWNobyAidGVzdCI=",
 *     tags: [
 *         {
 *             key: "tf-key1",
 *             value: "tf-value1",
 *         },
 *         {
 *             key: "tf-key2",
 *             value: "tf-value2",
 *         },
 *     ],
 *     projectName: "default",
 *     hpcClusterId: "",
 *     spotStrategy: "NoSpot",
 * });
 * ```
 *
 * ## Import
 *
 * ScalingConfiguration can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:autoscaling/scalingConfiguration:ScalingConfiguration default scc-ybkuck3mx8cm9tm5yglz
 * ```
 */
class ScalingConfiguration extends pulumi.CustomResource {
    /**
     * Get an existing ScalingConfiguration 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 ScalingConfiguration(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of ScalingConfiguration.  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'] === ScalingConfiguration.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createdAt"] = state ? state.createdAt : undefined;
            resourceInputs["eipBandwidth"] = state ? state.eipBandwidth : undefined;
            resourceInputs["eipBillingType"] = state ? state.eipBillingType : undefined;
            resourceInputs["eipIsp"] = state ? state.eipIsp : undefined;
            resourceInputs["hostName"] = state ? state.hostName : undefined;
            resourceInputs["hpcClusterId"] = state ? state.hpcClusterId : undefined;
            resourceInputs["imageId"] = state ? state.imageId : undefined;
            resourceInputs["instanceDescription"] = state ? state.instanceDescription : undefined;
            resourceInputs["instanceName"] = state ? state.instanceName : undefined;
            resourceInputs["instanceTypes"] = state ? state.instanceTypes : undefined;
            resourceInputs["ipv6AddressCount"] = state ? state.ipv6AddressCount : undefined;
            resourceInputs["keyPairName"] = state ? state.keyPairName : undefined;
            resourceInputs["lifecycleState"] = state ? state.lifecycleState : undefined;
            resourceInputs["password"] = state ? state.password : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["scalingConfigurationId"] = state ? state.scalingConfigurationId : undefined;
            resourceInputs["scalingConfigurationName"] = state ? state.scalingConfigurationName : undefined;
            resourceInputs["scalingGroupId"] = state ? state.scalingGroupId : undefined;
            resourceInputs["securityEnhancementStrategy"] = state ? state.securityEnhancementStrategy : undefined;
            resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined;
            resourceInputs["spotStrategy"] = state ? state.spotStrategy : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
            resourceInputs["userData"] = state ? state.userData : undefined;
            resourceInputs["volumes"] = state ? state.volumes : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.imageId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'imageId'");
            }
            if ((!args || args.instanceName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'instanceName'");
            }
            if ((!args || args.instanceTypes === undefined) && !opts.urn) {
                throw new Error("Missing required property 'instanceTypes'");
            }
            if ((!args || args.scalingConfigurationName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'scalingConfigurationName'");
            }
            if ((!args || args.scalingGroupId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'scalingGroupId'");
            }
            if ((!args || args.securityGroupIds === undefined) && !opts.urn) {
                throw new Error("Missing required property 'securityGroupIds'");
            }
            if ((!args || args.volumes === undefined) && !opts.urn) {
                throw new Error("Missing required property 'volumes'");
            }
            resourceInputs["eipBandwidth"] = args ? args.eipBandwidth : undefined;
            resourceInputs["eipBillingType"] = args ? args.eipBillingType : undefined;
            resourceInputs["eipIsp"] = args ? args.eipIsp : undefined;
            resourceInputs["hostName"] = args ? args.hostName : undefined;
            resourceInputs["hpcClusterId"] = args ? args.hpcClusterId : undefined;
            resourceInputs["imageId"] = args ? args.imageId : undefined;
            resourceInputs["instanceDescription"] = args ? args.instanceDescription : undefined;
            resourceInputs["instanceName"] = args ? args.instanceName : undefined;
            resourceInputs["instanceTypes"] = args ? args.instanceTypes : undefined;
            resourceInputs["ipv6AddressCount"] = args ? args.ipv6AddressCount : undefined;
            resourceInputs["keyPairName"] = args ? args.keyPairName : undefined;
            resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["scalingConfigurationName"] = args ? args.scalingConfigurationName : undefined;
            resourceInputs["scalingGroupId"] = args ? args.scalingGroupId : undefined;
            resourceInputs["securityEnhancementStrategy"] = args ? args.securityEnhancementStrategy : undefined;
            resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined;
            resourceInputs["spotStrategy"] = args ? args.spotStrategy : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["userData"] = args ? args.userData : undefined;
            resourceInputs["volumes"] = args ? args.volumes : undefined;
            resourceInputs["createdAt"] = undefined /*out*/;
            resourceInputs["lifecycleState"] = undefined /*out*/;
            resourceInputs["scalingConfigurationId"] = undefined /*out*/;
            resourceInputs["updatedAt"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["password"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(ScalingConfiguration.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ScalingConfiguration = ScalingConfiguration;
/** @internal */
ScalingConfiguration.__pulumiType = 'volcengine:autoscaling/scalingConfiguration:ScalingConfiguration';
//# sourceMappingURL=scalingConfiguration.js.map