AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.11.0 published on Wednesday, Aug 17, 2022 by Pulumi

LifecycleHook

Provides an AutoScaling Lifecycle Hook resource.

NOTE: This provider has two types of ways you can add lifecycle hooks - via the initial_lifecycle_hook attribute from the aws.autoscaling.Group resource, or via this one. Hooks added via this resource will not be added until the autoscaling group has been created, and depending on your capacity settings, after the initial instances have been launched, creating unintended behavior. If you need hooks to run on all instances, add them with initial_lifecycle_hook in aws.autoscaling.Group, but take care to not duplicate those hooks with this resource.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var foobarGroup = new Aws.AutoScaling.Group("foobarGroup", new()
    {
        AvailabilityZones = new[]
        {
            "us-west-2a",
        },
        HealthCheckType = "EC2",
        TerminationPolicies = new[]
        {
            "OldestInstance",
        },
        Tags = new[]
        {
            new Aws.AutoScaling.Inputs.GroupTagArgs
            {
                Key = "Foo",
                Value = "foo-bar",
                PropagateAtLaunch = true,
            },
        },
    });

    var foobarLifecycleHook = new Aws.AutoScaling.LifecycleHook("foobarLifecycleHook", new()
    {
        AutoscalingGroupName = foobarGroup.Name,
        DefaultResult = "CONTINUE",
        HeartbeatTimeout = 2000,
        LifecycleTransition = "autoscaling:EC2_INSTANCE_LAUNCHING",
        NotificationMetadata = @"{
  ""foo"": ""bar""
}
",
        NotificationTargetArn = "arn:aws:sqs:us-east-1:444455556666:queue1*",
        RoleArn = "arn:aws:iam::123456789012:role/S3Access",
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foobarGroup, err := autoscaling.NewGroup(ctx, "foobarGroup", &autoscaling.GroupArgs{
			AvailabilityZones: pulumi.StringArray{
				pulumi.String("us-west-2a"),
			},
			HealthCheckType: pulumi.String("EC2"),
			TerminationPolicies: pulumi.StringArray{
				pulumi.String("OldestInstance"),
			},
			Tags: autoscaling.GroupTagArray{
				&autoscaling.GroupTagArgs{
					Key:               pulumi.String("Foo"),
					Value:             pulumi.String("foo-bar"),
					PropagateAtLaunch: pulumi.Bool(true),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = autoscaling.NewLifecycleHook(ctx, "foobarLifecycleHook", &autoscaling.LifecycleHookArgs{
			AutoscalingGroupName:  foobarGroup.Name,
			DefaultResult:         pulumi.String("CONTINUE"),
			HeartbeatTimeout:      pulumi.Int(2000),
			LifecycleTransition:   pulumi.String("autoscaling:EC2_INSTANCE_LAUNCHING"),
			NotificationMetadata:  pulumi.String(fmt.Sprintf("{\n  \"foo\": \"bar\"\n}\n")),
			NotificationTargetArn: pulumi.String("arn:aws:sqs:us-east-1:444455556666:queue1*"),
			RoleArn:               pulumi.String("arn:aws:iam::123456789012:role/S3Access"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupTagArgs;
import com.pulumi.aws.autoscaling.LifecycleHook;
import com.pulumi.aws.autoscaling.LifecycleHookArgs;
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 foobarGroup = new Group("foobarGroup", GroupArgs.builder()        
            .availabilityZones("us-west-2a")
            .healthCheckType("EC2")
            .terminationPolicies("OldestInstance")
            .tags(GroupTagArgs.builder()
                .key("Foo")
                .value("foo-bar")
                .propagateAtLaunch(true)
                .build())
            .build());

        var foobarLifecycleHook = new LifecycleHook("foobarLifecycleHook", LifecycleHookArgs.builder()        
            .autoscalingGroupName(foobarGroup.name())
            .defaultResult("CONTINUE")
            .heartbeatTimeout(2000)
            .lifecycleTransition("autoscaling:EC2_INSTANCE_LAUNCHING")
            .notificationMetadata("""
{
  "foo": "bar"
}
            """)
            .notificationTargetArn("arn:aws:sqs:us-east-1:444455556666:queue1*")
            .roleArn("arn:aws:iam::123456789012:role/S3Access")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

foobar_group = aws.autoscaling.Group("foobarGroup",
    availability_zones=["us-west-2a"],
    health_check_type="EC2",
    termination_policies=["OldestInstance"],
    tags=[aws.autoscaling.GroupTagArgs(
        key="Foo",
        value="foo-bar",
        propagate_at_launch=True,
    )])
foobar_lifecycle_hook = aws.autoscaling.LifecycleHook("foobarLifecycleHook",
    autoscaling_group_name=foobar_group.name,
    default_result="CONTINUE",
    heartbeat_timeout=2000,
    lifecycle_transition="autoscaling:EC2_INSTANCE_LAUNCHING",
    notification_metadata="""{
  "foo": "bar"
}
""",
    notification_target_arn="arn:aws:sqs:us-east-1:444455556666:queue1*",
    role_arn="arn:aws:iam::123456789012:role/S3Access")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const foobarGroup = new aws.autoscaling.Group("foobarGroup", {
    availabilityZones: ["us-west-2a"],
    healthCheckType: "EC2",
    terminationPolicies: ["OldestInstance"],
    tags: [{
        key: "Foo",
        value: "foo-bar",
        propagateAtLaunch: true,
    }],
});
const foobarLifecycleHook = new aws.autoscaling.LifecycleHook("foobarLifecycleHook", {
    autoscalingGroupName: foobarGroup.name,
    defaultResult: "CONTINUE",
    heartbeatTimeout: 2000,
    lifecycleTransition: "autoscaling:EC2_INSTANCE_LAUNCHING",
    notificationMetadata: `{
  "foo": "bar"
}
`,
    notificationTargetArn: "arn:aws:sqs:us-east-1:444455556666:queue1*",
    roleArn: "arn:aws:iam::123456789012:role/S3Access",
});
resources:
  foobarGroup:
    type: aws:autoscaling:Group
    properties:
      availabilityZones:
        - us-west-2a
      healthCheckType: EC2
      terminationPolicies:
        - OldestInstance
      tags:
        - key: Foo
          value: foo-bar
          propagateAtLaunch: true
  foobarLifecycleHook:
    type: aws:autoscaling:LifecycleHook
    properties:
      autoscalingGroupName: ${foobarGroup.name}
      defaultResult: CONTINUE
      heartbeatTimeout: 2000
      lifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
      notificationMetadata: |
        {
          "foo": "bar"
        }        
      notificationTargetArn: arn:aws:sqs:us-east-1:444455556666:queue1*
      roleArn: arn:aws:iam::123456789012:role/S3Access

Create a LifecycleHook Resource

new LifecycleHook(name: string, args: LifecycleHookArgs, opts?: CustomResourceOptions);
@overload
def LifecycleHook(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  autoscaling_group_name: Optional[str] = None,
                  default_result: Optional[str] = None,
                  heartbeat_timeout: Optional[int] = None,
                  lifecycle_transition: Optional[str] = None,
                  name: Optional[str] = None,
                  notification_metadata: Optional[str] = None,
                  notification_target_arn: Optional[str] = None,
                  role_arn: Optional[str] = None)
@overload
def LifecycleHook(resource_name: str,
                  args: LifecycleHookArgs,
                  opts: Optional[ResourceOptions] = None)
func NewLifecycleHook(ctx *Context, name string, args LifecycleHookArgs, opts ...ResourceOption) (*LifecycleHook, error)
public LifecycleHook(string name, LifecycleHookArgs args, CustomResourceOptions? opts = null)
public LifecycleHook(String name, LifecycleHookArgs args)
public LifecycleHook(String name, LifecycleHookArgs args, CustomResourceOptions options)
type: aws:autoscaling:LifecycleHook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args LifecycleHookArgs
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 LifecycleHookArgs
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 LifecycleHookArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LifecycleHookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args LifecycleHookArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

LifecycleHook Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The LifecycleHook resource accepts the following input properties:

AutoscalingGroupName string

The name of the Auto Scaling group to which you want to assign the lifecycle hook

LifecycleTransition string

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

DefaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

Name string

The name of the lifecycle hook.

NotificationMetadata string

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

NotificationTargetArn string

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

RoleArn string

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

AutoscalingGroupName string

The name of the Auto Scaling group to which you want to assign the lifecycle hook

LifecycleTransition string

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

DefaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

Name string

The name of the lifecycle hook.

NotificationMetadata string

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

NotificationTargetArn string

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

RoleArn string

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

autoscalingGroupName String

The name of the Auto Scaling group to which you want to assign the lifecycle hook

lifecycleTransition String

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

defaultResult String

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

heartbeatTimeout Integer

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 DefaultResult parameter

name String

The name of the lifecycle hook.

notificationMetadata String

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

notificationTargetArn String

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

roleArn String

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

autoscalingGroupName string

The name of the Auto Scaling group to which you want to assign the lifecycle hook

lifecycleTransition string

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

defaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

name string

The name of the lifecycle hook.

notificationMetadata string

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

notificationTargetArn string

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

roleArn string

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

autoscaling_group_name str

The name of the Auto Scaling group to which you want to assign the lifecycle hook

lifecycle_transition str

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

default_result str

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

name str

The name of the lifecycle hook.

notification_metadata str

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

notification_target_arn str

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

role_arn str

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

autoscalingGroupName String

The name of the Auto Scaling group to which you want to assign the lifecycle hook

lifecycleTransition String

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

defaultResult String

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

name String

The name of the lifecycle hook.

notificationMetadata String

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

notificationTargetArn String

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

roleArn String

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing LifecycleHook Resource

Get an existing LifecycleHook 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?: LifecycleHookState, opts?: CustomResourceOptions): LifecycleHook
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        autoscaling_group_name: Optional[str] = None,
        default_result: Optional[str] = None,
        heartbeat_timeout: Optional[int] = None,
        lifecycle_transition: Optional[str] = None,
        name: Optional[str] = None,
        notification_metadata: Optional[str] = None,
        notification_target_arn: Optional[str] = None,
        role_arn: Optional[str] = None) -> LifecycleHook
func GetLifecycleHook(ctx *Context, name string, id IDInput, state *LifecycleHookState, opts ...ResourceOption) (*LifecycleHook, error)
public static LifecycleHook Get(string name, Input<string> id, LifecycleHookState? state, CustomResourceOptions? opts = null)
public static LifecycleHook get(String name, Output<String> id, LifecycleHookState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
AutoscalingGroupName string

The name of the Auto Scaling group to which you want to assign the lifecycle hook

DefaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

LifecycleTransition string

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

Name string

The name of the lifecycle hook.

NotificationMetadata string

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

NotificationTargetArn string

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

RoleArn string

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

AutoscalingGroupName string

The name of the Auto Scaling group to which you want to assign the lifecycle hook

DefaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

LifecycleTransition string

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

Name string

The name of the lifecycle hook.

NotificationMetadata string

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

NotificationTargetArn string

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

RoleArn string

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

autoscalingGroupName String

The name of the Auto Scaling group to which you want to assign the lifecycle hook

defaultResult String

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

heartbeatTimeout Integer

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 DefaultResult parameter

lifecycleTransition String

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

name String

The name of the lifecycle hook.

notificationMetadata String

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

notificationTargetArn String

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

roleArn String

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

autoscalingGroupName string

The name of the Auto Scaling group to which you want to assign the lifecycle hook

defaultResult string

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

lifecycleTransition string

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

name string

The name of the lifecycle hook.

notificationMetadata string

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

notificationTargetArn string

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

roleArn string

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

autoscaling_group_name str

The name of the Auto Scaling group to which you want to assign the lifecycle hook

default_result str

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

lifecycle_transition str

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

name str

The name of the lifecycle hook.

notification_metadata str

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

notification_target_arn str

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

role_arn str

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

autoscalingGroupName String

The name of the Auto Scaling group to which you want to assign the lifecycle hook

defaultResult String

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.

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 DefaultResult parameter

lifecycleTransition String

The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types

name String

The name of the lifecycle hook.

notificationMetadata String

Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.

notificationTargetArn String

The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.

roleArn String

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

Import

AutoScaling Lifecycle Hooks can be imported using the role autoscaling_group_name and name separated by /.

 $ pulumi import aws:autoscaling/lifecycleHook:LifecycleHook test-lifecycle-hook asg-name/lifecycle-hook-name

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.