forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getLab.go
276 lines (236 loc) · 12 KB
/
getLab.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
// 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 devtestlab
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get lab.
// Azure REST API version: 2018-09-15.
//
// Other available API versions: 2016-05-15.
func LookupLab(ctx *pulumi.Context, args *LookupLabArgs, opts ...pulumi.InvokeOption) (*LookupLabResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupLabResult
err := ctx.Invoke("azure-native:devtestlab:getLab", args, &rv, opts...)
if err != nil {
return nil, err
}
return rv.Defaults(), nil
}
type LookupLabArgs struct {
// Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'
Expand *string `pulumi:"expand"`
// The name of the lab.
Name string `pulumi:"name"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A lab.
type LookupLabResult struct {
// The properties of any lab announcement associated with this lab
Announcement *LabAnnouncementPropertiesResponse `pulumi:"announcement"`
// The lab's artifact storage account.
ArtifactsStorageAccount string `pulumi:"artifactsStorageAccount"`
// The creation date of the lab.
CreatedDate string `pulumi:"createdDate"`
// The lab's default premium storage account.
DefaultPremiumStorageAccount string `pulumi:"defaultPremiumStorageAccount"`
// The lab's default storage account.
DefaultStorageAccount string `pulumi:"defaultStorageAccount"`
// The access rights to be granted to the user when provisioning an environment
EnvironmentPermission *string `pulumi:"environmentPermission"`
// Extended properties of the lab used for experimental features
ExtendedProperties map[string]string `pulumi:"extendedProperties"`
// The identifier of the resource.
Id string `pulumi:"id"`
// Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.
LabStorageType *string `pulumi:"labStorageType"`
// The load balancer used to for lab VMs that use shared IP address.
LoadBalancerId string `pulumi:"loadBalancerId"`
// The location of the resource.
Location *string `pulumi:"location"`
// The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.
MandatoryArtifactsResourceIdsLinux []string `pulumi:"mandatoryArtifactsResourceIdsLinux"`
// The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.
MandatoryArtifactsResourceIdsWindows []string `pulumi:"mandatoryArtifactsResourceIdsWindows"`
// The name of the resource.
Name string `pulumi:"name"`
// The Network Security Group attached to the lab VMs Network interfaces to restrict open ports.
NetworkSecurityGroupId string `pulumi:"networkSecurityGroupId"`
// The lab's premium data disk storage account.
PremiumDataDiskStorageAccount string `pulumi:"premiumDataDiskStorageAccount"`
// The setting to enable usage of premium data disks.
// When its value is 'Enabled', creation of standard or premium data disks is allowed.
// When its value is 'Disabled', only creation of standard data disks is allowed.
PremiumDataDisks *string `pulumi:"premiumDataDisks"`
// The provisioning status of the resource.
ProvisioningState string `pulumi:"provisioningState"`
// The public IP address for the lab's load balancer.
PublicIpId string `pulumi:"publicIpId"`
// The properties of any lab support message associated with this lab
Support *LabSupportPropertiesResponse `pulumi:"support"`
// The tags of the resource.
Tags map[string]string `pulumi:"tags"`
// The type of the resource.
Type string `pulumi:"type"`
// The unique immutable identifier of a resource (Guid).
UniqueIdentifier string `pulumi:"uniqueIdentifier"`
// The lab's Key vault.
VaultName string `pulumi:"vaultName"`
// The resource group in which all new lab virtual machines will be created. To let DevTest Labs manage resource group creation, set this value to null.
VmCreationResourceGroup string `pulumi:"vmCreationResourceGroup"`
}
// Defaults sets the appropriate defaults for LookupLabResult
func (val *LookupLabResult) Defaults() *LookupLabResult {
if val == nil {
return nil
}
tmp := *val
if tmp.LabStorageType == nil {
labStorageType_ := "Premium"
tmp.LabStorageType = &labStorageType_
}
return &tmp
}
func LookupLabOutput(ctx *pulumi.Context, args LookupLabOutputArgs, opts ...pulumi.InvokeOption) LookupLabResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupLabResult, error) {
args := v.(LookupLabArgs)
r, err := LookupLab(ctx, &args, opts...)
var s LookupLabResult
if r != nil {
s = *r
}
return s, err
}).(LookupLabResultOutput)
}
type LookupLabOutputArgs struct {
// Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'
Expand pulumi.StringPtrInput `pulumi:"expand"`
// The name of the lab.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupLabOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupLabArgs)(nil)).Elem()
}
// A lab.
type LookupLabResultOutput struct{ *pulumi.OutputState }
func (LookupLabResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupLabResult)(nil)).Elem()
}
func (o LookupLabResultOutput) ToLookupLabResultOutput() LookupLabResultOutput {
return o
}
func (o LookupLabResultOutput) ToLookupLabResultOutputWithContext(ctx context.Context) LookupLabResultOutput {
return o
}
// The properties of any lab announcement associated with this lab
func (o LookupLabResultOutput) Announcement() LabAnnouncementPropertiesResponsePtrOutput {
return o.ApplyT(func(v LookupLabResult) *LabAnnouncementPropertiesResponse { return v.Announcement }).(LabAnnouncementPropertiesResponsePtrOutput)
}
// The lab's artifact storage account.
func (o LookupLabResultOutput) ArtifactsStorageAccount() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.ArtifactsStorageAccount }).(pulumi.StringOutput)
}
// The creation date of the lab.
func (o LookupLabResultOutput) CreatedDate() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.CreatedDate }).(pulumi.StringOutput)
}
// The lab's default premium storage account.
func (o LookupLabResultOutput) DefaultPremiumStorageAccount() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.DefaultPremiumStorageAccount }).(pulumi.StringOutput)
}
// The lab's default storage account.
func (o LookupLabResultOutput) DefaultStorageAccount() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.DefaultStorageAccount }).(pulumi.StringOutput)
}
// The access rights to be granted to the user when provisioning an environment
func (o LookupLabResultOutput) EnvironmentPermission() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupLabResult) *string { return v.EnvironmentPermission }).(pulumi.StringPtrOutput)
}
// Extended properties of the lab used for experimental features
func (o LookupLabResultOutput) ExtendedProperties() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupLabResult) map[string]string { return v.ExtendedProperties }).(pulumi.StringMapOutput)
}
// The identifier of the resource.
func (o LookupLabResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.Id }).(pulumi.StringOutput)
}
// Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.
func (o LookupLabResultOutput) LabStorageType() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupLabResult) *string { return v.LabStorageType }).(pulumi.StringPtrOutput)
}
// The load balancer used to for lab VMs that use shared IP address.
func (o LookupLabResultOutput) LoadBalancerId() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.LoadBalancerId }).(pulumi.StringOutput)
}
// The location of the resource.
func (o LookupLabResultOutput) Location() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupLabResult) *string { return v.Location }).(pulumi.StringPtrOutput)
}
// The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.
func (o LookupLabResultOutput) MandatoryArtifactsResourceIdsLinux() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupLabResult) []string { return v.MandatoryArtifactsResourceIdsLinux }).(pulumi.StringArrayOutput)
}
// The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.
func (o LookupLabResultOutput) MandatoryArtifactsResourceIdsWindows() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupLabResult) []string { return v.MandatoryArtifactsResourceIdsWindows }).(pulumi.StringArrayOutput)
}
// The name of the resource.
func (o LookupLabResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.Name }).(pulumi.StringOutput)
}
// The Network Security Group attached to the lab VMs Network interfaces to restrict open ports.
func (o LookupLabResultOutput) NetworkSecurityGroupId() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.NetworkSecurityGroupId }).(pulumi.StringOutput)
}
// The lab's premium data disk storage account.
func (o LookupLabResultOutput) PremiumDataDiskStorageAccount() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.PremiumDataDiskStorageAccount }).(pulumi.StringOutput)
}
// The setting to enable usage of premium data disks.
// When its value is 'Enabled', creation of standard or premium data disks is allowed.
// When its value is 'Disabled', only creation of standard data disks is allowed.
func (o LookupLabResultOutput) PremiumDataDisks() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupLabResult) *string { return v.PremiumDataDisks }).(pulumi.StringPtrOutput)
}
// The provisioning status of the resource.
func (o LookupLabResultOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.ProvisioningState }).(pulumi.StringOutput)
}
// The public IP address for the lab's load balancer.
func (o LookupLabResultOutput) PublicIpId() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.PublicIpId }).(pulumi.StringOutput)
}
// The properties of any lab support message associated with this lab
func (o LookupLabResultOutput) Support() LabSupportPropertiesResponsePtrOutput {
return o.ApplyT(func(v LookupLabResult) *LabSupportPropertiesResponse { return v.Support }).(LabSupportPropertiesResponsePtrOutput)
}
// The tags of the resource.
func (o LookupLabResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupLabResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The type of the resource.
func (o LookupLabResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.Type }).(pulumi.StringOutput)
}
// The unique immutable identifier of a resource (Guid).
func (o LookupLabResultOutput) UniqueIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.UniqueIdentifier }).(pulumi.StringOutput)
}
// The lab's Key vault.
func (o LookupLabResultOutput) VaultName() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.VaultName }).(pulumi.StringOutput)
}
// The resource group in which all new lab virtual machines will be created. To let DevTest Labs manage resource group creation, set this value to null.
func (o LookupLabResultOutput) VmCreationResourceGroup() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.VmCreationResourceGroup }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupLabResultOutput{})
}