1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getPdrGrsLocationPairs
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 (GRS) location pairs associated with the specified service instance based on managed VMs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const pdrGrsLocationPairs = ibm.getPdrGrsLocationPairs({
        instanceId: "123456d3-1122-3344-b67d-4389b44b7bf9",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    pdr_grs_location_pairs = ibm.get_pdr_grs_location_pairs(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.GetPdrGrsLocationPairs(ctx, &ibm.GetPdrGrsLocationPairsArgs{
    			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 pdrGrsLocationPairs = Ibm.GetPdrGrsLocationPairs.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.GetPdrGrsLocationPairsArgs;
    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 pdrGrsLocationPairs = IbmFunctions.getPdrGrsLocationPairs(GetPdrGrsLocationPairsArgs.builder()
                .instanceId("123456d3-1122-3344-b67d-4389b44b7bf9")
                .build());
    
        }
    }
    
    variables:
      pdrGrsLocationPairs:
        fn::invoke:
          function: ibm:getPdrGrsLocationPairs
          arguments:
            instanceId: 123456d3-1122-3344-b67d-4389b44b7bf9
    
    Example coming soon!
    

    Using getPdrGrsLocationPairs

    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 getPdrGrsLocationPairs(args: GetPdrGrsLocationPairsArgs, opts?: InvokeOptions): Promise<GetPdrGrsLocationPairsResult>
    function getPdrGrsLocationPairsOutput(args: GetPdrGrsLocationPairsOutputArgs, opts?: InvokeOptions): Output<GetPdrGrsLocationPairsResult>
    def get_pdr_grs_location_pairs(accept_language: Optional[str] = None,
                                   id: Optional[str] = None,
                                   instance_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetPdrGrsLocationPairsResult
    def get_pdr_grs_location_pairs_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[GetPdrGrsLocationPairsResult]
    func GetPdrGrsLocationPairs(ctx *Context, args *GetPdrGrsLocationPairsArgs, opts ...InvokeOption) (*GetPdrGrsLocationPairsResult, error)
    func GetPdrGrsLocationPairsOutput(ctx *Context, args *GetPdrGrsLocationPairsOutputArgs, opts ...InvokeOption) GetPdrGrsLocationPairsResultOutput

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

    public static class GetPdrGrsLocationPairs 
    {
        public static Task<GetPdrGrsLocationPairsResult> InvokeAsync(GetPdrGrsLocationPairsArgs args, InvokeOptions? opts = null)
        public static Output<GetPdrGrsLocationPairsResult> Invoke(GetPdrGrsLocationPairsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPdrGrsLocationPairsResult> getPdrGrsLocationPairs(GetPdrGrsLocationPairsArgs args, InvokeOptions options)
    public static Output<GetPdrGrsLocationPairsResult> getPdrGrsLocationPairs(GetPdrGrsLocationPairsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPdrGrsLocationPairs:getPdrGrsLocationPairs
      arguments:
        # arguments dictionary
    data "ibm_getpdrgrslocationpairs" "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
    The unique identifier of the pdr_grs_location_pairs.
    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
    The unique identifier of the pdr_grs_location_pairs.
    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
    The unique identifier of the pdr_grs_location_pairs.
    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
    The unique identifier of the pdr_grs_location_pairs.
    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
    The unique identifier of the pdr_grs_location_pairs.
    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
    The unique identifier of the pdr_grs_location_pairs.
    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
    The unique identifier of the pdr_grs_location_pairs.

    getPdrGrsLocationPairs Result

    The following output properties are available:

    Id string
    The unique identifier of the pdr_grs_location_pairs.
    InstanceId string
    LocationPairs Dictionary<string, string>
    (Map) A map of GRS location pairs where each key is a primary location and the value is its paired location.
    AcceptLanguage string
    Id string
    The unique identifier of the pdr_grs_location_pairs.
    InstanceId string
    LocationPairs map[string]string
    (Map) A map of GRS location pairs where each key is a primary location and the value is its paired location.
    AcceptLanguage string
    id string
    The unique identifier of the pdr_grs_location_pairs.
    instance_id string
    location_pairs map(string)
    (Map) A map of GRS location pairs where each key is a primary location and the value is its paired location.
    accept_language string
    id String
    The unique identifier of the pdr_grs_location_pairs.
    instanceId String
    locationPairs Map<String,String>
    (Map) A map of GRS location pairs where each key is a primary location and the value is its paired location.
    acceptLanguage String
    id string
    The unique identifier of the pdr_grs_location_pairs.
    instanceId string
    locationPairs {[key: string]: string}
    (Map) A map of GRS location pairs where each key is a primary location and the value is its paired location.
    acceptLanguage string
    id str
    The unique identifier of the pdr_grs_location_pairs.
    instance_id str
    location_pairs Mapping[str, str]
    (Map) A map of GRS location pairs where each key is a primary location and the value is its paired location.
    accept_language str
    id String
    The unique identifier of the pdr_grs_location_pairs.
    instanceId String
    locationPairs Map<String>
    (Map) A map of GRS location pairs where each key is a primary location and the value is its paired location.
    acceptLanguage String

    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.