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

com.pulumi.alicloud.ecs.kotlin.EcsSnapshotArgs.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: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.ecs.kotlin

import com.pulumi.alicloud.ecs.EcsSnapshotArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a ECS Snapshot resource.
 * For information about ECS Snapshot and how to use it, see [What is Snapshot](https://www.alibabacloud.com/help/en/doc-detail/25524.htm).
 * > **NOTE:** Available in v1.120.0+.
 * ## Import
 * ECS Snapshot can be imported using the id, e.g.
 * ```sh
 * $ pulumi import alicloud:ecs/ecsSnapshot:EcsSnapshot example 
 * ```
 * @property category The category of the snapshot. Valid Values: `standard` and `flash`.
 * @property description The description of the snapshot.
 * @property diskId The ID of the disk.
 * @property force Specifies whether to forcibly delete the snapshot that has been used to create disks.
 * @property instantAccess Specifies whether to enable the instant access feature.
 * @property instantAccessRetentionDays Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
 * @property name Field `name` has been deprecated from provider version 1.120.0. New field `snapshot_name` instead.
 * @property resourceGroupId The resource group id.
 * @property retentionDays The retention period of the snapshot.
 * @property snapshotName The name of the snapshot.
 * @property tags A mapping of tags to assign to the snapshot.
 * > **NOTE:** If `force` is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.
 */
public data class EcsSnapshotArgs(
    public val category: Output? = null,
    public val description: Output? = null,
    public val diskId: Output? = null,
    public val force: Output? = null,
    public val instantAccess: Output? = null,
    public val instantAccessRetentionDays: Output? = null,
    @Deprecated(
        message = """
  Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.
  """,
    )
    public val name: Output? = null,
    public val resourceGroupId: Output? = null,
    public val retentionDays: Output? = null,
    public val snapshotName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.ecs.EcsSnapshotArgs =
        com.pulumi.alicloud.ecs.EcsSnapshotArgs.builder()
            .category(category?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .diskId(diskId?.applyValue({ args0 -> args0 }))
            .force(force?.applyValue({ args0 -> args0 }))
            .instantAccess(instantAccess?.applyValue({ args0 -> args0 }))
            .instantAccessRetentionDays(instantAccessRetentionDays?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupId(resourceGroupId?.applyValue({ args0 -> args0 }))
            .retentionDays(retentionDays?.applyValue({ args0 -> args0 }))
            .snapshotName(snapshotName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [EcsSnapshotArgs].
 */
@PulumiTagMarker
public class EcsSnapshotArgsBuilder internal constructor() {
    private var category: Output? = null

    private var description: Output? = null

    private var diskId: Output? = null

    private var force: Output? = null

    private var instantAccess: Output? = null

    private var instantAccessRetentionDays: Output? = null

    private var name: Output? = null

    private var resourceGroupId: Output? = null

    private var retentionDays: Output? = null

    private var snapshotName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The category of the snapshot. Valid Values: `standard` and `flash`.
     */
    @JvmName("yafrspuxewdkcenk")
    public suspend fun category(`value`: Output) {
        this.category = value
    }

    /**
     * @param value The description of the snapshot.
     */
    @JvmName("yvxqvtignqsxkuqj")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The ID of the disk.
     */
    @JvmName("wuacjulqaudwvpnr")
    public suspend fun diskId(`value`: Output) {
        this.diskId = value
    }

    /**
     * @param value Specifies whether to forcibly delete the snapshot that has been used to create disks.
     */
    @JvmName("sbfbuikjnqgoysuv")
    public suspend fun force(`value`: Output) {
        this.force = value
    }

    /**
     * @param value Specifies whether to enable the instant access feature.
     */
    @JvmName("yyrfhayqligvgiqo")
    public suspend fun instantAccess(`value`: Output) {
        this.instantAccess = value
    }

    /**
     * @param value Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
     */
    @JvmName("apvlejeqrufummbk")
    public suspend fun instantAccessRetentionDays(`value`: Output) {
        this.instantAccessRetentionDays = value
    }

    /**
     * @param value Field `name` has been deprecated from provider version 1.120.0. New field `snapshot_name` instead.
     */
    @Deprecated(
        message = """
  Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.
  """,
    )
    @JvmName("bxpvmkpdcswggtts")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The resource group id.
     */
    @JvmName("ovfbdulmpaachltu")
    public suspend fun resourceGroupId(`value`: Output) {
        this.resourceGroupId = value
    }

    /**
     * @param value The retention period of the snapshot.
     */
    @JvmName("kbfemvgxiswhcmnv")
    public suspend fun retentionDays(`value`: Output) {
        this.retentionDays = value
    }

    /**
     * @param value The name of the snapshot.
     */
    @JvmName("mutjiiiwlinjhimq")
    public suspend fun snapshotName(`value`: Output) {
        this.snapshotName = value
    }

    /**
     * @param value A mapping of tags to assign to the snapshot.
     * > **NOTE:** If `force` is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.
     */
    @JvmName("qqdlgxgpyrevbsti")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The category of the snapshot. Valid Values: `standard` and `flash`.
     */
    @JvmName("amrudnfrpfpoojji")
    public suspend fun category(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.category = mapped
    }

    /**
     * @param value The description of the snapshot.
     */
    @JvmName("bveuyakdbucfccli")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The ID of the disk.
     */
    @JvmName("ktbdqaxumyhklpry")
    public suspend fun diskId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskId = mapped
    }

    /**
     * @param value Specifies whether to forcibly delete the snapshot that has been used to create disks.
     */
    @JvmName("yatbsphmjnovwkpn")
    public suspend fun force(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.force = mapped
    }

    /**
     * @param value Specifies whether to enable the instant access feature.
     */
    @JvmName("cyycjlxprqvyiofl")
    public suspend fun instantAccess(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instantAccess = mapped
    }

    /**
     * @param value Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
     */
    @JvmName("swlujxmohragyyte")
    public suspend fun instantAccessRetentionDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instantAccessRetentionDays = mapped
    }

    /**
     * @param value Field `name` has been deprecated from provider version 1.120.0. New field `snapshot_name` instead.
     */
    @Deprecated(
        message = """
  Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.
  """,
    )
    @JvmName("febxqaxfbjgdharq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The resource group id.
     */
    @JvmName("lbdqemqlsiqtmylq")
    public suspend fun resourceGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupId = mapped
    }

    /**
     * @param value The retention period of the snapshot.
     */
    @JvmName("kyfgfnglllkdqode")
    public suspend fun retentionDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionDays = mapped
    }

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

    /**
     * @param value A mapping of tags to assign to the snapshot.
     * > **NOTE:** If `force` is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.
     */
    @JvmName("msemsirygmxpavla")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the snapshot.
     * > **NOTE:** If `force` is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.
     */
    @JvmName("ajrbtslxddmlyvtn")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): EcsSnapshotArgs = EcsSnapshotArgs(
        category = category,
        description = description,
        diskId = diskId,
        force = force,
        instantAccess = instantAccess,
        instantAccessRetentionDays = instantAccessRetentionDays,
        name = name,
        resourceGroupId = resourceGroupId,
        retentionDays = retentionDays,
        snapshotName = snapshotName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy