1. Packages
  2. Bytepluscc Provider
  3. API Docs
  4. autoscaling
  5. ScalingLifecycleHook
Viewing docs for bytepluscc v0.0.21
published on Thursday, Apr 2, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.21
published on Thursday, Apr 2, 2026 by Byteplus

    After the scaling group triggers scaling rules, health checks, and instance count checks, the lifecycle hook can suspend instances that are in the ‘joining’, ‘removing’, or ‘disabling’ state, putting them into the joining/removing suspended state. The instances are now in a waiting state, and you can perform custom operations during this period until the lifecycle hook times out or you manually end the suspension.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      scalingLifecycleHookDemo:
        type: bytepluscc:autoscaling:ScalingLifecycleHook
        name: ScalingLifecycleHookDemo
        properties:
          scalingGroupId: scg-yexxxxxxv6yn56hnvlm
          lifecycleHookName: ccapi-dx-1
          lifecycleHookType: SCALE_IN
          lifecycleHookTimeout: 1800
          lifecycleHookPolicy: CONTINUE
          lifecycleCommand:
            command_id: cmd-ybv3xxxxxxx51qxnx
            parameters: '{"KEY_PAIR_ID":"1024","KEY_PAIR_TIMEOUT":"360"}'
    

    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: bytepluscc: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 Bytepluscc.Autoscaling.ScalingLifecycleHook("scalingLifecycleHookResource", new()
    {
        LifecycleHookName = "string",
        LifecycleHookPolicy = "string",
        LifecycleHookTimeout = 0,
        LifecycleHookType = "string",
        ScalingGroupId = "string",
        LifecycleCommand = new Bytepluscc.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 = bytepluscc.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 bytepluscc.autoscaling.ScalingLifecycleHook("scalingLifecycleHookResource", {
        lifecycleHookName: "string",
        lifecycleHookPolicy: "string",
        lifecycleHookTimeout: 0,
        lifecycleHookType: "string",
        scalingGroupId: "string",
        lifecycleCommand: {
            commandId: "string",
            parameters: "string",
        },
    });
    
    type: bytepluscc: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:

    LifecycleHookName string
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    LifecycleHookPolicy string
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    LifecycleHookTimeout int
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    LifecycleHookType string
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    ScalingGroupId string
    Scaling group ID.
    LifecycleCommand Byteplus.ScalingLifecycleHookLifecycleCommand
    Cloud Assistant command information.
    LifecycleHookName string
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    LifecycleHookPolicy string
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    LifecycleHookTimeout int
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    LifecycleHookType string
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    ScalingGroupId string
    Scaling group ID.
    LifecycleCommand ScalingLifecycleHookLifecycleCommandArgs
    Cloud Assistant command information.
    lifecycleHookName String
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    lifecycleHookPolicy String
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    lifecycleHookTimeout Integer
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    lifecycleHookType String
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    scalingGroupId String
    Scaling group ID.
    lifecycleCommand ScalingLifecycleHookLifecycleCommand
    Cloud Assistant command information.
    lifecycleHookName string
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    lifecycleHookPolicy string
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    lifecycleHookTimeout number
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    lifecycleHookType string
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    scalingGroupId string
    Scaling group ID.
    lifecycleCommand ScalingLifecycleHookLifecycleCommand
    Cloud Assistant command information.
    lifecycle_hook_name str
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    lifecycle_hook_policy str
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    lifecycle_hook_timeout int
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    lifecycle_hook_type str
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    scaling_group_id str
    Scaling group ID.
    lifecycle_command ScalingLifecycleHookLifecycleCommandArgs
    Cloud Assistant command information.
    lifecycleHookName String
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    lifecycleHookPolicy String
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    lifecycleHookTimeout Number
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    lifecycleHookType String
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    scalingGroupId String
    Scaling group ID.
    lifecycleCommand Property Map
    Cloud Assistant command information.

    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.
    LifecycleHookId string
    Lifecycle hook ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleHookId string
    Lifecycle hook ID.
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleHookId String
    Lifecycle hook ID.
    id string
    The provider-assigned unique ID for this managed resource.
    lifecycleHookId string
    Lifecycle hook ID.
    id str
    The provider-assigned unique ID for this managed resource.
    lifecycle_hook_id str
    Lifecycle hook ID.
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleHookId String
    Lifecycle hook ID.

    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)
    resources:  _:    type: bytepluscc:autoscaling:ScalingLifecycleHook    get:      id: ${id}
    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.
    The following state arguments are supported:
    LifecycleCommand Byteplus.ScalingLifecycleHookLifecycleCommand
    Cloud Assistant command information.
    LifecycleHookId string
    Lifecycle hook ID.
    LifecycleHookName string
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    LifecycleHookPolicy string
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    LifecycleHookTimeout int
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    LifecycleHookType string
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    ScalingGroupId string
    Scaling group ID.
    LifecycleCommand ScalingLifecycleHookLifecycleCommandArgs
    Cloud Assistant command information.
    LifecycleHookId string
    Lifecycle hook ID.
    LifecycleHookName string
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    LifecycleHookPolicy string
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    LifecycleHookTimeout int
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    LifecycleHookType string
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    ScalingGroupId string
    Scaling group ID.
    lifecycleCommand ScalingLifecycleHookLifecycleCommand
    Cloud Assistant command information.
    lifecycleHookId String
    Lifecycle hook ID.
    lifecycleHookName String
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    lifecycleHookPolicy String
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    lifecycleHookTimeout Integer
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    lifecycleHookType String
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    scalingGroupId String
    Scaling group ID.
    lifecycleCommand ScalingLifecycleHookLifecycleCommand
    Cloud Assistant command information.
    lifecycleHookId string
    Lifecycle hook ID.
    lifecycleHookName string
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    lifecycleHookPolicy string
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    lifecycleHookTimeout number
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    lifecycleHookType string
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    scalingGroupId string
    Scaling group ID.
    lifecycle_command ScalingLifecycleHookLifecycleCommandArgs
    Cloud Assistant command information.
    lifecycle_hook_id str
    Lifecycle hook ID.
    lifecycle_hook_name str
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    lifecycle_hook_policy str
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    lifecycle_hook_timeout int
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    lifecycle_hook_type str
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    scaling_group_id str
    Scaling group ID.
    lifecycleCommand Property Map
    Cloud Assistant command information.
    lifecycleHookId String
    Lifecycle hook ID.
    lifecycleHookName String
    Lifecycle hook name, cannot be modified after creation. Values: Cannot start with a digit, hyphen, or underscore. Can only contain Chinese characters, letters, digits, underscores, and hyphens. Length must be between 1 and 128 characters.
    lifecycleHookPolicy String
    Policy executed after the instance suspension ends. Values: CONTINUE: Continue execution. REJECT: Abort subsequent actions. ROLLBACK: For elastic scale-in activities, the release of ECS instances is rejected and rollback is performed; for elastic scale-out activities, the effect is the same as REJECT.
    lifecycleHookTimeout Number
    Duration for which the ECS instance remains suspended. After timeout, the suspended state ends automatically and scaling actions continue according to the execution policy. Please evaluate the processing time for custom operations and set an appropriate timeout. Values: 30 to 21600 (6 hours), unit: s, must be an integer.
    lifecycleHookType String
    Type of scaling activity. When a specified type of scaling activity occurs, the lifecycle hook is triggered and the ECS instance is suspended. Values: SCALEIN: Elastic scale-in activity. SCALEOUT: Elastic scale-out activity.
    scalingGroupId String
    Scaling group ID.

    Supporting Types

    ScalingLifecycleHookLifecycleCommand, ScalingLifecycleHookLifecycleCommandArgs

    CommandId string
    Cloud Assistant command ID, indicates that after the lifecycle hook is triggered, the Cloud Assistant command is executed on the instance. If the command executes successfully, the post-suspend policy is executed according to CONTINUE. If the command fails, times out, or the lifecycle hook times out, the post-suspend policy is executed according to the LifecycleHookPolicy parameter configuration.
    Parameters string
    Parameters and values in the Cloud Assistant command. The number of parameters ranges from 0 to 60. Note: Parameters cannot be empty strings and can have up to 64 characters. Values can be empty strings. After Base64 encoding, the combined length of parameters and the original command content must not exceed 16 KB. The set of parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided.
    CommandId string
    Cloud Assistant command ID, indicates that after the lifecycle hook is triggered, the Cloud Assistant command is executed on the instance. If the command executes successfully, the post-suspend policy is executed according to CONTINUE. If the command fails, times out, or the lifecycle hook times out, the post-suspend policy is executed according to the LifecycleHookPolicy parameter configuration.
    Parameters string
    Parameters and values in the Cloud Assistant command. The number of parameters ranges from 0 to 60. Note: Parameters cannot be empty strings and can have up to 64 characters. Values can be empty strings. After Base64 encoding, the combined length of parameters and the original command content must not exceed 16 KB. The set of parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided.
    commandId String
    Cloud Assistant command ID, indicates that after the lifecycle hook is triggered, the Cloud Assistant command is executed on the instance. If the command executes successfully, the post-suspend policy is executed according to CONTINUE. If the command fails, times out, or the lifecycle hook times out, the post-suspend policy is executed according to the LifecycleHookPolicy parameter configuration.
    parameters String
    Parameters and values in the Cloud Assistant command. The number of parameters ranges from 0 to 60. Note: Parameters cannot be empty strings and can have up to 64 characters. Values can be empty strings. After Base64 encoding, the combined length of parameters and the original command content must not exceed 16 KB. The set of parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided.
    commandId string
    Cloud Assistant command ID, indicates that after the lifecycle hook is triggered, the Cloud Assistant command is executed on the instance. If the command executes successfully, the post-suspend policy is executed according to CONTINUE. If the command fails, times out, or the lifecycle hook times out, the post-suspend policy is executed according to the LifecycleHookPolicy parameter configuration.
    parameters string
    Parameters and values in the Cloud Assistant command. The number of parameters ranges from 0 to 60. Note: Parameters cannot be empty strings and can have up to 64 characters. Values can be empty strings. After Base64 encoding, the combined length of parameters and the original command content must not exceed 16 KB. The set of parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided.
    command_id str
    Cloud Assistant command ID, indicates that after the lifecycle hook is triggered, the Cloud Assistant command is executed on the instance. If the command executes successfully, the post-suspend policy is executed according to CONTINUE. If the command fails, times out, or the lifecycle hook times out, the post-suspend policy is executed according to the LifecycleHookPolicy parameter configuration.
    parameters str
    Parameters and values in the Cloud Assistant command. The number of parameters ranges from 0 to 60. Note: Parameters cannot be empty strings and can have up to 64 characters. Values can be empty strings. After Base64 encoding, the combined length of parameters and the original command content must not exceed 16 KB. The set of parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided.
    commandId String
    Cloud Assistant command ID, indicates that after the lifecycle hook is triggered, the Cloud Assistant command is executed on the instance. If the command executes successfully, the post-suspend policy is executed according to CONTINUE. If the command fails, times out, or the lifecycle hook times out, the post-suspend policy is executed according to the LifecycleHookPolicy parameter configuration.
    parameters String
    Parameters and values in the Cloud Assistant command. The number of parameters ranges from 0 to 60. Note: Parameters cannot be empty strings and can have up to 64 characters. Values can be empty strings. After Base64 encoding, the combined length of parameters and the original command content must not exceed 16 KB. The set of parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided.

    Import

    $ pulumi import bytepluscc:autoscaling/scalingLifecycleHook:ScalingLifecycleHook example "scaling_group_id|lifecycle_hook_id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.21
    published on Thursday, Apr 2, 2026 by Byteplus
      Try Pulumi Cloud free. Your team will thank you.