LifecycleHookProps
Properties for defining a LifecycleHook.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ess-lifecyclehook
Initializer
import { LifecycleHookProps } from '@alicloud/ros-cdk-ess'
const lifecycleHookProps: LifecycleHookProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
lifecycleTransition | string | @alicloud/ros-cdk-core.IResolvable | Property lifecycleTransition: The scaling activities to which lifecycle hooks apply Value range: SCALE_OUT: scale-out event SCALE_IN: scale-in event. |
scalingGroupId | string | @alicloud/ros-cdk-core.IResolvable | Property scalingGroupId: The ID of the scaling group. |
defaultResult | string | @alicloud/ros-cdk-core.IResolvable | Property defaultResult: The action that the scaling group takes when the lifecycle hook times out. |
heartbeatTimeout | number | @alicloud/ros-cdk-core.IResolvable | Property heartbeatTimeout: The time, in seconds, that can elapse before the lifecycle hook times out. |
lifecycleHookName | string | @alicloud/ros-cdk-core.IResolvable | Property lifecycleHookName: The name of the lifecycle hook. |
notificationArn | string | @alicloud/ros-cdk-core.IResolvable | Property notificationArn: The Alibaba Cloud Resource Name (ARN) of the notification recipient. |
notificationMetadata | string | @alicloud/ros-cdk-core.IResolvable | Property notificationMetadata: The fixed string that you want to include when Auto Scaling sends a message about the wait state of the scaling activity to the notification target. |
lifecycleTransitionRequired
public readonly lifecycleTransition: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property lifecycleTransition: The scaling activities to which lifecycle hooks apply Value range: SCALE_OUT: scale-out event SCALE_IN: scale-in event.
scalingGroupIdRequired
public readonly scalingGroupId: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property scalingGroupId: The ID of the scaling group.
defaultResultOptional
public readonly defaultResult: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property defaultResult: The action that the scaling group takes when the lifecycle hook times out.
Value range: CONTINUE: the scaling group continues with the scale-in or scale-out process. ABANDON: the scaling group stops any remaining action of the scale-in or scale-out event. Default value: CONTINUE If the scaling group has multiple lifecycle hooks and one of them is terminated by the DefaultResult=ABANDON parameter during a scale-in event (SCALE_IN), the remaining lifecycle hooks under the same scaling group will also be terminated. Otherwise, the action following the wait state is the next action, as specified in the parameter DefaultResult, after the last lifecycle event under the same scaling group.
heartbeatTimeoutOptional
public readonly heartbeatTimeout: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property heartbeatTimeout: The time, in seconds, that can elapse before the lifecycle hook times out.
If the lifecycle hook times out, the scaling group performs the default action (DefaultResult). The range is from 30 to 86400 seconds. The default value is 600 seconds. You can prevent the lifecycle hook from timing out by calling the RecordLifecycleActionHeartbeat operation. You can also terminate the lifecycle action by calling the CompleteLifecycleAction operation.
lifecycleHookNameOptional
public readonly lifecycleHookName: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property lifecycleHookName: The name of the lifecycle hook.
Each name must be unique within a scaling group. The name must be 2 to 64 characters in length and can contain letters, numbers, Chinese characters, and special characters including underscores (_), hyphens (-) and periods (.). Default value: Lifecycle Hook ID
notificationArnOptional
public readonly notificationArn: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property notificationArn: The Alibaba Cloud Resource Name (ARN) of the notification recipient.
If you do not specify this parameter, no notification is sent when the lifecycle hook takes effect. If you specify this parameter, the value must be in one of the following formats: - If you specify a Simple Message Queue (SMQ, formerly MNS) as the notification recipient, specify the value in the acs:mns:{region-id}:{account-id}:queue\/{queuename} format. - If you specify an SMQ topic as the notification recipient, specify the value in the acs:mns:{region-id}:{account-id}:topic\/{topicname} format. - If you specify a CloudOps Orchestration Service (OOS) template as the notification recipient, specify the value in the acs:oos:{region-id}:{account-id}:template\/{templatename} format. - If you specify an event bus as the notification recipient, specify the value in the acs:eventbridge:{region-id}:{account-id}:eventbus\/default format.
The variables in the preceding value formats have the following meanings: - region-id: the region ID of your scaling group. - account-id: the ID of the Alibaba Cloud account. IDs of Resource Access Management (RAM) users are not supported. - queuename: the name of the SMQ queue. - topicname: the name of the SMQ topic. - templatename: the name of the OOS template.
notificationMetadataOptional
public readonly notificationMetadata: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property notificationMetadata: The fixed string that you want to include when Auto Scaling sends a message about the wait state of the scaling activity to the notification target.
The length of the parameter can be up to 4096 characters. Auto Scaling will send the specified NotificationMetadata parameter along with the notification message so that you can easily categorize your notifications. The NotificationMetadata parameter will only take effect after you specify the NotificationArn parameter.