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.
- Name
Regex string A regex string to filter resulting lifecycle hook by name.
- Output
File string - Scaling
Group stringId Scaling group id the lifecycle hooks belong to.
- Ids []string
A list of lifecycle hook IDs.
- Name
Regex string A regex string to filter resulting lifecycle hook by name.
- Output
File string - Scaling
Group stringId Scaling group id the lifecycle hooks belong to.
- ids string[]
A list of lifecycle hook IDs.
- name
Regex string A regex string to filter resulting lifecycle hook by name.
- output
File string - scaling
Group stringId 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_ strid Scaling group id the lifecycle hooks belong to.
GetLifecycleHooks Result
The following output properties are available:
- Hooks
List<Pulumi.
Ali Cloud. Ess. Outputs. Get Lifecycle Hooks Hook> 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.
- Name
Regex string - Output
File string - Scaling
Group stringId ID of the scaling group.
- Hooks
[]Get
Lifecycle Hooks Hook 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.
- Name
Regex string - Output
File string - Scaling
Group stringId ID of the scaling group.
- hooks
Get
Lifecycle Hooks Hook[] 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.
- name
Regex string - output
File string - scaling
Group stringId ID of the scaling group.
- hooks
List[Get
Lifecycle Hooks Hook] 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_ strid 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.
- Default
Result string Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses.
- Heartbeat
Timeout 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.
- Lifecycle
Transition string Type of Scaling activity attached to lifecycle hook.
- Name string
Name of the lifecycle hook.
- Notification
Arn string The Arn of notification target.
- Notification
Metadata string Additional information that you want to include when Auto Scaling sends a message to the notification target.
- Scaling
Group stringId Scaling group id the lifecycle hooks belong to.
- Default
Result string Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses.
- Heartbeat
Timeout 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.
- Lifecycle
Transition string Type of Scaling activity attached to lifecycle hook.
- Name string
Name of the lifecycle hook.
- Notification
Arn string The Arn of notification target.
- Notification
Metadata string Additional information that you want to include when Auto Scaling sends a message to the notification target.
- Scaling
Group stringId Scaling group id the lifecycle hooks belong to.
- default
Result string Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses.
- heartbeat
Timeout 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.
- lifecycle
Transition string Type of Scaling activity attached to lifecycle hook.
- name string
Name of the lifecycle hook.
- notification
Arn string The Arn of notification target.
- notification
Metadata string Additional information that you want to include when Auto Scaling sends a message to the notification target.
- scaling
Group stringId 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_ strid 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
alicloudTerraform Provider.