forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getMediaService.go
205 lines (174 loc) · 8.97 KB
/
getMediaService.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
// 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"
)
// Get the details of a Media Services account
// Azure REST API version: 2023-01-01.
//
// Other available API versions: 2015-10-01.
func LookupMediaService(ctx *pulumi.Context, args *LookupMediaServiceArgs, opts ...pulumi.InvokeOption) (*LookupMediaServiceResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupMediaServiceResult
err := ctx.Invoke("azure-native:media:getMediaService", args, &rv, opts...)
if err != nil {
return nil, err
}
return rv.Defaults(), nil
}
type LookupMediaServiceArgs struct {
// The Media Services account name.
AccountName string `pulumi:"accountName"`
// The name of the resource group within the Azure subscription.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A Media Services account.
type LookupMediaServiceResult struct {
// The account encryption properties.
Encryption *AccountEncryptionResponse `pulumi:"encryption"`
// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
Id string `pulumi:"id"`
// The Managed Identity for the Media Services account.
Identity *MediaServiceIdentityResponse `pulumi:"identity"`
// The Key Delivery properties for Media Services account.
KeyDelivery *KeyDeliveryResponse `pulumi:"keyDelivery"`
// The geo-location where the resource lives
Location string `pulumi:"location"`
// The Media Services account ID.
MediaServiceId string `pulumi:"mediaServiceId"`
// The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used.
MinimumTlsVersion *string `pulumi:"minimumTlsVersion"`
// The name of the resource
Name string `pulumi:"name"`
// The Private Endpoint Connections created for the Media Service account.
PrivateEndpointConnections []PrivateEndpointConnectionResponse `pulumi:"privateEndpointConnections"`
// Provisioning state of the Media Services account.
ProvisioningState string `pulumi:"provisioningState"`
// Whether or not public network access is allowed for resources under the Media Services account.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The storage accounts for this resource.
StorageAccounts []StorageAccountResponse `pulumi:"storageAccounts"`
StorageAuthentication *string `pulumi:"storageAuthentication"`
// The system metadata relating to this resource.
SystemData SystemDataResponse `pulumi:"systemData"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type string `pulumi:"type"`
}
// Defaults sets the appropriate defaults for LookupMediaServiceResult
func (val *LookupMediaServiceResult) Defaults() *LookupMediaServiceResult {
if val == nil {
return nil
}
tmp := *val
if tmp.MinimumTlsVersion == nil {
minimumTlsVersion_ := "Tls12"
tmp.MinimumTlsVersion = &minimumTlsVersion_
}
return &tmp
}
func LookupMediaServiceOutput(ctx *pulumi.Context, args LookupMediaServiceOutputArgs, opts ...pulumi.InvokeOption) LookupMediaServiceResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupMediaServiceResult, error) {
args := v.(LookupMediaServiceArgs)
r, err := LookupMediaService(ctx, &args, opts...)
var s LookupMediaServiceResult
if r != nil {
s = *r
}
return s, err
}).(LookupMediaServiceResultOutput)
}
type LookupMediaServiceOutputArgs struct {
// The Media Services account name.
AccountName pulumi.StringInput `pulumi:"accountName"`
// The name of the resource group within the Azure subscription.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupMediaServiceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMediaServiceArgs)(nil)).Elem()
}
// A Media Services account.
type LookupMediaServiceResultOutput struct{ *pulumi.OutputState }
func (LookupMediaServiceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMediaServiceResult)(nil)).Elem()
}
func (o LookupMediaServiceResultOutput) ToLookupMediaServiceResultOutput() LookupMediaServiceResultOutput {
return o
}
func (o LookupMediaServiceResultOutput) ToLookupMediaServiceResultOutputWithContext(ctx context.Context) LookupMediaServiceResultOutput {
return o
}
// The account encryption properties.
func (o LookupMediaServiceResultOutput) Encryption() AccountEncryptionResponsePtrOutput {
return o.ApplyT(func(v LookupMediaServiceResult) *AccountEncryptionResponse { return v.Encryption }).(AccountEncryptionResponsePtrOutput)
}
// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
func (o LookupMediaServiceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupMediaServiceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Managed Identity for the Media Services account.
func (o LookupMediaServiceResultOutput) Identity() MediaServiceIdentityResponsePtrOutput {
return o.ApplyT(func(v LookupMediaServiceResult) *MediaServiceIdentityResponse { return v.Identity }).(MediaServiceIdentityResponsePtrOutput)
}
// The Key Delivery properties for Media Services account.
func (o LookupMediaServiceResultOutput) KeyDelivery() KeyDeliveryResponsePtrOutput {
return o.ApplyT(func(v LookupMediaServiceResult) *KeyDeliveryResponse { return v.KeyDelivery }).(KeyDeliveryResponsePtrOutput)
}
// The geo-location where the resource lives
func (o LookupMediaServiceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupMediaServiceResult) string { return v.Location }).(pulumi.StringOutput)
}
// The Media Services account ID.
func (o LookupMediaServiceResultOutput) MediaServiceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMediaServiceResult) string { return v.MediaServiceId }).(pulumi.StringOutput)
}
// The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used.
func (o LookupMediaServiceResultOutput) MinimumTlsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupMediaServiceResult) *string { return v.MinimumTlsVersion }).(pulumi.StringPtrOutput)
}
// The name of the resource
func (o LookupMediaServiceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupMediaServiceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The Private Endpoint Connections created for the Media Service account.
func (o LookupMediaServiceResultOutput) PrivateEndpointConnections() PrivateEndpointConnectionResponseArrayOutput {
return o.ApplyT(func(v LookupMediaServiceResult) []PrivateEndpointConnectionResponse {
return v.PrivateEndpointConnections
}).(PrivateEndpointConnectionResponseArrayOutput)
}
// Provisioning state of the Media Services account.
func (o LookupMediaServiceResultOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v LookupMediaServiceResult) string { return v.ProvisioningState }).(pulumi.StringOutput)
}
// Whether or not public network access is allowed for resources under the Media Services account.
func (o LookupMediaServiceResultOutput) PublicNetworkAccess() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupMediaServiceResult) *string { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput)
}
// The storage accounts for this resource.
func (o LookupMediaServiceResultOutput) StorageAccounts() StorageAccountResponseArrayOutput {
return o.ApplyT(func(v LookupMediaServiceResult) []StorageAccountResponse { return v.StorageAccounts }).(StorageAccountResponseArrayOutput)
}
func (o LookupMediaServiceResultOutput) StorageAuthentication() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupMediaServiceResult) *string { return v.StorageAuthentication }).(pulumi.StringPtrOutput)
}
// The system metadata relating to this resource.
func (o LookupMediaServiceResultOutput) SystemData() SystemDataResponseOutput {
return o.ApplyT(func(v LookupMediaServiceResult) SystemDataResponse { return v.SystemData }).(SystemDataResponseOutput)
}
// Resource tags.
func (o LookupMediaServiceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupMediaServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
func (o LookupMediaServiceResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupMediaServiceResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupMediaServiceResultOutput{})
}