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

com.pulumi.azure.mysql.kotlin.FlexibleServerConfigurationArgs.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.mysql.kotlin

import com.pulumi.azure.mysql.FlexibleServerConfigurationArgs.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 MySQL Flexible Server Configuration value on a MySQL Flexible Server.
 * ## Disclaimers
 * > **Note:** Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it.
 * ## 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 exampleFlexibleServer = new azure.mysql.FlexibleServer("example", {
 *     name: "example-fs",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     administratorLogin: "adminTerraform",
 *     administratorPassword: "H@Sh1CoR3!",
 *     skuName: "GP_Standard_D2ds_v4",
 * });
 * const exampleFlexibleServerConfiguration = new azure.mysql.FlexibleServerConfiguration("example", {
 *     name: "interactive_timeout",
 *     resourceGroupName: example.name,
 *     serverName: exampleFlexibleServer.name,
 *     value: "600",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_flexible_server = azure.mysql.FlexibleServer("example",
 *     name="example-fs",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     administrator_login="adminTerraform",
 *     administrator_password="H@Sh1CoR3!",
 *     sku_name="GP_Standard_D2ds_v4")
 * example_flexible_server_configuration = azure.mysql.FlexibleServerConfiguration("example",
 *     name="interactive_timeout",
 *     resource_group_name=example.name,
 *     server_name=example_flexible_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 = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleFlexibleServer = new Azure.MySql.FlexibleServer("example", new()
 *     {
 *         Name = "example-fs",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AdministratorLogin = "adminTerraform",
 *         AdministratorPassword = "H@Sh1CoR3!",
 *         SkuName = "GP_Standard_D2ds_v4",
 *     });
 *     var exampleFlexibleServerConfiguration = new Azure.MySql.FlexibleServerConfiguration("example", new()
 *     {
 *         Name = "interactive_timeout",
 *         ResourceGroupName = example.Name,
 *         ServerName = exampleFlexibleServer.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/mysql"
 * 	"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
 * 		}
 * 		exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{
 * 			Name:                  pulumi.String("example-fs"),
 * 			ResourceGroupName:     example.Name,
 * 			Location:              example.Location,
 * 			AdministratorLogin:    pulumi.String("adminTerraform"),
 * 			AdministratorPassword: pulumi.String("H@Sh1CoR3!"),
 * 			SkuName:               pulumi.String("GP_Standard_D2ds_v4"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = mysql.NewFlexibleServerConfiguration(ctx, "example", &mysql.FlexibleServerConfigurationArgs{
 * 			Name:              pulumi.String("interactive_timeout"),
 * 			ResourceGroupName: example.Name,
 * 			ServerName:        exampleFlexibleServer.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.mysql.FlexibleServer;
 * import com.pulumi.azure.mysql.FlexibleServerArgs;
 * import com.pulumi.azure.mysql.FlexibleServerConfiguration;
 * import com.pulumi.azure.mysql.FlexibleServerConfigurationArgs;
 * 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 exampleFlexibleServer = new FlexibleServer("exampleFlexibleServer", FlexibleServerArgs.builder()
 *             .name("example-fs")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .administratorLogin("adminTerraform")
 *             .administratorPassword("H@Sh1CoR3!")
 *             .skuName("GP_Standard_D2ds_v4")
 *             .build());
 *         var exampleFlexibleServerConfiguration = new FlexibleServerConfiguration("exampleFlexibleServerConfiguration", FlexibleServerConfigurationArgs.builder()
 *             .name("interactive_timeout")
 *             .resourceGroupName(example.name())
 *             .serverName(exampleFlexibleServer.name())
 *             .value("600")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleFlexibleServer:
 *     type: azure:mysql:FlexibleServer
 *     name: example
 *     properties:
 *       name: example-fs
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       administratorLogin: adminTerraform
 *       administratorPassword: H@Sh1CoR3!
 *       skuName: GP_Standard_D2ds_v4
 *   exampleFlexibleServerConfiguration:
 *     type: azure:mysql:FlexibleServerConfiguration
 *     name: example
 *     properties:
 *       name: interactive_timeout
 *       resourceGroupName: ${example.name}
 *       serverName: ${exampleFlexibleServer.name}
 *       value: '600'
 * ```
 * 
 * ## Import
 * MySQL Flexible Server Configurations can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:mysql/flexibleServerConfiguration:FlexibleServerConfiguration interactive_timeout /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforMySQL/flexibleServers/flexibleServer1/configurations/interactive_timeout
 * ```
 * @property name Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
 * @property serverName Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
 * @property value Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
 */
public data class FlexibleServerConfigurationArgs(
    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.mysql.FlexibleServerConfigurationArgs =
        com.pulumi.azure.mysql.FlexibleServerConfigurationArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serverName(serverName?.applyValue({ args0 -> args0 }))
            .`value`(`value`?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FlexibleServerConfigurationArgs].
 */
@PulumiTagMarker
public class FlexibleServerConfigurationArgsBuilder 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 MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created.
     */
    @JvmName("hvwxaapuxetemrlm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

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

    /**
     * @param value Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
     */
    @JvmName("kgeglufxljdwvtjs")
    public suspend fun `value`(`value`: Output) {
        this.`value` = value
    }

    /**
     * @param value Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created.
     */
    @JvmName("jkhrajvlaovyfokw")
    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 MySQL Flexible Server exists. Changing this forces a new resource to be created.
     */
    @JvmName("dhedwkcjphcacswe")
    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 MySQL Flexible Server. Changing this forces a new resource to be created.
     */
    @JvmName("xtlitunryuwvedle")
    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 MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
     */
    @JvmName("cvixqletklqlgaqk")
    public suspend fun `value`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`value` = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy