1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. AsLifecycleHookV1
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.AsLifecycleHookV1

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages an AS Lifecycle Hook resource within FlexibleEngine.

    Example Usage

    Basic Lifecycle Hook

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const hookName = config.requireObject("hookName");
    const asGroupId = config.requireObject("asGroupId");
    const smnTopicUrn = config.requireObject("smnTopicUrn");
    const test = new flexibleengine.AsLifecycleHookV1("test", {
        scalingGroupId: asGroupId,
        type: "ADD",
        defaultResult: "ABANDON",
        notificationTopicUrn: smnTopicUrn,
        notificationMessage: "This is a test message",
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    hook_name = config.require_object("hookName")
    as_group_id = config.require_object("asGroupId")
    smn_topic_urn = config.require_object("smnTopicUrn")
    test = flexibleengine.AsLifecycleHookV1("test",
        scaling_group_id=as_group_id,
        type="ADD",
        default_result="ABANDON",
        notification_topic_urn=smn_topic_urn,
        notification_message="This is a test message")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		hookName := cfg.RequireObject("hookName")
    		asGroupId := cfg.RequireObject("asGroupId")
    		smnTopicUrn := cfg.RequireObject("smnTopicUrn")
    		_, err := flexibleengine.NewAsLifecycleHookV1(ctx, "test", &flexibleengine.AsLifecycleHookV1Args{
    			ScalingGroupId:       pulumi.Any(asGroupId),
    			Type:                 pulumi.String("ADD"),
    			DefaultResult:        pulumi.String("ABANDON"),
    			NotificationTopicUrn: pulumi.Any(smnTopicUrn),
    			NotificationMessage:  pulumi.String("This is a test message"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var hookName = config.RequireObject<dynamic>("hookName");
        var asGroupId = config.RequireObject<dynamic>("asGroupId");
        var smnTopicUrn = config.RequireObject<dynamic>("smnTopicUrn");
        var test = new Flexibleengine.AsLifecycleHookV1("test", new()
        {
            ScalingGroupId = asGroupId,
            Type = "ADD",
            DefaultResult = "ABANDON",
            NotificationTopicUrn = smnTopicUrn,
            NotificationMessage = "This is a test message",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.AsLifecycleHookV1;
    import com.pulumi.flexibleengine.AsLifecycleHookV1Args;
    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 config = ctx.config();
            final var hookName = config.get("hookName");
            final var asGroupId = config.get("asGroupId");
            final var smnTopicUrn = config.get("smnTopicUrn");
            var test = new AsLifecycleHookV1("test", AsLifecycleHookV1Args.builder()
                .scalingGroupId(asGroupId)
                .type("ADD")
                .defaultResult("ABANDON")
                .notificationTopicUrn(smnTopicUrn)
                .notificationMessage("This is a test message")
                .build());
    
        }
    }
    
    configuration:
      hookName:
        type: dynamic
      asGroupId:
        type: dynamic
      smnTopicUrn:
        type: dynamic
    resources:
      test:
        type: flexibleengine:AsLifecycleHookV1
        properties:
          scalingGroupId: ${asGroupId}
          type: ADD
          defaultResult: ABANDON
          notificationTopicUrn: ${smnTopicUrn}
          notificationMessage: This is a test message
    

    Create AsLifecycleHookV1 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AsLifecycleHookV1(name: string, args: AsLifecycleHookV1Args, opts?: CustomResourceOptions);
    @overload
    def AsLifecycleHookV1(resource_name: str,
                          args: AsLifecycleHookV1Args,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def AsLifecycleHookV1(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          notification_topic_urn: Optional[str] = None,
                          scaling_group_id: Optional[str] = None,
                          type: Optional[str] = None,
                          as_lifecycle_hook_v1_id: Optional[str] = None,
                          default_result: Optional[str] = None,
                          name: Optional[str] = None,
                          notification_message: Optional[str] = None,
                          region: Optional[str] = None,
                          timeout: Optional[float] = None)
    func NewAsLifecycleHookV1(ctx *Context, name string, args AsLifecycleHookV1Args, opts ...ResourceOption) (*AsLifecycleHookV1, error)
    public AsLifecycleHookV1(string name, AsLifecycleHookV1Args args, CustomResourceOptions? opts = null)
    public AsLifecycleHookV1(String name, AsLifecycleHookV1Args args)
    public AsLifecycleHookV1(String name, AsLifecycleHookV1Args args, CustomResourceOptions options)
    
    type: flexibleengine:AsLifecycleHookV1
    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 AsLifecycleHookV1Args
    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 AsLifecycleHookV1Args
    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 AsLifecycleHookV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AsLifecycleHookV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AsLifecycleHookV1Args
    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 asLifecycleHookV1Resource = new Flexibleengine.AsLifecycleHookV1("asLifecycleHookV1Resource", new()
    {
        NotificationTopicUrn = "string",
        ScalingGroupId = "string",
        Type = "string",
        AsLifecycleHookV1Id = "string",
        DefaultResult = "string",
        Name = "string",
        NotificationMessage = "string",
        Region = "string",
        Timeout = 0,
    });
    
    example, err := flexibleengine.NewAsLifecycleHookV1(ctx, "asLifecycleHookV1Resource", &flexibleengine.AsLifecycleHookV1Args{
    	NotificationTopicUrn: pulumi.String("string"),
    	ScalingGroupId:       pulumi.String("string"),
    	Type:                 pulumi.String("string"),
    	AsLifecycleHookV1Id:  pulumi.String("string"),
    	DefaultResult:        pulumi.String("string"),
    	Name:                 pulumi.String("string"),
    	NotificationMessage:  pulumi.String("string"),
    	Region:               pulumi.String("string"),
    	Timeout:              pulumi.Float64(0),
    })
    
    var asLifecycleHookV1Resource = new AsLifecycleHookV1("asLifecycleHookV1Resource", AsLifecycleHookV1Args.builder()
        .notificationTopicUrn("string")
        .scalingGroupId("string")
        .type("string")
        .asLifecycleHookV1Id("string")
        .defaultResult("string")
        .name("string")
        .notificationMessage("string")
        .region("string")
        .timeout(0)
        .build());
    
    as_lifecycle_hook_v1_resource = flexibleengine.AsLifecycleHookV1("asLifecycleHookV1Resource",
        notification_topic_urn="string",
        scaling_group_id="string",
        type="string",
        as_lifecycle_hook_v1_id="string",
        default_result="string",
        name="string",
        notification_message="string",
        region="string",
        timeout=0)
    
    const asLifecycleHookV1Resource = new flexibleengine.AsLifecycleHookV1("asLifecycleHookV1Resource", {
        notificationTopicUrn: "string",
        scalingGroupId: "string",
        type: "string",
        asLifecycleHookV1Id: "string",
        defaultResult: "string",
        name: "string",
        notificationMessage: "string",
        region: "string",
        timeout: 0,
    });
    
    type: flexibleengine:AsLifecycleHookV1
    properties:
        asLifecycleHookV1Id: string
        defaultResult: string
        name: string
        notificationMessage: string
        notificationTopicUrn: string
        region: string
        scalingGroupId: string
        timeout: 0
        type: string
    

    AsLifecycleHookV1 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 AsLifecycleHookV1 resource accepts the following input properties:

    NotificationTopicUrn string
    Specifies a unique topic in SMN.
    ScalingGroupId string
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    Type string
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    AsLifecycleHookV1Id string
    The resource ID.
    DefaultResult string
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    Name string
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    NotificationMessage string
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    Region string
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    Timeout double
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    NotificationTopicUrn string
    Specifies a unique topic in SMN.
    ScalingGroupId string
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    Type string
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    AsLifecycleHookV1Id string
    The resource ID.
    DefaultResult string
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    Name string
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    NotificationMessage string
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    Region string
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    Timeout float64
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    notificationTopicUrn String
    Specifies a unique topic in SMN.
    scalingGroupId String
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    type String
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    asLifecycleHookV1Id String
    The resource ID.
    defaultResult String
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    name String
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    notificationMessage String
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    region String
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    timeout Double
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    notificationTopicUrn string
    Specifies a unique topic in SMN.
    scalingGroupId string
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    type string
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    asLifecycleHookV1Id string
    The resource ID.
    defaultResult string
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    name string
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    notificationMessage string
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    region string
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    timeout number
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    notification_topic_urn str
    Specifies a unique topic in SMN.
    scaling_group_id str
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    type str
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    as_lifecycle_hook_v1_id str
    The resource ID.
    default_result str
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    name str
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    notification_message str
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    region str
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    timeout float
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    notificationTopicUrn String
    Specifies a unique topic in SMN.
    scalingGroupId String
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    type String
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    asLifecycleHookV1Id String
    The resource ID.
    defaultResult String
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    name String
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    notificationMessage String
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    region String
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    timeout Number
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AsLifecycleHookV1 resource produces the following output properties:

    CreateTime string
    The server time in UTC format when the lifecycle hook is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    NotificationTopicName string
    The topic name in SMN.
    CreateTime string
    The server time in UTC format when the lifecycle hook is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    NotificationTopicName string
    The topic name in SMN.
    createTime String
    The server time in UTC format when the lifecycle hook is created.
    id String
    The provider-assigned unique ID for this managed resource.
    notificationTopicName String
    The topic name in SMN.
    createTime string
    The server time in UTC format when the lifecycle hook is created.
    id string
    The provider-assigned unique ID for this managed resource.
    notificationTopicName string
    The topic name in SMN.
    create_time str
    The server time in UTC format when the lifecycle hook is created.
    id str
    The provider-assigned unique ID for this managed resource.
    notification_topic_name str
    The topic name in SMN.
    createTime String
    The server time in UTC format when the lifecycle hook is created.
    id String
    The provider-assigned unique ID for this managed resource.
    notificationTopicName String
    The topic name in SMN.

    Look up Existing AsLifecycleHookV1 Resource

    Get an existing AsLifecycleHookV1 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?: AsLifecycleHookV1State, opts?: CustomResourceOptions): AsLifecycleHookV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            as_lifecycle_hook_v1_id: Optional[str] = None,
            create_time: Optional[str] = None,
            default_result: Optional[str] = None,
            name: Optional[str] = None,
            notification_message: Optional[str] = None,
            notification_topic_name: Optional[str] = None,
            notification_topic_urn: Optional[str] = None,
            region: Optional[str] = None,
            scaling_group_id: Optional[str] = None,
            timeout: Optional[float] = None,
            type: Optional[str] = None) -> AsLifecycleHookV1
    func GetAsLifecycleHookV1(ctx *Context, name string, id IDInput, state *AsLifecycleHookV1State, opts ...ResourceOption) (*AsLifecycleHookV1, error)
    public static AsLifecycleHookV1 Get(string name, Input<string> id, AsLifecycleHookV1State? state, CustomResourceOptions? opts = null)
    public static AsLifecycleHookV1 get(String name, Output<String> id, AsLifecycleHookV1State state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:AsLifecycleHookV1    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:
    AsLifecycleHookV1Id string
    The resource ID.
    CreateTime string
    The server time in UTC format when the lifecycle hook is created.
    DefaultResult string
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    Name string
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    NotificationMessage string
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    NotificationTopicName string
    The topic name in SMN.
    NotificationTopicUrn string
    Specifies a unique topic in SMN.
    Region string
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    ScalingGroupId string
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    Timeout double
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    Type string
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    AsLifecycleHookV1Id string
    The resource ID.
    CreateTime string
    The server time in UTC format when the lifecycle hook is created.
    DefaultResult string
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    Name string
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    NotificationMessage string
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    NotificationTopicName string
    The topic name in SMN.
    NotificationTopicUrn string
    Specifies a unique topic in SMN.
    Region string
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    ScalingGroupId string
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    Timeout float64
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    Type string
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    asLifecycleHookV1Id String
    The resource ID.
    createTime String
    The server time in UTC format when the lifecycle hook is created.
    defaultResult String
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    name String
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    notificationMessage String
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    notificationTopicName String
    The topic name in SMN.
    notificationTopicUrn String
    Specifies a unique topic in SMN.
    region String
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    scalingGroupId String
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    timeout Double
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    type String
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    asLifecycleHookV1Id string
    The resource ID.
    createTime string
    The server time in UTC format when the lifecycle hook is created.
    defaultResult string
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    name string
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    notificationMessage string
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    notificationTopicName string
    The topic name in SMN.
    notificationTopicUrn string
    Specifies a unique topic in SMN.
    region string
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    scalingGroupId string
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    timeout number
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    type string
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    as_lifecycle_hook_v1_id str
    The resource ID.
    create_time str
    The server time in UTC format when the lifecycle hook is created.
    default_result str
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    name str
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    notification_message str
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    notification_topic_name str
    The topic name in SMN.
    notification_topic_urn str
    Specifies a unique topic in SMN.
    region str
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    scaling_group_id str
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    timeout float
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    type str
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.
    asLifecycleHookV1Id String
    The resource ID.
    createTime String
    The server time in UTC format when the lifecycle hook is created.
    defaultResult String
    Specifies the default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The valid values are ABANDON and CONTINUE, default to ABANDON.
    name String
    Specifies the lifecycle hook name. This parameter can contain a maximum of 32 characters, which may consist of letters, digits, underscores (_) and hyphens (-). Changing this creates a new AS configuration.
    notificationMessage String
    Specifies a customized notification. This parameter can contains a maximum of 256 characters, which cannot contain the following characters: <>&'().
    notificationTopicName String
    The topic name in SMN.
    notificationTopicUrn String
    Specifies a unique topic in SMN.
    region String
    Specifies the region in which to create the AS lifecycle hook. If omitted, the provider-level region will be used. Changing this creates a new AS lifecycle hook.
    scalingGroupId String
    Specifies the ID of the AS group in UUID format. Changing this creates a new AS lifecycle hook.
    timeout Number
    Specifies the lifecycle hook timeout duration, which ranges from 300 to 86400 in the unit of second, default to 3600.
    type String
    Specifies the lifecycle hook type. The valid values are following strings:

    • ADD: The hook suspends the instance when the instance is started.
    • REMOVE: The hook suspends the instance when the instance is terminated.

    Import

    Lifecycle hooks can be imported using the Auto Scalling group ID scaling_group_id and hook Name name separated by a

    slash /, e.g.

    $ pulumi import flexibleengine:index/asLifecycleHookV1:AsLifecycleHookV1 test <scaling_group_id>/<name>
    

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

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud