forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
listMediaServiceKeys.go
113 lines (94 loc) · 4.18 KB
/
listMediaServiceKeys.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
// 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 media
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Lists the keys for a Media Service.
// Azure REST API version: 2015-10-01.
func ListMediaServiceKeys(ctx *pulumi.Context, args *ListMediaServiceKeysArgs, opts ...pulumi.InvokeOption) (*ListMediaServiceKeysResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv ListMediaServiceKeysResult
err := ctx.Invoke("azure-native:media:listMediaServiceKeys", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type ListMediaServiceKeysArgs struct {
// Name of the Media Service.
MediaServiceName string `pulumi:"mediaServiceName"`
// Name of the resource group within the Azure subscription.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The response body for a ListKeys API.
type ListMediaServiceKeysResult struct {
// The primary authorization endpoint.
PrimaryAuthEndpoint *string `pulumi:"primaryAuthEndpoint"`
// The primary key for the Media Service resource.
PrimaryKey *string `pulumi:"primaryKey"`
// The authorization scope.
Scope *string `pulumi:"scope"`
// The secondary authorization endpoint.
SecondaryAuthEndpoint *string `pulumi:"secondaryAuthEndpoint"`
// The secondary key for the Media Service resource.
SecondaryKey *string `pulumi:"secondaryKey"`
}
func ListMediaServiceKeysOutput(ctx *pulumi.Context, args ListMediaServiceKeysOutputArgs, opts ...pulumi.InvokeOption) ListMediaServiceKeysResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (ListMediaServiceKeysResult, error) {
args := v.(ListMediaServiceKeysArgs)
r, err := ListMediaServiceKeys(ctx, &args, opts...)
var s ListMediaServiceKeysResult
if r != nil {
s = *r
}
return s, err
}).(ListMediaServiceKeysResultOutput)
}
type ListMediaServiceKeysOutputArgs struct {
// Name of the Media Service.
MediaServiceName pulumi.StringInput `pulumi:"mediaServiceName"`
// Name of the resource group within the Azure subscription.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (ListMediaServiceKeysOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ListMediaServiceKeysArgs)(nil)).Elem()
}
// The response body for a ListKeys API.
type ListMediaServiceKeysResultOutput struct{ *pulumi.OutputState }
func (ListMediaServiceKeysResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ListMediaServiceKeysResult)(nil)).Elem()
}
func (o ListMediaServiceKeysResultOutput) ToListMediaServiceKeysResultOutput() ListMediaServiceKeysResultOutput {
return o
}
func (o ListMediaServiceKeysResultOutput) ToListMediaServiceKeysResultOutputWithContext(ctx context.Context) ListMediaServiceKeysResultOutput {
return o
}
// The primary authorization endpoint.
func (o ListMediaServiceKeysResultOutput) PrimaryAuthEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v ListMediaServiceKeysResult) *string { return v.PrimaryAuthEndpoint }).(pulumi.StringPtrOutput)
}
// The primary key for the Media Service resource.
func (o ListMediaServiceKeysResultOutput) PrimaryKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v ListMediaServiceKeysResult) *string { return v.PrimaryKey }).(pulumi.StringPtrOutput)
}
// The authorization scope.
func (o ListMediaServiceKeysResultOutput) Scope() pulumi.StringPtrOutput {
return o.ApplyT(func(v ListMediaServiceKeysResult) *string { return v.Scope }).(pulumi.StringPtrOutput)
}
// The secondary authorization endpoint.
func (o ListMediaServiceKeysResultOutput) SecondaryAuthEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v ListMediaServiceKeysResult) *string { return v.SecondaryAuthEndpoint }).(pulumi.StringPtrOutput)
}
// The secondary key for the Media Service resource.
func (o ListMediaServiceKeysResultOutput) SecondaryKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v ListMediaServiceKeysResult) *string { return v.SecondaryKey }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(ListMediaServiceKeysResultOutput{})
}