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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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 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 Opentelekomcloud.AsLifecycleHookV1("asLifecycleHookV1Resource", new()
{
NotificationTopicUrn = "string",
ScalingGroupId = "string",
ScalingLifecycleHookName = "string",
ScalingLifecycleHookType = "string",
AsLifecycleHookV1Id = "string",
DefaultResult = "string",
DefaultTimeout = 0,
NotificationMetadata = "string",
});
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"),
})
var asLifecycleHookV1Resource = new AsLifecycleHookV1("asLifecycleHookV1Resource", AsLifecycleHookV1Args.builder()
.notificationTopicUrn("string")
.scalingGroupId("string")
.scalingLifecycleHookName("string")
.scalingLifecycleHookType("string")
.asLifecycleHookV1Id("string")
.defaultResult("string")
.defaultTimeout(0)
.notificationMetadata("string")
.build());
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")
const asLifecycleHookV1Resource = new opentelekomcloud.AsLifecycleHookV1("asLifecycleHookV1Resource", {
notificationTopicUrn: "string",
scalingGroupId: "string",
scalingLifecycleHookName: "string",
scalingLifecycleHookType: "string",
asLifecycleHookV1Id: "string",
defaultResult: "string",
defaultTimeout: 0,
notificationMetadata: "string",
});
type: opentelekomcloud:AsLifecycleHookV1
properties:
asLifecycleHookV1Id: string
defaultResult: string
defaultTimeout: 0
notificationMetadata: string
notificationTopicUrn: string
scalingGroupId: string
scalingLifecycleHookName: string
scalingLifecycleHookType: 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:
- Notification
Topic stringUrn - 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 stringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- Scaling
Lifecycle stringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- Scaling
Lifecycle stringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 stringHook V1Id - Default
Result string - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 double - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- Notification
Metadata string - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- Notification
Topic stringUrn - 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 stringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- Scaling
Lifecycle stringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- Scaling
Lifecycle stringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 stringHook V1Id - Default
Result string - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 float64 - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- Notification
Metadata string - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- notification
Topic StringUrn - 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 StringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- scaling
Lifecycle StringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- scaling
Lifecycle StringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 StringHook V1Id - default
Result String - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 Double - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- notification
Metadata String - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- notification
Topic stringUrn - 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 stringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- scaling
Lifecycle stringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- scaling
Lifecycle stringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 stringHook V1Id - default
Result string - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 number - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- notification
Metadata string - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- notification_
topic_ strurn - 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_ strid - The AS group ID. Changing this creates a new AS lifecycle hook.
- scaling_
lifecycle_ strhook_ name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- scaling_
lifecycle_ strhook_ type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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_ strhook_ v1_ id - 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), andCONTINUE
.- 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 StringUrn - 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 StringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- scaling
Lifecycle StringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- scaling
Lifecycle StringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 StringHook V1Id - default
Result String - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 Number - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- notification
Metadata 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:
- Create
Time string - (String) Time of creation of the autoscaling lifecycle hook.
- Id string
- The provider-assigned unique ID for this managed resource.
- Notification
Topic stringName - (String) Name of the associated topic in SMN..
- Region string
- Create
Time string - (String) Time of creation of the autoscaling lifecycle hook.
- Id string
- The provider-assigned unique ID for this managed resource.
- Notification
Topic stringName - (String) Name of the associated topic in SMN..
- Region string
- create
Time String - (String) Time of creation of the autoscaling lifecycle hook.
- id String
- The provider-assigned unique ID for this managed resource.
- notification
Topic StringName - (String) Name of the associated topic in SMN..
- region String
- create
Time string - (String) Time of creation of the autoscaling lifecycle hook.
- id string
- The provider-assigned unique ID for this managed resource.
- notification
Topic stringName - (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_ strname - (String) Name of the associated topic in SMN..
- region str
- create
Time String - (String) Time of creation of the autoscaling lifecycle hook.
- id String
- The provider-assigned unique ID for this managed resource.
- notification
Topic StringName - (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
- 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.
- As
Lifecycle stringHook V1Id - Create
Time string - (String) Time of creation of the autoscaling lifecycle hook.
- Default
Result string - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 double - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- Notification
Metadata string - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- Notification
Topic stringName - (String) Name of the associated topic in SMN..
- Notification
Topic stringUrn - 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
- Scaling
Group stringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- Scaling
Lifecycle stringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- Scaling
Lifecycle stringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 stringHook V1Id - Create
Time string - (String) Time of creation of the autoscaling lifecycle hook.
- Default
Result string - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 float64 - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- Notification
Metadata string - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- Notification
Topic stringName - (String) Name of the associated topic in SMN..
- Notification
Topic stringUrn - 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
- Scaling
Group stringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- Scaling
Lifecycle stringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- Scaling
Lifecycle stringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 StringHook V1Id - create
Time String - (String) Time of creation of the autoscaling lifecycle hook.
- default
Result String - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 Double - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- notification
Metadata String - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- notification
Topic StringName - (String) Name of the associated topic in SMN..
- notification
Topic StringUrn - 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
- scaling
Group StringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- scaling
Lifecycle StringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- scaling
Lifecycle StringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 stringHook V1Id - create
Time string - (String) Time of creation of the autoscaling lifecycle hook.
- default
Result string - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 number - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- notification
Metadata string - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- notification
Topic stringName - (String) Name of the associated topic in SMN..
- notification
Topic stringUrn - 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
- scaling
Group stringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- scaling
Lifecycle stringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- scaling
Lifecycle stringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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_ strhook_ v1_ id - 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), andCONTINUE
.- 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_ strname - (String) Name of the associated topic in SMN..
- notification_
topic_ strurn - 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_ strid - The AS group ID. Changing this creates a new AS lifecycle hook.
- scaling_
lifecycle_ strhook_ name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- scaling_
lifecycle_ strhook_ type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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 StringHook V1Id - create
Time String - (String) Time of creation of the autoscaling lifecycle hook.
- default
Result String - The default lifecycle hook callback operation. This operation is performed when the timeout duration expires. The values
can be
ABANDON
(default value), andCONTINUE
.- 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 Number - the lifecycle hook timeout duration, which ranges from 60 to 86400 seconds. The default value is 3600.
- notification
Metadata String - A customized notification, which contains no more than 256 characters. The message cannot contain the following characters: <>&'(){}.
- notification
Topic StringName - (String) Name of the associated topic in SMN..
- notification
Topic StringUrn - 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
- scaling
Group StringId - The AS group ID. Changing this creates a new AS lifecycle hook.
- scaling
Lifecycle StringHook Name - The name of the AS Lifecycle Hook. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 32 characters.
- scaling
Lifecycle StringHook Type - The lifecycle hook type. The values can be
INSTANCE_TERMINATING
, andINSTANCE_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>
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.