We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 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.
- NamespaceId string
- The ID of the Service Bus Namespace.
- NamespaceName string
- ResourceGroup 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.
- NamespaceId string
- The ID of the Service Bus Namespace.
- NamespaceName string
- ResourceGroup 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.
- namespaceId String
- The ID of the Service Bus Namespace.
- namespaceName String
- resourceGroup 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.
- namespaceId string
- The ID of the Service Bus Namespace.
- namespaceName string
- resourceGroup 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.
- namespaceId String
- The ID of the Service Bus Namespace.
- namespaceName String
- resourceGroup StringName 
getNamespaceDisasterRecoveryConfig Result
The following output properties are available:
- DefaultPrimary stringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- DefaultSecondary stringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- NamespaceId string
- NamespaceName string
- PartnerNamespace stringId 
- The ID of the Service Bus Namespace to replicate to.
- PrimaryConnection stringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace.
- ResourceGroup stringName 
- SecondaryConnection stringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- string
- DefaultPrimary stringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- DefaultSecondary stringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- NamespaceId string
- NamespaceName string
- PartnerNamespace stringId 
- The ID of the Service Bus Namespace to replicate to.
- PrimaryConnection stringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace.
- ResourceGroup stringName 
- SecondaryConnection stringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- string
- defaultPrimary StringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- defaultSecondary StringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- namespaceId String
- namespaceName String
- partnerNamespace StringId 
- The ID of the Service Bus Namespace to replicate to.
- primaryConnection StringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace.
- resourceGroup StringName 
- secondaryConnection StringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- String
- defaultPrimary stringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- defaultSecondary stringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- namespaceId string
- namespaceName string
- partnerNamespace stringId 
- The ID of the Service Bus Namespace to replicate to.
- primaryConnection stringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace.
- resourceGroup stringName 
- secondaryConnection 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
- defaultPrimary StringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- defaultSecondary StringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- namespaceId String
- namespaceName String
- partnerNamespace StringId 
- The ID of the Service Bus Namespace to replicate to.
- primaryConnection StringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace.
- resourceGroup StringName 
- secondaryConnection 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.