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.azurenative.dbformysql.kotlin.ServerArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.dbformysql.kotlin
import com.pulumi.azurenative.dbformysql.ServerArgs.builder
import com.pulumi.azurenative.dbformysql.kotlin.enums.CreateMode
import com.pulumi.azurenative.dbformysql.kotlin.enums.ReplicationRole
import com.pulumi.azurenative.dbformysql.kotlin.enums.ServerVersion
import com.pulumi.azurenative.dbformysql.kotlin.inputs.BackupArgs
import com.pulumi.azurenative.dbformysql.kotlin.inputs.BackupArgsBuilder
import com.pulumi.azurenative.dbformysql.kotlin.inputs.DataEncryptionArgs
import com.pulumi.azurenative.dbformysql.kotlin.inputs.DataEncryptionArgsBuilder
import com.pulumi.azurenative.dbformysql.kotlin.inputs.HighAvailabilityArgs
import com.pulumi.azurenative.dbformysql.kotlin.inputs.HighAvailabilityArgsBuilder
import com.pulumi.azurenative.dbformysql.kotlin.inputs.IdentityArgs
import com.pulumi.azurenative.dbformysql.kotlin.inputs.IdentityArgsBuilder
import com.pulumi.azurenative.dbformysql.kotlin.inputs.MaintenanceWindowArgs
import com.pulumi.azurenative.dbformysql.kotlin.inputs.MaintenanceWindowArgsBuilder
import com.pulumi.azurenative.dbformysql.kotlin.inputs.NetworkArgs
import com.pulumi.azurenative.dbformysql.kotlin.inputs.NetworkArgsBuilder
import com.pulumi.azurenative.dbformysql.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.dbformysql.kotlin.inputs.SkuArgsBuilder
import com.pulumi.azurenative.dbformysql.kotlin.inputs.StorageArgs
import com.pulumi.azurenative.dbformysql.kotlin.inputs.StorageArgsBuilder
import com.pulumi.core.Either
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Represents a server.
* Azure REST API version: 2022-01-01. Prior API version in Azure Native 1.x: 2017-12-01.
* Other available API versions: 2017-12-01, 2018-06-01-privatepreview, 2020-07-01-preview, 2020-07-01-privatepreview, 2022-09-30-preview, 2023-06-01-preview, 2023-06-30, 2023-10-01-preview, 2023-12-01-preview, 2023-12-30, 2024-02-01-preview.
* ## Example Usage
* ### Create a new server
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var server = new AzureNative.DBforMySQL.Server("server", new()
* {
* AdministratorLogin = "cloudsa",
* AdministratorLoginPassword = "your_password",
* AvailabilityZone = "1",
* Backup = new AzureNative.DBforMySQL.Inputs.BackupArgs
* {
* BackupRetentionDays = 7,
* GeoRedundantBackup = AzureNative.DBforMySQL.EnableStatusEnum.Disabled,
* },
* CreateMode = AzureNative.DBforMySQL.CreateMode.Default,
* HighAvailability = new AzureNative.DBforMySQL.Inputs.HighAvailabilityArgs
* {
* Mode = AzureNative.DBforMySQL.HighAvailabilityMode.ZoneRedundant,
* StandbyAvailabilityZone = "3",
* },
* Location = "southeastasia",
* ResourceGroupName = "testrg",
* ServerName = "mysqltestserver",
* Sku = new AzureNative.DBforMySQL.Inputs.SkuArgs
* {
* Name = "Standard_D2ds_v4",
* Tier = AzureNative.DBforMySQL.SkuTier.GeneralPurpose,
* },
* Storage = new AzureNative.DBforMySQL.Inputs.StorageArgs
* {
* AutoGrow = AzureNative.DBforMySQL.EnableStatusEnum.Disabled,
* Iops = 600,
* StorageSizeGB = 100,
* },
* Tags =
* {
* { "num", "1" },
* },
* Version = AzureNative.DBforMySQL.ServerVersion.ServerVersion_5_7,
* });
* });
* ```
* ```go
* package main
* import (
* dbformysql "github.com/pulumi/pulumi-azure-native-sdk/dbformysql/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dbformysql.NewServer(ctx, "server", &dbformysql.ServerArgs{
* AdministratorLogin: pulumi.String("cloudsa"),
* AdministratorLoginPassword: pulumi.String("your_password"),
* AvailabilityZone: pulumi.String("1"),
* Backup: &dbformysql.BackupArgs{
* BackupRetentionDays: pulumi.Int(7),
* GeoRedundantBackup: pulumi.String(dbformysql.EnableStatusEnumDisabled),
* },
* CreateMode: pulumi.String(dbformysql.CreateModeDefault),
* HighAvailability: &dbformysql.HighAvailabilityArgs{
* Mode: pulumi.String(dbformysql.HighAvailabilityModeZoneRedundant),
* StandbyAvailabilityZone: pulumi.String("3"),
* },
* Location: pulumi.String("southeastasia"),
* ResourceGroupName: pulumi.String("testrg"),
* ServerName: pulumi.String("mysqltestserver"),
* Sku: &dbformysql.SkuArgs{
* Name: pulumi.String("Standard_D2ds_v4"),
* Tier: pulumi.String(dbformysql.SkuTierGeneralPurpose),
* },
* Storage: &dbformysql.StorageArgs{
* AutoGrow: pulumi.String(dbformysql.EnableStatusEnumDisabled),
* Iops: pulumi.Int(600),
* StorageSizeGB: pulumi.Int(100),
* },
* Tags: pulumi.StringMap{
* "num": pulumi.String("1"),
* },
* Version: pulumi.String(dbformysql.ServerVersion_5_7),
* })
* 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.azurenative.dbformysql.Server;
* import com.pulumi.azurenative.dbformysql.ServerArgs;
* import com.pulumi.azurenative.dbformysql.inputs.BackupArgs;
* import com.pulumi.azurenative.dbformysql.inputs.HighAvailabilityArgs;
* import com.pulumi.azurenative.dbformysql.inputs.SkuArgs;
* import com.pulumi.azurenative.dbformysql.inputs.StorageArgs;
* 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 server = new Server("server", ServerArgs.builder()
* .administratorLogin("cloudsa")
* .administratorLoginPassword("your_password")
* .availabilityZone("1")
* .backup(BackupArgs.builder()
* .backupRetentionDays(7)
* .geoRedundantBackup("Disabled")
* .build())
* .createMode("Default")
* .highAvailability(HighAvailabilityArgs.builder()
* .mode("ZoneRedundant")
* .standbyAvailabilityZone("3")
* .build())
* .location("southeastasia")
* .resourceGroupName("testrg")
* .serverName("mysqltestserver")
* .sku(SkuArgs.builder()
* .name("Standard_D2ds_v4")
* .tier("GeneralPurpose")
* .build())
* .storage(StorageArgs.builder()
* .autoGrow("Disabled")
* .iops(600)
* .storageSizeGB(100)
* .build())
* .tags(Map.of("num", "1"))
* .version("5.7")
* .build());
* }
* }
* ```
* ### Create a replica server
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var server = new AzureNative.DBforMySQL.Server("server", new()
* {
* CreateMode = AzureNative.DBforMySQL.CreateMode.Replica,
* Location = "SoutheastAsia",
* ResourceGroupName = "testgr",
* ServerName = "replica-server",
* SourceServerResourceId = "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server",
* });
* });
* ```
* ```go
* package main
* import (
* dbformysql "github.com/pulumi/pulumi-azure-native-sdk/dbformysql/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dbformysql.NewServer(ctx, "server", &dbformysql.ServerArgs{
* CreateMode: pulumi.String(dbformysql.CreateModeReplica),
* Location: pulumi.String("SoutheastAsia"),
* ResourceGroupName: pulumi.String("testgr"),
* ServerName: pulumi.String("replica-server"),
* SourceServerResourceId: pulumi.String("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server"),
* })
* 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.azurenative.dbformysql.Server;
* import com.pulumi.azurenative.dbformysql.ServerArgs;
* 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 server = new Server("server", ServerArgs.builder()
* .createMode("Replica")
* .location("SoutheastAsia")
* .resourceGroupName("testgr")
* .serverName("replica-server")
* .sourceServerResourceId("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server")
* .build());
* }
* }
* ```
* ### Create a server as a point in time restore
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var server = new AzureNative.DBforMySQL.Server("server", new()
* {
* CreateMode = AzureNative.DBforMySQL.CreateMode.PointInTimeRestore,
* Location = "SoutheastAsia",
* ResourceGroupName = "TargetResourceGroup",
* RestorePointInTime = "2021-06-24T00:00:37.467Z",
* ServerName = "targetserver",
* Sku = new AzureNative.DBforMySQL.Inputs.SkuArgs
* {
* Name = "Standard_D14_v2",
* Tier = AzureNative.DBforMySQL.SkuTier.GeneralPurpose,
* },
* SourceServerResourceId = "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver",
* Tags =
* {
* { "num", "1" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* dbformysql "github.com/pulumi/pulumi-azure-native-sdk/dbformysql/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dbformysql.NewServer(ctx, "server", &dbformysql.ServerArgs{
* CreateMode: pulumi.String(dbformysql.CreateModePointInTimeRestore),
* Location: pulumi.String("SoutheastAsia"),
* ResourceGroupName: pulumi.String("TargetResourceGroup"),
* RestorePointInTime: pulumi.String("2021-06-24T00:00:37.467Z"),
* ServerName: pulumi.String("targetserver"),
* Sku: &dbformysql.SkuArgs{
* Name: pulumi.String("Standard_D14_v2"),
* Tier: pulumi.String(dbformysql.SkuTierGeneralPurpose),
* },
* SourceServerResourceId: pulumi.String("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver"),
* Tags: pulumi.StringMap{
* "num": pulumi.String("1"),
* },
* })
* 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.azurenative.dbformysql.Server;
* import com.pulumi.azurenative.dbformysql.ServerArgs;
* import com.pulumi.azurenative.dbformysql.inputs.SkuArgs;
* 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 server = new Server("server", ServerArgs.builder()
* .createMode("PointInTimeRestore")
* .location("SoutheastAsia")
* .resourceGroupName("TargetResourceGroup")
* .restorePointInTime("2021-06-24T00:00:37.467Z")
* .serverName("targetserver")
* .sku(SkuArgs.builder()
* .name("Standard_D14_v2")
* .tier("GeneralPurpose")
* .build())
* .sourceServerResourceId("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver")
* .tags(Map.of("num", "1"))
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:dbformysql:Server mysqltestserver /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}
* ```
* @property administratorLogin The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
* @property administratorLoginPassword The password of the administrator login (required for server creation).
* @property availabilityZone availability Zone information of the server.
* @property backup Backup related properties of a server.
* @property createMode The mode to create a new MySQL server.
* @property dataEncryption The Data Encryption for CMK.
* @property highAvailability High availability related properties of a server.
* @property identity The cmk identity for the server.
* @property location The geo-location where the resource lives
* @property maintenanceWindow Maintenance window of a server.
* @property network Network related properties of a server.
* @property replicationRole The replication role.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property restorePointInTime Restore point creation time (ISO8601 format), specifying the time to restore from.
* @property serverName The name of the server.
* @property sku The SKU (pricing tier) of the server.
* @property sourceServerResourceId The source MySQL server id.
* @property storage Storage related properties of a server.
* @property tags Resource tags.
* @property version Server version.
*/
public data class ServerArgs(
public val administratorLogin: Output? = null,
public val administratorLoginPassword: Output? = null,
public val availabilityZone: Output? = null,
public val backup: Output? = null,
public val createMode: Output>? = null,
public val dataEncryption: Output? = null,
public val highAvailability: Output? = null,
public val identity: Output? = null,
public val location: Output? = null,
public val maintenanceWindow: Output? = null,
public val network: Output? = null,
public val replicationRole: Output>? = null,
public val resourceGroupName: Output? = null,
public val restorePointInTime: Output? = null,
public val serverName: Output? = null,
public val sku: Output? = null,
public val sourceServerResourceId: Output? = null,
public val storage: Output? = null,
public val tags: Output>? = null,
public val version: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.dbformysql.ServerArgs =
com.pulumi.azurenative.dbformysql.ServerArgs.builder()
.administratorLogin(administratorLogin?.applyValue({ args0 -> args0 }))
.administratorLoginPassword(administratorLoginPassword?.applyValue({ args0 -> args0 }))
.availabilityZone(availabilityZone?.applyValue({ args0 -> args0 }))
.backup(backup?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.createMode(
createMode?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.dataEncryption(dataEncryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.highAvailability(highAvailability?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.maintenanceWindow(maintenanceWindow?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.network(network?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.replicationRole(
replicationRole?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.restorePointInTime(restorePointInTime?.applyValue({ args0 -> args0 }))
.serverName(serverName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.sourceServerResourceId(sourceServerResourceId?.applyValue({ args0 -> args0 }))
.storage(storage?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.version(
version?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [ServerArgs].
*/
@PulumiTagMarker
public class ServerArgsBuilder internal constructor() {
private var administratorLogin: Output? = null
private var administratorLoginPassword: Output? = null
private var availabilityZone: Output? = null
private var backup: Output? = null
private var createMode: Output>? = null
private var dataEncryption: Output? = null
private var highAvailability: Output? = null
private var identity: Output? = null
private var location: Output? = null
private var maintenanceWindow: Output? = null
private var network: Output? = null
private var replicationRole: Output>? = null
private var resourceGroupName: Output? = null
private var restorePointInTime: Output? = null
private var serverName: Output? = null
private var sku: Output? = null
private var sourceServerResourceId: Output? = null
private var storage: Output? = null
private var tags: Output>? = null
private var version: Output>? = null
/**
* @param value The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
*/
@JvmName("rqhddsybjdwgmtdp")
public suspend fun administratorLogin(`value`: Output) {
this.administratorLogin = value
}
/**
* @param value The password of the administrator login (required for server creation).
*/
@JvmName("aiixmwooqehhrcha")
public suspend fun administratorLoginPassword(`value`: Output) {
this.administratorLoginPassword = value
}
/**
* @param value availability Zone information of the server.
*/
@JvmName("gjaughvtpqwwnpxe")
public suspend fun availabilityZone(`value`: Output) {
this.availabilityZone = value
}
/**
* @param value Backup related properties of a server.
*/
@JvmName("kehwtogjfmtgpwrh")
public suspend fun backup(`value`: Output) {
this.backup = value
}
/**
* @param value The mode to create a new MySQL server.
*/
@JvmName("qlqtnlkepqcnvscf")
public suspend fun createMode(`value`: Output>) {
this.createMode = value
}
/**
* @param value The Data Encryption for CMK.
*/
@JvmName("atibrvrsgahybewr")
public suspend fun dataEncryption(`value`: Output) {
this.dataEncryption = value
}
/**
* @param value High availability related properties of a server.
*/
@JvmName("tohruvaptbmdmywy")
public suspend fun highAvailability(`value`: Output) {
this.highAvailability = value
}
/**
* @param value The cmk identity for the server.
*/
@JvmName("vorpqtkgiedcxseh")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("obqqibgljaxhgfca")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Maintenance window of a server.
*/
@JvmName("aseneulrbwnrjbys")
public suspend fun maintenanceWindow(`value`: Output) {
this.maintenanceWindow = value
}
/**
* @param value Network related properties of a server.
*/
@JvmName("xullulmfntouqrlc")
public suspend fun network(`value`: Output) {
this.network = value
}
/**
* @param value The replication role.
*/
@JvmName("lvlbssxxikyppyxa")
public suspend fun replicationRole(`value`: Output>) {
this.replicationRole = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("smgqcdjyyaxbpbrj")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Restore point creation time (ISO8601 format), specifying the time to restore from.
*/
@JvmName("jywssajisyicpdlv")
public suspend fun restorePointInTime(`value`: Output) {
this.restorePointInTime = value
}
/**
* @param value The name of the server.
*/
@JvmName("bhlmtjvqdvuehfav")
public suspend fun serverName(`value`: Output) {
this.serverName = value
}
/**
* @param value The SKU (pricing tier) of the server.
*/
@JvmName("nctteskokypboidq")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value The source MySQL server id.
*/
@JvmName("juuquxblqplfqwvu")
public suspend fun sourceServerResourceId(`value`: Output) {
this.sourceServerResourceId = value
}
/**
* @param value Storage related properties of a server.
*/
@JvmName("bdvkbaglqfcplhcu")
public suspend fun storage(`value`: Output) {
this.storage = value
}
/**
* @param value Resource tags.
*/
@JvmName("xnucxrofyacmhlbn")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Server version.
*/
@JvmName("oculsmyikrvpowhm")
public suspend fun version(`value`: Output>) {
this.version = value
}
/**
* @param value The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
*/
@JvmName("riofvmvmhwmopeid")
public suspend fun administratorLogin(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.administratorLogin = mapped
}
/**
* @param value The password of the administrator login (required for server creation).
*/
@JvmName("lpkercesdiyfgiio")
public suspend fun administratorLoginPassword(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.administratorLoginPassword = mapped
}
/**
* @param value availability Zone information of the server.
*/
@JvmName("gklkthbayejmtugv")
public suspend fun availabilityZone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.availabilityZone = mapped
}
/**
* @param value Backup related properties of a server.
*/
@JvmName("eglhxedygxifgasw")
public suspend fun backup(`value`: BackupArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backup = mapped
}
/**
* @param argument Backup related properties of a server.
*/
@JvmName("uvfylcprwrtudnqg")
public suspend fun backup(argument: suspend BackupArgsBuilder.() -> Unit) {
val toBeMapped = BackupArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.backup = mapped
}
/**
* @param value The mode to create a new MySQL server.
*/
@JvmName("pkmfynrxcujmlsfl")
public suspend fun createMode(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.createMode = mapped
}
/**
* @param value The mode to create a new MySQL server.
*/
@JvmName("gaxfahghapveepqe")
public fun createMode(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.createMode = mapped
}
/**
* @param value The mode to create a new MySQL server.
*/
@JvmName("dqxbjdkbrxmmulmp")
public fun createMode(`value`: CreateMode) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.createMode = mapped
}
/**
* @param value The Data Encryption for CMK.
*/
@JvmName("qkpskyhpfwljbdcy")
public suspend fun dataEncryption(`value`: DataEncryptionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.dataEncryption = mapped
}
/**
* @param argument The Data Encryption for CMK.
*/
@JvmName("prvejtfskospcjce")
public suspend fun dataEncryption(argument: suspend DataEncryptionArgsBuilder.() -> Unit) {
val toBeMapped = DataEncryptionArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.dataEncryption = mapped
}
/**
* @param value High availability related properties of a server.
*/
@JvmName("julcsfjgsvpjisdm")
public suspend fun highAvailability(`value`: HighAvailabilityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.highAvailability = mapped
}
/**
* @param argument High availability related properties of a server.
*/
@JvmName("nmnsoxsbplssctcs")
public suspend fun highAvailability(argument: suspend HighAvailabilityArgsBuilder.() -> Unit) {
val toBeMapped = HighAvailabilityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.highAvailability = mapped
}
/**
* @param value The cmk identity for the server.
*/
@JvmName("oikgyyadaxhkqttf")
public suspend fun identity(`value`: IdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument The cmk identity for the server.
*/
@JvmName("ypgkmpapsjsbnlym")
public suspend fun identity(argument: suspend IdentityArgsBuilder.() -> Unit) {
val toBeMapped = IdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("rjwxcorwmgiphjas")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Maintenance window of a server.
*/
@JvmName("pnqefrlvxmiucjut")
public suspend fun maintenanceWindow(`value`: MaintenanceWindowArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.maintenanceWindow = mapped
}
/**
* @param argument Maintenance window of a server.
*/
@JvmName("rkhctjawrbordsnl")
public suspend fun maintenanceWindow(argument: suspend MaintenanceWindowArgsBuilder.() -> Unit) {
val toBeMapped = MaintenanceWindowArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.maintenanceWindow = mapped
}
/**
* @param value Network related properties of a server.
*/
@JvmName("kwcdfwmmubedyyrv")
public suspend fun network(`value`: NetworkArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.network = mapped
}
/**
* @param argument Network related properties of a server.
*/
@JvmName("srqjobqhwsbycbwo")
public suspend fun network(argument: suspend NetworkArgsBuilder.() -> Unit) {
val toBeMapped = NetworkArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.network = mapped
}
/**
* @param value The replication role.
*/
@JvmName("avicewqlqvhfkman")
public suspend fun replicationRole(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.replicationRole = mapped
}
/**
* @param value The replication role.
*/
@JvmName("dpehsinrjyfhllyn")
public fun replicationRole(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.replicationRole = mapped
}
/**
* @param value The replication role.
*/
@JvmName("jaymmtuyrmqeqgxs")
public fun replicationRole(`value`: ReplicationRole) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.replicationRole = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("iwtnmgaavxbbikkp")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Restore point creation time (ISO8601 format), specifying the time to restore from.
*/
@JvmName("inowcpsepbnvkrun")
public suspend fun restorePointInTime(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.restorePointInTime = mapped
}
/**
* @param value The name of the server.
*/
@JvmName("hlkfxrcatmekbeqd")
public suspend fun serverName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serverName = mapped
}
/**
* @param value The SKU (pricing tier) of the server.
*/
@JvmName("eottpjjtpditygtc")
public suspend fun sku(`value`: SkuArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param argument The SKU (pricing tier) of the server.
*/
@JvmName("eisgegfncatpinui")
public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sku = mapped
}
/**
* @param value The source MySQL server id.
*/
@JvmName("dsatfbglcphvadfy")
public suspend fun sourceServerResourceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sourceServerResourceId = mapped
}
/**
* @param value Storage related properties of a server.
*/
@JvmName("aalrlxnvvgoiefjh")
public suspend fun storage(`value`: StorageArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storage = mapped
}
/**
* @param argument Storage related properties of a server.
*/
@JvmName("mrdbtrmfjegeuvxx")
public suspend fun storage(argument: suspend StorageArgsBuilder.() -> Unit) {
val toBeMapped = StorageArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.storage = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("aktjqiugnglmjsga")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("isuxrdggpstcqing")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Server version.
*/
@JvmName("fueeeyjkrkiqlgin")
public suspend fun version(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.version = mapped
}
/**
* @param value Server version.
*/
@JvmName("evevbliwvvdchbjg")
public fun version(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.version = mapped
}
/**
* @param value Server version.
*/
@JvmName("pfgvmddqnxufpnmy")
public fun version(`value`: ServerVersion) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.version = mapped
}
internal fun build(): ServerArgs = ServerArgs(
administratorLogin = administratorLogin,
administratorLoginPassword = administratorLoginPassword,
availabilityZone = availabilityZone,
backup = backup,
createMode = createMode,
dataEncryption = dataEncryption,
highAvailability = highAvailability,
identity = identity,
location = location,
maintenanceWindow = maintenanceWindow,
network = network,
replicationRole = replicationRole,
resourceGroupName = resourceGroupName,
restorePointInTime = restorePointInTime,
serverName = serverName,
sku = sku,
sourceServerResourceId = sourceServerResourceId,
storage = storage,
tags = tags,
version = version,
)
}