FlexibleServerArgs

data class FlexibleServerArgs(val administratorLogin: Output<String>? = null, val administratorPassword: Output<String>? = null, val backupRetentionDays: Output<Int>? = null, val createMode: Output<String>? = null, val customerManagedKey: Output<FlexibleServerCustomerManagedKeyArgs>? = null, val delegatedSubnetId: Output<String>? = null, val geoRedundantBackupEnabled: Output<Boolean>? = null, val highAvailability: Output<FlexibleServerHighAvailabilityArgs>? = null, val identity: Output<FlexibleServerIdentityArgs>? = null, val location: Output<String>? = null, val maintenanceWindow: Output<FlexibleServerMaintenanceWindowArgs>? = null, val name: Output<String>? = null, val pointInTimeRestoreTimeInUtc: Output<String>? = null, val privateDnsZoneId: Output<String>? = null, val replicationRole: Output<String>? = null, val resourceGroupName: Output<String>? = null, val skuName: Output<String>? = null, val sourceServerId: Output<String>? = null, val storage: Output<FlexibleServerStorageArgs>? = null, val tags: Output<Map<String, String>>? = null, val version: Output<String>? = null, val zone: Output<String>? = null) : ConvertibleToJava<FlexibleServerArgs>

Manages a MySQL Flexible Server.

Example Usage

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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
import com.pulumi.azure.privatedns.Zone;
import com.pulumi.azure.privatedns.ZoneArgs;
import com.pulumi.azure.privatedns.ZoneVirtualNetworkLink;
import com.pulumi.azure.privatedns.ZoneVirtualNetworkLinkArgs;
import com.pulumi.azure.mysql.FlexibleServer;
import com.pulumi.azure.mysql.FlexibleServerArgs;
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 exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example-vn")
.location(example.location())
.resourceGroupName(example.name())
.addressSpaces("10.0.0.0/16")
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("example-sn")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.serviceEndpoints("Microsoft.Storage")
.delegations(SubnetDelegationArgs.builder()
.name("fs")
.serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
.name("Microsoft.DBforMySQL/flexibleServers")
.actions("Microsoft.Network/virtualNetworks/subnets/join/action")
.build())
.build())
.build());
var exampleZone = new Zone("exampleZone", ZoneArgs.builder()
.name("example.mysql.database.azure.com")
.resourceGroupName(example.name())
.build());
var exampleZoneVirtualNetworkLink = new ZoneVirtualNetworkLink("exampleZoneVirtualNetworkLink", ZoneVirtualNetworkLinkArgs.builder()
.name("exampleVnetZone.com")
.privateDnsZoneName(exampleZone.name())
.virtualNetworkId(exampleVirtualNetwork.id())
.resourceGroupName(example.name())
.build());
var exampleFlexibleServer = new FlexibleServer("exampleFlexibleServer", FlexibleServerArgs.builder()
.name("example-fs")
.resourceGroupName(example.name())
.location(example.location())
.administratorLogin("psqladmin")
.administratorPassword("H@Sh1CoR3!")
.backupRetentionDays(7)
.delegatedSubnetId(exampleSubnet.id())
.privateDnsZoneId(exampleZone.id())
.skuName("GP_Standard_D2ds_v4")
.build());
}
}

Import

MySQL Flexible Servers can be imported using the resource id, e.g.

$ pulumi import azure:mysql/flexibleServer:FlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforMySQL/flexibleServers/flexibleServer1

Constructors

Link copied to clipboard
fun FlexibleServerArgs(administratorLogin: Output<String>? = null, administratorPassword: Output<String>? = null, backupRetentionDays: Output<Int>? = null, createMode: Output<String>? = null, customerManagedKey: Output<FlexibleServerCustomerManagedKeyArgs>? = null, delegatedSubnetId: Output<String>? = null, geoRedundantBackupEnabled: Output<Boolean>? = null, highAvailability: Output<FlexibleServerHighAvailabilityArgs>? = null, identity: Output<FlexibleServerIdentityArgs>? = null, location: Output<String>? = null, maintenanceWindow: Output<FlexibleServerMaintenanceWindowArgs>? = null, name: Output<String>? = null, pointInTimeRestoreTimeInUtc: Output<String>? = null, privateDnsZoneId: Output<String>? = null, replicationRole: Output<String>? = null, resourceGroupName: Output<String>? = null, skuName: Output<String>? = null, sourceServerId: Output<String>? = null, storage: Output<FlexibleServerStorageArgs>? = null, tags: Output<Map<String, String>>? = null, version: Output<String>? = null, zone: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): FlexibleServerArgs

Properties

Link copied to clipboard
val administratorLogin: Output<String>? = null

The Administrator login for the MySQL Flexible Server. Required when create_mode is Default. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard
val administratorPassword: Output<String>? = null

The Password associated with the administrator_login for the MySQL Flexible Server. Required when create_mode is Default.

Link copied to clipboard
val backupRetentionDays: Output<Int>? = null

The backup retention days for the MySQL Flexible Server. Possible values are between 1 and 35 days. Defaults to 7.

Link copied to clipboard
val createMode: Output<String>? = null

The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard

A customer_managed_key block as defined below.

Link copied to clipboard
val delegatedSubnetId: Output<String>? = null

The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard
val geoRedundantBackupEnabled: Output<Boolean>? = null

Should geo redundant backup enabled? Defaults to false. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard

A high_availability block as defined below.

Link copied to clipboard

An identity block as defined below.

Link copied to clipboard
val location: Output<String>? = null

The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard

A maintenance_window block as defined below.

Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard
val pointInTimeRestoreTimeInUtc: Output<String>? = null

The point in time to restore from creation_source_server_id when create_mode is PointInTimeRestore. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard
val privateDnsZoneId: Output<String>? = null

The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard
val replicationRole: Output<String>? = null

The replication role. Possible value is None.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard
val skuName: Output<String>? = null

The SKU Name for the MySQL Flexible Server.

Link copied to clipboard
val sourceServerId: Output<String>? = null

The resource ID of the source MySQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard
val storage: Output<FlexibleServerStorageArgs>? = null

A storage block as defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags which should be assigned to the MySQL Flexible Server.

Link copied to clipboard
val version: Output<String>? = null

The version of the MySQL Flexible Server to use. Possible values are 5.7, and 8.0.21. Changing this forces a new MySQL Flexible Server to be created.

Link copied to clipboard
val zone: Output<String>? = null