/
getQueueAuthorizationRule.go
199 lines (170 loc) · 8.95 KB
/
getQueueAuthorizationRule.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
// *** 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 an existing ServiceBus Queue Authorisation Rule within a ServiceBus Queue.
//
// ## 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 {
// example, err := servicebus.LookupQueueAuthorizationRule(ctx, &servicebus.LookupQueueAuthorizationRuleArgs{
// Name: "example-tfex_name",
// ResourceGroupName: pulumi.StringRef("example-resources"),
// QueueName: pulumi.StringRef("example-servicebus_queue"),
// NamespaceName: pulumi.StringRef("example-namespace"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
// ```
func LookupQueueAuthorizationRule(ctx *pulumi.Context, args *LookupQueueAuthorizationRuleArgs, opts ...pulumi.InvokeOption) (*LookupQueueAuthorizationRuleResult, error) {
var rv LookupQueueAuthorizationRuleResult
err := ctx.Invoke("azure:servicebus/getQueueAuthorizationRule:getQueueAuthorizationRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getQueueAuthorizationRule.
type LookupQueueAuthorizationRuleArgs struct {
// The name of this ServiceBus Queue Authorisation Rule.
Name string `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName *string `pulumi:"namespaceName"`
QueueId *string `pulumi:"queueId"`
// The name of the ServiceBus Queue.
QueueName *string `pulumi:"queueName"`
// The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getQueueAuthorizationRule.
type LookupQueueAuthorizationRuleResult 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 Queue 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 Queue authorization Rule.
PrimaryKey string `pulumi:"primaryKey"`
QueueId *string `pulumi:"queueId"`
QueueName *string `pulumi:"queueName"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the ServiceBus Queue 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 Queue authorization Rule.
SecondaryKey string `pulumi:"secondaryKey"`
Send bool `pulumi:"send"`
}
func LookupQueueAuthorizationRuleOutput(ctx *pulumi.Context, args LookupQueueAuthorizationRuleOutputArgs, opts ...pulumi.InvokeOption) LookupQueueAuthorizationRuleResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupQueueAuthorizationRuleResult, error) {
args := v.(LookupQueueAuthorizationRuleArgs)
r, err := LookupQueueAuthorizationRule(ctx, &args, opts...)
return *r, err
}).(LookupQueueAuthorizationRuleResultOutput)
}
// A collection of arguments for invoking getQueueAuthorizationRule.
type LookupQueueAuthorizationRuleOutputArgs struct {
// The name of this ServiceBus Queue Authorisation Rule.
Name pulumi.StringInput `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
QueueId pulumi.StringPtrInput `pulumi:"queueId"`
// The name of the ServiceBus Queue.
QueueName pulumi.StringPtrInput `pulumi:"queueName"`
// The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
}
func (LookupQueueAuthorizationRuleOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupQueueAuthorizationRuleArgs)(nil)).Elem()
}
// A collection of values returned by getQueueAuthorizationRule.
type LookupQueueAuthorizationRuleResultOutput struct{ *pulumi.OutputState }
func (LookupQueueAuthorizationRuleResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupQueueAuthorizationRuleResult)(nil)).Elem()
}
func (o LookupQueueAuthorizationRuleResultOutput) ToLookupQueueAuthorizationRuleResultOutput() LookupQueueAuthorizationRuleResultOutput {
return o
}
func (o LookupQueueAuthorizationRuleResultOutput) ToLookupQueueAuthorizationRuleResultOutputWithContext(ctx context.Context) LookupQueueAuthorizationRuleResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupQueueAuthorizationRuleResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) Listen() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) bool { return v.Listen }).(pulumi.BoolOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) Manage() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) bool { return v.Manage }).(pulumi.BoolOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) NamespaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) *string { return v.NamespaceName }).(pulumi.StringPtrOutput)
}
// The Primary Connection String for the ServiceBus Queue authorization Rule.
func (o LookupQueueAuthorizationRuleResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o LookupQueueAuthorizationRuleResultOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the ServiceBus Queue authorization Rule.
func (o LookupQueueAuthorizationRuleResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) QueueId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) *string { return v.QueueId }).(pulumi.StringPtrOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) QueueName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) *string { return v.QueueName }).(pulumi.StringPtrOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
// The Secondary Connection String for the ServiceBus Queue authorization Rule.
func (o LookupQueueAuthorizationRuleResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o LookupQueueAuthorizationRuleResultOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the ServiceBus Queue authorization Rule.
func (o LookupQueueAuthorizationRuleResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) Send() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) bool { return v.Send }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupQueueAuthorizationRuleResultOutput{})
}