forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
listTopicSharedAccessKeys.go
94 lines (78 loc) · 3.34 KB
/
listTopicSharedAccessKeys.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// List the two keys used to publish to a topic.
// Azure REST API version: 2022-06-15.
//
// Other available API versions: 2020-04-01-preview, 2023-06-01-preview, 2023-12-15-preview, 2024-06-01-preview.
func ListTopicSharedAccessKeys(ctx *pulumi.Context, args *ListTopicSharedAccessKeysArgs, opts ...pulumi.InvokeOption) (*ListTopicSharedAccessKeysResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv ListTopicSharedAccessKeysResult
err := ctx.Invoke("azure-native:eventgrid:listTopicSharedAccessKeys", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type ListTopicSharedAccessKeysArgs struct {
// The name of the resource group within the user's subscription.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Name of the topic.
TopicName string `pulumi:"topicName"`
}
// Shared access keys of the Topic
type ListTopicSharedAccessKeysResult struct {
// Shared access key1 for the topic.
Key1 *string `pulumi:"key1"`
// Shared access key2 for the topic.
Key2 *string `pulumi:"key2"`
}
func ListTopicSharedAccessKeysOutput(ctx *pulumi.Context, args ListTopicSharedAccessKeysOutputArgs, opts ...pulumi.InvokeOption) ListTopicSharedAccessKeysResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (ListTopicSharedAccessKeysResult, error) {
args := v.(ListTopicSharedAccessKeysArgs)
r, err := ListTopicSharedAccessKeys(ctx, &args, opts...)
var s ListTopicSharedAccessKeysResult
if r != nil {
s = *r
}
return s, err
}).(ListTopicSharedAccessKeysResultOutput)
}
type ListTopicSharedAccessKeysOutputArgs struct {
// The name of the resource group within the user's subscription.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Name of the topic.
TopicName pulumi.StringInput `pulumi:"topicName"`
}
func (ListTopicSharedAccessKeysOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ListTopicSharedAccessKeysArgs)(nil)).Elem()
}
// Shared access keys of the Topic
type ListTopicSharedAccessKeysResultOutput struct{ *pulumi.OutputState }
func (ListTopicSharedAccessKeysResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ListTopicSharedAccessKeysResult)(nil)).Elem()
}
func (o ListTopicSharedAccessKeysResultOutput) ToListTopicSharedAccessKeysResultOutput() ListTopicSharedAccessKeysResultOutput {
return o
}
func (o ListTopicSharedAccessKeysResultOutput) ToListTopicSharedAccessKeysResultOutputWithContext(ctx context.Context) ListTopicSharedAccessKeysResultOutput {
return o
}
// Shared access key1 for the topic.
func (o ListTopicSharedAccessKeysResultOutput) Key1() pulumi.StringPtrOutput {
return o.ApplyT(func(v ListTopicSharedAccessKeysResult) *string { return v.Key1 }).(pulumi.StringPtrOutput)
}
// Shared access key2 for the topic.
func (o ListTopicSharedAccessKeysResultOutput) Key2() pulumi.StringPtrOutput {
return o.ApplyT(func(v ListTopicSharedAccessKeysResult) *string { return v.Key2 }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(ListTopicSharedAccessKeysResultOutput{})
}