1. Packages
  2. Azure Classic
  3. API Docs
  4. postgresql
  5. getFlexibleServer

We recommend using Azure Native.

Azure Classic v6.4.0 published on Tuesday, Oct 8, 2024 by Pulumi

azure.postgresql.getFlexibleServer

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.4.0 published on Tuesday, Oct 8, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.postgresql.getFlexibleServer({
        name: "existing-postgresql-fs",
        resourceGroupName: "existing-postgresql-resgroup",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.postgresql.get_flexible_server(name="existing-postgresql-fs",
        resource_group_name="existing-postgresql-resgroup")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := postgresql.LookupFlexibleServer(ctx, &postgresql.LookupFlexibleServerArgs{
    			Name:              "existing-postgresql-fs",
    			ResourceGroupName: "existing-postgresql-resgroup",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.PostgreSql.GetFlexibleServer.Invoke(new()
        {
            Name = "existing-postgresql-fs",
            ResourceGroupName = "existing-postgresql-resgroup",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getFlexibleServerResult => getFlexibleServerResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.postgresql.PostgresqlFunctions;
    import com.pulumi.azure.postgresql.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 = PostgresqlFunctions.getFlexibleServer(GetFlexibleServerArgs.builder()
                .name("existing-postgresql-fs")
                .resourceGroupName("existing-postgresql-resgroup")
                .build());
    
            ctx.export("id", example.applyValue(getFlexibleServerResult -> getFlexibleServerResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:postgresql:getFlexibleServer
          Arguments:
            name: existing-postgresql-fs
            resourceGroupName: existing-postgresql-resgroup
    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:postgresql/getFlexibleServer:getFlexibleServer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of this PostgreSQL Flexible Server.
    ResourceGroupName string
    The name of the Resource Group where the PostgreSQL Flexible Server exists.
    Name string
    The name of this PostgreSQL Flexible Server.
    ResourceGroupName string
    The name of the Resource Group where the PostgreSQL Flexible Server exists.
    name String
    The name of this PostgreSQL Flexible Server.
    resourceGroupName String
    The name of the Resource Group where the PostgreSQL Flexible Server exists.
    name string
    The name of this PostgreSQL Flexible Server.
    resourceGroupName string
    The name of the Resource Group where the PostgreSQL Flexible Server exists.
    name str
    The name of this PostgreSQL Flexible Server.
    resource_group_name str
    The name of the Resource Group where the PostgreSQL Flexible Server exists.
    name String
    The name of this PostgreSQL Flexible Server.
    resourceGroupName String
    The name of the Resource Group where the PostgreSQL Flexible Server exists.

    getFlexibleServer Result

    The following output properties are available:

    AdministratorLogin string
    The Administrator login for the PostgreSQL Flexible Server.
    AutoGrowEnabled bool
    Is the storage auto grow for PostgreSQL Flexible Server enabled?
    BackupRetentionDays int
    The backup retention days for the PostgreSQL Flexible Server.
    DelegatedSubnetId string
    The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
    Fqdn string
    The FQDN of the PostgreSQL Flexible Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region where the PostgreSQL Flexible Server exists.
    Name string
    PublicNetworkAccessEnabled bool
    Is public network access enabled?
    ResourceGroupName string
    SkuName string
    The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3).
    StorageMb int
    The max storage allowed for the PostgreSQL Flexible Server.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the PostgreSQL Flexible Server.
    Version string
    The version of PostgreSQL Flexible Server to use.
    AdministratorLogin string
    The Administrator login for the PostgreSQL Flexible Server.
    AutoGrowEnabled bool
    Is the storage auto grow for PostgreSQL Flexible Server enabled?
    BackupRetentionDays int
    The backup retention days for the PostgreSQL Flexible Server.
    DelegatedSubnetId string
    The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
    Fqdn string
    The FQDN of the PostgreSQL Flexible Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region where the PostgreSQL Flexible Server exists.
    Name string
    PublicNetworkAccessEnabled bool
    Is public network access enabled?
    ResourceGroupName string
    SkuName string
    The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3).
    StorageMb int
    The max storage allowed for the PostgreSQL Flexible Server.
    Tags map[string]string
    A mapping of tags assigned to the PostgreSQL Flexible Server.
    Version string
    The version of PostgreSQL Flexible Server to use.
    administratorLogin String
    The Administrator login for the PostgreSQL Flexible Server.
    autoGrowEnabled Boolean
    Is the storage auto grow for PostgreSQL Flexible Server enabled?
    backupRetentionDays Integer
    The backup retention days for the PostgreSQL Flexible Server.
    delegatedSubnetId String
    The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
    fqdn String
    The FQDN of the PostgreSQL Flexible Server.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region where the PostgreSQL Flexible Server exists.
    name String
    publicNetworkAccessEnabled Boolean
    Is public network access enabled?
    resourceGroupName String
    skuName String
    The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3).
    storageMb Integer
    The max storage allowed for the PostgreSQL Flexible Server.
    tags Map<String,String>
    A mapping of tags assigned to the PostgreSQL Flexible Server.
    version String
    The version of PostgreSQL Flexible Server to use.
    administratorLogin string
    The Administrator login for the PostgreSQL Flexible Server.
    autoGrowEnabled boolean
    Is the storage auto grow for PostgreSQL Flexible Server enabled?
    backupRetentionDays number
    The backup retention days for the PostgreSQL Flexible Server.
    delegatedSubnetId string
    The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
    fqdn string
    The FQDN of the PostgreSQL Flexible Server.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Azure Region where the PostgreSQL Flexible Server exists.
    name string
    publicNetworkAccessEnabled boolean
    Is public network access enabled?
    resourceGroupName string
    skuName string
    The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3).
    storageMb number
    The max storage allowed for the PostgreSQL Flexible Server.
    tags {[key: string]: string}
    A mapping of tags assigned to the PostgreSQL Flexible Server.
    version string
    The version of PostgreSQL Flexible Server to use.
    administrator_login str
    The Administrator login for the PostgreSQL Flexible Server.
    auto_grow_enabled bool
    Is the storage auto grow for PostgreSQL Flexible Server enabled?
    backup_retention_days int
    The backup retention days for the PostgreSQL Flexible Server.
    delegated_subnet_id str
    The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
    fqdn str
    The FQDN of the PostgreSQL Flexible Server.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Azure Region where the PostgreSQL Flexible Server exists.
    name str
    public_network_access_enabled bool
    Is public network access enabled?
    resource_group_name str
    sku_name str
    The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3).
    storage_mb int
    The max storage allowed for the PostgreSQL Flexible Server.
    tags Mapping[str, str]
    A mapping of tags assigned to the PostgreSQL Flexible Server.
    version str
    The version of PostgreSQL Flexible Server to use.
    administratorLogin String
    The Administrator login for the PostgreSQL Flexible Server.
    autoGrowEnabled Boolean
    Is the storage auto grow for PostgreSQL Flexible Server enabled?
    backupRetentionDays Number
    The backup retention days for the PostgreSQL Flexible Server.
    delegatedSubnetId String
    The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
    fqdn String
    The FQDN of the PostgreSQL Flexible Server.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region where the PostgreSQL Flexible Server exists.
    name String
    publicNetworkAccessEnabled Boolean
    Is public network access enabled?
    resourceGroupName String
    skuName String
    The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3).
    storageMb Number
    The max storage allowed for the PostgreSQL Flexible Server.
    tags Map<String>
    A mapping of tags assigned to the PostgreSQL Flexible Server.
    version String
    The version of PostgreSQL Flexible Server to use.

    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 v6.4.0 published on Tuesday, Oct 8, 2024 by Pulumi