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.azure.elasticsan.kotlin.ElasticSan.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.elasticsan.kotlin
import com.pulumi.azure.elasticsan.kotlin.outputs.ElasticSanSku
import com.pulumi.azure.elasticsan.kotlin.outputs.ElasticSanSku.Companion.toKotlin
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
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [ElasticSan].
*/
@PulumiTagMarker
public class ElasticSanResourceBuilder internal constructor() {
public var name: String? = null
public var args: ElasticSanArgs = ElasticSanArgs()
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 ElasticSanArgsBuilder.() -> Unit) {
val builder = ElasticSanArgsBuilder()
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(): ElasticSan {
val builtJavaResource = com.pulumi.azure.elasticsan.ElasticSan(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ElasticSan(builtJavaResource)
}
}
/**
* Manages an Elastic SAN resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleElasticSan = new azure.elasticsan.ElasticSan("example", {
* name: "example",
* resourceGroupName: example.name,
* location: example.location,
* baseSizeInTib: 1,
* extendedSizeInTib: 2,
* sku: {
* name: "example-value",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_elastic_san = azure.elasticsan.ElasticSan("example",
* name="example",
* resource_group_name=example.name,
* location=example.location,
* base_size_in_tib=1,
* extended_size_in_tib=2,
* sku={
* "name": "example-value",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleElasticSan = new Azure.ElasticSan.ElasticSan("example", new()
* {
* Name = "example",
* ResourceGroupName = example.Name,
* Location = example.Location,
* BaseSizeInTib = 1,
* ExtendedSizeInTib = 2,
* Sku = new Azure.ElasticSan.Inputs.ElasticSanSkuArgs
* {
* Name = "example-value",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/elasticsan"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = elasticsan.NewElasticSan(ctx, "example", &elasticsan.ElasticSanArgs{
* Name: pulumi.String("example"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* BaseSizeInTib: pulumi.Int(1),
* ExtendedSizeInTib: pulumi.Int(2),
* Sku: &elasticsan.ElasticSanSkuArgs{
* Name: pulumi.String("example-value"),
* },
* })
* 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.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.elasticsan.ElasticSan;
* import com.pulumi.azure.elasticsan.ElasticSanArgs;
* import com.pulumi.azure.elasticsan.inputs.ElasticSanSkuArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleElasticSan = new ElasticSan("exampleElasticSan", ElasticSanArgs.builder()
* .name("example")
* .resourceGroupName(example.name())
* .location(example.location())
* .baseSizeInTib(1)
* .extendedSizeInTib(2)
* .sku(ElasticSanSkuArgs.builder()
* .name("example-value")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleElasticSan:
* type: azure:elasticsan:ElasticSan
* name: example
* properties:
* name: example
* resourceGroupName: ${example.name}
* location: ${example.location}
* baseSizeInTib: 1
* extendedSizeInTib: 2
* sku:
* name: example-value
* ```
*
* ## Import
* An existing Elastic SAN can be imported into Terraform using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:elasticsan/elasticSan:ElasticSan example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ElasticSan/elasticSans/esan1
* ```
*/
public class ElasticSan internal constructor(
override val javaResource: com.pulumi.azure.elasticsan.ElasticSan,
) : KotlinCustomResource(javaResource, ElasticSanMapper) {
/**
* Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`.
* > **NOTE** When updating `base_size_in_tib`, the new value should be greater than the existing one.
*/
public val baseSizeInTib: Output
get() = javaResource.baseSizeInTib().applyValue({ args0 -> args0 })
/**
* Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`.
* > **NOTE** `extended_size_in_tib` cannot be removed and when updating, the new value should be greater than the existing one.
*/
public val extendedSizeInTib: Output?
get() = javaResource.extendedSizeInTib().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Azure Region where the Elastic SAN resource should exist. Changing this forces a new resource to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* A `sku` block as defined below.
*/
public val sku: Output
get() = javaResource.sku().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* A mapping of tags which should be assigned to the Elastic SAN resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
/**
* Total Provisioned IOps of the Elastic SAN resource.
*/
public val totalIops: Output
get() = javaResource.totalIops().applyValue({ args0 -> args0 })
/**
* Total Provisioned MBps Elastic SAN resource.
*/
public val totalMbps: Output
get() = javaResource.totalMbps().applyValue({ args0 -> args0 })
/**
* Total size of the Elastic SAN resource in TB.
*/
public val totalSizeInTib: Output
get() = javaResource.totalSizeInTib().applyValue({ args0 -> args0 })
/**
* Total size of the provisioned Volumes in GiB.
*/
public val totalVolumeSizeInGib: Output
get() = javaResource.totalVolumeSizeInGib().applyValue({ args0 -> args0 })
/**
* Total number of volume groups in this Elastic SAN resource.
*/
public val volumeGroupCount: Output
get() = javaResource.volumeGroupCount().applyValue({ args0 -> args0 })
/**
* Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created.
* > **NOTE** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`.
*/
public val zones: Output>?
get() = javaResource.zones().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
}
public object ElasticSanMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.elasticsan.ElasticSan::class == javaResource::class
override fun map(javaResource: Resource): ElasticSan = ElasticSan(
javaResource as
com.pulumi.azure.elasticsan.ElasticSan,
)
}
/**
* @see [ElasticSan].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ElasticSan].
*/
public suspend fun elasticSan(name: String, block: suspend ElasticSanResourceBuilder.() -> Unit): ElasticSan {
val builder = ElasticSanResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ElasticSan].
* @param name The _unique_ name of the resulting resource.
*/
public fun elasticSan(name: String): ElasticSan {
val builder = ElasticSanResourceBuilder()
builder.name(name)
return builder.build()
}