/
getComputeMachine.go
326 lines (281 loc) · 14.1 KB
/
getComputeMachine.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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package hybrid
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Hybrid Compute.
//
// ## Disclaimers
//
// > **Note:** The Data Source `hybrid.getComputeMachine` is deprecated will be removed in v4.0 of the Azure Provider - a replacement can be found in the form of the `arcmachine.get` Data Source.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/hybrid"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := hybrid.GetComputeMachine(ctx, &hybrid.GetComputeMachineArgs{
// Name: "existing-hcmachine",
// ResourceGroupName: "existing-rg",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
func GetComputeMachine(ctx *pulumi.Context, args *GetComputeMachineArgs, opts ...pulumi.InvokeOption) (*GetComputeMachineResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetComputeMachineResult
err := ctx.Invoke("azure:hybrid/getComputeMachine:getComputeMachine", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getComputeMachine.
type GetComputeMachineArgs struct {
// The name of this hybrid compute machine.
Name string `pulumi:"name"`
// The name of the Resource Group where the Hybrid Compute exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getComputeMachine.
type GetComputeMachineResult struct {
// Specifies the AD fully qualified display name.
AdFqdn string `pulumi:"adFqdn"`
// A `agentConfiguration` block as defined below.
AgentConfigurations []GetComputeMachineAgentConfiguration `pulumi:"agentConfigurations"`
// The hybrid machine agent full version.
AgentVersion string `pulumi:"agentVersion"`
// Public Key that the client provides to be used during initial resource onboarding.
ClientPublicKey string `pulumi:"clientPublicKey"`
// A `cloudMetadata` block as defined below.
CloudMetadatas []GetComputeMachineCloudMetadata `pulumi:"cloudMetadatas"`
// A `detectedProperties` block as defined below.
DetectedProperties map[string]string `pulumi:"detectedProperties"`
// Specifies the hybrid machine display name.
DisplayName string `pulumi:"displayName"`
// Specifies the DNS fully qualified display name.
DnsFqdn string `pulumi:"dnsFqdn"`
// Specifies the Windows domain name.
DomainName string `pulumi:"domainName"`
// A `errorDetails` block as defined below.
ErrorDetails []GetComputeMachineErrorDetail `pulumi:"errorDetails"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `identity` block as defined below.
Identities []GetComputeMachineIdentity `pulumi:"identities"`
// The time of the last status change.
LastStatusChange string `pulumi:"lastStatusChange"`
// The Azure Region where the hybrid compute machine exists.
Location string `pulumi:"location"`
// A `locationData` block as defined below.
LocationDatas []GetComputeMachineLocationData `pulumi:"locationDatas"`
// Specifies the hybrid machine fully qualified display name.
MachineFqdn string `pulumi:"machineFqdn"`
// Specifies whether any MS SQL instance is discovered on the machine.
MssqlDiscovered bool `pulumi:"mssqlDiscovered"`
// A canonical name for the geographic or physical location.
Name string `pulumi:"name"`
// The Operating System running on the hybrid machine.
OsName string `pulumi:"osName"`
// A `osProfile` block as defined below.
OsProfiles []GetComputeMachineOsProfile `pulumi:"osProfiles"`
// Specifies the Operating System product SKU.
OsSku string `pulumi:"osSku"`
// The type of Operating System. Possible values are `windows` and `linux`.
OsType string `pulumi:"osType"`
// The version of Operating System running on the hybrid machine.
OsVersion string `pulumi:"osVersion"`
// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
ParentClusterResourceId string `pulumi:"parentClusterResourceId"`
// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
PrivateLinkScopeResourceId string `pulumi:"privateLinkScopeResourceId"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `serviceStatus` block as defined below.
ServiceStatuses []GetComputeMachineServiceStatus `pulumi:"serviceStatuses"`
// The current status of the service.
Status string `pulumi:"status"`
// A mapping of tags assigned to the Hybrid Compute.
Tags map[string]string `pulumi:"tags"`
// Specifies the hybrid machine unique ID.
VmId string `pulumi:"vmId"`
// Specifies the Arc Machine's unique SMBIOS ID.
VmUuid string `pulumi:"vmUuid"`
}
func GetComputeMachineOutput(ctx *pulumi.Context, args GetComputeMachineOutputArgs, opts ...pulumi.InvokeOption) GetComputeMachineResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetComputeMachineResult, error) {
args := v.(GetComputeMachineArgs)
r, err := GetComputeMachine(ctx, &args, opts...)
var s GetComputeMachineResult
if r != nil {
s = *r
}
return s, err
}).(GetComputeMachineResultOutput)
}
// A collection of arguments for invoking getComputeMachine.
type GetComputeMachineOutputArgs struct {
// The name of this hybrid compute machine.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Hybrid Compute exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (GetComputeMachineOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetComputeMachineArgs)(nil)).Elem()
}
// A collection of values returned by getComputeMachine.
type GetComputeMachineResultOutput struct{ *pulumi.OutputState }
func (GetComputeMachineResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetComputeMachineResult)(nil)).Elem()
}
func (o GetComputeMachineResultOutput) ToGetComputeMachineResultOutput() GetComputeMachineResultOutput {
return o
}
func (o GetComputeMachineResultOutput) ToGetComputeMachineResultOutputWithContext(ctx context.Context) GetComputeMachineResultOutput {
return o
}
// Specifies the AD fully qualified display name.
func (o GetComputeMachineResultOutput) AdFqdn() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.AdFqdn }).(pulumi.StringOutput)
}
// A `agentConfiguration` block as defined below.
func (o GetComputeMachineResultOutput) AgentConfigurations() GetComputeMachineAgentConfigurationArrayOutput {
return o.ApplyT(func(v GetComputeMachineResult) []GetComputeMachineAgentConfiguration { return v.AgentConfigurations }).(GetComputeMachineAgentConfigurationArrayOutput)
}
// The hybrid machine agent full version.
func (o GetComputeMachineResultOutput) AgentVersion() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.AgentVersion }).(pulumi.StringOutput)
}
// Public Key that the client provides to be used during initial resource onboarding.
func (o GetComputeMachineResultOutput) ClientPublicKey() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.ClientPublicKey }).(pulumi.StringOutput)
}
// A `cloudMetadata` block as defined below.
func (o GetComputeMachineResultOutput) CloudMetadatas() GetComputeMachineCloudMetadataArrayOutput {
return o.ApplyT(func(v GetComputeMachineResult) []GetComputeMachineCloudMetadata { return v.CloudMetadatas }).(GetComputeMachineCloudMetadataArrayOutput)
}
// A `detectedProperties` block as defined below.
func (o GetComputeMachineResultOutput) DetectedProperties() pulumi.StringMapOutput {
return o.ApplyT(func(v GetComputeMachineResult) map[string]string { return v.DetectedProperties }).(pulumi.StringMapOutput)
}
// Specifies the hybrid machine display name.
func (o GetComputeMachineResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Specifies the DNS fully qualified display name.
func (o GetComputeMachineResultOutput) DnsFqdn() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.DnsFqdn }).(pulumi.StringOutput)
}
// Specifies the Windows domain name.
func (o GetComputeMachineResultOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.DomainName }).(pulumi.StringOutput)
}
// A `errorDetails` block as defined below.
func (o GetComputeMachineResultOutput) ErrorDetails() GetComputeMachineErrorDetailArrayOutput {
return o.ApplyT(func(v GetComputeMachineResult) []GetComputeMachineErrorDetail { return v.ErrorDetails }).(GetComputeMachineErrorDetailArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetComputeMachineResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `identity` block as defined below.
func (o GetComputeMachineResultOutput) Identities() GetComputeMachineIdentityArrayOutput {
return o.ApplyT(func(v GetComputeMachineResult) []GetComputeMachineIdentity { return v.Identities }).(GetComputeMachineIdentityArrayOutput)
}
// The time of the last status change.
func (o GetComputeMachineResultOutput) LastStatusChange() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.LastStatusChange }).(pulumi.StringOutput)
}
// The Azure Region where the hybrid compute machine exists.
func (o GetComputeMachineResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.Location }).(pulumi.StringOutput)
}
// A `locationData` block as defined below.
func (o GetComputeMachineResultOutput) LocationDatas() GetComputeMachineLocationDataArrayOutput {
return o.ApplyT(func(v GetComputeMachineResult) []GetComputeMachineLocationData { return v.LocationDatas }).(GetComputeMachineLocationDataArrayOutput)
}
// Specifies the hybrid machine fully qualified display name.
func (o GetComputeMachineResultOutput) MachineFqdn() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.MachineFqdn }).(pulumi.StringOutput)
}
// Specifies whether any MS SQL instance is discovered on the machine.
func (o GetComputeMachineResultOutput) MssqlDiscovered() pulumi.BoolOutput {
return o.ApplyT(func(v GetComputeMachineResult) bool { return v.MssqlDiscovered }).(pulumi.BoolOutput)
}
// A canonical name for the geographic or physical location.
func (o GetComputeMachineResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.Name }).(pulumi.StringOutput)
}
// The Operating System running on the hybrid machine.
func (o GetComputeMachineResultOutput) OsName() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.OsName }).(pulumi.StringOutput)
}
// A `osProfile` block as defined below.
func (o GetComputeMachineResultOutput) OsProfiles() GetComputeMachineOsProfileArrayOutput {
return o.ApplyT(func(v GetComputeMachineResult) []GetComputeMachineOsProfile { return v.OsProfiles }).(GetComputeMachineOsProfileArrayOutput)
}
// Specifies the Operating System product SKU.
func (o GetComputeMachineResultOutput) OsSku() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.OsSku }).(pulumi.StringOutput)
}
// The type of Operating System. Possible values are `windows` and `linux`.
func (o GetComputeMachineResultOutput) OsType() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.OsType }).(pulumi.StringOutput)
}
// The version of Operating System running on the hybrid machine.
func (o GetComputeMachineResultOutput) OsVersion() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.OsVersion }).(pulumi.StringOutput)
}
// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
func (o GetComputeMachineResultOutput) ParentClusterResourceId() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.ParentClusterResourceId }).(pulumi.StringOutput)
}
// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
func (o GetComputeMachineResultOutput) PrivateLinkScopeResourceId() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.PrivateLinkScopeResourceId }).(pulumi.StringOutput)
}
func (o GetComputeMachineResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `serviceStatus` block as defined below.
func (o GetComputeMachineResultOutput) ServiceStatuses() GetComputeMachineServiceStatusArrayOutput {
return o.ApplyT(func(v GetComputeMachineResult) []GetComputeMachineServiceStatus { return v.ServiceStatuses }).(GetComputeMachineServiceStatusArrayOutput)
}
// The current status of the service.
func (o GetComputeMachineResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.Status }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Hybrid Compute.
func (o GetComputeMachineResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetComputeMachineResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// Specifies the hybrid machine unique ID.
func (o GetComputeMachineResultOutput) VmId() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.VmId }).(pulumi.StringOutput)
}
// Specifies the Arc Machine's unique SMBIOS ID.
func (o GetComputeMachineResultOutput) VmUuid() pulumi.StringOutput {
return o.ApplyT(func(v GetComputeMachineResult) string { return v.VmUuid }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetComputeMachineResultOutput{})
}