MySQLServerArgs

data class MySQLServerArgs(val edition: Output<Either<String, Edition>>? = null, val errors: Output<List<ErrorArgs>>? = null, val hostIp: Output<List<String>>? = null, val hostName: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val machineId: Output<String>? = null, val mysqlVersion: Output<String>? = null, val numberOfDatabase: Output<Double>? = null, val portNumber: Output<String>? = null, val provisioningState: Output<Either<String, ProvisioningState>>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null, val siteName: Output<String>? = null, val supportEndIn: Output<String>? = null, val supportStatus: Output<Either<String, SupportStatus>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<MySQLServerArgs>

The MySQLServer resource definition. Uses Azure REST API version 2024-09-30-preview. In version 2.x of the Azure Native provider, it used API version 2024-09-30-preview.

Example Usage

MySQLServers_Create

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var mySQLServer = new AzureNative.MySQLDiscovery.MySQLServer("mySQLServer", new()
{
HostIp = new[]
{
"127.0.0.1",
"127.0.0.2",
},
HostName = "test.mysql.server",
MachineId = "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourcegroups/demoRG/providers/Microsoft.OffAzure/serverSites/xxx/machines/xxx",
MysqlVersion = "8.0",
NumberOfDatabase = 16,
PortNumber = "3306",
ResourceGroupName = "testrg",
ServerName = "testServerName",
SiteName = "testSite",
SupportStatus = AzureNative.MySQLDiscovery.SupportStatus.Mainstream,
});
});
package main
import (
mysqldiscovery "github.com/pulumi/pulumi-azure-native-sdk/mysqldiscovery/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mysqldiscovery.NewMySQLServer(ctx, "mySQLServer", &mysqldiscovery.MySQLServerArgs{
HostIp: pulumi.StringArray{
pulumi.String("127.0.0.1"),
pulumi.String("127.0.0.2"),
},
HostName: pulumi.String("test.mysql.server"),
MachineId: pulumi.String("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourcegroups/demoRG/providers/Microsoft.OffAzure/serverSites/xxx/machines/xxx"),
MysqlVersion: pulumi.String("8.0"),
NumberOfDatabase: pulumi.Float64(16),
PortNumber: pulumi.String("3306"),
ResourceGroupName: pulumi.String("testrg"),
ServerName: pulumi.String("testServerName"),
SiteName: pulumi.String("testSite"),
SupportStatus: pulumi.String(mysqldiscovery.SupportStatusMainstream),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.mysqldiscovery.MySQLServer;
import com.pulumi.azurenative.mysqldiscovery.MySQLServerArgs;
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 mySQLServer = new MySQLServer("mySQLServer", MySQLServerArgs.builder()
.hostIp(
"127.0.0.1",
"127.0.0.2")
.hostName("test.mysql.server")
.machineId("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourcegroups/demoRG/providers/Microsoft.OffAzure/serverSites/xxx/machines/xxx")
.mysqlVersion("8.0")
.numberOfDatabase(16.0)
.portNumber("3306")
.resourceGroupName("testrg")
.serverName("testServerName")
.siteName("testSite")
.supportStatus("Mainstream")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:mysqldiscovery:MySQLServer testServerName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MySQLDiscovery/MySQLSites/{siteName}/MySQLServers/{serverName}

Constructors

Link copied to clipboard
constructor(edition: Output<Either<String, Edition>>? = null, errors: Output<List<ErrorArgs>>? = null, hostIp: Output<List<String>>? = null, hostName: Output<String>? = null, labels: Output<Map<String, String>>? = null, machineId: Output<String>? = null, mysqlVersion: Output<String>? = null, numberOfDatabase: Output<Double>? = null, portNumber: Output<String>? = null, provisioningState: Output<Either<String, ProvisioningState>>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null, siteName: Output<String>? = null, supportEndIn: Output<String>? = null, supportStatus: Output<Either<String, SupportStatus>>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val edition: Output<Either<String, Edition>>? = null

mysql server edition.

Link copied to clipboard
val errors: Output<List<ErrorArgs>>? = null

The list of errors.

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

The Server IP/host name.

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

The Server IP/host name.

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

Resource labels.

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

discovery Machine Id

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

The mysql server version.

Link copied to clipboard
val numberOfDatabase: Output<Double>? = null

The number of database.

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

MySQL Server port number

Link copied to clipboard
val provisioningState: Output<Either<String, ProvisioningState>>? = null

Gets or sets the provisioning state.

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

The name of the resource group. The name is case insensitive.

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

The name of Server

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

The name of Site

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

Time when mysql version support end.

Link copied to clipboard
val supportStatus: Output<Either<String, SupportStatus>>? = null

mysql version support status.

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

Resource tags

Functions

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