volcengine.autoscaling.ScalingLifecycleHook
Explore with Pulumi AI
Provides a resource to manage scaling lifecycle hook
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooCommand = new Volcengine.Ecs.Command("fooCommand", new()
{
Description = "tf",
WorkingDir = "/home",
Username = "root",
Timeout = 100,
CommandContent = "IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi",
});
var fooScalingGroup = new Volcengine.Autoscaling.ScalingGroup("fooScalingGroup", new()
{
ScalingGroupName = "acc-test-scaling-group-lifecycle",
SubnetIds = new[]
{
fooSubnet.Id,
},
MultiAzPolicy = "BALANCE",
DesireInstanceNumber = 0,
MinInstanceNumber = 0,
MaxInstanceNumber = 1,
InstanceTerminatePolicy = "OldestInstance",
DefaultCooldown = 10,
});
var fooScalingLifecycleHook = new Volcengine.Autoscaling.ScalingLifecycleHook("fooScalingLifecycleHook", new()
{
LifecycleHookName = "acc-test-lifecycle",
LifecycleHookPolicy = "ROLLBACK",
LifecycleHookTimeout = 300,
LifecycleHookType = "SCALE_OUT",
ScalingGroupId = fooScalingGroup.Id,
});
// lifecycle_command {
// command_id = volcengine_ecs_command.foo.id
// parameters = "{}"
// }
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/autoscaling"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
_, err = ecs.NewCommand(ctx, "fooCommand", &ecs.CommandArgs{
Description: pulumi.String("tf"),
WorkingDir: pulumi.String("/home"),
Username: pulumi.String("root"),
Timeout: pulumi.Int(100),
CommandContent: pulumi.String("IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi"),
})
if err != nil {
return err
}
fooScalingGroup, err := autoscaling.NewScalingGroup(ctx, "fooScalingGroup", &autoscaling.ScalingGroupArgs{
ScalingGroupName: pulumi.String("acc-test-scaling-group-lifecycle"),
SubnetIds: pulumi.StringArray{
fooSubnet.ID(),
},
MultiAzPolicy: pulumi.String("BALANCE"),
DesireInstanceNumber: pulumi.Int(0),
MinInstanceNumber: pulumi.Int(0),
MaxInstanceNumber: pulumi.Int(1),
InstanceTerminatePolicy: pulumi.String("OldestInstance"),
DefaultCooldown: pulumi.Int(10),
})
if err != nil {
return err
}
_, err = autoscaling.NewScalingLifecycleHook(ctx, "fooScalingLifecycleHook", &autoscaling.ScalingLifecycleHookArgs{
LifecycleHookName: pulumi.String("acc-test-lifecycle"),
LifecycleHookPolicy: pulumi.String("ROLLBACK"),
LifecycleHookTimeout: pulumi.Int(300),
LifecycleHookType: pulumi.String("SCALE_OUT"),
ScalingGroupId: fooScalingGroup.ID(),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.ecs.Command;
import com.pulumi.volcengine.ecs.CommandArgs;
import com.pulumi.volcengine.autoscaling.ScalingGroup;
import com.pulumi.volcengine.autoscaling.ScalingGroupArgs;
import com.pulumi.volcengine.autoscaling.ScalingLifecycleHook;
import com.pulumi.volcengine.autoscaling.ScalingLifecycleHookArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooCommand = new Command("fooCommand", CommandArgs.builder()
.description("tf")
.workingDir("/home")
.username("root")
.timeout(100)
.commandContent("IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi")
.build());
var fooScalingGroup = new ScalingGroup("fooScalingGroup", ScalingGroupArgs.builder()
.scalingGroupName("acc-test-scaling-group-lifecycle")
.subnetIds(fooSubnet.id())
.multiAzPolicy("BALANCE")
.desireInstanceNumber(0)
.minInstanceNumber(0)
.maxInstanceNumber(1)
.instanceTerminatePolicy("OldestInstance")
.defaultCooldown(10)
.build());
var fooScalingLifecycleHook = new ScalingLifecycleHook("fooScalingLifecycleHook", ScalingLifecycleHookArgs.builder()
.lifecycleHookName("acc-test-lifecycle")
.lifecycleHookPolicy("ROLLBACK")
.lifecycleHookTimeout(300)
.lifecycleHookType("SCALE_OUT")
.scalingGroupId(fooScalingGroup.id())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_command = volcengine.ecs.Command("fooCommand",
description="tf",
working_dir="/home",
username="root",
timeout=100,
command_content="IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi")
foo_scaling_group = volcengine.autoscaling.ScalingGroup("fooScalingGroup",
scaling_group_name="acc-test-scaling-group-lifecycle",
subnet_ids=[foo_subnet.id],
multi_az_policy="BALANCE",
desire_instance_number=0,
min_instance_number=0,
max_instance_number=1,
instance_terminate_policy="OldestInstance",
default_cooldown=10)
foo_scaling_lifecycle_hook = volcengine.autoscaling.ScalingLifecycleHook("fooScalingLifecycleHook",
lifecycle_hook_name="acc-test-lifecycle",
lifecycle_hook_policy="ROLLBACK",
lifecycle_hook_timeout=300,
lifecycle_hook_type="SCALE_OUT",
scaling_group_id=foo_scaling_group.id)
# lifecycle_command {
# command_id = volcengine_ecs_command.foo.id
# parameters = "{}"
# }
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
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 fooCommand = new volcengine.ecs.Command("fooCommand", {
description: "tf",
workingDir: "/home",
username: "root",
timeout: 100,
commandContent: "IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi",
});
const fooScalingGroup = new volcengine.autoscaling.ScalingGroup("fooScalingGroup", {
scalingGroupName: "acc-test-scaling-group-lifecycle",
subnetIds: [fooSubnet.id],
multiAzPolicy: "BALANCE",
desireInstanceNumber: 0,
minInstanceNumber: 0,
maxInstanceNumber: 1,
instanceTerminatePolicy: "OldestInstance",
defaultCooldown: 10,
});
const fooScalingLifecycleHook = new volcengine.autoscaling.ScalingLifecycleHook("fooScalingLifecycleHook", {
lifecycleHookName: "acc-test-lifecycle",
lifecycleHookPolicy: "ROLLBACK",
lifecycleHookTimeout: 300,
lifecycleHookType: "SCALE_OUT",
scalingGroupId: fooScalingGroup.id,
});
// lifecycle_command {
// command_id = volcengine_ecs_command.foo.id
// parameters = "{}"
// }
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooCommand:
type: volcengine:ecs:Command
properties:
description: tf
workingDir: /home
username: root
timeout: 100
commandContent: IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi
fooScalingGroup:
type: volcengine:autoscaling:ScalingGroup
properties:
scalingGroupName: acc-test-scaling-group-lifecycle
subnetIds:
- ${fooSubnet.id}
multiAzPolicy: BALANCE
desireInstanceNumber: 0
minInstanceNumber: 0
maxInstanceNumber: 1
instanceTerminatePolicy: OldestInstance
defaultCooldown: 10
fooScalingLifecycleHook:
type: volcengine:autoscaling:ScalingLifecycleHook
properties:
lifecycleHookName: acc-test-lifecycle
lifecycleHookPolicy: ROLLBACK
lifecycleHookTimeout: 300
lifecycleHookType: SCALE_OUT
scalingGroupId: ${fooScalingGroup.id}
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
Create ScalingLifecycleHook Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScalingLifecycleHook(name: string, args: ScalingLifecycleHookArgs, opts?: CustomResourceOptions);
@overload
def ScalingLifecycleHook(resource_name: str,
args: ScalingLifecycleHookArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScalingLifecycleHook(resource_name: str,
opts: Optional[ResourceOptions] = None,
lifecycle_hook_name: Optional[str] = None,
lifecycle_hook_policy: Optional[str] = None,
lifecycle_hook_timeout: Optional[int] = None,
lifecycle_hook_type: Optional[str] = None,
scaling_group_id: Optional[str] = None,
lifecycle_command: Optional[ScalingLifecycleHookLifecycleCommandArgs] = None)
func NewScalingLifecycleHook(ctx *Context, name string, args ScalingLifecycleHookArgs, opts ...ResourceOption) (*ScalingLifecycleHook, error)
public ScalingLifecycleHook(string name, ScalingLifecycleHookArgs args, CustomResourceOptions? opts = null)
public ScalingLifecycleHook(String name, ScalingLifecycleHookArgs args)
public ScalingLifecycleHook(String name, ScalingLifecycleHookArgs args, CustomResourceOptions options)
type: volcengine:autoscaling:ScalingLifecycleHook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ScalingLifecycleHookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ScalingLifecycleHookArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ScalingLifecycleHookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScalingLifecycleHookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScalingLifecycleHookArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var scalingLifecycleHookResource = new Volcengine.Autoscaling.ScalingLifecycleHook("scalingLifecycleHookResource", new()
{
LifecycleHookName = "string",
LifecycleHookPolicy = "string",
LifecycleHookTimeout = 0,
LifecycleHookType = "string",
ScalingGroupId = "string",
LifecycleCommand = new Volcengine.Autoscaling.Inputs.ScalingLifecycleHookLifecycleCommandArgs
{
CommandId = "string",
Parameters = "string",
},
});
example, err := autoscaling.NewScalingLifecycleHook(ctx, "scalingLifecycleHookResource", &autoscaling.ScalingLifecycleHookArgs{
LifecycleHookName: pulumi.String("string"),
LifecycleHookPolicy: pulumi.String("string"),
LifecycleHookTimeout: pulumi.Int(0),
LifecycleHookType: pulumi.String("string"),
ScalingGroupId: pulumi.String("string"),
LifecycleCommand: &autoscaling.ScalingLifecycleHookLifecycleCommandArgs{
CommandId: pulumi.String("string"),
Parameters: pulumi.String("string"),
},
})
var scalingLifecycleHookResource = new ScalingLifecycleHook("scalingLifecycleHookResource", ScalingLifecycleHookArgs.builder()
.lifecycleHookName("string")
.lifecycleHookPolicy("string")
.lifecycleHookTimeout(0)
.lifecycleHookType("string")
.scalingGroupId("string")
.lifecycleCommand(ScalingLifecycleHookLifecycleCommandArgs.builder()
.commandId("string")
.parameters("string")
.build())
.build());
scaling_lifecycle_hook_resource = volcengine.autoscaling.ScalingLifecycleHook("scalingLifecycleHookResource",
lifecycle_hook_name="string",
lifecycle_hook_policy="string",
lifecycle_hook_timeout=0,
lifecycle_hook_type="string",
scaling_group_id="string",
lifecycle_command={
"command_id": "string",
"parameters": "string",
})
const scalingLifecycleHookResource = new volcengine.autoscaling.ScalingLifecycleHook("scalingLifecycleHookResource", {
lifecycleHookName: "string",
lifecycleHookPolicy: "string",
lifecycleHookTimeout: 0,
lifecycleHookType: "string",
scalingGroupId: "string",
lifecycleCommand: {
commandId: "string",
parameters: "string",
},
});
type: volcengine:autoscaling:ScalingLifecycleHook
properties:
lifecycleCommand:
commandId: string
parameters: string
lifecycleHookName: string
lifecycleHookPolicy: string
lifecycleHookTimeout: 0
lifecycleHookType: string
scalingGroupId: string
ScalingLifecycleHook Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ScalingLifecycleHook resource accepts the following input properties:
- Lifecycle
Hook stringName - The name of the lifecycle hook.
- Lifecycle
Hook stringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- Lifecycle
Hook intTimeout - The timeout of the lifecycle hook.
- Lifecycle
Hook stringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- Scaling
Group stringId - The id of the scaling group.
- Lifecycle
Command ScalingLifecycle Hook Lifecycle Command - Batch job command.
- Lifecycle
Hook stringName - The name of the lifecycle hook.
- Lifecycle
Hook stringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- Lifecycle
Hook intTimeout - The timeout of the lifecycle hook.
- Lifecycle
Hook stringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- Scaling
Group stringId - The id of the scaling group.
- Lifecycle
Command ScalingLifecycle Hook Lifecycle Command Args - Batch job command.
- lifecycle
Hook StringName - The name of the lifecycle hook.
- lifecycle
Hook StringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- lifecycle
Hook IntegerTimeout - The timeout of the lifecycle hook.
- lifecycle
Hook StringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- scaling
Group StringId - The id of the scaling group.
- lifecycle
Command ScalingLifecycle Hook Lifecycle Command - Batch job command.
- lifecycle
Hook stringName - The name of the lifecycle hook.
- lifecycle
Hook stringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- lifecycle
Hook numberTimeout - The timeout of the lifecycle hook.
- lifecycle
Hook stringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- scaling
Group stringId - The id of the scaling group.
- lifecycle
Command ScalingLifecycle Hook Lifecycle Command - Batch job command.
- lifecycle_
hook_ strname - The name of the lifecycle hook.
- lifecycle_
hook_ strpolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- lifecycle_
hook_ inttimeout - The timeout of the lifecycle hook.
- lifecycle_
hook_ strtype - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- scaling_
group_ strid - The id of the scaling group.
- lifecycle_
command ScalingLifecycle Hook Lifecycle Command Args - Batch job command.
- lifecycle
Hook StringName - The name of the lifecycle hook.
- lifecycle
Hook StringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- lifecycle
Hook NumberTimeout - The timeout of the lifecycle hook.
- lifecycle
Hook StringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- scaling
Group StringId - The id of the scaling group.
- lifecycle
Command Property Map - Batch job command.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScalingLifecycleHook resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Hook stringId - The id of the lifecycle hook.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Hook stringId - The id of the lifecycle hook.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Hook StringId - The id of the lifecycle hook.
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
Hook stringId - The id of the lifecycle hook.
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_
hook_ strid - The id of the lifecycle hook.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Hook StringId - The id of the lifecycle hook.
Look up Existing ScalingLifecycleHook Resource
Get an existing ScalingLifecycleHook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ScalingLifecycleHookState, opts?: CustomResourceOptions): ScalingLifecycleHook
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
lifecycle_command: Optional[ScalingLifecycleHookLifecycleCommandArgs] = None,
lifecycle_hook_id: Optional[str] = None,
lifecycle_hook_name: Optional[str] = None,
lifecycle_hook_policy: Optional[str] = None,
lifecycle_hook_timeout: Optional[int] = None,
lifecycle_hook_type: Optional[str] = None,
scaling_group_id: Optional[str] = None) -> ScalingLifecycleHook
func GetScalingLifecycleHook(ctx *Context, name string, id IDInput, state *ScalingLifecycleHookState, opts ...ResourceOption) (*ScalingLifecycleHook, error)
public static ScalingLifecycleHook Get(string name, Input<string> id, ScalingLifecycleHookState? state, CustomResourceOptions? opts = null)
public static ScalingLifecycleHook get(String name, Output<String> id, ScalingLifecycleHookState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Lifecycle
Command ScalingLifecycle Hook Lifecycle Command - Batch job command.
- Lifecycle
Hook stringId - The id of the lifecycle hook.
- Lifecycle
Hook stringName - The name of the lifecycle hook.
- Lifecycle
Hook stringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- Lifecycle
Hook intTimeout - The timeout of the lifecycle hook.
- Lifecycle
Hook stringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- Scaling
Group stringId - The id of the scaling group.
- Lifecycle
Command ScalingLifecycle Hook Lifecycle Command Args - Batch job command.
- Lifecycle
Hook stringId - The id of the lifecycle hook.
- Lifecycle
Hook stringName - The name of the lifecycle hook.
- Lifecycle
Hook stringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- Lifecycle
Hook intTimeout - The timeout of the lifecycle hook.
- Lifecycle
Hook stringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- Scaling
Group stringId - The id of the scaling group.
- lifecycle
Command ScalingLifecycle Hook Lifecycle Command - Batch job command.
- lifecycle
Hook StringId - The id of the lifecycle hook.
- lifecycle
Hook StringName - The name of the lifecycle hook.
- lifecycle
Hook StringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- lifecycle
Hook IntegerTimeout - The timeout of the lifecycle hook.
- lifecycle
Hook StringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- scaling
Group StringId - The id of the scaling group.
- lifecycle
Command ScalingLifecycle Hook Lifecycle Command - Batch job command.
- lifecycle
Hook stringId - The id of the lifecycle hook.
- lifecycle
Hook stringName - The name of the lifecycle hook.
- lifecycle
Hook stringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- lifecycle
Hook numberTimeout - The timeout of the lifecycle hook.
- lifecycle
Hook stringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- scaling
Group stringId - The id of the scaling group.
- lifecycle_
command ScalingLifecycle Hook Lifecycle Command Args - Batch job command.
- lifecycle_
hook_ strid - The id of the lifecycle hook.
- lifecycle_
hook_ strname - The name of the lifecycle hook.
- lifecycle_
hook_ strpolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- lifecycle_
hook_ inttimeout - The timeout of the lifecycle hook.
- lifecycle_
hook_ strtype - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- scaling_
group_ strid - The id of the scaling group.
- lifecycle
Command Property Map - Batch job command.
- lifecycle
Hook StringId - The id of the lifecycle hook.
- lifecycle
Hook StringName - The name of the lifecycle hook.
- lifecycle
Hook StringPolicy - The policy of the lifecycle hook. Valid values: CONTINUE, REJECT, ROLLBACK.
- lifecycle
Hook NumberTimeout - The timeout of the lifecycle hook.
- lifecycle
Hook StringType - The type of the lifecycle hook. Valid values: SCALE_IN, SCALE_OUT.
- scaling
Group StringId - The id of the scaling group.
Supporting Types
ScalingLifecycleHookLifecycleCommand, ScalingLifecycleHookLifecycleCommandArgs
- Command
Id string - Batch job command ID, which indicates the batch job command to be executed after triggering the lifecycle hook and installed in the instance.
- Parameters string
- Parameters and parameter values in batch job commands. The number of parameters ranges from 0 to 60.
- Command
Id string - Batch job command ID, which indicates the batch job command to be executed after triggering the lifecycle hook and installed in the instance.
- Parameters string
- Parameters and parameter values in batch job commands. The number of parameters ranges from 0 to 60.
- command
Id String - Batch job command ID, which indicates the batch job command to be executed after triggering the lifecycle hook and installed in the instance.
- parameters String
- Parameters and parameter values in batch job commands. The number of parameters ranges from 0 to 60.
- command
Id string - Batch job command ID, which indicates the batch job command to be executed after triggering the lifecycle hook and installed in the instance.
- parameters string
- Parameters and parameter values in batch job commands. The number of parameters ranges from 0 to 60.
- command_
id str - Batch job command ID, which indicates the batch job command to be executed after triggering the lifecycle hook and installed in the instance.
- parameters str
- Parameters and parameter values in batch job commands. The number of parameters ranges from 0 to 60.
- command
Id String - Batch job command ID, which indicates the batch job command to be executed after triggering the lifecycle hook and installed in the instance.
- parameters String
- Parameters and parameter values in batch job commands. The number of parameters ranges from 0 to 60.
Import
ScalingLifecycleHook can be imported using the ScalingGroupId:LifecycleHookId, e.g.
$ pulumi import volcengine:autoscaling/scalingLifecycleHook:ScalingLifecycleHook default scg-yblfbfhy7agh9zn72iaz:sgh-ybqholahe4gso0ee88sd
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.