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

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

package com.pulumi.azure.elasticcloud.kotlin

import com.pulumi.azure.elasticcloud.ElasticsearchArgs.builder
import com.pulumi.azure.elasticcloud.kotlin.inputs.ElasticsearchLogsArgs
import com.pulumi.azure.elasticcloud.kotlin.inputs.ElasticsearchLogsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an Elasticsearch in Elastic Cloud.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const test = new azure.core.ResourceGroup("test", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const testElasticsearch = new azure.elasticcloud.Elasticsearch("test", {
 *     name: "example-elasticsearch",
 *     resourceGroupName: test.name,
 *     location: test.location,
 *     skuName: "ess-consumption-2024_Monthly",
 *     elasticCloudEmailAddress: "[email protected]",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * test = azure.core.ResourceGroup("test",
 *     name="example-resources",
 *     location="West Europe")
 * test_elasticsearch = azure.elasticcloud.Elasticsearch("test",
 *     name="example-elasticsearch",
 *     resource_group_name=test.name,
 *     location=test.location,
 *     sku_name="ess-consumption-2024_Monthly",
 *     elastic_cloud_email_address="[email protected]")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Azure.Core.ResourceGroup("test", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var testElasticsearch = new Azure.ElasticCloud.Elasticsearch("test", new()
 *     {
 *         Name = "example-elasticsearch",
 *         ResourceGroupName = test.Name,
 *         Location = test.Location,
 *         SkuName = "ess-consumption-2024_Monthly",
 *         ElasticCloudEmailAddress = "[email protected]",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/elasticcloud"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		test, err := core.NewResourceGroup(ctx, "test", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = elasticcloud.NewElasticsearch(ctx, "test", &elasticcloud.ElasticsearchArgs{
 * 			Name:                     pulumi.String("example-elasticsearch"),
 * 			ResourceGroupName:        test.Name,
 * 			Location:                 test.Location,
 * 			SkuName:                  pulumi.String("ess-consumption-2024_Monthly"),
 * 			ElasticCloudEmailAddress: pulumi.String("[email protected]"),
 * 		})
 * 		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.elasticcloud.Elasticsearch;
 * import com.pulumi.azure.elasticcloud.ElasticsearchArgs;
 * 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 test = new ResourceGroup("test", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var testElasticsearch = new Elasticsearch("testElasticsearch", ElasticsearchArgs.builder()
 *             .name("example-elasticsearch")
 *             .resourceGroupName(test.name())
 *             .location(test.location())
 *             .skuName("ess-consumption-2024_Monthly")
 *             .elasticCloudEmailAddress("[email protected]")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   testElasticsearch:
 *     type: azure:elasticcloud:Elasticsearch
 *     name: test
 *     properties:
 *       name: example-elasticsearch
 *       resourceGroupName: ${test.name}
 *       location: ${test.location}
 *       skuName: ess-consumption-2024_Monthly
 *       elasticCloudEmailAddress: [email protected]
 * ```
 * 
 * ## Import
 * Elasticsearch's can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:elasticcloud/elasticsearch:Elasticsearch example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Elastic/monitors/monitor1
 * ```
 * @property elasticCloudEmailAddress Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created.
 * @property location The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created.
 * @property logs A `logs` block as defined below.
 * @property monitoringEnabled Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created.
 * @property name The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created.
 * @property resourceGroupName The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created.
 * @property skuName Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created.
 * > **NOTE:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term.
 * Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly".
 * You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU.
 * @property tags A mapping of tags which should be assigned to the Elasticsearch resource.
 */
public data class ElasticsearchArgs(
    public val elasticCloudEmailAddress: Output? = null,
    public val location: Output? = null,
    public val logs: Output? = null,
    public val monitoringEnabled: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val skuName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.elasticcloud.ElasticsearchArgs =
        com.pulumi.azure.elasticcloud.ElasticsearchArgs.builder()
            .elasticCloudEmailAddress(elasticCloudEmailAddress?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .logs(logs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .monitoringEnabled(monitoringEnabled?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .skuName(skuName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ElasticsearchArgs].
 */
@PulumiTagMarker
public class ElasticsearchArgsBuilder internal constructor() {
    private var elasticCloudEmailAddress: Output? = null

    private var location: Output? = null

    private var logs: Output? = null

    private var monitoringEnabled: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var skuName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("csyyadpibyknongv")
    public suspend fun elasticCloudEmailAddress(`value`: Output) {
        this.elasticCloudEmailAddress = value
    }

    /**
     * @param value The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("bkcocifwrvgrbfqc")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value A `logs` block as defined below.
     */
    @JvmName("yjtebsqxpykmklqh")
    public suspend fun logs(`value`: Output) {
        this.logs = value
    }

    /**
     * @param value Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("wwiywbgfijwpnrmf")
    public suspend fun monitoringEnabled(`value`: Output) {
        this.monitoringEnabled = value
    }

    /**
     * @param value The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("fybwdfrhfoxlwdmk")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("suxtfybvakxbyjdo")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created.
     * > **NOTE:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term.
     * Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly".
     * You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU.
     */
    @JvmName("rlkgxcphmxbrmpty")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Elasticsearch resource.
     */
    @JvmName("gviiodsiuvjmsebu")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("rfcxxisjpwlhnrmm")
    public suspend fun elasticCloudEmailAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.elasticCloudEmailAddress = mapped
    }

    /**
     * @param value The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("ecrbehfnkvbnauhx")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value A `logs` block as defined below.
     */
    @JvmName("pqnwvnragfpixdmp")
    public suspend fun logs(`value`: ElasticsearchLogsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logs = mapped
    }

    /**
     * @param argument A `logs` block as defined below.
     */
    @JvmName("jsdordxiaqdehbat")
    public suspend fun logs(argument: suspend ElasticsearchLogsArgsBuilder.() -> Unit) {
        val toBeMapped = ElasticsearchLogsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.logs = mapped
    }

    /**
     * @param value Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("tyhlejuiipovgiee")
    public suspend fun monitoringEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monitoringEnabled = mapped
    }

    /**
     * @param value The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("ghryxavrbfmrfasc")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created.
     */
    @JvmName("sujnjapgqjsmtbil")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created.
     * > **NOTE:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term.
     * Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly".
     * You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU.
     */
    @JvmName("xrnnqwcxtytdblfp")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Elasticsearch resource.
     */
    @JvmName("dqnveflkevarwnvj")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Elasticsearch resource.
     */
    @JvmName("kfmmdnrlsajxigur")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ElasticsearchArgs = ElasticsearchArgs(
        elasticCloudEmailAddress = elasticCloudEmailAddress,
        location = location,
        logs = logs,
        monitoringEnabled = monitoringEnabled,
        name = name,
        resourceGroupName = resourceGroupName,
        skuName = skuName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy