1. Packages
  2. Azure Classic
  3. API Docs
  4. mariadb
  5. getMariaDbServer

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.mariadb.getMariaDbServer

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const dbServer = azure.mariadb.getMariaDbServer({
        name: "mariadb-server",
        resourceGroupName: example.resourceGroupName,
    });
    export const mariadbServerId = exampleAzurermMariadbServer.id;
    
    import pulumi
    import pulumi_azure as azure
    
    db_server = azure.mariadb.get_maria_db_server(name="mariadb-server",
        resource_group_name=example["resourceGroupName"])
    pulumi.export("mariadbServerId", example_azurerm_mariadb_server["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mariadb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mariadb.GetMariaDbServer(ctx, &mariadb.GetMariaDbServerArgs{
    			Name:              "mariadb-server",
    			ResourceGroupName: example.ResourceGroupName,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("mariadbServerId", exampleAzurermMariadbServer.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var dbServer = Azure.MariaDB.GetMariaDbServer.Invoke(new()
        {
            Name = "mariadb-server",
            ResourceGroupName = example.ResourceGroupName,
        });
    
        return new Dictionary<string, object?>
        {
            ["mariadbServerId"] = exampleAzurermMariadbServer.Id,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.mariadb.MariadbFunctions;
    import com.pulumi.azure.mariadb.inputs.GetMariaDbServerArgs;
    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 dbServer = MariadbFunctions.getMariaDbServer(GetMariaDbServerArgs.builder()
                .name("mariadb-server")
                .resourceGroupName(example.resourceGroupName())
                .build());
    
            ctx.export("mariadbServerId", exampleAzurermMariadbServer.id());
        }
    }
    
    variables:
      dbServer:
        fn::invoke:
          Function: azure:mariadb:getMariaDbServer
          Arguments:
            name: mariadb-server
            resourceGroupName: ${example.resourceGroupName}
    outputs:
      mariadbServerId: ${exampleAzurermMariadbServer.id}
    

    Using getMariaDbServer

    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 getMariaDbServer(args: GetMariaDbServerArgs, opts?: InvokeOptions): Promise<GetMariaDbServerResult>
    function getMariaDbServerOutput(args: GetMariaDbServerOutputArgs, opts?: InvokeOptions): Output<GetMariaDbServerResult>
    def get_maria_db_server(name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetMariaDbServerResult
    def get_maria_db_server_output(name: Optional[pulumi.Input[str]] = None,
                            resource_group_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetMariaDbServerResult]
    func GetMariaDbServer(ctx *Context, args *GetMariaDbServerArgs, opts ...InvokeOption) (*GetMariaDbServerResult, error)
    func GetMariaDbServerOutput(ctx *Context, args *GetMariaDbServerOutputArgs, opts ...InvokeOption) GetMariaDbServerResultOutput

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

    public static class GetMariaDbServer 
    {
        public static Task<GetMariaDbServerResult> InvokeAsync(GetMariaDbServerArgs args, InvokeOptions? opts = null)
        public static Output<GetMariaDbServerResult> Invoke(GetMariaDbServerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMariaDbServerResult> getMariaDbServer(GetMariaDbServerArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:mariadb/getMariaDbServer:getMariaDbServer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the MariaDB Server to retrieve information about.
    ResourceGroupName string
    The name of the resource group where the MariaDB Server exists.
    Name string
    The name of the MariaDB Server to retrieve information about.
    ResourceGroupName string
    The name of the resource group where the MariaDB Server exists.
    name String
    The name of the MariaDB Server to retrieve information about.
    resourceGroupName String
    The name of the resource group where the MariaDB Server exists.
    name string
    The name of the MariaDB Server to retrieve information about.
    resourceGroupName string
    The name of the resource group where the MariaDB Server exists.
    name str
    The name of the MariaDB Server to retrieve information about.
    resource_group_name str
    The name of the resource group where the MariaDB Server exists.
    name String
    The name of the MariaDB Server to retrieve information about.
    resourceGroupName String
    The name of the resource group where the MariaDB Server exists.

    getMariaDbServer Result

    The following output properties are available:

    AdministratorLogin string
    The Administrator login for the MariaDB Server.
    Fqdn string
    The FQDN of the MariaDB Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure location where the resource exists.
    Name string
    ResourceGroupName string
    SkuName string
    The SKU Name for this MariaDB Server.
    SslEnforcement string
    The SSL being enforced on connections.
    StorageProfiles List<GetMariaDbServerStorageProfile>
    A storage_profile block as defined below.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the resource.
    Version string
    The version of MariaDB being used.
    AdministratorLogin string
    The Administrator login for the MariaDB Server.
    Fqdn string
    The FQDN of the MariaDB Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure location where the resource exists.
    Name string
    ResourceGroupName string
    SkuName string
    The SKU Name for this MariaDB Server.
    SslEnforcement string
    The SSL being enforced on connections.
    StorageProfiles []GetMariaDbServerStorageProfile
    A storage_profile block as defined below.
    Tags map[string]string
    A mapping of tags assigned to the resource.
    Version string
    The version of MariaDB being used.
    administratorLogin String
    The Administrator login for the MariaDB Server.
    fqdn String
    The FQDN of the MariaDB Server.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure location where the resource exists.
    name String
    resourceGroupName String
    skuName String
    The SKU Name for this MariaDB Server.
    sslEnforcement String
    The SSL being enforced on connections.
    storageProfiles List<GetMariaDbServerStorageProfile>
    A storage_profile block as defined below.
    tags Map<String,String>
    A mapping of tags assigned to the resource.
    version String
    The version of MariaDB being used.
    administratorLogin string
    The Administrator login for the MariaDB Server.
    fqdn string
    The FQDN of the MariaDB Server.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Azure location where the resource exists.
    name string
    resourceGroupName string
    skuName string
    The SKU Name for this MariaDB Server.
    sslEnforcement string
    The SSL being enforced on connections.
    storageProfiles GetMariaDbServerStorageProfile[]
    A storage_profile block as defined below.
    tags {[key: string]: string}
    A mapping of tags assigned to the resource.
    version string
    The version of MariaDB being used.
    administrator_login str
    The Administrator login for the MariaDB Server.
    fqdn str
    The FQDN of the MariaDB Server.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Azure location where the resource exists.
    name str
    resource_group_name str
    sku_name str
    The SKU Name for this MariaDB Server.
    ssl_enforcement str
    The SSL being enforced on connections.
    storage_profiles Sequence[GetMariaDbServerStorageProfile]
    A storage_profile block as defined below.
    tags Mapping[str, str]
    A mapping of tags assigned to the resource.
    version str
    The version of MariaDB being used.
    administratorLogin String
    The Administrator login for the MariaDB Server.
    fqdn String
    The FQDN of the MariaDB Server.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure location where the resource exists.
    name String
    resourceGroupName String
    skuName String
    The SKU Name for this MariaDB Server.
    sslEnforcement String
    The SSL being enforced on connections.
    storageProfiles List<Property Map>
    A storage_profile block as defined below.
    tags Map<String>
    A mapping of tags assigned to the resource.
    version String
    The version of MariaDB being used.

    Supporting Types

    GetMariaDbServerStorageProfile

    AutoGrow string
    Whether autogrow is enabled or disabled for the storage.
    BackupRetentionDays int
    Backup retention days for the server.
    GeoRedundantBackup string
    Whether Geo-redundant is enabled or not for server backup.
    StorageMb int
    The max storage allowed for a server.
    AutoGrow string
    Whether autogrow is enabled or disabled for the storage.
    BackupRetentionDays int
    Backup retention days for the server.
    GeoRedundantBackup string
    Whether Geo-redundant is enabled or not for server backup.
    StorageMb int
    The max storage allowed for a server.
    autoGrow String
    Whether autogrow is enabled or disabled for the storage.
    backupRetentionDays Integer
    Backup retention days for the server.
    geoRedundantBackup String
    Whether Geo-redundant is enabled or not for server backup.
    storageMb Integer
    The max storage allowed for a server.
    autoGrow string
    Whether autogrow is enabled or disabled for the storage.
    backupRetentionDays number
    Backup retention days for the server.
    geoRedundantBackup string
    Whether Geo-redundant is enabled or not for server backup.
    storageMb number
    The max storage allowed for a server.
    auto_grow str
    Whether autogrow is enabled or disabled for the storage.
    backup_retention_days int
    Backup retention days for the server.
    geo_redundant_backup str
    Whether Geo-redundant is enabled or not for server backup.
    storage_mb int
    The max storage allowed for a server.
    autoGrow String
    Whether autogrow is enabled or disabled for the storage.
    backupRetentionDays Number
    Backup retention days for the server.
    geoRedundantBackup String
    Whether Geo-redundant is enabled or not for server backup.
    storageMb Number
    The max storage allowed for a server.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi