GetAuthorizationRule
Use this data source to access information about an existing Event Hubs Authorization Rule within an Event Hub.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var test = Output.Create(Azure.EventHub.GetAuthorizationRule.InvokeAsync(new Azure.EventHub.GetAuthorizationRuleArgs
{
EventhubName = azurerm_eventhub.Test.Name,
Name = "test",
NamespaceName = azurerm_eventhub_namespace.Test.Name,
ResourceGroupName = azurerm_resource_group.Test.Name,
}));
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/eventhub"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := eventhub.LookupAuthorizationRule(ctx, &eventhub.LookupAuthorizationRuleArgs{
EventhubName: azurerm_eventhub.Test.Name,
Name: "test",
NamespaceName: azurerm_eventhub_namespace.Test.Name,
ResourceGroupName: azurerm_resource_group.Test.Name,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
test = azure.eventhub.get_authorization_rule(eventhub_name=azurerm_eventhub["test"]["name"],
name="test",
namespace_name=azurerm_eventhub_namespace["test"]["name"],
resource_group_name=azurerm_resource_group["test"]["name"])import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const test = pulumi.all([azurerm_eventhub_test.name, azurerm_eventhub_namespace_test.name, azurerm_resource_group_test.name]).apply(([azurerm_eventhub_testName, azurerm_eventhub_namespace_testName, azurerm_resource_group_testName]) => azure.eventhub.getAuthorizationRule({
eventhubName: azurerm_eventhub_testName,
name: "test",
namespaceName: azurerm_eventhub_namespace_testName,
resourceGroupName: azurerm_resource_group_testName,
}, { async: true }));Using GetAuthorizationRule
function getAuthorizationRule(args: GetAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetAuthorizationRuleResult>function get_authorization_rule(eventhub_name=None, listen=None, manage=None, name=None, namespace_name=None, resource_group_name=None, send=None, opts=None)func LookupAuthorizationRule(ctx *Context, args *LookupAuthorizationRuleArgs, opts ...InvokeOption) (*LookupAuthorizationRuleResult, error)Note: This function is named
LookupAuthorizationRulein the Go SDK.
public static class GetAuthorizationRule {
public static Task<GetAuthorizationRuleResult> InvokeAsync(GetAuthorizationRuleArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Eventhub
Name string Specifies the name of the EventHub.
- Name string
Specifies the name of the EventHub Authorization Rule resource. be created.
- Namespace
Name string Specifies the name of the grandparent EventHub Namespace.
- Resource
Group stringName The name of the resource group in which the EventHub Authorization Rule’s grandparent Namespace exists.
- Listen bool
- Manage bool
- Send bool
- Eventhub
Name string Specifies the name of the EventHub.
- Name string
Specifies the name of the EventHub Authorization Rule resource. be created.
- Namespace
Name string Specifies the name of the grandparent EventHub Namespace.
- Resource
Group stringName The name of the resource group in which the EventHub Authorization Rule’s grandparent Namespace exists.
- Listen bool
- Manage bool
- Send bool
- eventhub
Name string Specifies the name of the EventHub.
- name string
Specifies the name of the EventHub Authorization Rule resource. be created.
- namespace
Name string Specifies the name of the grandparent EventHub Namespace.
- resource
Group stringName The name of the resource group in which the EventHub Authorization Rule’s grandparent Namespace exists.
- listen boolean
- manage boolean
- send boolean
- eventhub_
name str Specifies the name of the EventHub.
- name str
Specifies the name of the EventHub Authorization Rule resource. be created.
- namespace_
name str Specifies the name of the grandparent EventHub Namespace.
- resource_
group_ strname The name of the resource group in which the EventHub Authorization Rule’s grandparent Namespace exists.
- listen bool
- manage bool
- send bool
GetAuthorizationRule Result
The following output properties are available:
- Eventhub
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Location string
- 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.
- Listen bool
- Manage bool
- Send bool
- Eventhub
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Location string
- 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.
- Listen bool
- Manage bool
- Send bool
- eventhub
Name string - id string
The provider-assigned unique ID for this managed resource.
- location string
- 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.
- listen boolean
- manage boolean
- send boolean
- eventhub_
name str - id str
The provider-assigned unique ID for this managed resource.
- location str
- 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.
- listen bool
- manage bool
- send bool
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.