All Downloads are FREE. Search and download functionalities are using the official Maven repository.
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.fabric.kotlin.FabricCapacity.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.fabric.kotlin
import com.pulumi.azurenative.fabric.kotlin.outputs.CapacityAdministrationResponse
import com.pulumi.azurenative.fabric.kotlin.outputs.RpSkuResponse
import com.pulumi.azurenative.fabric.kotlin.outputs.SystemDataResponse
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.Map
import com.pulumi.azurenative.fabric.kotlin.outputs.CapacityAdministrationResponse.Companion.toKotlin as capacityAdministrationResponseToKotlin
import com.pulumi.azurenative.fabric.kotlin.outputs.RpSkuResponse.Companion.toKotlin as rpSkuResponseToKotlin
import com.pulumi.azurenative.fabric.kotlin.outputs.SystemDataResponse.Companion.toKotlin as systemDataResponseToKotlin
/**
* Builder for [FabricCapacity].
*/
@PulumiTagMarker
public class FabricCapacityResourceBuilder internal constructor() {
public var name: String? = null
public var args: FabricCapacityArgs = FabricCapacityArgs()
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 FabricCapacityArgsBuilder.() -> Unit) {
val builder = FabricCapacityArgsBuilder()
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(): FabricCapacity {
val builtJavaResource = com.pulumi.azurenative.fabric.FabricCapacity(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return FabricCapacity(builtJavaResource)
}
}
/**
* Fabric Capacity resource
* Azure REST API version: 2023-11-01.
* ## Example Usage
* ### Create or update a capacity
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var fabricCapacity = new AzureNative.Fabric.FabricCapacity("fabricCapacity", new()
* {
* Administration = new AzureNative.Fabric.Inputs.CapacityAdministrationArgs
* {
* Members = new[]
* {
* "[email protected] ",
* "[email protected] ",
* },
* },
* CapacityName = "azsdktest",
* Location = "westcentralus",
* ResourceGroupName = "TestRG",
* Sku = new AzureNative.Fabric.Inputs.RpSkuArgs
* {
* Name = "F2",
* Tier = AzureNative.Fabric.RpSkuTier.Fabric,
* },
* });
* });
* ```
* ```go
* package main
* import (
* fabric "github.com/pulumi/pulumi-azure-native-sdk/fabric/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := fabric.NewFabricCapacity(ctx, "fabricCapacity", &fabric.FabricCapacityArgs{
* Administration: &fabric.CapacityAdministrationArgs{
* Members: pulumi.StringArray{
* pulumi.String("[email protected] "),
* pulumi.String("[email protected] "),
* },
* },
* CapacityName: pulumi.String("azsdktest"),
* Location: pulumi.String("westcentralus"),
* ResourceGroupName: pulumi.String("TestRG"),
* Sku: &fabric.RpSkuArgs{
* Name: pulumi.String("F2"),
* Tier: pulumi.String(fabric.RpSkuTierFabric),
* },
* })
* 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.fabric.FabricCapacity;
* import com.pulumi.azurenative.fabric.FabricCapacityArgs;
* import com.pulumi.azurenative.fabric.inputs.CapacityAdministrationArgs;
* import com.pulumi.azurenative.fabric.inputs.RpSkuArgs;
* 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 fabricCapacity = new FabricCapacity("fabricCapacity", FabricCapacityArgs.builder()
* .administration(CapacityAdministrationArgs.builder()
* .members(
* "[email protected] ",
* "[email protected] ")
* .build())
* .capacityName("azsdktest")
* .location("westcentralus")
* .resourceGroupName("TestRG")
* .sku(RpSkuArgs.builder()
* .name("F2")
* .tier("Fabric")
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:fabric:FabricCapacity azsdktest /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}
* ```
*/
public class FabricCapacity internal constructor(
override val javaResource: com.pulumi.azurenative.fabric.FabricCapacity,
) : KotlinCustomResource(javaResource, FabricCapacityMapper) {
/**
* The capacity administration
*/
public val administration: Output
get() = javaResource.administration().applyValue({ args0 ->
args0.let({ args0 ->
capacityAdministrationResponseToKotlin(args0)
})
})
/**
* The geo-location where the resource lives
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The name of the resource
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The current deployment state of Microsoft Fabric resource. The provisioningState is to indicate states for resource provisioning.
*/
public val provisioningState: Output
get() = javaResource.provisioningState().applyValue({ args0 -> args0 })
/**
* The SKU details
*/
public val sku: Output
get() = javaResource.sku().applyValue({ args0 ->
args0.let({ args0 ->
rpSkuResponseToKotlin(args0)
})
})
/**
* The current state of Microsoft Fabric resource. The state is to indicate more states outside of resource provisioning.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
public val systemData: Output
get() = javaResource.systemData().applyValue({ args0 ->
args0.let({ args0 ->
systemDataResponseToKotlin(args0)
})
})
/**
* Resource tags.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
}
public object FabricCapacityMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.fabric.FabricCapacity::class == javaResource::class
override fun map(javaResource: Resource): FabricCapacity = FabricCapacity(
javaResource as
com.pulumi.azurenative.fabric.FabricCapacity,
)
}
/**
* @see [FabricCapacity].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [FabricCapacity].
*/
public suspend fun fabricCapacity(
name: String,
block: suspend FabricCapacityResourceBuilder.() -> Unit,
): FabricCapacity {
val builder = FabricCapacityResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [FabricCapacity].
* @param name The _unique_ name of the resulting resource.
*/
public fun fabricCapacity(name: String): FabricCapacity {
val builder = FabricCapacityResourceBuilder()
builder.name(name)
return builder.build()
}