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

com.pulumi.azurenative.storage.kotlin.BlobArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.storage.kotlin

import com.pulumi.asset.AssetOrArchive
import com.pulumi.azurenative.storage.BlobArgs.builder
import com.pulumi.azurenative.storage.kotlin.enums.BlobAccessTier
import com.pulumi.azurenative.storage.kotlin.enums.BlobType
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Blob within a Storage Container. For the supported combinations of properties and features please see [here](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-feature-support-in-storage-accounts).
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:storage:Blob myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/blobs/{blobName}
 * ```
 * @property accessTier The access tier of the storage blob. Only supported for standard storage accounts, not premium.
 * @property accountName Specifies the storage account in which to create the storage container.
 * @property blobName The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
 * @property containerName The name of the storage container in which this blob should be created.
 * @property contentMd5 The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
 * @property contentType The content type of the storage blob. Defaults to `application/octet-stream`.
 * @property metadata A map of custom blob metadata.
 * @property resourceGroupName The name of the resource group within the user's subscription.
 * @property source An asset to copy to the blob contents. This field cannot be specified for Append blobs.
 * @property type The type of the storage blob to be created. Defaults to 'Block'.
 */
public data class BlobArgs(
    public val accessTier: Output? = null,
    public val accountName: Output? = null,
    public val blobName: Output? = null,
    public val containerName: Output? = null,
    public val contentMd5: Output? = null,
    public val contentType: Output? = null,
    public val metadata: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val source: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.storage.BlobArgs =
        com.pulumi.azurenative.storage.BlobArgs.builder()
            .accessTier(accessTier?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .accountName(accountName?.applyValue({ args0 -> args0 }))
            .blobName(blobName?.applyValue({ args0 -> args0 }))
            .containerName(containerName?.applyValue({ args0 -> args0 }))
            .contentMd5(contentMd5?.applyValue({ args0 -> args0 }))
            .contentType(contentType?.applyValue({ args0 -> args0 }))
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .source(source?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [BlobArgs].
 */
@PulumiTagMarker
public class BlobArgsBuilder internal constructor() {
    private var accessTier: Output? = null

    private var accountName: Output? = null

    private var blobName: Output? = null

    private var containerName: Output? = null

    private var contentMd5: Output? = null

    private var contentType: Output? = null

    private var metadata: Output>? = null

    private var resourceGroupName: Output? = null

    private var source: Output? = null

    private var type: Output? = null

    /**
     * @param value The access tier of the storage blob. Only supported for standard storage accounts, not premium.
     */
    @JvmName("bdrdqqxymxlvwnss")
    public suspend fun accessTier(`value`: Output) {
        this.accessTier = value
    }

    /**
     * @param value Specifies the storage account in which to create the storage container.
     */
    @JvmName("ytqymkdwkollpkhp")
    public suspend fun accountName(`value`: Output) {
        this.accountName = value
    }

    /**
     * @param value The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
     */
    @JvmName("edddugythqqsxfny")
    public suspend fun blobName(`value`: Output) {
        this.blobName = value
    }

    /**
     * @param value The name of the storage container in which this blob should be created.
     */
    @JvmName("ysgsobcihrhinuyj")
    public suspend fun containerName(`value`: Output) {
        this.containerName = value
    }

    /**
     * @param value The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
     */
    @JvmName("xroeihdefvgkwkiv")
    public suspend fun contentMd5(`value`: Output) {
        this.contentMd5 = value
    }

    /**
     * @param value The content type of the storage blob. Defaults to `application/octet-stream`.
     */
    @JvmName("jndsviuphrjoqcwg")
    public suspend fun contentType(`value`: Output) {
        this.contentType = value
    }

    /**
     * @param value A map of custom blob metadata.
     */
    @JvmName("mgiwtpnkehcbormb")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value The name of the resource group within the user's subscription.
     */
    @JvmName("afoumsdctbkqdvoq")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value An asset to copy to the blob contents. This field cannot be specified for Append blobs.
     */
    @JvmName("hwrkdswmsryodnrj")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value The type of the storage blob to be created. Defaults to 'Block'.
     */
    @JvmName("joyutuomecyypkxl")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The access tier of the storage blob. Only supported for standard storage accounts, not premium.
     */
    @JvmName("axaiiaacnidavjna")
    public suspend fun accessTier(`value`: BlobAccessTier?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessTier = mapped
    }

    /**
     * @param value Specifies the storage account in which to create the storage container.
     */
    @JvmName("mnjrlhxhpnymqbvr")
    public suspend fun accountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountName = mapped
    }

    /**
     * @param value The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
     */
    @JvmName("kpmstvevoskumwkk")
    public suspend fun blobName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blobName = mapped
    }

    /**
     * @param value The name of the storage container in which this blob should be created.
     */
    @JvmName("ksgmarywskhegwrg")
    public suspend fun containerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerName = mapped
    }

    /**
     * @param value The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
     */
    @JvmName("kryiyrqdkbhubtti")
    public suspend fun contentMd5(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentMd5 = mapped
    }

    /**
     * @param value The content type of the storage blob. Defaults to `application/octet-stream`.
     */
    @JvmName("fcihgnpbghmrjabo")
    public suspend fun contentType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentType = mapped
    }

    /**
     * @param value A map of custom blob metadata.
     */
    @JvmName("pqxffygsvjndrvpj")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values A map of custom blob metadata.
     */
    @JvmName("beumapovujwiprsr")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value The name of the resource group within the user's subscription.
     */
    @JvmName("wiosnbrmouhpqygw")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value An asset to copy to the blob contents. This field cannot be specified for Append blobs.
     */
    @JvmName("opqrpcyaefbfmncp")
    public suspend fun source(`value`: AssetOrArchive?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param value The type of the storage blob to be created. Defaults to 'Block'.
     */
    @JvmName("lryepfhsgfoedkjc")
    public suspend fun type(`value`: BlobType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): BlobArgs = BlobArgs(
        accessTier = accessTier,
        accountName = accountName,
        blobName = blobName,
        containerName = containerName,
        contentMd5 = contentMd5,
        contentType = contentType,
        metadata = metadata,
        resourceGroupName = resourceGroupName,
        source = source,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy