get Service Bus Namespace
Deprecated
azure.eventhub.getServiceBusNamespace has been deprecated in favor of azure.servicebus.getNamespace
Use this data source to access information about an existing ServiceBus Namespace.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.servicebus.getNamespace({
name: "examplenamespace",
resourceGroupName: "example-resources",
});
export const location = example.then(example => example.location);
import pulumi
import pulumi_azure as azure
example = azure.servicebus.get_namespace(name="examplenamespace",
resource_group_name="example-resources")
pulumi.export("location", example.location)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ServiceBus.GetNamespace.Invoke(new()
{
Name = "examplenamespace",
ResourceGroupName = "example-resources",
});
return new Dictionary<string, object?>
{
["location"] = example.Apply(getNamespaceResult => getNamespaceResult.Location),
};
});
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.LookupNamespace(ctx, &servicebus.LookupNamespaceArgs{
Name: "examplenamespace",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
ctx.Export("location", example.Location)
return nil
})
}
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.GetNamespaceArgs;
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.getNamespace(GetNamespaceArgs.builder()
.name("examplenamespace")
.resourceGroupName("example-resources")
.build());
ctx.export("location", example.applyValue(getNamespaceResult -> getNamespaceResult.location()));
}
}
variables:
example:
fn::invoke:
function: azure:servicebus:getNamespace
arguments:
name: examplenamespace
resourceGroupName: example-resources
outputs:
location: ${example.location}
Return
A collection of values returned by getServiceBusNamespace.
Parameters
A collection of arguments for invoking getServiceBusNamespace.
Deprecated
azure.eventhub.getServiceBusNamespace has been deprecated in favor of azure.servicebus.getNamespace
Return
A collection of values returned by getServiceBusNamespace.
Parameters
Specifies the name of the ServiceBus Namespace.
Specifies the name of the Resource Group where the ServiceBus Namespace exists.
See also
Deprecated
azure.eventhub.getServiceBusNamespace has been deprecated in favor of azure.servicebus.getNamespace
Return
A collection of values returned by getServiceBusNamespace.
Parameters
Builder for com.pulumi.azure.eventhub.kotlin.inputs.GetServiceBusNamespacePlainArgs.