We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.eventhub.getAuthorizationRule
Explore with Pulumi AI
Use this data source to access information about an existing Event Hubs Authorization Rule within an Event Hub.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const test = azure.eventhub.getAuthorizationRule({
name: "test",
namespaceName: testAzurermEventhubNamespace.name,
eventhubName: testAzurermEventhub.name,
resourceGroupName: testAzurermResourceGroup.name,
});
import pulumi
import pulumi_azure as azure
test = azure.eventhub.get_authorization_rule(name="test",
namespace_name=test_azurerm_eventhub_namespace["name"],
eventhub_name=test_azurerm_eventhub["name"],
resource_group_name=test_azurerm_resource_group["name"])
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := eventhub.LookupAuthorizationRule(ctx, &eventhub.LookupAuthorizationRuleArgs{
Name: "test",
NamespaceName: testAzurermEventhubNamespace.Name,
EventhubName: testAzurermEventhub.Name,
ResourceGroupName: testAzurermResourceGroup.Name,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var test = Azure.EventHub.GetAuthorizationRule.Invoke(new()
{
Name = "test",
NamespaceName = testAzurermEventhubNamespace.Name,
EventhubName = testAzurermEventhub.Name,
ResourceGroupName = testAzurermResourceGroup.Name,
});
});
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.GetAuthorizationRuleArgs;
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 test = EventhubFunctions.getAuthorizationRule(GetAuthorizationRuleArgs.builder()
.name("test")
.namespaceName(testAzurermEventhubNamespace.name())
.eventhubName(testAzurermEventhub.name())
.resourceGroupName(testAzurermResourceGroup.name())
.build());
}
}
variables:
test:
fn::invoke:
Function: azure:eventhub:getAuthorizationRule
Arguments:
name: test
namespaceName: ${testAzurermEventhubNamespace.name}
eventhubName: ${testAzurermEventhub.name}
resourceGroupName: ${testAzurermResourceGroup.name}
Using getAuthorizationRule
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 getAuthorizationRule(args: GetAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetAuthorizationRuleResult>
function getAuthorizationRuleOutput(args: GetAuthorizationRuleOutputArgs, opts?: InvokeOptions): Output<GetAuthorizationRuleResult>
def get_authorization_rule(eventhub_name: Optional[str] = None,
listen: Optional[bool] = None,
manage: Optional[bool] = None,
name: Optional[str] = None,
namespace_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
send: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetAuthorizationRuleResult
def get_authorization_rule_output(eventhub_name: Optional[pulumi.Input[str]] = None,
listen: Optional[pulumi.Input[bool]] = None,
manage: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
namespace_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
send: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAuthorizationRuleResult]
func LookupAuthorizationRule(ctx *Context, args *LookupAuthorizationRuleArgs, opts ...InvokeOption) (*LookupAuthorizationRuleResult, error)
func LookupAuthorizationRuleOutput(ctx *Context, args *LookupAuthorizationRuleOutputArgs, opts ...InvokeOption) LookupAuthorizationRuleResultOutput
> Note: This function is named LookupAuthorizationRule
in the Go SDK.
public static class GetAuthorizationRule
{
public static Task<GetAuthorizationRuleResult> InvokeAsync(GetAuthorizationRuleArgs args, InvokeOptions? opts = null)
public static Output<GetAuthorizationRuleResult> Invoke(GetAuthorizationRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAuthorizationRuleResult> getAuthorizationRule(GetAuthorizationRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:eventhub/getAuthorizationRule:getAuthorizationRule
arguments:
# arguments dictionary
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 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
- 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
getAuthorizationRule Result
The following output properties are available:
- Eventhub
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- 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.
- 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.
- 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 string - id string
- The provider-assigned unique ID for this managed resource.
- 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.
- 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
- eventhub
Name String - id String
- The provider-assigned unique ID for this managed resource.
- 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
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.