import * as core from "@terrascript/core"; export interface LifecycleHookArgs extends core.ResourceArgs { /** * (Required) The name of the Auto Scaling group to which you want to assign the lifecycle hook */ autoscalingGroupName: string | core.StringOut; /** * (Optional) Defines the action the Auto Scaling group should take when the lifecycle hook timeout ela * pses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABAN * DON. The default value for this parameter is ABANDON. */ defaultResult?: string | core.StringOut; /** * (Optional) Defines the amount of time, in seconds, that can elapse before the lifecycle hook times o * ut. When the lifecycle hook times out, Auto Scaling performs the action defined in the DefaultResult * parameter */ heartbeatTimeout?: number | core.NumberOut; /** * (Required) The instance state to which you want to attach the lifecycle hook. For a list of lifecycl * e hook types, see [describe-lifecycle-hook-types](https://docs.aws.amazon.com/cli/latest/reference/a * utoscaling/describe-lifecycle-hook-types.html#examples) */ lifecycleTransition: string | core.StringOut; /** * (Required) The name of the lifecycle hook. */ name: string | core.StringOut; /** * (Optional) Contains additional information that you want to include any time Auto Scaling sends a me * ssage to the notification target. */ notificationMetadata?: string | core.StringOut; /** * (Optional) The ARN of the notification target that Auto Scaling will use to notify you when an insta * nce is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or * an SNS topic. */ notificationTargetArn?: string | core.StringOut; /** * (Optional) The ARN of the IAM role that allows the Auto Scaling group to publish to the specified no * tification target. */ roleArn?: string | core.StringOut; } export class LifecycleHook extends core.Resource { /** * (Required) The name of the Auto Scaling group to which you want to assign the lifecycle hook */ @core.attr(String) public autoscalingGroupName!: string | core.StringOut; /** * (Optional) Defines the action the Auto Scaling group should take when the lifecycle hook timeout ela * pses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABAN * DON. The default value for this parameter is ABANDON. */ @core.attr(String, { computed: true }) public defaultResult?: string | core.StringOut; /** * (Optional) Defines the amount of time, in seconds, that can elapse before the lifecycle hook times o * ut. When the lifecycle hook times out, Auto Scaling performs the action defined in the DefaultResult * parameter */ @core.attr(Number) public heartbeatTimeout?: number | core.NumberOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) The instance state to which you want to attach the lifecycle hook. For a list of lifecycl * e hook types, see [describe-lifecycle-hook-types](https://docs.aws.amazon.com/cli/latest/reference/a * utoscaling/describe-lifecycle-hook-types.html#examples) */ @core.attr(String) public lifecycleTransition!: string | core.StringOut; /** * (Required) The name of the lifecycle hook. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) Contains additional information that you want to include any time Auto Scaling sends a me * ssage to the notification target. */ @core.attr(String) public notificationMetadata?: string | core.StringOut; /** * (Optional) The ARN of the notification target that Auto Scaling will use to notify you when an insta * nce is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or * an SNS topic. */ @core.attr(String) public notificationTargetArn?: string | core.StringOut; /** * (Optional) The ARN of the IAM role that allows the Auto Scaling group to publish to the specified no * tification target. */ @core.attr(String) public roleArn?: string | core.StringOut; constructor(name: string, args?: LifecycleHookArgs) { super(name, "aws_autoscaling_lifecycle_hook", args); } public override getNamespace(): string { return "aws_autoscaling"; } }