Azure Classic

v5.25.0 published on Thursday, Nov 24, 2022 by Pulumi

getFlexibleServer

Use this data source to access information about an existing MySQL Flexible Server.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.MySql.GetFlexibleServer.Invoke(new()
    {
        Name = "existingMySqlFlexibleServer",
        ResourceGroupName = "existingResGroup",
    });

    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getFlexibleServerResult => getFlexibleServerResult.Id),
    };
});
package main

import (
	"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 := mysql.LookupFlexibleServer(ctx, &mysql.LookupFlexibleServerArgs{
			Name:              "existingMySqlFlexibleServer",
			ResourceGroupName: "existingResGroup",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.mysql.MysqlFunctions;
import com.pulumi.azure.mysql.inputs.GetFlexibleServerArgs;
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) {
        final var example = MysqlFunctions.getFlexibleServer(GetFlexibleServerArgs.builder()
            .name("existingMySqlFlexibleServer")
            .resourceGroupName("existingResGroup")
            .build());

        ctx.export("id", example.applyValue(getFlexibleServerResult -> getFlexibleServerResult.id()));
    }
}
import pulumi
import pulumi_azure as azure

example = azure.mysql.get_flexible_server(name="existingMySqlFlexibleServer",
    resource_group_name="existingResGroup")
