/
getTopicAuthorizationRule.go
206 lines (176 loc) · 9.35 KB
/
getTopicAuthorizationRule.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
// *** 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 servicebus
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about a ServiceBus Topic Authorization Rule within a ServiceBus Topic.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/servicebus"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := servicebus.LookupTopicAuthorizationRule(ctx, &servicebus.LookupTopicAuthorizationRuleArgs{
// Name: "example-tfex_name",
// ResourceGroupName: pulumi.StringRef("example-resources"),
// NamespaceName: pulumi.StringRef("example-namespace"),
// TopicName: pulumi.StringRef("example-servicebus_topic"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("servicebusAuthorizationRuleId", data.Azurem_servicebus_topic_authorization_rule.Example.Id)
// return nil
// })
// }
// ```
func LookupTopicAuthorizationRule(ctx *pulumi.Context, args *LookupTopicAuthorizationRuleArgs, opts ...pulumi.InvokeOption) (*LookupTopicAuthorizationRuleResult, error) {
var rv LookupTopicAuthorizationRuleResult
err := ctx.Invoke("azure:servicebus/getTopicAuthorizationRule:getTopicAuthorizationRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTopicAuthorizationRule.
type LookupTopicAuthorizationRuleArgs struct {
// The name of the ServiceBus Topic Authorization Rule resource.
Name string `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName *string `pulumi:"namespaceName"`
QueueName *string `pulumi:"queueName"`
// The name of the resource group in which the ServiceBus Namespace exists.
ResourceGroupName *string `pulumi:"resourceGroupName"`
TopicId *string `pulumi:"topicId"`
// The name of the ServiceBus Topic.
TopicName *string `pulumi:"topicName"`
}
// A collection of values returned by getTopicAuthorizationRule.
type LookupTopicAuthorizationRuleResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Listen bool `pulumi:"listen"`
Manage bool `pulumi:"manage"`
Name string `pulumi:"name"`
NamespaceName *string `pulumi:"namespaceName"`
// The Primary Connection String for the ServiceBus Topic authorization Rule.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Topic authorization Rule.
PrimaryKey string `pulumi:"primaryKey"`
QueueName *string `pulumi:"queueName"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Topic authorization Rule.
SecondaryKey string `pulumi:"secondaryKey"`
Send bool `pulumi:"send"`
TopicId *string `pulumi:"topicId"`
TopicName *string `pulumi:"topicName"`
}
func LookupTopicAuthorizationRuleOutput(ctx *pulumi.Context, args LookupTopicAuthorizationRuleOutputArgs, opts ...pulumi.InvokeOption) LookupTopicAuthorizationRuleResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupTopicAuthorizationRuleResult, error) {
args := v.(LookupTopicAuthorizationRuleArgs)
r, err := LookupTopicAuthorizationRule(ctx, &args, opts...)
return *r, err
}).(LookupTopicAuthorizationRuleResultOutput)
}
// A collection of arguments for invoking getTopicAuthorizationRule.
type LookupTopicAuthorizationRuleOutputArgs struct {
// The name of the ServiceBus Topic Authorization Rule resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
QueueName pulumi.StringPtrInput `pulumi:"queueName"`
// The name of the resource group in which the ServiceBus Namespace exists.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
TopicId pulumi.StringPtrInput `pulumi:"topicId"`
// The name of the ServiceBus Topic.
TopicName pulumi.StringPtrInput `pulumi:"topicName"`
}
func (LookupTopicAuthorizationRuleOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTopicAuthorizationRuleArgs)(nil)).Elem()
}
// A collection of values returned by getTopicAuthorizationRule.
type LookupTopicAuthorizationRuleResultOutput struct{ *pulumi.OutputState }
func (LookupTopicAuthorizationRuleResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTopicAuthorizationRuleResult)(nil)).Elem()
}
func (o LookupTopicAuthorizationRuleResultOutput) ToLookupTopicAuthorizationRuleResultOutput() LookupTopicAuthorizationRuleResultOutput {
return o
}
func (o LookupTopicAuthorizationRuleResultOutput) ToLookupTopicAuthorizationRuleResultOutputWithContext(ctx context.Context) LookupTopicAuthorizationRuleResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupTopicAuthorizationRuleResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) Listen() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) bool { return v.Listen }).(pulumi.BoolOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) Manage() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) bool { return v.Manage }).(pulumi.BoolOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) NamespaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.NamespaceName }).(pulumi.StringPtrOutput)
}
// The Primary Connection String for the ServiceBus Topic authorization Rule.
func (o LookupTopicAuthorizationRuleResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o LookupTopicAuthorizationRuleResultOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the ServiceBus Topic authorization Rule.
func (o LookupTopicAuthorizationRuleResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) QueueName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.QueueName }).(pulumi.StringPtrOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
func (o LookupTopicAuthorizationRuleResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o LookupTopicAuthorizationRuleResultOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the ServiceBus Topic authorization Rule.
func (o LookupTopicAuthorizationRuleResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) Send() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) bool { return v.Send }).(pulumi.BoolOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) TopicId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.TopicId }).(pulumi.StringPtrOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) TopicName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.TopicName }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTopicAuthorizationRuleResultOutput{})
}