Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.netapp.kotlin.VolumeQuotaRuleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.netapp.kotlin
import com.pulumi.azurenative.netapp.VolumeQuotaRuleArgs.builder
import com.pulumi.azurenative.netapp.kotlin.enums.Type
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Double
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Quota Rule of a Volume
* Azure REST API version: 2022-11-01. Prior API version in Azure Native 1.x: 2022-01-01.
* Other available API versions: 2022-11-01-preview, 2023-05-01, 2023-05-01-preview, 2023-07-01, 2023-07-01-preview, 2023-11-01, 2023-11-01-preview, 2024-01-01, 2024-03-01, 2024-03-01-preview.
* ## Example Usage
* ### VolumeQuotaRules_Create
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var volumeQuotaRule = new AzureNative.NetApp.VolumeQuotaRule("volumeQuotaRule", new()
* {
* AccountName = "account-9957",
* Location = "westus",
* PoolName = "pool-5210",
* QuotaSizeInKiBs = 100005,
* QuotaTarget = "1821",
* QuotaType = AzureNative.NetApp.Type.IndividualUserQuota,
* ResourceGroupName = "myRG",
* VolumeName = "volume-6387",
* VolumeQuotaRuleName = "rule-0004",
* });
* });
* ```
* ```go
* package main
* import (
* netapp "github.com/pulumi/pulumi-azure-native-sdk/netapp/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := netapp.NewVolumeQuotaRule(ctx, "volumeQuotaRule", &netapp.VolumeQuotaRuleArgs{
* AccountName: pulumi.String("account-9957"),
* Location: pulumi.String("westus"),
* PoolName: pulumi.String("pool-5210"),
* QuotaSizeInKiBs: pulumi.Float64(100005),
* QuotaTarget: pulumi.String("1821"),
* QuotaType: pulumi.String(netapp.TypeIndividualUserQuota),
* ResourceGroupName: pulumi.String("myRG"),
* VolumeName: pulumi.String("volume-6387"),
* VolumeQuotaRuleName: pulumi.String("rule-0004"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.netapp.VolumeQuotaRule;
* import com.pulumi.azurenative.netapp.VolumeQuotaRuleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var volumeQuotaRule = new VolumeQuotaRule("volumeQuotaRule", VolumeQuotaRuleArgs.builder()
* .accountName("account-9957")
* .location("westus")
* .poolName("pool-5210")
* .quotaSizeInKiBs(100005)
* .quotaTarget("1821")
* .quotaType("IndividualUserQuota")
* .resourceGroupName("myRG")
* .volumeName("volume-6387")
* .volumeQuotaRuleName("rule-0004")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:netapp:VolumeQuotaRule account-9957/pool-5210/volume-6387/rule-0004 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}
* ```
* @property accountName The name of the NetApp account
* @property location The geo-location where the resource lives
* @property poolName The name of the capacity pool
* @property quotaSizeInKiBs Size of quota
* @property quotaTarget UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running
* @property quotaType Type of quota
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property tags Resource tags.
* @property volumeName The name of the volume
* @property volumeQuotaRuleName The name of volume quota rule
*/
public data class VolumeQuotaRuleArgs(
public val accountName: Output? = null,
public val location: Output? = null,
public val poolName: Output? = null,
public val quotaSizeInKiBs: Output? = null,
public val quotaTarget: Output? = null,
public val quotaType: Output>? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
public val volumeName: Output? = null,
public val volumeQuotaRuleName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.netapp.VolumeQuotaRuleArgs =
com.pulumi.azurenative.netapp.VolumeQuotaRuleArgs.builder()
.accountName(accountName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.poolName(poolName?.applyValue({ args0 -> args0 }))
.quotaSizeInKiBs(quotaSizeInKiBs?.applyValue({ args0 -> args0 }))
.quotaTarget(quotaTarget?.applyValue({ args0 -> args0 }))
.quotaType(
quotaType?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.volumeName(volumeName?.applyValue({ args0 -> args0 }))
.volumeQuotaRuleName(volumeQuotaRuleName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [VolumeQuotaRuleArgs].
*/
@PulumiTagMarker
public class VolumeQuotaRuleArgsBuilder internal constructor() {
private var accountName: Output? = null
private var location: Output? = null
private var poolName: Output? = null
private var quotaSizeInKiBs: Output? = null
private var quotaTarget: Output? = null
private var quotaType: Output>? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
private var volumeName: Output? = null
private var volumeQuotaRuleName: Output? = null
/**
* @param value The name of the NetApp account
*/
@JvmName("nfhhramsgdptyexg")
public suspend fun accountName(`value`: Output) {
this.accountName = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("jymdhctlmstyoghw")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the capacity pool
*/
@JvmName("ceaxhklcaaaodgid")
public suspend fun poolName(`value`: Output) {
this.poolName = value
}
/**
* @param value Size of quota
*/
@JvmName("xitqhsehsfquhtdl")
public suspend fun quotaSizeInKiBs(`value`: Output) {
this.quotaSizeInKiBs = value
}
/**
* @param value UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running
*/
@JvmName("gkyechomsdgyqutp")
public suspend fun quotaTarget(`value`: Output) {
this.quotaTarget = value
}
/**
* @param value Type of quota
*/
@JvmName("qkpnllxepsambvpt")
public suspend fun quotaType(`value`: Output>) {
this.quotaType = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("oxprsiatpildajeu")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Resource tags.
*/
@JvmName("buyhloesbwycfewg")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The name of the volume
*/
@JvmName("apatyirvcuxxlnbx")
public suspend fun volumeName(`value`: Output) {
this.volumeName = value
}
/**
* @param value The name of volume quota rule
*/
@JvmName("jpwoeohyskvvheow")
public suspend fun volumeQuotaRuleName(`value`: Output) {
this.volumeQuotaRuleName = value
}
/**
* @param value The name of the NetApp account
*/
@JvmName("eyoclwlvopthbgbq")
public suspend fun accountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountName = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("uenmufmsxgpapysd")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the capacity pool
*/
@JvmName("kmwksyokyqtdayqt")
public suspend fun poolName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.poolName = mapped
}
/**
* @param value Size of quota
*/
@JvmName("gfogntcitutyvnjt")
public suspend fun quotaSizeInKiBs(`value`: Double?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.quotaSizeInKiBs = mapped
}
/**
* @param value UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running
*/
@JvmName("qhthhbjwaebksfji")
public suspend fun quotaTarget(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.quotaTarget = mapped
}
/**
* @param value Type of quota
*/
@JvmName("hyfrlaptawrbhnlk")
public suspend fun quotaType(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.quotaType = mapped
}
/**
* @param value Type of quota
*/
@JvmName("alvjcodndttaygxq")
public fun quotaType(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.quotaType = mapped
}
/**
* @param value Type of quota
*/
@JvmName("plldmsekhgslfryp")
public fun quotaType(`value`: Type) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.quotaType = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("plnwccmoqcrphwbg")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("hwsacvyxojpqjyht")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("mmikgdtbtfwrqmpj")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The name of the volume
*/
@JvmName("rtfqicklumitiarw")
public suspend fun volumeName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.volumeName = mapped
}
/**
* @param value The name of volume quota rule
*/
@JvmName("yrxvojckhtmodqnt")
public suspend fun volumeQuotaRuleName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.volumeQuotaRuleName = mapped
}
internal fun build(): VolumeQuotaRuleArgs = VolumeQuotaRuleArgs(
accountName = accountName,
location = location,
poolName = poolName,
quotaSizeInKiBs = quotaSizeInKiBs,
quotaTarget = quotaTarget,
quotaType = quotaType,
resourceGroupName = resourceGroupName,
tags = tags,
volumeName = volumeName,
volumeQuotaRuleName = volumeQuotaRuleName,
)
}