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

com.pulumi.azure.mariadb.kotlin.ConfigurationArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.mariadb.kotlin

import com.pulumi.azure.mariadb.ConfigurationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Sets a MariaDB Configuration value on a MariaDB Server.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "api-rg-pro",
 *     location: "West Europe",
 * });
 * const exampleServer = new azure.mariadb.Server("example", {
 *     name: "mariadb-server-1",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "B_Gen5_2",
 *     sslEnforcementEnabled: true,
 *     administratorLogin: "mariadbadmin",
 *     administratorLoginPassword: "H@Sh1CoR3!",
 *     version: "10.2",
 * });
 * const exampleConfiguration = new azure.mariadb.Configuration("example", {
 *     name: "interactive_timeout",
 *     resourceGroupName: example.name,
 *     serverName: exampleServer.name,
 *     value: "600",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="api-rg-pro",
 *     location="West Europe")
 * example_server = azure.mariadb.Server("example",
 *     name="mariadb-server-1",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku_name="B_Gen5_2",
 *     ssl_enforcement_enabled=True,
 *     administrator_login="mariadbadmin",
 *     administrator_login_password="H@Sh1CoR3!",
 *     version="10.2")
 * example_configuration = azure.mariadb.Configuration("example",
 *     name="interactive_timeout",
 *     resource_group_name=example.name,
 *     server_name=example_server.name,
 *     value="600")
 * ```
 * ```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 = "api-rg-pro",
 *         Location = "West Europe",
 *     });
 *     var exampleServer = new Azure.MariaDB.Server("example", new()
 *     {
 *         Name = "mariadb-server-1",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SkuName = "B_Gen5_2",
 *         SslEnforcementEnabled = true,
 *         AdministratorLogin = "mariadbadmin",
 *         AdministratorLoginPassword = "H@Sh1CoR3!",
 *         Version = "10.2",
 *     });
 *     var exampleConfiguration = new Azure.MariaDB.Configuration("example", new()
 *     {
 *         Name = "interactive_timeout",
 *         ResourceGroupName = example.Name,
 *         ServerName = exampleServer.Name,
 *         Value = "600",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mariadb"
 * 	"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("api-rg-pro"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleServer, err := mariadb.NewServer(ctx, "example", &mariadb.ServerArgs{
 * 			Name:                       pulumi.String("mariadb-server-1"),
 * 			Location:                   example.Location,
 * 			ResourceGroupName:          example.Name,
 * 			SkuName:                    pulumi.String("B_Gen5_2"),
 * 			SslEnforcementEnabled:      pulumi.Bool(true),
 * 			AdministratorLogin:         pulumi.String("mariadbadmin"),
 * 			AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
 * 			Version:                    pulumi.String("10.2"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = mariadb.NewConfiguration(ctx, "example", &mariadb.ConfigurationArgs{
 * 			Name:              pulumi.String("interactive_timeout"),
 * 			ResourceGroupName: example.Name,
 * 			ServerName:        exampleServer.Name,
 * 			Value:             pulumi.String("600"),
 * 		})
 * 		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.mariadb.Server;
 * import com.pulumi.azure.mariadb.ServerArgs;
 * import com.pulumi.azure.mariadb.Configuration;
 * import com.pulumi.azure.mariadb.ConfigurationArgs;
 * 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("api-rg-pro")
 *             .location("West Europe")
 *             .build());
 *         var exampleServer = new Server("exampleServer", ServerArgs.builder()
 *             .name("mariadb-server-1")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("B_Gen5_2")
 *             .sslEnforcementEnabled(true)
 *             .administratorLogin("mariadbadmin")
 *             .administratorLoginPassword("H@Sh1CoR3!")
 *             .version("10.2")
 *             .build());
 *         var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()
 *             .name("interactive_timeout")
 *             .resourceGroupName(example.name())
 *             .serverName(exampleServer.name())
 *             .value("600")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: api-rg-pro
 *       location: West Europe
 *   exampleServer:
 *     type: azure:mariadb:Server
 *     name: example
 *     properties:
 *       name: mariadb-server-1
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       skuName: B_Gen5_2
 *       sslEnforcementEnabled: true
 *       administratorLogin: mariadbadmin
 *       administratorLoginPassword: H@Sh1CoR3!
 *       version: '10.2'
 *   exampleConfiguration:
 *     type: azure:mariadb:Configuration
 *     name: example
 *     properties:
 *       name: interactive_timeout
 *       resourceGroupName: ${example.name}
 *       serverName: ${exampleServer.name}
 *       value: '600'
 * ```
 * 
 * ## Import
 * MariaDB Configurations can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:mariadb/configuration:Configuration interactive_timeout /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1/configurations/interactive_timeout
 * ```
 * @property name Specifies the name of the MariaDB Configuration, which needs [to be a valid MariaDB configuration name](https://mariadb.com/kb/en/library/server-system-variables/). Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created.
 * @property serverName Specifies the name of the MariaDB Server. Changing this forces a new resource to be created.
 * @property value Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created.
 */
public data class ConfigurationArgs(
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val serverName: Output? = null,
    public val `value`: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.mariadb.ConfigurationArgs =
        com.pulumi.azure.mariadb.ConfigurationArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serverName(serverName?.applyValue({ args0 -> args0 }))
            .`value`(`value`?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConfigurationArgs].
 */
@PulumiTagMarker
public class ConfigurationArgsBuilder internal constructor() {
    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var serverName: Output? = null

    private var `value`: Output? = null

    /**
     * @param value Specifies the name of the MariaDB Configuration, which needs [to be a valid MariaDB configuration name](https://mariadb.com/kb/en/library/server-system-variables/). Changing this forces a new resource to be created.
     */
    @JvmName("qqhapyxhheamnfvq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created.
     */
    @JvmName("pvfuimjxupasxlmh")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Specifies the name of the MariaDB Server. Changing this forces a new resource to be created.
     */
    @JvmName("wltvbbcrvbqysyde")
    public suspend fun serverName(`value`: Output) {
        this.serverName = value
    }

    /**
     * @param value Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created.
     */
    @JvmName("bptfxsjqhbwhdjsm")
    public suspend fun `value`(`value`: Output) {
        this.`value` = value
    }

    /**
     * @param value Specifies the name of the MariaDB Configuration, which needs [to be a valid MariaDB configuration name](https://mariadb.com/kb/en/library/server-system-variables/). Changing this forces a new resource to be created.
     */
    @JvmName("bwntccjchstepddu")
    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 in which the MariaDB Server exists. Changing this forces a new resource to be created.
     */
    @JvmName("lvneanyngiestydd")
    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 MariaDB Server. Changing this forces a new resource to be created.
     */
    @JvmName("fumkphkxewupwftx")
    public suspend fun serverName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serverName = mapped
    }

    /**
     * @param value Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created.
     */
    @JvmName("imsabmmkntvxdhns")
    public suspend fun `value`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`value` = mapped
    }

    internal fun build(): ConfigurationArgs = ConfigurationArgs(
        name = name,
        resourceGroupName = resourceGroupName,
        serverName = serverName,
        `value` = `value`,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy