1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getPdrDrLocations
Viewing docs for ibm 2.1.0
published on Tuesday, May 5, 2026 by ibm-cloud
Viewing docs for ibm 2.1.0
published on Tuesday, May 5, 2026 by ibm-cloud

    Retrieves the list of disaster recovery (DR) locations available for the specified service instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const pdrDrLocations = ibm.getPdrDrLocations({
        instanceId: "123456d3-1122-3344-b67d-4389b44b7bf9",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    pdr_dr_locations = ibm.get_pdr_dr_locations(instance_id="123456d3-1122-3344-b67d-4389b44b7bf9")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetPdrDrLocations(ctx, &ibm.GetPdrDrLocationsArgs{
    			InstanceId: "123456d3-1122-3344-b67d-4389b44b7bf9",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var pdrDrLocations = Ibm.GetPdrDrLocations.Invoke(new()
        {
            InstanceId = "123456d3-1122-3344-b67d-4389b44b7bf9",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetPdrDrLocationsArgs;
    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 pdrDrLocations = IbmFunctions.getPdrDrLocations(GetPdrDrLocationsArgs.builder()
                .instanceId("123456d3-1122-3344-b67d-4389b44b7bf9")
                .build());
    
        }
    }
    
    variables:
      pdrDrLocations:
        fn::invoke:
          function: ibm:getPdrDrLocations
          arguments:
            instanceId: 123456d3-1122-3344-b67d-4389b44b7bf9
    
    Example coming soon!
    

    Using getPdrDrLocations

    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 getPdrDrLocations(args: GetPdrDrLocationsArgs, opts?: InvokeOptions): Promise<GetPdrDrLocationsResult>
    function getPdrDrLocationsOutput(args: GetPdrDrLocationsOutputArgs, opts?: InvokeOptions): Output<GetPdrDrLocationsResult>
    def get_pdr_dr_locations(accept_language: Optional[str] = None,
                             id: Optional[str] = None,
                             instance_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetPdrDrLocationsResult
    def get_pdr_dr_locations_output(accept_language: pulumi.Input[Optional[str]] = None,
                             id: pulumi.Input[Optional[str]] = None,
                             instance_id: pulumi.Input[Optional[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetPdrDrLocationsResult]
    func GetPdrDrLocations(ctx *Context, args *GetPdrDrLocationsArgs, opts ...InvokeOption) (*GetPdrDrLocationsResult, error)
    func GetPdrDrLocationsOutput(ctx *Context, args *GetPdrDrLocationsOutputArgs, opts ...InvokeOption) GetPdrDrLocationsResultOutput

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

    public static class GetPdrDrLocations 
    {
        public static Task<GetPdrDrLocationsResult> InvokeAsync(GetPdrDrLocationsArgs args, InvokeOptions? opts = null)
        public static Output<GetPdrDrLocationsResult> Invoke(GetPdrDrLocationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPdrDrLocationsResult> getPdrDrLocations(GetPdrDrLocationsArgs args, InvokeOptions options)
    public static Output<GetPdrDrLocationsResult> getPdrDrLocations(GetPdrDrLocationsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPdrDrLocations:getPdrDrLocations
      arguments:
        # arguments dictionary
    data "ibm_getpdrdrlocations" "name" {
        # arguments
    }

    The following arguments are supported:

    InstanceId string
    ID of the service instance.
    AcceptLanguage string
    The language requested for the return document.(ex., en,it,fr,es,de,ja,ko,pt-BR,zh-HANS,zh-HANT)
    Id string
    (String) Unique identifier of the DR location.
    InstanceId string
    ID of the service instance.
    AcceptLanguage string
    The language requested for the return document.(ex., en,it,fr,es,de,ja,ko,pt-BR,zh-HANS,zh-HANT)
    Id string
    (String) Unique identifier of the DR location.
    instance_id string
    ID of the service instance.
    accept_language string
    The language requested for the return document.(ex., en,it,fr,es,de,ja,ko,pt-BR,zh-HANS,zh-HANT)
    id string
    (String) Unique identifier of the DR location.
    instanceId String
    ID of the service instance.
    acceptLanguage String
    The language requested for the return document.(ex., en,it,fr,es,de,ja,ko,pt-BR,zh-HANS,zh-HANT)
    id String
    (String) Unique identifier of the DR location.
    instanceId string
    ID of the service instance.
    acceptLanguage string
    The language requested for the return document.(ex., en,it,fr,es,de,ja,ko,pt-BR,zh-HANS,zh-HANT)
    id string
    (String) Unique identifier of the DR location.
    instance_id str
    ID of the service instance.
    accept_language str
    The language requested for the return document.(ex., en,it,fr,es,de,ja,ko,pt-BR,zh-HANS,zh-HANT)
    id str
    (String) Unique identifier of the DR location.
    instanceId String
    ID of the service instance.
    acceptLanguage String
    The language requested for the return document.(ex., en,it,fr,es,de,ja,ko,pt-BR,zh-HANS,zh-HANT)
    id String
    (String) Unique identifier of the DR location.

    getPdrDrLocations Result

    The following output properties are available:

    DrLocations List<GetPdrDrLocationsDrLocation>
    (List) List of disaster recovery locations available for the service. Nested schema for dr_locations:
    Id string
    (String) Unique identifier of the DR location.
    InstanceId string
    AcceptLanguage string
    DrLocations []GetPdrDrLocationsDrLocation
    (List) List of disaster recovery locations available for the service. Nested schema for dr_locations:
    Id string
    (String) Unique identifier of the DR location.
    InstanceId string
    AcceptLanguage string
    dr_locations list(object)
    (List) List of disaster recovery locations available for the service. Nested schema for dr_locations:
    id string
    (String) Unique identifier of the DR location.
    instance_id string
    accept_language string
    drLocations List<GetPdrDrLocationsDrLocation>
    (List) List of disaster recovery locations available for the service. Nested schema for dr_locations:
    id String
    (String) Unique identifier of the DR location.
    instanceId String
    acceptLanguage String
    drLocations GetPdrDrLocationsDrLocation[]
    (List) List of disaster recovery locations available for the service. Nested schema for dr_locations:
    id string
    (String) Unique identifier of the DR location.
    instanceId string
    acceptLanguage string
    dr_locations Sequence[GetPdrDrLocationsDrLocation]
    (List) List of disaster recovery locations available for the service. Nested schema for dr_locations:
    id str
    (String) Unique identifier of the DR location.
    instance_id str
    accept_language str
    drLocations List<Property Map>
    (List) List of disaster recovery locations available for the service. Nested schema for dr_locations:
    id String
    (String) Unique identifier of the DR location.
    instanceId String
    acceptLanguage String

    Supporting Types

    GetPdrDrLocationsDrLocation

    Id string
    (String) Unique identifier of the DR location.
    Name string
    (String) The name of the Power virtual server DR location .
    Id string
    (String) Unique identifier of the DR location.
    Name string
    (String) The name of the Power virtual server DR location .
    id string
    (String) Unique identifier of the DR location.
    name string
    (String) The name of the Power virtual server DR location .
    id String
    (String) Unique identifier of the DR location.
    name String
    (String) The name of the Power virtual server DR location .
    id string
    (String) Unique identifier of the DR location.
    name string
    (String) The name of the Power virtual server DR location .
    id str
    (String) Unique identifier of the DR location.
    name str
    (String) The name of the Power virtual server DR location .
    id String
    (String) Unique identifier of the DR location.
    name String
    (String) The name of the Power virtual server DR location .

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    Viewing docs for ibm 2.1.0
    published on Tuesday, May 5, 2026 by ibm-cloud
      Try Pulumi Cloud free. Your team will thank you.