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

com.pulumi.azure.redis.kotlin.EnterpriseCluster.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.redis.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map

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

    public var args: EnterpriseClusterArgs = EnterpriseClusterArgs()

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

/**
 * Manages a Redis Enterprise Cluster.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-redisenterprise",
 *     location: "West Europe",
 * });
 * const exampleEnterpriseCluster = new azure.redis.EnterpriseCluster("example", {
 *     name: "example-redisenterprise",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     skuName: "EnterpriseFlash_F300-3",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-redisenterprise",
 *     location="West Europe")
 * example_enterprise_cluster = azure.redis.EnterpriseCluster("example",
 *     name="example-redisenterprise",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     sku_name="EnterpriseFlash_F300-3")
 * ```
 * ```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-redisenterprise",
 *         Location = "West Europe",
 *     });
 *     var exampleEnterpriseCluster = new Azure.Redis.EnterpriseCluster("example", new()
 *     {
 *         Name = "example-redisenterprise",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         SkuName = "EnterpriseFlash_F300-3",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/redis"
 * 	"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-redisenterprise"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = redis.NewEnterpriseCluster(ctx, "example", &redis.EnterpriseClusterArgs{
 * 			Name:              pulumi.String("example-redisenterprise"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			SkuName:           pulumi.String("EnterpriseFlash_F300-3"),
 * 		})
 * 		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.redis.EnterpriseCluster;
 * import com.pulumi.azure.redis.EnterpriseClusterArgs;
 * 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-redisenterprise")
 *             .location("West Europe")
 *             .build());
 *         var exampleEnterpriseCluster = new EnterpriseCluster("exampleEnterpriseCluster", EnterpriseClusterArgs.builder()
 *             .name("example-redisenterprise")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .skuName("EnterpriseFlash_F300-3")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-redisenterprise
 *       location: West Europe
 *   exampleEnterpriseCluster:
 *     type: azure:redis:EnterpriseCluster
 *     name: example
 *     properties:
 *       name: example-redisenterprise
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       skuName: EnterpriseFlash_F300-3
 * ```
 * 
 * ## Import
 * Redis Enterprise Clusters can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:redis/enterpriseCluster:EnterpriseCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redisEnterprise/cluster1
 * ```
 */
public class EnterpriseCluster internal constructor(
    override val javaResource: com.pulumi.azure.redis.EnterpriseCluster,
) : KotlinCustomResource(javaResource, EnterpriseClusterMapper) {
    /**
     * DNS name of the cluster endpoint.
     */
    public val hostname: Output
        get() = javaResource.hostname().applyValue({ args0 -> args0 })

    /**
     * The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.2`. Changing this forces a new Redis Enterprise Cluster to be created.
     */
    public val minimumTlsVersion: Output?
        get() = javaResource.minimumTlsVersion().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

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

    /**
     * The `sku_name` is comprised of two segments separated by a hyphen (e.g. `Enterprise_E10-2`). The first segment of the `sku_name` defines the `name` of the SKU, possible values are `Enterprise_E5`, `Enterprise_E10`, `Enterprise_E20"`, `Enterprise_E50`, `Enterprise_E100`, `Enterprise_E200`, `Enterprise_E400`, `EnterpriseFlash_F300`, `EnterpriseFlash_F700` or `EnterpriseFlash_F1500`. The second segment defines the `capacity` of the `sku_name`, possible values for `Enteprise` SKUs are (`2`, `4`, `6`, ...). Possible values for `EnterpriseFlash` SKUs are (`3`, `9`, `15`, ...). Changing this forces a new Redis Enterprise Cluster to be created.
     */
    public val skuName: Output
        get() = javaResource.skuName().applyValue({ args0 -> args0 })

    /**
     * A mapping of tags which should be assigned to the Redis Enterprise Cluster.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created.
     */
    public val zones: Output>?
        get() = javaResource.zones().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0
                })
            }).orElse(null)
        })
}

public object EnterpriseClusterMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.redis.EnterpriseCluster::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy