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

com.pulumi.azure.hpc.kotlin.CacheBlobNfsTarget.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.hpc.kotlin

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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

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

    public var args: CacheBlobNfsTargetArgs = CacheBlobNfsTargetArgs()

    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 CacheBlobNfsTargetArgsBuilder.() -> Unit) {
        val builder = CacheBlobNfsTargetArgsBuilder()
        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(): CacheBlobNfsTarget {
        val builtJavaResource = com.pulumi.azure.hpc.CacheBlobNfsTarget(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return CacheBlobNfsTarget(builtJavaResource)
    }
}

/**
 * Manages a Blob NFSv3 Target within a HPC Cache.
 * > **NOTE:**: By request of the service team the provider no longer automatically registering the `Microsoft.StorageCache` Resource Provider for this resource. To register it you can run `az provider register --namespace 'Microsoft.StorageCache'`.
 * > **NOTE:**: This resource depends on the NFSv3 enabled Storage Account, which has some prerequisites need to meet. Please checkout: .
 * ## Import
 * HPC Cache Blob NFS Targets can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:hpc/cacheBlobNfsTarget:CacheBlobNfsTarget example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/storageTargets/target1
 * ```
 */
public class CacheBlobNfsTarget internal constructor(
    override val javaResource: com.pulumi.azure.hpc.CacheBlobNfsTarget,
) : KotlinCustomResource(javaResource, CacheBlobNfsTargetMapper) {
    /**
     * The name of the access policy applied to this target. Defaults to `default`.
     */
    public val accessPolicyName: Output?
        get() = javaResource.accessPolicyName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
     */
    public val cacheName: Output
        get() = javaResource.cacheName().applyValue({ args0 -> args0 })

    /**
     * The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The client-facing file path of the HPC Cache Blob NFS Target.
     */
    public val namespacePath: Output
        get() = javaResource.namespacePath().applyValue({ args0 -> args0 })

    /**
     * The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
     */
    public val resourceGroupName: Output
        get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })

    /**
     * The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
     * > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `azure.storage.Container` Data Source/Resource as `resource_manager_id`.
     */
    public val storageContainerId: Output
        get() = javaResource.storageContainerId().applyValue({ args0 -> args0 })

    /**
     * The type of usage of the HPC Cache Blob NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
     */
    public val usageModel: Output
        get() = javaResource.usageModel().applyValue({ args0 -> args0 })

    /**
     * The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
     */
    public val verificationTimerInSeconds: Output?
        get() = javaResource.verificationTimerInSeconds().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
     */
    public val writeBackTimerInSeconds: Output?
        get() = javaResource.writeBackTimerInSeconds().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object CacheBlobNfsTargetMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.hpc.CacheBlobNfsTarget::class == javaResource::class

    override fun map(javaResource: Resource): CacheBlobNfsTarget = CacheBlobNfsTarget(
        javaResource as
            com.pulumi.azure.hpc.CacheBlobNfsTarget,
    )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy