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

com.pulumi.awsnative.ssmcontacts.kotlin.Rotation.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ssmcontacts.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.ssmcontacts.kotlin.outputs.RotationRecurrenceSettings
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.ssmcontacts.kotlin.outputs.RotationRecurrenceSettings.Companion.toKotlin as rotationRecurrenceSettingsToKotlin

/**
 * Builder for [Rotation].
 */
@PulumiTagMarker
public class RotationResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: RotationArgs = RotationArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend RotationArgsBuilder.() -> Unit) {
        val builder = RotationArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Rotation {
        val builtJavaResource = com.pulumi.awsnative.ssmcontacts.Rotation(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Rotation(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::SSMContacts::Rotation.
 */
public class Rotation internal constructor(
    override val javaResource: com.pulumi.awsnative.ssmcontacts.Rotation,
) : KotlinCustomResource(javaResource, RotationMapper) {
    /**
     * The Amazon Resource Name (ARN) of the rotation.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Members of the rotation
     */
    public val contactIds: Output>
        get() = javaResource.contactIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * Name of the Rotation
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Information about the rule that specifies when shift team members rotate.
     */
    public val recurrence: Output
        get() = javaResource.recurrence().applyValue({ args0 ->
            args0.let({ args0 ->
                rotationRecurrenceSettingsToKotlin(args0)
            })
        })

    /**
     * Start time of the first shift of Oncall Schedule
     */
    public val startTime: Output
        get() = javaResource.startTime().applyValue({ args0 -> args0 })

    /**
     * Optional metadata to assign to the rotation. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For more information, see [Tagging Incident Manager resources](https://docs.aws.amazon.com/incident-manager/latest/userguide/tagging.html) in the *Incident Manager User Guide* .
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * TimeZone Identifier for the Oncall Schedule
     */
    public val timeZoneId: Output
        get() = javaResource.timeZoneId().applyValue({ args0 -> args0 })
}

public object RotationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.ssmcontacts.Rotation::class == javaResource::class

    override fun map(javaResource: Resource): Rotation = Rotation(
        javaResource as
            com.pulumi.awsnative.ssmcontacts.Rotation,
    )
}

/**
 * @see [Rotation].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Rotation].
 */
public suspend fun rotation(name: String, block: suspend RotationResourceBuilder.() -> Unit): Rotation {
    val builder = RotationResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Rotation].
 * @param name The _unique_ name of the resulting resource.
 */
public fun rotation(name: String): Rotation {
    val builder = RotationResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy