Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.mysql.kotlin.FlexibleServerConfiguration.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.mysql.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
/**
* Builder for [FlexibleServerConfiguration].
*/
@PulumiTagMarker
public class FlexibleServerConfigurationResourceBuilder internal constructor() {
public var name: String? = null
public var args: FlexibleServerConfigurationArgs = FlexibleServerConfigurationArgs()
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 FlexibleServerConfigurationArgsBuilder.() -> Unit) {
val builder = FlexibleServerConfigurationArgsBuilder()
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(): FlexibleServerConfiguration {
val builtJavaResource =
com.pulumi.azure.mysql.FlexibleServerConfiguration(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return FlexibleServerConfiguration(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class FlexibleServerConfiguration internal constructor(
override val javaResource: com.pulumi.azure.mysql.FlexibleServerConfiguration,
) : KotlinCustomResource(javaResource, FlexibleServerConfigurationMapper) {
/**
* 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.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
*/
public val serverName: Output
get() = javaResource.serverName().applyValue({ args0 -> args0 })
/**
* Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
*/
public val `value`: Output
get() = javaResource.`value`().applyValue({ args0 -> args0 })
}
public object FlexibleServerConfigurationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.mysql.FlexibleServerConfiguration::class == javaResource::class
override fun map(javaResource: Resource): FlexibleServerConfiguration =
FlexibleServerConfiguration(
javaResource as
com.pulumi.azure.mysql.FlexibleServerConfiguration,
)
}
/**
* @see [FlexibleServerConfiguration].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [FlexibleServerConfiguration].
*/
public suspend fun flexibleServerConfiguration(
name: String,
block: suspend FlexibleServerConfigurationResourceBuilder.() -> Unit,
): FlexibleServerConfiguration {
val builder = FlexibleServerConfigurationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [FlexibleServerConfiguration].
* @param name The _unique_ name of the resulting resource.
*/
public fun flexibleServerConfiguration(name: String): FlexibleServerConfiguration {
val builder = FlexibleServerConfigurationResourceBuilder()
builder.name(name)
return builder.build()
}