@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
370 lines (369 loc) • 13.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a resource to manage scaling group
* ## 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 fooScalingGroup: volcengine.autoscaling.ScalingGroup[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooScalingGroup.push(new volcengine.autoscaling.ScalingGroup(`fooScalingGroup-${range.value}`, {
* scalingGroupName: `acc-test-scaling-group-${range.value}`,
* subnetIds: [fooSubnet.id],
* multiAzPolicy: "BALANCE",
* desireInstanceNumber: 0,
* minInstanceNumber: 0,
* maxInstanceNumber: 10,
* instanceTerminatePolicy: "OldestInstance",
* defaultCooldown: 30,
* tags: [
* {
* key: "k2",
* value: "v2",
* },
* {
* key: "k1",
* value: "v1",
* },
* ],
* }));
* }
* ```
*
* ## Import
*
* ScalingGroup can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:autoscaling/scalingGroup:ScalingGroup default scg-mizl7m1kqccg5smt1bdpijuj
* ```
*/
export declare class ScalingGroup extends pulumi.CustomResource {
/**
* Get an existing ScalingGroup 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: string, id: pulumi.Input<pulumi.ID>, state?: ScalingGroupState, opts?: pulumi.CustomResourceOptions): ScalingGroup;
/**
* Returns true if the given object is an instance of ScalingGroup. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ScalingGroup;
/**
* The scaling configuration id which used by the scaling group.
*/
readonly activeScalingConfigurationId: pulumi.Output<string>;
/**
* The create time of the scaling group.
*/
readonly createdAt: pulumi.Output<string>;
/**
* ID of the RDS database instance.
*/
readonly dbInstanceIds: pulumi.Output<string[] | undefined>;
/**
* The default cooldown interval of the scaling group. Value range: 5 ~ 86400, unit: second. Default value: 300.
*/
readonly defaultCooldown: pulumi.Output<number>;
/**
* The desire instance number of the scaling group.
*/
readonly desireInstanceNumber: pulumi.Output<number>;
/**
* The health check type of the scaling group.
*/
readonly healthCheckType: pulumi.Output<string>;
/**
* The instance terminate policy of the scaling group. Valid values: OldestInstance, NewestInstance, OldestScalingConfigurationWithOldestInstance, OldestScalingConfigurationWithNewestInstance. Default value: OldestScalingConfigurationWithOldestInstance.
*/
readonly instanceTerminatePolicy: pulumi.Output<string>;
/**
* The ID of the launch template bound to the scaling group. The launch template and scaling configuration cannot take effect at the same time.
*/
readonly launchTemplateId: pulumi.Output<string | undefined>;
/**
* Specify instance specifications.
*/
readonly launchTemplateOverrides: pulumi.Output<outputs.autoscaling.ScalingGroupLaunchTemplateOverride[] | undefined>;
/**
* The version of the launch template bound to the scaling group. Valid values are the version number, Latest, or Default.
*/
readonly launchTemplateVersion: pulumi.Output<string | undefined>;
/**
* The lifecycle state of the scaling group.
*/
readonly lifecycleState: pulumi.Output<string>;
/**
* Grace period for health check of CLB instance in elastic group.
*/
readonly loadBalancerHealthCheckGracePeriod: pulumi.Output<number>;
/**
* The max instance number of the scaling group. Value range: 0 ~ 100.
*/
readonly maxInstanceNumber: pulumi.Output<number>;
/**
* The min instance number of the scaling group. Value range: 0 ~ 100.
*/
readonly minInstanceNumber: pulumi.Output<number>;
/**
* The multi az policy of the scaling group. Valid values: PRIORITY, BALANCE. Default value: PRIORITY.
*/
readonly multiAzPolicy: pulumi.Output<string>;
/**
* The ProjectName of the scaling group.
*/
readonly projectName: pulumi.Output<string>;
/**
* The id of the scaling group.
*/
readonly scalingGroupId: pulumi.Output<string>;
/**
* The name of the scaling group.
*/
readonly scalingGroupName: pulumi.Output<string>;
/**
* Example recycling mode for the elastic group, with values:
* release (default): Release mode.
* recycle: Shutdown recycling mode.
*/
readonly scalingMode: pulumi.Output<string>;
/**
* The load balancer server group attributes of the scaling group.
*/
readonly serverGroupAttributes: pulumi.Output<outputs.autoscaling.ScalingGroupServerGroupAttribute[] | undefined>;
/**
* The number of stopped instances.
*/
readonly stoppedInstanceCount: pulumi.Output<number>;
/**
* The list of the subnet id to which the ENI is connected.
*/
readonly subnetIds: pulumi.Output<string[]>;
/**
* Tags.
*/
readonly tags: pulumi.Output<outputs.autoscaling.ScalingGroupTag[] | undefined>;
/**
* The total instance count of the scaling group.
*/
readonly totalInstanceCount: pulumi.Output<number>;
/**
* The create time of the scaling group.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* The VPC id of the scaling group.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Create a ScalingGroup resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ScalingGroupArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ScalingGroup resources.
*/
export interface ScalingGroupState {
/**
* The scaling configuration id which used by the scaling group.
*/
activeScalingConfigurationId?: pulumi.Input<string>;
/**
* The create time of the scaling group.
*/
createdAt?: pulumi.Input<string>;
/**
* ID of the RDS database instance.
*/
dbInstanceIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The default cooldown interval of the scaling group. Value range: 5 ~ 86400, unit: second. Default value: 300.
*/
defaultCooldown?: pulumi.Input<number>;
/**
* The desire instance number of the scaling group.
*/
desireInstanceNumber?: pulumi.Input<number>;
/**
* The health check type of the scaling group.
*/
healthCheckType?: pulumi.Input<string>;
/**
* The instance terminate policy of the scaling group. Valid values: OldestInstance, NewestInstance, OldestScalingConfigurationWithOldestInstance, OldestScalingConfigurationWithNewestInstance. Default value: OldestScalingConfigurationWithOldestInstance.
*/
instanceTerminatePolicy?: pulumi.Input<string>;
/**
* The ID of the launch template bound to the scaling group. The launch template and scaling configuration cannot take effect at the same time.
*/
launchTemplateId?: pulumi.Input<string>;
/**
* Specify instance specifications.
*/
launchTemplateOverrides?: pulumi.Input<pulumi.Input<inputs.autoscaling.ScalingGroupLaunchTemplateOverride>[]>;
/**
* The version of the launch template bound to the scaling group. Valid values are the version number, Latest, or Default.
*/
launchTemplateVersion?: pulumi.Input<string>;
/**
* The lifecycle state of the scaling group.
*/
lifecycleState?: pulumi.Input<string>;
/**
* Grace period for health check of CLB instance in elastic group.
*/
loadBalancerHealthCheckGracePeriod?: pulumi.Input<number>;
/**
* The max instance number of the scaling group. Value range: 0 ~ 100.
*/
maxInstanceNumber?: pulumi.Input<number>;
/**
* The min instance number of the scaling group. Value range: 0 ~ 100.
*/
minInstanceNumber?: pulumi.Input<number>;
/**
* The multi az policy of the scaling group. Valid values: PRIORITY, BALANCE. Default value: PRIORITY.
*/
multiAzPolicy?: pulumi.Input<string>;
/**
* The ProjectName of the scaling group.
*/
projectName?: pulumi.Input<string>;
/**
* The id of the scaling group.
*/
scalingGroupId?: pulumi.Input<string>;
/**
* The name of the scaling group.
*/
scalingGroupName?: pulumi.Input<string>;
/**
* Example recycling mode for the elastic group, with values:
* release (default): Release mode.
* recycle: Shutdown recycling mode.
*/
scalingMode?: pulumi.Input<string>;
/**
* The load balancer server group attributes of the scaling group.
*/
serverGroupAttributes?: pulumi.Input<pulumi.Input<inputs.autoscaling.ScalingGroupServerGroupAttribute>[]>;
/**
* The number of stopped instances.
*/
stoppedInstanceCount?: pulumi.Input<number>;
/**
* The list of the subnet id to which the ENI is connected.
*/
subnetIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.autoscaling.ScalingGroupTag>[]>;
/**
* The total instance count of the scaling group.
*/
totalInstanceCount?: pulumi.Input<number>;
/**
* The create time of the scaling group.
*/
updatedAt?: pulumi.Input<string>;
/**
* The VPC id of the scaling group.
*/
vpcId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ScalingGroup resource.
*/
export interface ScalingGroupArgs {
/**
* ID of the RDS database instance.
*/
dbInstanceIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The default cooldown interval of the scaling group. Value range: 5 ~ 86400, unit: second. Default value: 300.
*/
defaultCooldown?: pulumi.Input<number>;
/**
* The desire instance number of the scaling group.
*/
desireInstanceNumber?: pulumi.Input<number>;
/**
* The instance terminate policy of the scaling group. Valid values: OldestInstance, NewestInstance, OldestScalingConfigurationWithOldestInstance, OldestScalingConfigurationWithNewestInstance. Default value: OldestScalingConfigurationWithOldestInstance.
*/
instanceTerminatePolicy?: pulumi.Input<string>;
/**
* The ID of the launch template bound to the scaling group. The launch template and scaling configuration cannot take effect at the same time.
*/
launchTemplateId?: pulumi.Input<string>;
/**
* Specify instance specifications.
*/
launchTemplateOverrides?: pulumi.Input<pulumi.Input<inputs.autoscaling.ScalingGroupLaunchTemplateOverride>[]>;
/**
* The version of the launch template bound to the scaling group. Valid values are the version number, Latest, or Default.
*/
launchTemplateVersion?: pulumi.Input<string>;
/**
* The max instance number of the scaling group. Value range: 0 ~ 100.
*/
maxInstanceNumber: pulumi.Input<number>;
/**
* The min instance number of the scaling group. Value range: 0 ~ 100.
*/
minInstanceNumber: pulumi.Input<number>;
/**
* The multi az policy of the scaling group. Valid values: PRIORITY, BALANCE. Default value: PRIORITY.
*/
multiAzPolicy?: pulumi.Input<string>;
/**
* The ProjectName of the scaling group.
*/
projectName?: pulumi.Input<string>;
/**
* The name of the scaling group.
*/
scalingGroupName: pulumi.Input<string>;
/**
* Example recycling mode for the elastic group, with values:
* release (default): Release mode.
* recycle: Shutdown recycling mode.
*/
scalingMode?: pulumi.Input<string>;
/**
* The load balancer server group attributes of the scaling group.
*/
serverGroupAttributes?: pulumi.Input<pulumi.Input<inputs.autoscaling.ScalingGroupServerGroupAttribute>[]>;
/**
* The list of the subnet id to which the ENI is connected.
*/
subnetIds: pulumi.Input<pulumi.Input<string>[]>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.autoscaling.ScalingGroupTag>[]>;
}