All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.autoscaling.kotlin.LifecycleHookArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.autoscaling.kotlin

import com.pulumi.awsnative.autoscaling.LifecycleHookArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::AutoScaling::LifecycleHook
 * @property autoScalingGroupName The name of the Auto Scaling group for the lifecycle hook.
 * @property defaultResult The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. The valid values are CONTINUE and ABANDON (default).
 * @property heartbeatTimeout The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from 30 to 7200 seconds. The default value is 3600 seconds (1 hour). If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified in the DefaultResult property.
 * @property lifecycleHookName The name of the lifecycle hook.
 * @property lifecycleTransition The instance state to which you want to attach the lifecycle hook.
 * @property notificationMetadata Additional information that is included any time Amazon EC2 Auto Scaling sends a message to the notification target.
 * @property notificationTargetArn The Amazon Resource Name (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. You can specify an Amazon SQS queue or an Amazon SNS topic. The notification message includes the following information: lifecycle action token, user account ID, Auto Scaling group name, lifecycle hook name, instance ID, lifecycle transition, and notification metadata.
 * @property roleArn The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target, for example, an Amazon SNS topic or an Amazon SQS queue.
 */
public data class LifecycleHookArgs(
    public val autoScalingGroupName: Output? = null,
    public val defaultResult: Output? = null,
    public val heartbeatTimeout: Output? = null,
    public val lifecycleHookName: Output? = null,
    public val lifecycleTransition: Output? = null,
    public val notificationMetadata: Output? = null,
    public val notificationTargetArn: Output? = null,
    public val roleArn: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.autoscaling.LifecycleHookArgs =
        com.pulumi.awsnative.autoscaling.LifecycleHookArgs.builder()
            .autoScalingGroupName(autoScalingGroupName?.applyValue({ args0 -> args0 }))
            .defaultResult(defaultResult?.applyValue({ args0 -> args0 }))
            .heartbeatTimeout(heartbeatTimeout?.applyValue({ args0 -> args0 }))
            .lifecycleHookName(lifecycleHookName?.applyValue({ args0 -> args0 }))
            .lifecycleTransition(lifecycleTransition?.applyValue({ args0 -> args0 }))
            .notificationMetadata(notificationMetadata?.applyValue({ args0 -> args0 }))
            .notificationTargetArn(notificationTargetArn?.applyValue({ args0 -> args0 }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LifecycleHookArgs].
 */
@PulumiTagMarker
public class LifecycleHookArgsBuilder internal constructor() {
    private var autoScalingGroupName: Output? = null

    private var defaultResult: Output? = null

    private var heartbeatTimeout: Output? = null

    private var lifecycleHookName: Output? = null

    private var lifecycleTransition: Output? = null

    private var notificationMetadata: Output? = null

    private var notificationTargetArn: Output? = null

    private var roleArn: Output? = null

    /**
     * @param value The name of the Auto Scaling group for the lifecycle hook.
     */
    @JvmName("tfbsrfkcquuqnlpx")
    public suspend fun autoScalingGroupName(`value`: Output) {
        this.autoScalingGroupName = value
    }

    /**
     * @param value The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. The valid values are CONTINUE and ABANDON (default).
     */
    @JvmName("peaawshcqgpwdyar")
    public suspend fun defaultResult(`value`: Output) {
        this.defaultResult = value
    }

    /**
     * @param value The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from 30 to 7200 seconds. The default value is 3600 seconds (1 hour). If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified in the DefaultResult property.
     */
    @JvmName("lmtxjgdofhfpxrju")
    public suspend fun heartbeatTimeout(`value`: Output) {
        this.heartbeatTimeout = value
    }

    /**
     * @param value The name of the lifecycle hook.
     */
    @JvmName("qjfjrlghfejjsbdo")
    public suspend fun lifecycleHookName(`value`: Output) {
        this.lifecycleHookName = value
    }

    /**
     * @param value The instance state to which you want to attach the lifecycle hook.
     */
    @JvmName("ucaiyoilssifmlmk")
    public suspend fun lifecycleTransition(`value`: Output) {
        this.lifecycleTransition = value
    }

    /**
     * @param value Additional information that is included any time Amazon EC2 Auto Scaling sends a message to the notification target.
     */
    @JvmName("rewyeuxiildciokd")
    public suspend fun notificationMetadata(`value`: Output) {
        this.notificationMetadata = value
    }

    /**
     * @param value The Amazon Resource Name (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. You can specify an Amazon SQS queue or an Amazon SNS topic. The notification message includes the following information: lifecycle action token, user account ID, Auto Scaling group name, lifecycle hook name, instance ID, lifecycle transition, and notification metadata.
     */
    @JvmName("frwoeypsrqglwawj")
    public suspend fun notificationTargetArn(`value`: Output) {
        this.notificationTargetArn = value
    }

    /**
     * @param value The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target, for example, an Amazon SNS topic or an Amazon SQS queue.
     */
    @JvmName("egoehinfnhyxjclp")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value The name of the Auto Scaling group for the lifecycle hook.
     */
    @JvmName("qtifcwfwaccoyobq")
    public suspend fun autoScalingGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoScalingGroupName = mapped
    }

    /**
     * @param value The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. The valid values are CONTINUE and ABANDON (default).
     */
    @JvmName("rfnrsbahqhsbmems")
    public suspend fun defaultResult(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultResult = mapped
    }

    /**
     * @param value The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from 30 to 7200 seconds. The default value is 3600 seconds (1 hour). If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified in the DefaultResult property.
     */
    @JvmName("ddglwcmfbncjclsl")
    public suspend fun heartbeatTimeout(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.heartbeatTimeout = mapped
    }

    /**
     * @param value The name of the lifecycle hook.
     */
    @JvmName("uixwcxbyivrkocyq")
    public suspend fun lifecycleHookName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lifecycleHookName = mapped
    }

    /**
     * @param value The instance state to which you want to attach the lifecycle hook.
     */
    @JvmName("bhelqhibvoxsechx")
    public suspend fun lifecycleTransition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lifecycleTransition = mapped
    }

    /**
     * @param value Additional information that is included any time Amazon EC2 Auto Scaling sends a message to the notification target.
     */
    @JvmName("ivkvaxwuuhbrbmdv")
    public suspend fun notificationMetadata(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationMetadata = mapped
    }

    /**
     * @param value The Amazon Resource Name (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. You can specify an Amazon SQS queue or an Amazon SNS topic. The notification message includes the following information: lifecycle action token, user account ID, Auto Scaling group name, lifecycle hook name, instance ID, lifecycle transition, and notification metadata.
     */
    @JvmName("wuhjopprppunaxwl")
    public suspend fun notificationTargetArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationTargetArn = mapped
    }

    /**
     * @param value The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target, for example, an Amazon SNS topic or an Amazon SQS queue.
     */
    @JvmName("stuyxenyaduqrpgs")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    internal fun build(): LifecycleHookArgs = LifecycleHookArgs(
        autoScalingGroupName = autoScalingGroupName,
        defaultResult = defaultResult,
        heartbeatTimeout = heartbeatTimeout,
        lifecycleHookName = lifecycleHookName,
        lifecycleTransition = lifecycleTransition,
        notificationMetadata = notificationMetadata,
        notificationTargetArn = notificationTargetArn,
        roleArn = roleArn,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy