We recommend using Azure Native.
Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi
azure.eventhub.getNamespaceAuthorizationRule
Explore with Pulumi AI
Use this data source to access information about an Authorization Rule for an Event Hub Namespace.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.eventhub.getNamespaceAuthorizationRule({
name: "navi",
resourceGroupName: "example-resources",
namespaceName: "example-ns",
});
export const eventhubAuthorizationRuleId = exampleAzuremEventhubNamespaceAuthorizationRule.id;
import pulumi
import pulumi_azure as azure
example = azure.eventhub.get_namespace_authorization_rule(name="navi",
resource_group_name="example-resources",
namespace_name="example-ns")
pulumi.export("eventhubAuthorizationRuleId", example_azurem_eventhub_namespace_authorization_rule["id"])
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := eventhub.LookupNamespaceAuthorizationRule(ctx, &eventhub.LookupNamespaceAuthorizationRuleArgs{
Name: "navi",
ResourceGroupName: "example-resources",
NamespaceName: "example-ns",
}, nil)
if err != nil {
return err
}
ctx.Export("eventhubAuthorizationRuleId", exampleAzuremEventhubNamespaceAuthorizationRule.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.EventHub.GetNamespaceAuthorizationRule.Invoke(new()
{
Name = "navi",
ResourceGroupName = "example-resources",
NamespaceName = "example-ns",
});
return new Dictionary<string, object?>
{
["eventhubAuthorizationRuleId"] = exampleAzuremEventhubNamespaceAuthorizationRule.Id,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.eventhub.EventhubFunctions;
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 = EventhubFunctions.getNamespaceAuthorizationRule(GetNamespaceAuthorizationRuleArgs.builder()
.name("navi")
.resourceGroupName("example-resources")
.namespaceName("example-ns")
.build());
ctx.export("eventhubAuthorizationRuleId", exampleAzuremEventhubNamespaceAuthorizationRule.id());
}
}
variables:
example:
fn::invoke:
Function: azure:eventhub:getNamespaceAuthorizationRule
Arguments:
name: navi
resourceGroupName: example-resources
namespaceName: example-ns
outputs:
eventhubAuthorizationRuleId: ${exampleAzuremEventhubNamespaceAuthorizationRule.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_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_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:eventhub/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the EventHub Authorization Rule resource.
- Namespace
Name string - Specifies the name of the EventHub Namespace.
- Resource
Group stringName - The name of the resource group in which the EventHub Namespace exists.
- Name string
- The name of the EventHub Authorization Rule resource.
- Namespace
Name string - Specifies the name of the EventHub Namespace.
- Resource
Group stringName - The name of the resource group in which the EventHub Namespace exists.
- name String
- The name of the EventHub Authorization Rule resource.
- namespace
Name String - Specifies the name of the EventHub Namespace.
- resource
Group StringName - The name of the resource group in which the EventHub Namespace exists.
- name string
- The name of the EventHub Authorization Rule resource.
- namespace
Name string - Specifies the name of the EventHub Namespace.
- resource
Group stringName - The name of the resource group in which the EventHub Namespace exists.
- name str
- The name of the EventHub Authorization Rule resource.
- namespace_
name str - Specifies the name of the EventHub Namespace.
- resource_
group_ strname - The name of the resource group in which the EventHub Namespace exists.
- name String
- The name of the EventHub Authorization Rule resource.
- namespace
Name String - Specifies the name of the EventHub Namespace.
- resource
Group StringName - The name of the resource group in which the EventHub Namespace exists.
getNamespaceAuthorizationRule Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Listen bool
- Does this Authorization Rule have permissions to Listen to the Event Hub?
- Manage bool
- Does this Authorization Rule have permissions to Manage to the Event Hub?
- Name string
- Namespace
Name string - Primary
Connection stringString - The Primary Connection String for the Event Hubs authorization Rule.
- Primary
Connection stringString Alias - The alias of the Primary Connection String for the Event Hubs authorization Rule.
- Primary
Key string - The Primary Key for the Event Hubs authorization Rule.
- Resource
Group stringName - Secondary
Connection stringString - The Secondary Connection String for the Event Hubs authorization Rule.
- Secondary
Connection stringString Alias - The alias of the Secondary Connection String for the Event Hubs authorization Rule.
- Secondary
Key string - The Secondary Key for the Event Hubs authorization Rule.
- Send bool
- Does this Authorization Rule have permissions to Send to the Event Hub?
- Id string
- The provider-assigned unique ID for this managed resource.
- Listen bool
- Does this Authorization Rule have permissions to Listen to the Event Hub?
- Manage bool
- Does this Authorization Rule have permissions to Manage to the Event Hub?
- Name string
- Namespace
Name string - Primary
Connection stringString - The Primary Connection String for the Event Hubs authorization Rule.
- Primary
Connection stringString Alias - The alias of the Primary Connection String for the Event Hubs authorization Rule.
- Primary
Key string - The Primary Key for the Event Hubs authorization Rule.
- Resource
Group stringName - Secondary
Connection stringString - The Secondary Connection String for the Event Hubs authorization Rule.
- Secondary
Connection stringString Alias - The alias of the Secondary Connection String for the Event Hubs authorization Rule.
- Secondary
Key string - The Secondary Key for the Event Hubs authorization Rule.
- Send bool
- Does this Authorization Rule have permissions to Send to the Event Hub?
- id String
- The provider-assigned unique ID for this managed resource.
- listen Boolean
- Does this Authorization Rule have permissions to Listen to the Event Hub?
- manage Boolean
- Does this Authorization Rule have permissions to Manage to the Event Hub?
- name String
- namespace
Name String - primary
Connection StringString - The Primary Connection String for the Event Hubs authorization Rule.
- primary
Connection StringString Alias - The alias of the Primary Connection String for the Event Hubs authorization Rule.
- primary
Key String - The Primary Key for the Event Hubs authorization Rule.
- resource
Group StringName - secondary
Connection StringString - The Secondary Connection String for the Event Hubs authorization Rule.
- secondary
Connection StringString Alias - The alias of the Secondary Connection String for the Event Hubs authorization Rule.
- secondary
Key String - The Secondary Key for the Event Hubs authorization Rule.
- send Boolean
- Does this Authorization Rule have permissions to Send to the Event Hub?
- id string
- The provider-assigned unique ID for this managed resource.
- listen boolean
- Does this Authorization Rule have permissions to Listen to the Event Hub?
- manage boolean
- Does this Authorization Rule have permissions to Manage to the Event Hub?
- name string
- namespace
Name string - primary
Connection stringString - The Primary Connection String for the Event Hubs authorization Rule.
- primary
Connection stringString Alias - The alias of the Primary Connection String for the Event Hubs authorization Rule.
- primary
Key string - The Primary Key for the Event Hubs authorization Rule.
- resource
Group stringName - secondary
Connection stringString - The Secondary Connection String for the Event Hubs authorization Rule.
- secondary
Connection stringString Alias - The alias of the Secondary Connection String for the Event Hubs authorization Rule.
- secondary
Key string - The Secondary Key for the Event Hubs authorization Rule.
- send boolean
- Does this Authorization Rule have permissions to Send to the Event Hub?
- id str
- The provider-assigned unique ID for this managed resource.
- listen bool
- Does this Authorization Rule have permissions to Listen to the Event Hub?
- manage bool
- Does this Authorization Rule have permissions to Manage to the Event Hub?
- name str
- namespace_
name str - primary_
connection_ strstring - The Primary Connection String for the Event Hubs authorization Rule.
- primary_
connection_ strstring_ alias - The alias of the Primary Connection String for the Event Hubs authorization Rule.
- primary_
key str - The Primary Key for the Event Hubs authorization Rule.
- resource_
group_ strname - secondary_
connection_ strstring - The Secondary Connection String for the Event Hubs authorization Rule.
- secondary_
connection_ strstring_ alias - The alias of the Secondary Connection String for the Event Hubs authorization Rule.
- secondary_
key str - The Secondary Key for the Event Hubs authorization Rule.
- send bool
- Does this Authorization Rule have permissions to Send to the Event Hub?
- id String
- The provider-assigned unique ID for this managed resource.
- listen Boolean
- Does this Authorization Rule have permissions to Listen to the Event Hub?
- manage Boolean
- Does this Authorization Rule have permissions to Manage to the Event Hub?
- name String
- namespace
Name String - primary
Connection StringString - The Primary Connection String for the Event Hubs authorization Rule.
- primary
Connection StringString Alias - The alias of the Primary Connection String for the Event Hubs authorization Rule.
- primary
Key String - The Primary Key for the Event Hubs authorization Rule.
- resource
Group StringName - secondary
Connection StringString - The Secondary Connection String for the Event Hubs authorization Rule.
- secondary
Connection StringString Alias - The alias of the Secondary Connection String for the Event Hubs authorization Rule.
- secondary
Key String - The Secondary Key for the Event Hubs authorization Rule.
- send Boolean
- Does this Authorization Rule have permissions to Send to the Event Hub?
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.