MySQLServer

class MySQLServer : KotlinCustomResource

The MySQLServer resource definition. Uses Azure REST 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/v2"
"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)
.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}

Properties

Link copied to clipboard
val edition: Output<String>?

mysql server edition.

Link copied to clipboard
val errors: Output<List<ErrorResponse>>?

The list of errors.

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

The Server IP/host name.

Link copied to clipboard
val hostName: Output<String>

The Server IP/host name.

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

Resource labels.

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

discovery Machine Id

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

The mysql server version.

Link copied to clipboard
val name: Output<String>

The name of the resource

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

The number of database.

Link copied to clipboard
val portNumber: Output<String>

MySQL Server port number

Link copied to clipboard

Gets or sets the provisioning state.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val supportEndIn: Output<String>?

Time when mysql version support end.

Link copied to clipboard
val supportStatus: Output<String>?

mysql version support status.

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

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

Resource tags

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>