pulumi.export("id", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.mysql.getFlexibleServer({
    name: "existingMySqlFlexibleServer",
    resourceGroupName: "existingResGroup",
});
export const id = example.then(example => example.id);
variables:
  example:
    Fn::Invoke:
      Function: azure:mysql:getFlexibleServer
      Arguments:
        name: existingMySqlFlexibleServer
        resourceGroupName: existingResGroup
outputs:
  id: ${example.id}

Using getFlexibleServer

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getFlexibleServer(args: GetFlexibleServerArgs, opts?: InvokeOptions): Promise<GetFlexibleServerResult>
function getFlexibleServerOutput(args: GetFlexibleServerOutputArgs, opts?: InvokeOptions): Output<GetFlexibleServerResult>
def get_flexible_server(name: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetFlexibleServerResult
def get_flexible_server_output(name: Optional[pulumi.Input[str]] = None,
                        resource_group_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetFlexibleServerResult]
func LookupFlexibleServer(ctx *Context, args *LookupFlexibleServerArgs, opts ...InvokeOption) (*LookupFlexibleServerResult, error)
func LookupFlexibleServerOutput(ctx *Context, args *LookupFlexibleServerOutputArgs, opts ...InvokeOption) LookupFlexibleServerResultOutput

> Note: This function is named LookupFlexibleServer in the Go SDK.

public static class GetFlexibleServer 
{
    public static Task<GetFlexibleServerResult> InvokeAsync(GetFlexibleServerArgs args, InvokeOptions? opts = null)
    public static Output<GetFlexibleServerResult> Invoke(GetFlexibleServerInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFlexibleServerResult> getFlexibleServer(GetFlexibleServerArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:mysql/getFlexibleServer:getFlexibleServer
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

Specifies the name of the MySQL Flexible Server.

ResourceGroupName string

The name of the resource group for the MySQL Flexible Server.

Name string

Specifies the name of the MySQL Flexible Server.

ResourceGroupName string

The name of the resource group for the MySQL Flexible Server.

name String

Specifies the name of the MySQL Flexible Server.

resourceGroupName String

The name of the resource group for the MySQL Flexible Server.

name string

Specifies the name of the MySQL Flexible Server.

resourceGroupName string

The name of the resource group for the MySQL Flexible Server.

name str

Specifies the name of the MySQL Flexible Server.

resource_group_name str

The name of the resource group for the MySQL Flexible Server.

name String

Specifies the name of the MySQL Flexible Server.

resourceGroupName String

The name of the resource group for the MySQL Flexible Server.

getFlexibleServer Result

The following output properties are available:

AdministratorLogin string

The Administrator login of the MySQL Flexible Server.

BackupRetentionDays int

The backup retention days of the MySQL Flexible Server.

DelegatedSubnetId string

The ID of the virtual network subnet the MySQL Flexible Server is created in.

Fqdn string

The fully qualified domain name of the MySQL Flexible Server.

GeoRedundantBackupEnabled bool

Is geo redundant backup enabled?

HighAvailabilities List<GetFlexibleServerHighAvailability>

A high_availability block for this MySQL Flexible Server as defined below.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure Region of the MySQL Flexible Server.

MaintenanceWindows List<GetFlexibleServerMaintenanceWindow>

A maintenance_window block for this MySQL Flexible Server as defined below.

Name string
PrivateDnsZoneId string

The ID of the Private DNS zone of the MySQL Flexible Server.

PublicNetworkAccessEnabled bool

Is the public network access enabled?

ReplicaCapacity int

The maximum number of replicas that a primary MySQL Flexible Server can have.

ReplicationRole string

The replication role of the MySQL Flexible Server.

ResourceGroupName string
RestorePointInTime string
SkuName string

The SKU Name of the MySQL Flexible Server.

Storages List<GetFlexibleServerStorage>

A storage block for this MySQL Flexible Server as defined below.

Tags Dictionary<string, string>

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

Version string

The version of the MySQL Flexible Server.

Zone string

The Availability Zones where this MySQL Flexible Server is located.

AdministratorLogin string

The Administrator login of the MySQL Flexible Server.

BackupRetentionDays int

The backup retention days of the MySQL Flexible Server.

DelegatedSubnetId string

The ID of the virtual network subnet the MySQL Flexible Server is created in.

Fqdn string

The fully qualified domain name of the MySQL Flexible Server.

GeoRedundantBackupEnabled bool

Is geo redundant backup enabled?

HighAvailabilities []GetFlexibleServerHighAvailability

A high_availability block for this MySQL Flexible Server as defined below.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure Region of the MySQL Flexible Server.

MaintenanceWindows []GetFlexibleServerMaintenanceWindow

A maintenance_window block for this MySQL Flexible Server as defined below.

Name string
PrivateDnsZoneId string

The ID of the Private DNS zone of the MySQL Flexible Server.

PublicNetworkAccessEnabled bool

Is the public network access enabled?

ReplicaCapacity int

The maximum number of replicas that a primary MySQL Flexible Server can have.

ReplicationRole string

The replication role of the MySQL Flexible Server.

ResourceGroupName string
RestorePointInTime string
SkuName string

The SKU Name of the MySQL Flexible Server.

Storages []GetFlexibleServerStorage

A storage block for this MySQL Flexible Server as defined below.

Tags map[string]string

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

Version string

The version of the MySQL Flexible Server.

Zone string

The Availability Zones where this MySQL Flexible Server is located.

administratorLogin String

The Administrator login of the MySQL Flexible Server.

backupRetentionDays Integer

The backup retention days of the MySQL Flexible Server.

delegatedSubnetId String

The ID of the virtual network subnet the MySQL Flexible Server is created in.

fqdn String

The fully qualified domain name of the MySQL Flexible Server.

geoRedundantBackupEnabled Boolean

Is geo redundant backup enabled?

highAvailabilities List<GetFlexibleServerHighAvailability>

A high_availability block for this MySQL Flexible Server as defined below.

id String

The provider-assigned unique ID for this managed resource.

location String

The Azure Region of the MySQL Flexible Server.

maintenanceWindows List<GetFlexibleServerMaintenanceWindow>

A maintenance_window block for this MySQL Flexible Server as defined below.

name String
privateDnsZoneId String

The ID of the Private DNS zone of the MySQL Flexible Server.

publicNetworkAccessEnabled Boolean

Is the public network access enabled?

replicaCapacity Integer

The maximum number of replicas that a primary MySQL Flexible Server can have.

replicationRole String

The replication role of the MySQL Flexible Server.

resourceGroupName String
restorePointInTime String
skuName String

The SKU Name of the MySQL Flexible Server.

storages List<GetFlexibleServerStorage>

A storage block for this MySQL Flexible Server as defined below.

tags Map<String,String>

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

version String

The version of the MySQL Flexible Server.

zone String

The Availability Zones where this MySQL Flexible Server is located.

administratorLogin string

The Administrator login of the MySQL Flexible Server.

backupRetentionDays number

The backup retention days of the MySQL Flexible Server.

delegatedSubnetId string

The ID of the virtual network subnet the MySQL Flexible Server is created in.

fqdn string

The fully qualified domain name of the MySQL Flexible Server.

geoRedundantBackupEnabled boolean

Is geo redundant backup enabled?

highAvailabilities GetFlexibleServerHighAvailability[]

A high_availability block for this MySQL Flexible Server as defined below.

id string

The provider-assigned unique ID for this managed resource.

location string

The Azure Region of the MySQL Flexible Server.

maintenanceWindows GetFlexibleServerMaintenanceWindow[]

A maintenance_window block for this MySQL Flexible Server as defined below.

name string
privateDnsZoneId string

The ID of the Private DNS zone of the MySQL Flexible Server.

publicNetworkAccessEnabled boolean

Is the public network access enabled?

replicaCapacity number

The maximum number of replicas that a primary MySQL Flexible Server can have.

replicationRole string

The replication role of the MySQL Flexible Server.

resourceGroupName string
restorePointInTime string
skuName string

The SKU Name of the MySQL Flexible Server.

storages GetFlexibleServerStorage[]

A storage block for this MySQL Flexible Server as defined below.

tags {[key: string]: string}

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

version string

The version of the MySQL Flexible Server.

zone string

The Availability Zones where this MySQL Flexible Server is located.

administrator_login str

The Administrator login of the MySQL Flexible Server.

backup_retention_days int

The backup retention days of the MySQL Flexible Server.

delegated_subnet_id str

The ID of the virtual network subnet the MySQL Flexible Server is created in.

fqdn str

The fully qualified domain name of the MySQL Flexible Server.

geo_redundant_backup_enabled bool

Is geo redundant backup enabled?

high_availabilities Sequence[GetFlexibleServerHighAvailability]

A high_availability block for this MySQL Flexible Server as defined below.

id str

The provider-assigned unique ID for this managed resource.

location str

The Azure Region of the MySQL Flexible Server.

maintenance_windows Sequence[GetFlexibleServerMaintenanceWindow]

A maintenance_window block for this MySQL Flexible Server as defined below.

name str
private_dns_zone_id str

The ID of the Private DNS zone of the MySQL Flexible Server.

public_network_access_enabled bool

Is the public network access enabled?

replica_capacity int

The maximum number of replicas that a primary MySQL Flexible Server can have.

replication_role str

The replication role of the MySQL Flexible Server.

resource_group_name str
restore_point_in_time str
sku_name str

The SKU Name of the MySQL Flexible Server.

storages Sequence[GetFlexibleServerStorage]

A storage block for this MySQL Flexible Server as defined below.

tags Mapping[str, str]

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

version str

The version of the MySQL Flexible Server.

zone str

The Availability Zones where this MySQL Flexible Server is located.

administratorLogin String

The Administrator login of the MySQL Flexible Server.

backupRetentionDays Number

The backup retention days of the MySQL Flexible Server.

delegatedSubnetId String

The ID of the virtual network subnet the MySQL Flexible Server is created in.

fqdn String

The fully qualified domain name of the MySQL Flexible Server.

geoRedundantBackupEnabled Boolean

Is geo redundant backup enabled?

highAvailabilities List<Property Map>

A high_availability block for this MySQL Flexible Server as defined below.

id String

The provider-assigned unique ID for this managed resource.

location String

The Azure Region of the MySQL Flexible Server.

maintenanceWindows List<Property Map>

A maintenance_window block for this MySQL Flexible Server as defined below.

name String
privateDnsZoneId String

The ID of the Private DNS zone of the MySQL Flexible Server.

publicNetworkAccessEnabled Boolean

Is the public network access enabled?

replicaCapacity Number

The maximum number of replicas that a primary MySQL Flexible Server can have.

replicationRole String

The replication role of the MySQL Flexible Server.

resourceGroupName String
restorePointInTime String
skuName String

The SKU Name of the MySQL Flexible Server.

storages List<Property Map>

A storage block for this MySQL Flexible Server as defined below.

tags Map<String>

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

version String

The version of the MySQL Flexible Server.

zone String

The Availability Zones where this MySQL Flexible Server is located.

Supporting Types

GetFlexibleServerHighAvailability

Mode string

The high availability mode of the MySQL Flexible Server.

StandbyAvailabilityZone string

The availability zone of the standby Flexible Server.

Mode string

The high availability mode of the MySQL Flexible Server.

StandbyAvailabilityZone string

The availability zone of the standby Flexible Server.

mode String

The high availability mode of the MySQL Flexible Server.

standbyAvailabilityZone String

The availability zone of the standby Flexible Server.

mode string

The high availability mode of the MySQL Flexible Server.

standbyAvailabilityZone string

The availability zone of the standby Flexible Server.

mode str

The high availability mode of the MySQL Flexible Server.

standby_availability_zone str

The availability zone of the standby Flexible Server.

mode String

The high availability mode of the MySQL Flexible Server.

standbyAvailabilityZone String

The availability zone of the standby Flexible Server.

GetFlexibleServerMaintenanceWindow

DayOfWeek int

The day of week of the maintenance window.

StartHour int

The start hour of the maintenance window.

StartMinute int

The start minute of the maintenance window.

DayOfWeek int

The day of week of the maintenance window.

StartHour int

The start hour of the maintenance window.

StartMinute int

The start minute of the maintenance window.

dayOfWeek Integer

The day of week of the maintenance window.

startHour Integer

The start hour of the maintenance window.

startMinute Integer

The start minute of the maintenance window.

dayOfWeek number

The day of week of the maintenance window.

startHour number

The start hour of the maintenance window.

startMinute number

The start minute of the maintenance window.

day_of_week int

The day of week of the maintenance window.

start_hour int

The start hour of the maintenance window.

start_minute int

The start minute of the maintenance window.

dayOfWeek Number

The day of week of the maintenance window.

startHour Number

The start hour of the maintenance window.

startMinute Number

The start minute of the maintenance window.

GetFlexibleServerStorage

AutoGrowEnabled bool

Is Storage Auto Grow enabled?

Iops int

The storage IOPS of the MySQL Flexible Server.

SizeGb int

The max storage allowed for the MySQL Flexible Server.

AutoGrowEnabled bool

Is Storage Auto Grow enabled?

Iops int

The storage IOPS of the MySQL Flexible Server.

SizeGb int

The max storage allowed for the MySQL Flexible Server.

autoGrowEnabled Boolean

Is Storage Auto Grow enabled?

iops Integer

The storage IOPS of the MySQL Flexible Server.

sizeGb Integer

The max storage allowed for the MySQL Flexible Server.

autoGrowEnabled boolean

Is Storage Auto Grow enabled?

iops number

The storage IOPS of the MySQL Flexible Server.

sizeGb number

The max storage allowed for the MySQL Flexible Server.

auto_grow_enabled bool

Is Storage Auto Grow enabled?

iops int

The storage IOPS of the MySQL Flexible Server.

size_gb int

The max storage allowed for the MySQL Flexible Server.

autoGrowEnabled Boolean

Is Storage Auto Grow enabled?

iops Number

The storage IOPS of the MySQL Flexible Server.

sizeGb Number

The max storage allowed for the MySQL Flexible Server.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.