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

com.pulumi.azure.analysisservices.kotlin.ServerArgs.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.analysisservices.kotlin

import com.pulumi.azure.analysisservices.ServerArgs.builder
import com.pulumi.azure.analysisservices.kotlin.inputs.ServerIpv4FirewallRuleArgs
import com.pulumi.azure.analysisservices.kotlin.inputs.ServerIpv4FirewallRuleArgsBuilder
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.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an Analysis Services Server.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "analysis-services-server-test",
 *     location: "West Europe",
 * });
 * const server = new azure.analysisservices.Server("server", {
 *     name: "analysisservicesserver",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "S0",
 *     adminUsers: ["myuser@domain.tld"],
 *     enablePowerBiService: true,
 *     ipv4FirewallRules: [{
 *         name: "myRule1",
 *         rangeStart: "210.117.252.0",
 *         rangeEnd: "210.117.252.255",
 *     }],
 *     tags: {
 *         abc: "123",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="analysis-services-server-test",
 *     location="West Europe")
 * server = azure.analysisservices.Server("server",
 *     name="analysisservicesserver",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="S0",
 *     admin_users=["myuser@domain.tld"],
 *     enable_power_bi_service=True,
 *     ipv4_firewall_rules=[{
 *         "name": "myRule1",
 *         "range_start": "210.117.252.0",
 *         "range_end": "210.117.252.255",
 *     }],
 *     tags={
 *         "abc": "123",
 *     })
 * ```
 * ```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 = "analysis-services-server-test",
 *         Location = "West Europe",
 *     });
 *     var server = new Azure.AnalysisServices.Server("server", new()
 *     {
 *         Name = "analysisservicesserver",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "S0",
 *         AdminUsers = new[]
 *         {
 *             "[email protected]",
 *         },
 *         EnablePowerBiService = true,
 *         Ipv4FirewallRules = new[]
 *         {
 *             new Azure.AnalysisServices.Inputs.ServerIpv4FirewallRuleArgs
 *             {
 *                 Name = "myRule1",
 *                 RangeStart = "210.117.252.0",
 *                 RangeEnd = "210.117.252.255",
 *             },
 *         },
 *         Tags =
 *         {
 *             { "abc", "123" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/analysisservices"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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("analysis-services-server-test"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = analysisservices.NewServer(ctx, "server", &analysisservices.ServerArgs{
 * 			Name:              pulumi.String("analysisservicesserver"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("S0"),
 * 			AdminUsers: pulumi.StringArray{
 * 				pulumi.String("[email protected]"),
 * 			},
 * 			EnablePowerBiService: pulumi.Bool(true),
 * 			Ipv4FirewallRules: analysisservices.ServerIpv4FirewallRuleArray{
 * 				&analysisservices.ServerIpv4FirewallRuleArgs{
 * 					Name:       pulumi.String("myRule1"),
 * 					RangeStart: pulumi.String("210.117.252.0"),
 * 					RangeEnd:   pulumi.String("210.117.252.255"),
 * 				},
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"abc": pulumi.String("123"),
 * 			},
 * 		})
 * 		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.analysisservices.Server;
 * import com.pulumi.azure.analysisservices.ServerArgs;
 * import com.pulumi.azure.analysisservices.inputs.ServerIpv4FirewallRuleArgs;
 * 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("analysis-services-server-test")
 *             .location("West Europe")
 *             .build());
 *         var server = new Server("server", ServerArgs.builder()
 *             .name("analysisservicesserver")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("S0")
 *             .adminUsers("[email protected]")
 *             .enablePowerBiService(true)
 *             .ipv4FirewallRules(ServerIpv4FirewallRuleArgs.builder()
 *                 .name("myRule1")
 *                 .rangeStart("210.117.252.0")
 *                 .rangeEnd("210.117.252.255")
 *                 .build())
 *             .tags(Map.of("abc", 123))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: analysis-services-server-test
 *       location: West Europe
 *   server:
 *     type: azure:analysisservices:Server
 *     properties:
 *       name: analysisservicesserver
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: S0
 *       adminUsers:
 *         - [email protected]
 *       enablePowerBiService: true
 *       ipv4FirewallRules:
 *         - name: myRule1
 *           rangeStart: 210.117.252.0
 *           rangeEnd: 210.117.252.255
 *       tags:
 *         abc: 123
 * ```
 * 
 * > **NOTE:** The server resource will automatically be started and stopped during an update if it is in `paused` state.
 * ## Import
 * Analysis Services Server can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:analysisservices/server:Server server /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AnalysisServices/servers/server1
 * ```
 * @property adminUsers List of email addresses of admin users.
 * @property backupBlobContainerUri URI and SAS token for a blob container to store backups.
 * @property enablePowerBiService Indicates if the Power BI service is allowed to access or not.
 * @property ipv4FirewallRules One or more `ipv4_firewall_rule` block(s) as defined below.
 * @property location The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
 * @property name The name of the Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
 * @property powerBiServiceEnabled
 * @property querypoolConnectionMode Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations.
 * @property resourceGroupName The name of the Resource Group in which the Analysis Services Server should be exist. Changing this forces a new resource to be created.
 * @property sku SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class ServerArgs(
    public val adminUsers: Output>? = null,
    public val backupBlobContainerUri: Output? = null,
    @Deprecated(
        message = """
  The property `enable_power_bi_service` has been superseded by `power_bi_service_enabled` and will
      be removed in v4.0 of the AzureRM Provider.
  """,
    )
    public val enablePowerBiService: Output? = null,
    public val ipv4FirewallRules: Output>? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val powerBiServiceEnabled: Output? = null,
    public val querypoolConnectionMode: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.analysisservices.ServerArgs =
        com.pulumi.azure.analysisservices.ServerArgs.builder()
            .adminUsers(adminUsers?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .backupBlobContainerUri(backupBlobContainerUri?.applyValue({ args0 -> args0 }))
            .enablePowerBiService(enablePowerBiService?.applyValue({ args0 -> args0 }))
            .ipv4FirewallRules(
                ipv4FirewallRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .powerBiServiceEnabled(powerBiServiceEnabled?.applyValue({ args0 -> args0 }))
            .querypoolConnectionMode(querypoolConnectionMode?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ServerArgs].
 */
@PulumiTagMarker
public class ServerArgsBuilder internal constructor() {
    private var adminUsers: Output>? = null

    private var backupBlobContainerUri: Output? = null

    private var enablePowerBiService: Output? = null

    private var ipv4FirewallRules: Output>? = null

    private var location: Output? = null

    private var name: Output? = null

    private var powerBiServiceEnabled: Output? = null

    private var querypoolConnectionMode: Output? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    /**
     * @param value List of email addresses of admin users.
     */
    @JvmName("mvwewyfhvgvtykms")
    public suspend fun adminUsers(`value`: Output>) {
        this.adminUsers = value
    }

    @JvmName("nsswmqkissahusuq")
    public suspend fun adminUsers(vararg values: Output) {
        this.adminUsers = Output.all(values.asList())
    }

    /**
     * @param values List of email addresses of admin users.
     */
    @JvmName("kkopadecjswsjgkq")
    public suspend fun adminUsers(values: List>) {
        this.adminUsers = Output.all(values)
    }

    /**
     * @param value URI and SAS token for a blob container to store backups.
     */
    @JvmName("hhmynwooafcgsric")
    public suspend fun backupBlobContainerUri(`value`: Output) {
        this.backupBlobContainerUri = value
    }

    /**
     * @param value Indicates if the Power BI service is allowed to access or not.
     */
    @Deprecated(
        message = """
  The property `enable_power_bi_service` has been superseded by `power_bi_service_enabled` and will
      be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("cxedlqybhiugtwxl")
    public suspend fun enablePowerBiService(`value`: Output) {
        this.enablePowerBiService = value
    }

    /**
     * @param value One or more `ipv4_firewall_rule` block(s) as defined below.
     */
    @JvmName("bpdrdahuohhahdod")
    public suspend fun ipv4FirewallRules(`value`: Output>) {
        this.ipv4FirewallRules = value
    }

    @JvmName("cvwiupnxuvyxjlvi")
    public suspend fun ipv4FirewallRules(vararg values: Output) {
        this.ipv4FirewallRules = Output.all(values.asList())
    }

    /**
     * @param values One or more `ipv4_firewall_rule` block(s) as defined below.
     */
    @JvmName("epbrkcgrwomspuxp")
    public suspend fun ipv4FirewallRules(values: List>) {
        this.ipv4FirewallRules = Output.all(values)
    }

    /**
     * @param value The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
     */
    @JvmName("dpcjeptpireajice")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
     */
    @JvmName("jnochawxgginpruy")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @JvmName("hksnliwgixhtwapc")
    public suspend fun powerBiServiceEnabled(`value`: Output) {
        this.powerBiServiceEnabled = value
    }

    /**
     * @param value Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations.
     */
    @JvmName("pekaypwrmoevjiia")
    public suspend fun querypoolConnectionMode(`value`: Output) {
        this.querypoolConnectionMode = value
    }

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

    /**
     * @param value SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
     */
    @JvmName("iommvrentckkjylq")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("rxkrrcaacrhsconx")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value List of email addresses of admin users.
     */
    @JvmName("aexbychfkscaqjnx")
    public suspend fun adminUsers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.adminUsers = mapped
    }

    /**
     * @param values List of email addresses of admin users.
     */
    @JvmName("uroulhynewydymoa")
    public suspend fun adminUsers(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.adminUsers = mapped
    }

    /**
     * @param value URI and SAS token for a blob container to store backups.
     */
    @JvmName("siedvdsxtgjjcyug")
    public suspend fun backupBlobContainerUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupBlobContainerUri = mapped
    }

    /**
     * @param value Indicates if the Power BI service is allowed to access or not.
     */
    @Deprecated(
        message = """
  The property `enable_power_bi_service` has been superseded by `power_bi_service_enabled` and will
      be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("ymapjgxdinbbainc")
    public suspend fun enablePowerBiService(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enablePowerBiService = mapped
    }

    /**
     * @param value One or more `ipv4_firewall_rule` block(s) as defined below.
     */
    @JvmName("oqqobnahbrlpxjst")
    public suspend fun ipv4FirewallRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv4FirewallRules = mapped
    }

    /**
     * @param argument One or more `ipv4_firewall_rule` block(s) as defined below.
     */
    @JvmName("xoyqljbwfpbdgdiy")
    public suspend fun ipv4FirewallRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServerIpv4FirewallRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv4FirewallRules = mapped
    }

    /**
     * @param argument One or more `ipv4_firewall_rule` block(s) as defined below.
     */
    @JvmName("macnqpgfblsxjkkm")
    public suspend fun ipv4FirewallRules(vararg argument: suspend ServerIpv4FirewallRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServerIpv4FirewallRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv4FirewallRules = mapped
    }

    /**
     * @param argument One or more `ipv4_firewall_rule` block(s) as defined below.
     */
    @JvmName("cqxrysgyywelgjmm")
    public suspend fun ipv4FirewallRules(argument: suspend ServerIpv4FirewallRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ServerIpv4FirewallRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipv4FirewallRules = mapped
    }

    /**
     * @param values One or more `ipv4_firewall_rule` block(s) as defined below.
     */
    @JvmName("mejubntdhfisfivc")
    public suspend fun ipv4FirewallRules(vararg values: ServerIpv4FirewallRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv4FirewallRules = mapped
    }

    /**
     * @param value The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
     */
    @JvmName("biemwuheahokiexe")
    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 Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
     */
    @JvmName("tarspyftbnkobmwi")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @JvmName("yldtaxmoyyihbsep")
    public suspend fun powerBiServiceEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.powerBiServiceEnabled = mapped
    }

    /**
     * @param value Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations.
     */
    @JvmName("acdtwkedgjnhxnvy")
    public suspend fun querypoolConnectionMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.querypoolConnectionMode = mapped
    }

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

    /**
     * @param value SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
     */
    @JvmName("icjmhmuhmeqialcq")
    public suspend fun sku(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("rulwuyhusijqsltt")
    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 to assign to the resource.
     */
    @JvmName("qrrclnvkxcrwkopm")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ServerArgs = ServerArgs(
        adminUsers = adminUsers,
        backupBlobContainerUri = backupBlobContainerUri,
        enablePowerBiService = enablePowerBiService,
        ipv4FirewallRules = ipv4FirewallRules,
        location = location,
        name = name,
        powerBiServiceEnabled = powerBiServiceEnabled,
        querypoolConnectionMode = querypoolConnectionMode,
        resourceGroupName = resourceGroupName,
        sku = sku,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy