Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.14.0 published on Thursday, Jul 28, 2022 by Pulumi

getNamespaceAuthorizationRule

Use this data source to access information about an existing ServiceBus Namespace Authorization Rule.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.ServiceBus.GetNamespaceAuthorizationRule.InvokeAsync(new Azure.ServiceBus.GetNamespaceAuthorizationRuleArgs
        {
            Name = "examplerule",
            NamespaceName = "examplenamespace",
            ResourceGroupName = "example-resources",
        }));
        this.RuleId = example.Apply(example => example.Id);
    }

    [Output("ruleId")]
    public Output<string> RuleId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/servicebus"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := servicebus.LookupNamespaceAuthorizationRule(ctx, &servicebus.LookupNamespaceAuthorizationRuleArgs{
			Name:              "examplerule",
			NamespaceName:     pulumi.StringRef("examplenamespace"),
			ResourceGroupName: pulumi.StringRef("example-resources"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ruleId", example.Id)
		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.eventhub.inputs.GetNamespaceAuthorizationRuleArgs;
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.getNamespaceAuthorizationRule(GetNamespaceAuthorizationRuleArgs.builder()
            .name("examplerule")
            .namespaceName("examplenamespace")
            .resourceGroupName("example-resources")
            .build());

        ctx.export("ruleId", example.applyValue(getNamespaceAuthorizationRuleResult -> getNamespaceAuthorizationRuleResult.id()));
    }
}
import pulumi
import pulumi_azure as azure

example = azure.servicebus.get_namespace_authorization_rule(name="examplerule",
    namespace_name="examplenamespace",
    resource_group_name="example-resources")
pulumi.export("ruleId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.servicebus.getNamespaceAuthorizationRule({
    name: "examplerule",
    namespaceName: "examplenamespace",
    resourceGroupName: "example-resources",
});
export const ruleId = example.then(example => example.id);
variables:
  example:
    Fn::Invoke:
      Function: azure:servicebus:getNamespaceAuthorizationRule
      Arguments:
        name: examplerule
        namespaceName: examplenamespace
        resourceGroupName: example-resources
outputs:
  ruleId: ${example.id}

Using getNamespaceAuthorizationRule

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 getNamespaceAuthorizationRule(args: GetNamespaceAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetNamespaceAuthorizationRuleResult>
function getNamespaceAuthorizationRuleOutput(args: GetNamespaceAuthorizationRuleOutputArgs, opts?: InvokeOptions): Output<GetNamespaceAuthorizationRuleResult>
def get_namespace_authorization_rule(name: Optional[str] = None,
                                     namespace_id: Optional[str] = None,
                                     namespace_name: Optional[str] = None,
                                     resource_group_name: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetNamespaceAuthorizationRuleResult
def get_namespace_authorization_rule_output(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[GetNamespaceAuthorizationRuleResult]
func LookupNamespaceAuthorizationRule(ctx *Context, args *LookupNamespaceAuthorizationRuleArgs, opts ...InvokeOption) (*LookupNamespaceAuthorizationRuleResult, error)
func LookupNamespaceAuthorizationRuleOutput(ctx *Context, args *LookupNamespaceAuthorizationRuleOutputArgs, opts ...InvokeOption) LookupNamespaceAuthorizationRuleResultOutput

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

public static class GetNamespaceAuthorizationRule 
{
    public static Task<GetNamespaceAuthorizationRuleResult> InvokeAsync(GetNamespaceAuthorizationRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetNamespaceAuthorizationRuleResult> Invoke(GetNamespaceAuthorizationRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNamespaceAuthorizationRuleResult> getNamespaceAuthorizationRule(GetNamespaceAuthorizationRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure:servicebus/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

Specifies the name of the ServiceBus Namespace Authorization Rule.

NamespaceId string
NamespaceName string

Specifies the name of the ServiceBus Namespace.

ResourceGroupName string

Specifies the name of the Resource Group where the ServiceBus Namespace exists.

Name string

Specifies the name of the ServiceBus Namespace Authorization Rule.

NamespaceId string
NamespaceName string

Specifies the name of the ServiceBus Namespace.

ResourceGroupName string

Specifies the name of the Resource Group where the ServiceBus Namespace exists.

name String

Specifies the name of the ServiceBus Namespace Authorization Rule.

namespaceId String
namespaceName String

Specifies the name of the ServiceBus Namespace.

resourceGroupName String

Specifies the name of the Resource Group where the ServiceBus Namespace exists.

name string

Specifies the name of the ServiceBus Namespace Authorization Rule.

namespaceId string
namespaceName string

Specifies the name of the ServiceBus Namespace.

resourceGroupName string

Specifies the name of the Resource Group where the ServiceBus Namespace exists.

name str

Specifies the name of the ServiceBus Namespace Authorization Rule.

namespace_id str
namespace_name str

Specifies the name of the ServiceBus Namespace.

resource_group_name str

Specifies the name of the Resource Group where the ServiceBus Namespace exists.

name String

Specifies the name of the ServiceBus Namespace Authorization Rule.

namespaceId String
namespaceName String

Specifies the name of the ServiceBus Namespace.

resourceGroupName String

Specifies the name of the Resource Group where the ServiceBus Namespace exists.

getNamespaceAuthorizationRule Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
PrimaryConnectionString string

The primary connection string for the authorization rule.

PrimaryConnectionStringAlias string

The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.

PrimaryKey string

The primary access key for the authorization rule.

SecondaryConnectionString string

The secondary connection string for the authorization rule.

SecondaryConnectionStringAlias string

The alias Secondary Connection String for the ServiceBus Namespace

SecondaryKey string

The secondary access key for the authorization rule.

NamespaceId string
NamespaceName string
ResourceGroupName string
Id string

The provider-assigned unique ID for this managed resource.

Name string
PrimaryConnectionString string

The primary connection string for the authorization rule.

PrimaryConnectionStringAlias string

The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.

PrimaryKey string

The primary access key for the authorization rule.

SecondaryConnectionString string

The secondary connection string for the authorization rule.

SecondaryConnectionStringAlias string

The alias Secondary Connection String for the ServiceBus Namespace

SecondaryKey string

The secondary access key for the authorization rule.

NamespaceId string
NamespaceName string
ResourceGroupName string
id String

The provider-assigned unique ID for this managed resource.

name String
primaryConnectionString String

The primary connection string for the authorization rule.

primaryConnectionStringAlias String

The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.

primaryKey String

The primary access key for the authorization rule.

secondaryConnectionString String

The secondary connection string for the authorization rule.

secondaryConnectionStringAlias String

The alias Secondary Connection String for the ServiceBus Namespace

secondaryKey String

The secondary access key for the authorization rule.

namespaceId String
namespaceName String
resourceGroupName String
id string

The provider-assigned unique ID for this managed resource.

name string
primaryConnectionString string

The primary connection string for the authorization rule.

primaryConnectionStringAlias string

The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.

primaryKey string

The primary access key for the authorization rule.

secondaryConnectionString string

The secondary connection string for the authorization rule.

secondaryConnectionStringAlias string

The alias Secondary Connection String for the ServiceBus Namespace

secondaryKey string

The secondary access key for the authorization rule.

namespaceId string
namespaceName string
resourceGroupName string
id str

The provider-assigned unique ID for this managed resource.

name str
primary_connection_string str

The primary connection string for the authorization rule.

primary_connection_string_alias str

The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.

primary_key str

The primary access key for the authorization rule.

secondary_connection_string str

The secondary connection string for the authorization rule.

secondary_connection_string_alias str

The alias Secondary Connection String for the ServiceBus Namespace

secondary_key str

The secondary access key for the authorization rule.

namespace_id str
namespace_name str
resource_group_name str
id String

The provider-assigned unique ID for this managed resource.

name String
primaryConnectionString String

The primary connection string for the authorization rule.

primaryConnectionStringAlias String

The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.

primaryKey String

The primary access key for the authorization rule.

secondaryConnectionString String

The secondary connection string for the authorization rule.

secondaryConnectionStringAlias String

The alias Secondary Connection String for the ServiceBus Namespace

secondaryKey String

The secondary access key for the authorization rule.

namespaceId String
namespaceName String
resourceGroupName String

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.