GetLifecycleHooks

This data source provides available lifecycle hook resources.

NOTE: Available in 1.72.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ds = Output.Create(AliCloud.Ess.GetLifecycleHooks.InvokeAsync(new AliCloud.Ess.GetLifecycleHooksArgs
        {
            NameRegex = "lifecyclehook_name",
            ScalingGroupId = "scaling_group_id",
        }));
        this.FirstLifecycleHook = ds.Apply(ds => ds.Hooks[0].Id);
    }

    [Output("firstLifecycleHook")]
    public Output<string> FirstLifecycleHook { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

ds = alicloud.ess.get_lifecycle_hooks(name_regex="lifecyclehook_name",
    scaling_group_id="scaling_group_id")
pulumi.export("firstLifecycleHook", ds.hooks[0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ds = pulumi.output(alicloud.ess.getLifecycleHooks({
    nameRegex: "lifecyclehook_name",
    scalingGroupId: "scaling_group_id",
}, { async: true }));

export const firstLifecycleHook = ds.hooks[0].id;

Using GetLifecycleHooks

function getLifecycleHooks(args: GetLifecycleHooksArgs, opts?: InvokeOptions): Promise<GetLifecycleHooksResult>
function  get_lifecycle_hooks(ids=None, name_regex=None, output_file=None, scaling_group_id=None, opts=None)
func GetLifecycleHooks(ctx *Context, args *GetLifecycleHooksArgs, opts ...InvokeOption) (*GetLifecycleHooksResult, error)
public static class GetLifecycleHooks {
    public static Task<GetLifecycleHooksResult> InvokeAsync(GetLifecycleHooksArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Ids List<string>

A list of lifecycle hook IDs.

NameRegex string

A regex string to filter resulting lifecycle hook by name.

OutputFile string
ScalingGroupId string

Scaling group id the lifecycle hooks belong to.

Ids []string

A list of lifecycle hook IDs.

NameRegex string

A regex string to filter resulting lifecycle hook by name.

OutputFile string
ScalingGroupId string

Scaling group id the lifecycle hooks belong to.

ids string[]

A list of lifecycle hook IDs.

nameRegex string

A regex string to filter resulting lifecycle hook by name.

outputFile string
scalingGroupId string

Scaling group id the lifecycle hooks belong to.

ids List[str]

A list of lifecycle hook IDs.

name_regex str

A regex string to filter resulting lifecycle hook by name.

output_file str
scaling_group_id str

Scaling group id the lifecycle hooks belong to.

GetLifecycleHooks Result

The following output properties are available:

Hooks List<Pulumi.AliCloud.Ess.Outputs.GetLifecycleHooksHook>

A list of lifecycle hooks. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of lifecycle hook ids.

Names List<string>

A list of lifecycle hook names.

NameRegex string
OutputFile string
ScalingGroupId string

ID of the scaling group.

Hooks []GetLifecycleHooksHook

A list of lifecycle hooks. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of lifecycle hook ids.

Names []string

A list of lifecycle hook names.

NameRegex string
OutputFile string
ScalingGroupId string

ID of the scaling group.

hooks GetLifecycleHooksHook[]

A list of lifecycle hooks. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of lifecycle hook ids.

names string[]

A list of lifecycle hook names.

nameRegex string
outputFile string
scalingGroupId string

ID of the scaling group.

hooks List[GetLifecycleHooksHook]

A list of lifecycle hooks. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of lifecycle hook ids.

names List[str]

A list of lifecycle hook names.

name_regex str
output_file str
scaling_group_id str

ID of the scaling group.

Supporting Types

GetLifecycleHooksHook

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

DefaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses.

HeartbeatTimeout int

Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. When the lifecycle hook times out, Auto Scaling performs the action defined in the default_result parameter.

Id string

ID of the lifecycle hook.

LifecycleTransition string

Type of Scaling activity attached to lifecycle hook.

Name string

Name of the lifecycle hook.

NotificationArn string

The Arn of notification target.

NotificationMetadata string

Additional information that you want to include when Auto Scaling sends a message to the notification target.

ScalingGroupId string

Scaling group id the lifecycle hooks belong to.

DefaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses.

HeartbeatTimeout int

Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. When the lifecycle hook times out, Auto Scaling performs the action defined in the default_result parameter.

Id string

ID of the lifecycle hook.

LifecycleTransition string

Type of Scaling activity attached to lifecycle hook.

Name string

Name of the lifecycle hook.

NotificationArn string

The Arn of notification target.

NotificationMetadata string

Additional information that you want to include when Auto Scaling sends a message to the notification target.

ScalingGroupId string

Scaling group id the lifecycle hooks belong to.

defaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses.

heartbeatTimeout number

Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. When the lifecycle hook times out, Auto Scaling performs the action defined in the default_result parameter.

id string

ID of the lifecycle hook.

lifecycleTransition string

Type of Scaling activity attached to lifecycle hook.

name string

Name of the lifecycle hook.

notificationArn string

The Arn of notification target.

notificationMetadata string

Additional information that you want to include when Auto Scaling sends a message to the notification target.

scalingGroupId string

Scaling group id the lifecycle hooks belong to.

default_result str

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses.

heartbeat_timeout float

Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. When the lifecycle hook times out, Auto Scaling performs the action defined in the default_result parameter.

id str

ID of the lifecycle hook.

lifecycle_transition str

Type of Scaling activity attached to lifecycle hook.

name str

Name of the lifecycle hook.

notification_arn str

The Arn of notification target.

notification_metadata str

Additional information that you want to include when Auto Scaling sends a message to the notification target.

scaling_group_id str

Scaling group id the lifecycle hooks belong to.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.