1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. AsLifecycleHookV1
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.AsLifecycleHookV1

Explore with Pulumi AI

Up-to-date reference of API arguments for AS lifecycle hook you can get at documentation portal

Manages a V1 AS Lifecycle Hook resource within OpenTelekomCloud.

Example Usage

Autoscaling Lifecycle Hook

import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";

const hthAslifecyclehook = new opentelekomcloud.AsLifecycleHookV1("hthAslifecyclehook", {
    defaultResult: "ABANDON",
    defaultTimeout: 3600,
    notificationMetadata: "Some customized notification",
    notificationTopicUrn: "urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh",
    scalingGroupId: "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
    scalingLifecycleHookName: "hth_aslifecyclehook",
    scalingLifecycleHookType: "INSTANCE_TERMINATING",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

hth_aslifecyclehook = opentelekomcloud.AsLifecycleHookV1("hthAslifecyclehook",
    default_result="ABANDON",
    default_timeout=3600,
    notification_metadata="Some customized notification",
    notification_topic_urn="urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh",
    scaling_group_id="4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
    scaling_lifecycle_hook_name="hth_aslifecyclehook",
    scaling_lifecycle_hook_type="INSTANCE_TERMINATING")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opentelekomcloud.NewAsLifecycleHookV1(ctx, "hthAslifecyclehook", &opentelekomcloud.AsLifecycleHookV1Args{
			DefaultResult:            pulumi.String("ABANDON"),
			DefaultTimeout:           pulumi.Float64(3600),
			NotificationMetadata:     pulumi.String("Some customized notification"),
			NotificationTopicUrn:     pulumi.String("urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh"),
			ScalingGroupId:           pulumi.String("4579f2f5-cbe8-425a-8f32-53dcb9d9053a"),
			ScalingLifecycleHookName: pulumi.String("hth_aslifecyclehook"),
			ScalingLifecycleHookType: pulumi.String("INSTANCE_TERMINATING"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var hthAslifecyclehook = new Opentelekomcloud.AsLifecycleHookV1("hthAslifecyclehook", new()
    {
        DefaultResult = "ABANDON",
        DefaultTimeout = 3600,
        NotificationMetadata = "Some customized notification",
        NotificationTopicUrn = "urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh",
        ScalingGroupId = "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        ScalingLifecycleHookName = "hth_aslifecyclehook",
        ScalingLifecycleHookType = "INSTANCE_TERMINATING",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.AsLifecycleHookV1;
import com.pulumi.opentelekomcloud.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) {
        var hthAslifecyclehook = new AsLifecycleHookV1("hthAslifecyclehook", AsLifecycleHookV1Args.builder()
            .defaultResult("ABANDON")
            .defaultTimeout(3600)
            .notificationMetadata("Some customized notification")
            .notificationTopicUrn("urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh")
            .scalingGroupId("4579f2f5-cbe8-425a-8f32-53dcb9d9053a")
            .scalingLifecycleHookName("hth_aslifecyclehook")
            .scalingLifecycleHookType("INSTANCE_TERMINATING")
            .build());

    }
}
Copy
resources:
  hthAslifecyclehook:
    type: opentelekomcloud:AsLifecycleHookV1
    properties:
      defaultResult: ABANDON
      defaultTimeout: 3600
      notificationMetadata: Some customized notification
      notificationTopicUrn: urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh
      scalingGroupId: 4579f2f5-cbe8-425a-8f32-53dcb9d9053a
      scalingLifecycleHookName: hth_aslifecyclehook
      scalingLifecycleHookType: INSTANCE_TERMINATING
Copy

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,
                      scaling_lifecycle_hook_name: Optional[str] = None,
                      scaling_lifecycle_hook_type: Optional[str] = None,
                      as_lifecycle_hook_v1_id: Optional[str] = None,
                      default_result: Optional[str] = None,
                      default_timeout: Optional[float] = None,
                      notification_metadata: Optional[str] = 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: opentelekomcloud:AsLifecycleHookV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AsLifecycleHookV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. AsLifecycleHookV1Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AsLifecycleHookV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 Opentelekomcloud.AsLifecycleHookV1("asLifecycleHookV1Resource", new()
{
    NotificationTopicUrn = "string",
    ScalingGroupId = "string",
    ScalingLifecycleHookName = "string",
    ScalingLifecycleHookType = "string",
    AsLifecycleHookV1Id = "string",
    DefaultResult = "string",
    DefaultTimeout = 0,
    NotificationMetadata = "string",
});
Copy
example, err := opentelekomcloud.NewAsLifecycleHookV1(ctx, "asLifecycleHookV1Resource", &opentelekomcloud.AsLifecycleHookV1Args{
	NotificationTopicUrn:     pulumi.String("string"),
	ScalingGroupId:           pulumi.String("string"),
	ScalingLifecycleHookName: pulumi.String("string"),
	ScalingLifecycleHookType: pulumi.String("string"),
	AsLifecycleHookV1Id:      pulumi.String("string"),
	DefaultResult:            pulumi.String("string"),
	DefaultTimeout:           pulumi.Float64(0),
	NotificationMetadata:     pulumi.String("string"),
})
Copy
var asLifecycleHookV1Resource = new AsLifecycleHookV1("asLifecycleHookV1Resource", AsLifecycleHookV1Args.builder()
    .notificationTopicUrn("string")
    .scalingGroupId("string")
    .scalingLifecycleHookName("string")
    .scalingLifecycleHookType("string")
    .asLifecycleHookV1Id("string")
    .defaultResult("string")
    .defaultTimeout(0)
    .notificationMetadata("string")
    .build());
Copy
as_lifecycle_hook_v1_resource = opentelekomcloud.AsLifecycleHookV1("asLifecycleHookV1Resource",
    notification_topic_urn="string",
    scaling_group_id="string",
    scaling_lifecycle_hook_name="string",
    scaling_lifecycle_hook_type="string",
    as_lifecycle_hook_v1_id="string",
    default_result="string",
    default_timeout=0,
    notification_metadata="string")
Copy
const asLifecycleHookV1Resource = new opentelekomcloud.AsLifecycleHookV1("asLifecycleHookV1Resource", {
    notificationTopicUrn: "string",
    scalingGroupId: "string",
    scalingLifecycleHookName: "string",
    scalingLifecycleHookType: "string",
    asLifecycleHookV1Id: "string",
    defaultResult: "string",
    defaultTimeout: 0,
    notificationMetadata: "string",
});
Copy
type: opentelekomcloud:AsLifecycleHookV1
properties:
    asLifecycleHookV1Id: string
    defaultResult: string
    defaultTimeout: 0
    notificationMetadata: string
    notificationTopicUrn: string
    scalingGroupId: string
    scalingLifecycleHookName: string
    scalingLifecycleHookType: string
Copy

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 This property is required. string
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
ScalingGroupId This property is required. string
The AS group ID. Changing this creates a new AS lifecycle hook.
ScalingLifecycleHookName This property is required. string
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
ScalingLifecycleHookType This property is required. string
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
AsLifecycleHookV1Id string
DefaultResult string
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
DefaultTimeout double
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
NotificationMetadata string
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
NotificationTopicUrn This property is required. string
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
ScalingGroupId This property is required. string
The AS group ID. Changing this creates a new AS lifecycle hook.
ScalingLifecycleHookName This property is required. string
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
ScalingLifecycleHookType This property is required. string
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
AsLifecycleHookV1Id string
DefaultResult string
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
DefaultTimeout float64
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
NotificationMetadata string
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
notificationTopicUrn This property is required. String
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
scalingGroupId This property is required. String
The AS group ID. Changing this creates a new AS lifecycle hook.
scalingLifecycleHookName This property is required. String
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
scalingLifecycleHookType This property is required. String
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
asLifecycleHookV1Id String
defaultResult String
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
defaultTimeout Double
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
notificationMetadata String
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
notificationTopicUrn This property is required. string
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
scalingGroupId This property is required. string
The AS group ID. Changing this creates a new AS lifecycle hook.
scalingLifecycleHookName This property is required. string
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
scalingLifecycleHookType This property is required. string
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
asLifecycleHookV1Id string
defaultResult string
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
defaultTimeout number
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
notificationMetadata string
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
notification_topic_urn This property is required. str
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
scaling_group_id This property is required. str
The AS group ID. Changing this creates a new AS lifecycle hook.
scaling_lifecycle_hook_name This property is required. str
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
scaling_lifecycle_hook_type This property is required. str
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
as_lifecycle_hook_v1_id str
default_result str
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
default_timeout float
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
notification_metadata str
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
notificationTopicUrn This property is required. String
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
scalingGroupId This property is required. String
The AS group ID. Changing this creates a new AS lifecycle hook.
scalingLifecycleHookName This property is required. String
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
scalingLifecycleHookType This property is required. String
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
asLifecycleHookV1Id String
defaultResult String
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
defaultTimeout Number
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
notificationMetadata String
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.

Outputs

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

CreateTime string
(String) Time of creation of the autoscaling lifecycle hook.
Id string
The provider-assigned unique ID for this managed resource.
NotificationTopicName string
(String) Name of the associated topic in SMN..
Region string
CreateTime string
(String) Time of creation of the autoscaling lifecycle hook.
Id string
The provider-assigned unique ID for this managed resource.
NotificationTopicName string
(String) Name of the associated topic in SMN..
Region string
createTime String
(String) Time of creation of the autoscaling lifecycle hook.
id String
The provider-assigned unique ID for this managed resource.
notificationTopicName String
(String) Name of the associated topic in SMN..
region String
createTime string
(String) Time of creation of the autoscaling lifecycle hook.
id string
The provider-assigned unique ID for this managed resource.
notificationTopicName string
(String) Name of the associated topic in SMN..
region string
create_time str
(String) Time of creation of the autoscaling lifecycle hook.
id str
The provider-assigned unique ID for this managed resource.
notification_topic_name str
(String) Name of the associated topic in SMN..
region str
createTime String
(String) Time of creation of the autoscaling lifecycle hook.
id String
The provider-assigned unique ID for this managed resource.
notificationTopicName String
(String) Name of the associated topic in SMN..
region String

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,
        default_timeout: Optional[float] = None,
        notification_metadata: 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,
        scaling_lifecycle_hook_name: Optional[str] = None,
        scaling_lifecycle_hook_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: opentelekomcloud:AsLifecycleHookV1    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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
CreateTime string
(String) Time of creation of the autoscaling lifecycle hook.
DefaultResult string
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
DefaultTimeout double
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
NotificationMetadata string
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
NotificationTopicName string
(String) Name of the associated topic in SMN..
NotificationTopicUrn string
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
Region string
ScalingGroupId string
The AS group ID. Changing this creates a new AS lifecycle hook.
ScalingLifecycleHookName string
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
ScalingLifecycleHookType string
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
AsLifecycleHookV1Id string
CreateTime string
(String) Time of creation of the autoscaling lifecycle hook.
DefaultResult string
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
DefaultTimeout float64
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
NotificationMetadata string
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
NotificationTopicName string
(String) Name of the associated topic in SMN..
NotificationTopicUrn string
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
Region string
ScalingGroupId string
The AS group ID. Changing this creates a new AS lifecycle hook.
ScalingLifecycleHookName string
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
ScalingLifecycleHookType string
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
asLifecycleHookV1Id String
createTime String
(String) Time of creation of the autoscaling lifecycle hook.
defaultResult String
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
defaultTimeout Double
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
notificationMetadata String
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
notificationTopicName String
(String) Name of the associated topic in SMN..
notificationTopicUrn String
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
region String
scalingGroupId String
The AS group ID. Changing this creates a new AS lifecycle hook.
scalingLifecycleHookName String
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
scalingLifecycleHookType String
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
asLifecycleHookV1Id string
createTime string
(String) Time of creation of the autoscaling lifecycle hook.
defaultResult string
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
defaultTimeout number
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
notificationMetadata string
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
notificationTopicName string
(String) Name of the associated topic in SMN..
notificationTopicUrn string
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
region string
scalingGroupId string
The AS group ID. Changing this creates a new AS lifecycle hook.
scalingLifecycleHookName string
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
scalingLifecycleHookType string
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
as_lifecycle_hook_v1_id str
create_time str
(String) Time of creation of the autoscaling lifecycle hook.
default_result str
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
default_timeout float
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
notification_metadata str
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
notification_topic_name str
(String) Name of the associated topic in SMN..
notification_topic_urn str
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
region str
scaling_group_id str
The AS group ID. Changing this creates a new AS lifecycle hook.
scaling_lifecycle_hook_name str
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
scaling_lifecycle_hook_type str
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.
asLifecycleHookV1Id String
createTime String
(String) Time of creation of the autoscaling lifecycle hook.
defaultResult String
The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values can be ABANDON (default value), and CONTINUE.

  • ABANDON: If an instance is starting, ABANDON indicates that your customized operations failed, and the instance will be terminated. In such a case, the scaling action fails, and you must create a new instance. If an instance is stopping, ABANDON allows instance termination BUT stops other lifecycle hooks.
  • CONTINUE: If an instance is starting, CONTINUE indicates that your customized operations are successful and the instance can be used. If an instance is stopping, CONTINUE allows instance termination AND the completion of other lifecycle hooks.
defaultTimeout Number
the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
notificationMetadata String
A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
notificationTopicName String
(String) Name of the associated topic in SMN..
notificationTopicUrn String
The URN of an SMN topic. This parameter specifies a notification object for a lifecycle hook. When an instance is suspended by the lifecycle hook, the SMN service sends a notification to the object. This notification contains the basic instance information, your customized notification content, and the token for controlling lifecycle operations.
region String
scalingGroupId String
The AS group ID. Changing this creates a new AS lifecycle hook.
scalingLifecycleHookName String
The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
scalingLifecycleHookType String
The lifecycle hook type. The values can be INSTANCE_TERMINATING, and INSTANCE_LAUNCHING.

  • INSTANCE_TERMINATING: The hook suspends the instance when it is terminated.
  • INSTANCE_LAUNCHING: The hook suspends the instance when it is started.

Import

AS lifecycle hooks can be imported using their scaling_lifecycle_hook_name and related AS group ID, separated by a slash, e.g.

bash

$ pulumi import opentelekomcloud:index/asLifecycleHookV1:AsLifecycleHookV1 test <scaling_group_id>/<scaling_lifecycle_hook_name>
Copy

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

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.