AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

PutLifecycleHookInput

import "github.com/aws/aws-sdk-go/service/autoscaling"

type PutLifecycleHookInput struct { AutoScalingGroupName *string `min:"1" type:"string" required:"true"` DefaultResult *string `type:"string"` HeartbeatTimeout *int64 `type:"integer"` LifecycleHookName *string `min:"1" type:"string" required:"true"` LifecycleTransition *string `type:"string"` NotificationMetadata *string `min:"1" type:"string"` NotificationTargetARN *string `type:"string"` RoleARN *string `min:"1" type:"string"` }

AutoScalingGroupName

Type: *string

The name of the Auto Scaling group.

AutoScalingGroupName is a required field

DefaultResult

Type: *string

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

HeartbeatTimeout

Type: *int64

The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from 30 to 7200 seconds. The default is 3600 seconds (1 hour).

If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the default action. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat.

LifecycleHookName

Type: *string

The name of the lifecycle hook.

LifecycleHookName is a required field

LifecycleTransition

Type: *string

The instance state to which you want to attach the lifecycle hook. The possible values are:

  • autoscaling:EC2_INSTANCE_LAUNCHING

  • autoscaling:EC2_INSTANCE_TERMINATING

This parameter is required for new lifecycle hooks, but optional when updating existing hooks.

NotificationMetadata

Type: *string

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

NotificationTargetARN

Type: *string

The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify you when an instance is in the transition state for the lifecycle hook. This target can be either an SQS queue or an SNS topic. If you specify an empty string, this overrides the current ARN.

This operation uses the JSON format when sending notifications to an Amazon SQS queue, and an email key-value pair format when sending notifications to an Amazon SNS topic.

When you specify a notification target, Amazon EC2 Auto Scaling sends it a test message. Test messages contain the following additional key-value pair: "Event": "autoscaling:TEST_NOTIFICATION".

RoleARN

Type: *string

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

This parameter is required for new lifecycle hooks, but optional when updating existing hooks.

Method

GoString

func (s PutLifecycleHookInput) GoString() string

GoString returns the string representation

SetAutoScalingGroupName

func (s *PutLifecycleHookInput) SetAutoScalingGroupName(v string) *PutLifecycleHookInput

SetAutoScalingGroupName sets the AutoScalingGroupName field's value.

SetDefaultResult

func (s *PutLifecycleHookInput) SetDefaultResult(v string) *PutLifecycleHookInput

SetDefaultResult sets the DefaultResult field's value.

SetHeartbeatTimeout

func (s *PutLifecycleHookInput) SetHeartbeatTimeout(v int64) *PutLifecycleHookInput

SetHeartbeatTimeout sets the HeartbeatTimeout field's value.

SetLifecycleHookName

func (s *PutLifecycleHookInput) SetLifecycleHookName(v string) *PutLifecycleHookInput

SetLifecycleHookName sets the LifecycleHookName field's value.

SetLifecycleTransition

func (s *PutLifecycleHookInput) SetLifecycleTransition(v string) *PutLifecycleHookInput

SetLifecycleTransition sets the LifecycleTransition field's value.

SetNotificationMetadata

func (s *PutLifecycleHookInput) SetNotificationMetadata(v string) *PutLifecycleHookInput

SetNotificationMetadata sets the NotificationMetadata field's value.

SetNotificationTargetARN

func (s *PutLifecycleHookInput) SetNotificationTargetARN(v string) *PutLifecycleHookInput

SetNotificationTargetARN sets the NotificationTargetARN field's value.

SetRoleARN

func (s *PutLifecycleHookInput) SetRoleARN(v string) *PutLifecycleHookInput

SetRoleARN sets the RoleARN field's value.

String

func (s PutLifecycleHookInput) String() string

String returns the string representation

Validate

func (s *PutLifecycleHookInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: