/
getNamespaceAuthorizationRule.go
81 lines (76 loc) · 3.31 KB
/
getNamespaceAuthorizationRule.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to access information about an Authorization Rule for an Event Hub Namespace.
//
// ## Example Usage
//
// ```go
// 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.LookupNamespaceAuthorizationRule(ctx, &eventhub.LookupNamespaceAuthorizationRuleArgs{
// Name: "navi",
// ResourceGroupName: "example-resources",
// NamespaceName: "example-ns",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventhubAuthorizationRuleId", data.Azurem_eventhub_namespace_authorization_rule.Example.Id)
// return nil
// })
// }
// ```
func LookupNamespaceAuthorizationRule(ctx *pulumi.Context, args *LookupNamespaceAuthorizationRuleArgs, opts ...pulumi.InvokeOption) (*LookupNamespaceAuthorizationRuleResult, error) {
var rv LookupNamespaceAuthorizationRuleResult
err := ctx.Invoke("azure:eventhub/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleArgs struct {
// The name of the EventHub Authorization Rule resource.
Name string `pulumi:"name"`
// Specifies the name of the EventHub Namespace.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Does this Authorization Rule have permissions to Listen to the Event Hub?
Listen bool `pulumi:"listen"`
// Does this Authorization Rule have permissions to Manage to the Event Hub?
Manage bool `pulumi:"manage"`
Name string `pulumi:"name"`
NamespaceName string `pulumi:"namespaceName"`
// The Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionStringAlias string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Event Hubs authorization Rule.
PrimaryKey string `pulumi:"primaryKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Event Hubs authorization Rule.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Event Hubs authorization Rule.
SecondaryConnectionStringAlias string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Event Hubs authorization Rule.
SecondaryKey string `pulumi:"secondaryKey"`
// Does this Authorization Rule have permissions to Send to the Event Hub?
Send bool `pulumi:"send"`
}