We recommend using Azure Native.
Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi
azure.servicebus.getNamespaceDisasterRecoveryConfig
Explore with Pulumi AI
Use this data source to access information about an existing Service Bus Disaster Recovery Config.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.servicebus.getNamespaceDisasterRecoveryConfig({
    name: "existing",
    namespaceId: "example-namespace-id",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.servicebus.get_namespace_disaster_recovery_config(name="existing",
    namespace_id="example-namespace-id")
pulumi.export("id", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/servicebus"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := servicebus.LookupNamespaceDisasterRecoveryConfig(ctx, &servicebus.LookupNamespaceDisasterRecoveryConfigArgs{
			Name:        "existing",
			NamespaceId: pulumi.StringRef("example-namespace-id"),
		}, 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.ServiceBus.GetNamespaceDisasterRecoveryConfig.Invoke(new()
    {
        Name = "existing",
        NamespaceId = "example-namespace-id",
    });
    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getNamespaceDisasterRecoveryConfigResult => getNamespaceDisasterRecoveryConfigResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.servicebus.ServicebusFunctions;
import com.pulumi.azure.servicebus.inputs.GetNamespaceDisasterRecoveryConfigArgs;
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 = ServicebusFunctions.getNamespaceDisasterRecoveryConfig(GetNamespaceDisasterRecoveryConfigArgs.builder()
            .name("existing")
            .namespaceId("example-namespace-id")
            .build());
        ctx.export("id", example.applyValue(getNamespaceDisasterRecoveryConfigResult -> getNamespaceDisasterRecoveryConfigResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:servicebus:getNamespaceDisasterRecoveryConfig
      arguments:
        name: existing
        namespaceId: example-namespace-id
outputs:
  id: ${example.id}
Using getNamespaceDisasterRecoveryConfig
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 getNamespaceDisasterRecoveryConfig(args: GetNamespaceDisasterRecoveryConfigArgs, opts?: InvokeOptions): Promise<GetNamespaceDisasterRecoveryConfigResult>
function getNamespaceDisasterRecoveryConfigOutput(args: GetNamespaceDisasterRecoveryConfigOutputArgs, opts?: InvokeOptions): Output<GetNamespaceDisasterRecoveryConfigResult>def get_namespace_disaster_recovery_config(alias_authorization_rule_id: Optional[str] = None,
                                           name: Optional[str] = None,
                                           namespace_id: Optional[str] = None,
                                           namespace_name: Optional[str] = None,
                                           resource_group_name: Optional[str] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetNamespaceDisasterRecoveryConfigResult
def get_namespace_disaster_recovery_config_output(alias_authorization_rule_id: Optional[pulumi.Input[str]] = None,
                                           name: Optional[pulumi.Input[str]] = None,
                                           namespace_id: Optional[pulumi.Input[str]] = None,
                                           namespace_name: Optional[pulumi.Input[str]] = None,
                                           resource_group_name: Optional[pulumi.Input[str]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceDisasterRecoveryConfigResult]func LookupNamespaceDisasterRecoveryConfig(ctx *Context, args *LookupNamespaceDisasterRecoveryConfigArgs, opts ...InvokeOption) (*LookupNamespaceDisasterRecoveryConfigResult, error)
func LookupNamespaceDisasterRecoveryConfigOutput(ctx *Context, args *LookupNamespaceDisasterRecoveryConfigOutputArgs, opts ...InvokeOption) LookupNamespaceDisasterRecoveryConfigResultOutput> Note: This function is named LookupNamespaceDisasterRecoveryConfig in the Go SDK.
public static class GetNamespaceDisasterRecoveryConfig 
{
    public static Task<GetNamespaceDisasterRecoveryConfigResult> InvokeAsync(GetNamespaceDisasterRecoveryConfigArgs args, InvokeOptions? opts = null)
    public static Output<GetNamespaceDisasterRecoveryConfigResult> Invoke(GetNamespaceDisasterRecoveryConfigInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNamespaceDisasterRecoveryConfigResult> getNamespaceDisasterRecoveryConfig(GetNamespaceDisasterRecoveryConfigArgs args, InvokeOptions options)
public static Output<GetNamespaceDisasterRecoveryConfigResult> getNamespaceDisasterRecoveryConfig(GetNamespaceDisasterRecoveryConfigArgs args, InvokeOptions options)
fn::invoke:
  function: azure:servicebus/getNamespaceDisasterRecoveryConfig:getNamespaceDisasterRecoveryConfig
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
 - The name of this Service Bus Disaster Recovery Config.
 - string
 - The Shared access policies used to access the connection string for the alias.
 - Namespace
Id string - The ID of the Service Bus Namespace.
 - Namespace
Name string - Resource
Group stringName  
- Name string
 - The name of this Service Bus Disaster Recovery Config.
 - string
 - The Shared access policies used to access the connection string for the alias.
 - Namespace
Id string - The ID of the Service Bus Namespace.
 - Namespace
Name string - Resource
Group stringName  
- name String
 - The name of this Service Bus Disaster Recovery Config.
 - String
 - The Shared access policies used to access the connection string for the alias.
 - namespace
Id String - The ID of the Service Bus Namespace.
 - namespace
Name String - resource
Group StringName  
- name string
 - The name of this Service Bus Disaster Recovery Config.
 - string
 - The Shared access policies used to access the connection string for the alias.
 - namespace
Id string - The ID of the Service Bus Namespace.
 - namespace
Name string - resource
Group stringName  
- name str
 - The name of this Service Bus Disaster Recovery Config.
 - str
 - The Shared access policies used to access the connection string for the alias.
 - namespace_
id str - The ID of the Service Bus Namespace.
 - namespace_
name str - resource_
group_ strname  
- name String
 - The name of this Service Bus Disaster Recovery Config.
 - String
 - The Shared access policies used to access the connection string for the alias.
 - namespace
Id String - The ID of the Service Bus Namespace.
 - namespace
Name String - resource
Group StringName  
getNamespaceDisasterRecoveryConfig Result
The following output properties are available:
- Default
Primary stringKey  - The primary access key for the authorization rule 
RootManageSharedAccessKey. - Default
Secondary stringKey  - The secondary access key for the authorization rule 
RootManageSharedAccessKey. - Id string
 - The provider-assigned unique ID for this managed resource.
 - Name string
 - Namespace
Id string - Namespace
Name string - Partner
Namespace stringId  - The ID of the Service Bus Namespace to replicate to.
 - Primary
Connection stringString Alias  - The alias Primary Connection String for the ServiceBus Namespace.
 - Resource
Group stringName  - Secondary
Connection stringString Alias  - The alias Secondary Connection String for the ServiceBus Namespace
 - string
 
- Default
Primary stringKey  - The primary access key for the authorization rule 
RootManageSharedAccessKey. - Default
Secondary stringKey  - The secondary access key for the authorization rule 
RootManageSharedAccessKey. - Id string
 - The provider-assigned unique ID for this managed resource.
 - Name string
 - Namespace
Id string - Namespace
Name string - Partner
Namespace stringId  - The ID of the Service Bus Namespace to replicate to.
 - Primary
Connection stringString Alias  - The alias Primary Connection String for the ServiceBus Namespace.
 - Resource
Group stringName  - Secondary
Connection stringString Alias  - The alias Secondary Connection String for the ServiceBus Namespace
 - string
 
- default
Primary StringKey  - The primary access key for the authorization rule 
RootManageSharedAccessKey. - default
Secondary StringKey  - The secondary access key for the authorization rule 
RootManageSharedAccessKey. - id String
 - The provider-assigned unique ID for this managed resource.
 - name String
 - namespace
Id String - namespace
Name String - partner
Namespace StringId  - The ID of the Service Bus Namespace to replicate to.
 - primary
Connection StringString Alias  - The alias Primary Connection String for the ServiceBus Namespace.
 - resource
Group StringName  - secondary
Connection StringString Alias  - The alias Secondary Connection String for the ServiceBus Namespace
 - String
 
- default
Primary stringKey  - The primary access key for the authorization rule 
RootManageSharedAccessKey. - default
Secondary stringKey  - The secondary access key for the authorization rule 
RootManageSharedAccessKey. - id string
 - The provider-assigned unique ID for this managed resource.
 - name string
 - namespace
Id string - namespace
Name string - partner
Namespace stringId  - The ID of the Service Bus Namespace to replicate to.
 - primary
Connection stringString Alias  - The alias Primary Connection String for the ServiceBus Namespace.
 - resource
Group stringName  - secondary
Connection stringString Alias  - The alias Secondary Connection String for the ServiceBus Namespace
 - string
 
- default_
primary_ strkey  - The primary access key for the authorization rule 
RootManageSharedAccessKey. - default_
secondary_ strkey  - The secondary access key for the authorization rule 
RootManageSharedAccessKey. - id str
 - The provider-assigned unique ID for this managed resource.
 - name str
 - namespace_
id str - namespace_
name str - partner_
namespace_ strid  - The ID of the Service Bus Namespace to replicate to.
 - primary_
connection_ strstring_ alias  - The alias Primary Connection String for the ServiceBus Namespace.
 - resource_
group_ strname  - secondary_
connection_ strstring_ alias  - The alias Secondary Connection String for the ServiceBus Namespace
 - str
 
- default
Primary StringKey  - The primary access key for the authorization rule 
RootManageSharedAccessKey. - default
Secondary StringKey  - The secondary access key for the authorization rule 
RootManageSharedAccessKey. - id String
 - The provider-assigned unique ID for this managed resource.
 - name String
 - namespace
Id String - namespace
Name String - partner
Namespace StringId  - The ID of the Service Bus Namespace to replicate to.
 - primary
Connection StringString Alias  - The alias Primary Connection String for the ServiceBus Namespace.
 - resource
Group StringName  - secondary
Connection StringString Alias  - The alias Secondary Connection String for the ServiceBus Namespace
 - String
 
Package Details
- Repository
 - Azure Classic pulumi/pulumi-azure
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
azurermTerraform Provider.