/
dedicatedHost.go
506 lines (446 loc) · 25.7 KB
/
dedicatedHost.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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ecs
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// This resouce used to create a dedicated host and store its initial version. For information about Aliecs Dedicated Host and how to use it, see [What is Resource Aliecs Dedicated Host](https://www.alibabacloud.com/help/doc-detail/134238.htm).
//
// > **NOTE:** Available in 1.91.0+.
//
// ## Example Usage
//
// Basic Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ecs.NewDedicatedHost(ctx, "_default", &ecs.DedicatedHostArgs{
// DedicatedHostName: pulumi.String("dedicated_host_name"),
// DedicatedHostType: pulumi.String("ddh.g5"),
// Description: pulumi.String("From_Terraform"),
// Tags: pulumi.StringMap{
// "Create": pulumi.String("Terraform"),
// "For": pulumi.String("DDH"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// Create Prepaid DDH
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ecs"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ecs.NewDedicatedHost(ctx, "_default", &ecs.DedicatedHostArgs{
// DedicatedHostName: pulumi.String("dedicated_host_name"),
// DedicatedHostType: pulumi.String("ddh.g5"),
// Description: pulumi.String("From_Terraform"),
// ExpiredTime: pulumi.String("1"),
// PaymentType: pulumi.String("PrePaid"),
// SaleCycle: pulumi.String("Month"),
// Tags: pulumi.StringMap{
// "Create": pulumi.String("Terraform"),
// "For": pulumi.String("DDH"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// Ecs dedicated host can be imported using the id, e.g.
//
// ```sh
// $ pulumi import alicloud:ecs/dedicatedHost:DedicatedHost default dh-2zedmxxxx
// ```
type DedicatedHost struct {
pulumi.CustomResourceState
// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: `Migrate`, `Stop`.
ActionOnMaintenance pulumi.StringPtrOutput `pulumi:"actionOnMaintenance"`
// Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: `on`, `off`. Default: `on`.
AutoPlacement pulumi.StringPtrOutput `pulumi:"autoPlacement"`
// The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
AutoReleaseTime pulumi.StringPtrOutput `pulumi:"autoReleaseTime"`
// Specifies whether to automatically renew the subscription dedicated host.
AutoRenew pulumi.BoolPtrOutput `pulumi:"autoRenew"`
// The auto-renewal period of the dedicated host. Unit: months. Valid values: `1`, `2`, `3`, `6`, and `12`. takes effect and is required only when the AutoRenew parameter is set to true.
AutoRenewPeriod pulumi.IntPtrOutput `pulumi:"autoRenewPeriod"`
// The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
DedicatedHostName pulumi.StringPtrOutput `pulumi:"dedicatedHostName"`
// The type of the dedicated host. You can call the [DescribeDedicatedHostTypes](https://www.alibabacloud.com/help/doc-detail/134240.htm) operation to obtain the most recent list of dedicated host types.
DedicatedHostType pulumi.StringOutput `pulumi:"dedicatedHostType"`
// The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: `false`.
DetailFee pulumi.BoolPtrOutput `pulumi:"detailFee"`
// Specifies whether to only validate the request. Default: `false`.
DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`
// The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
ExpiredTime pulumi.StringOutput `pulumi:"expiredTime"`
// dedicated host network parameters. contains the following attributes:
NetworkAttributes DedicatedHostNetworkAttributeArrayOutput `pulumi:"networkAttributes"`
// The billing method of the dedicated host. Valid values: `PrePaid`, `PostPaid`. Default: `PostPaid`.
PaymentType pulumi.StringPtrOutput `pulumi:"paymentType"`
// The ID of the resource group to which the dedicated host belongs.
ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"`
// The unit of the subscription period of the dedicated host.
SaleCycle pulumi.StringOutput `pulumi:"saleCycle"`
// The status of the dedicated host.
Status pulumi.StringOutput `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags pulumi.MapOutput `pulumi:"tags"`
// The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
ZoneId pulumi.StringOutput `pulumi:"zoneId"`
}
// NewDedicatedHost registers a new resource with the given unique name, arguments, and options.
func NewDedicatedHost(ctx *pulumi.Context,
name string, args *DedicatedHostArgs, opts ...pulumi.ResourceOption) (*DedicatedHost, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DedicatedHostType == nil {
return nil, errors.New("invalid value for required argument 'DedicatedHostType'")
}
var resource DedicatedHost
err := ctx.RegisterResource("alicloud:ecs/dedicatedHost:DedicatedHost", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDedicatedHost gets an existing DedicatedHost resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDedicatedHost(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DedicatedHostState, opts ...pulumi.ResourceOption) (*DedicatedHost, error) {
var resource DedicatedHost
err := ctx.ReadResource("alicloud:ecs/dedicatedHost:DedicatedHost", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DedicatedHost resources.
type dedicatedHostState struct {
// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: `Migrate`, `Stop`.
ActionOnMaintenance *string `pulumi:"actionOnMaintenance"`
// Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: `on`, `off`. Default: `on`.
AutoPlacement *string `pulumi:"autoPlacement"`
// The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
AutoReleaseTime *string `pulumi:"autoReleaseTime"`
// Specifies whether to automatically renew the subscription dedicated host.
AutoRenew *bool `pulumi:"autoRenew"`
// The auto-renewal period of the dedicated host. Unit: months. Valid values: `1`, `2`, `3`, `6`, and `12`. takes effect and is required only when the AutoRenew parameter is set to true.
AutoRenewPeriod *int `pulumi:"autoRenewPeriod"`
// The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
DedicatedHostName *string `pulumi:"dedicatedHostName"`
// The type of the dedicated host. You can call the [DescribeDedicatedHostTypes](https://www.alibabacloud.com/help/doc-detail/134240.htm) operation to obtain the most recent list of dedicated host types.
DedicatedHostType *string `pulumi:"dedicatedHostType"`
// The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Description *string `pulumi:"description"`
// Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: `false`.
DetailFee *bool `pulumi:"detailFee"`
// Specifies whether to only validate the request. Default: `false`.
DryRun *bool `pulumi:"dryRun"`
// The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
ExpiredTime *string `pulumi:"expiredTime"`
// dedicated host network parameters. contains the following attributes:
NetworkAttributes []DedicatedHostNetworkAttribute `pulumi:"networkAttributes"`
// The billing method of the dedicated host. Valid values: `PrePaid`, `PostPaid`. Default: `PostPaid`.
PaymentType *string `pulumi:"paymentType"`
// The ID of the resource group to which the dedicated host belongs.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The unit of the subscription period of the dedicated host.
SaleCycle *string `pulumi:"saleCycle"`
// The status of the dedicated host.
Status *string `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags map[string]interface{} `pulumi:"tags"`
// The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
ZoneId *string `pulumi:"zoneId"`
}
type DedicatedHostState struct {
// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: `Migrate`, `Stop`.
ActionOnMaintenance pulumi.StringPtrInput
// Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: `on`, `off`. Default: `on`.
AutoPlacement pulumi.StringPtrInput
// The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
AutoReleaseTime pulumi.StringPtrInput
// Specifies whether to automatically renew the subscription dedicated host.
AutoRenew pulumi.BoolPtrInput
// The auto-renewal period of the dedicated host. Unit: months. Valid values: `1`, `2`, `3`, `6`, and `12`. takes effect and is required only when the AutoRenew parameter is set to true.
AutoRenewPeriod pulumi.IntPtrInput
// The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
DedicatedHostName pulumi.StringPtrInput
// The type of the dedicated host. You can call the [DescribeDedicatedHostTypes](https://www.alibabacloud.com/help/doc-detail/134240.htm) operation to obtain the most recent list of dedicated host types.
DedicatedHostType pulumi.StringPtrInput
// The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Description pulumi.StringPtrInput
// Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: `false`.
DetailFee pulumi.BoolPtrInput
// Specifies whether to only validate the request. Default: `false`.
DryRun pulumi.BoolPtrInput
// The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
ExpiredTime pulumi.StringPtrInput
// dedicated host network parameters. contains the following attributes:
NetworkAttributes DedicatedHostNetworkAttributeArrayInput
// The billing method of the dedicated host. Valid values: `PrePaid`, `PostPaid`. Default: `PostPaid`.
PaymentType pulumi.StringPtrInput
// The ID of the resource group to which the dedicated host belongs.
ResourceGroupId pulumi.StringPtrInput
// The unit of the subscription period of the dedicated host.
SaleCycle pulumi.StringPtrInput
// The status of the dedicated host.
Status pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.MapInput
// The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
ZoneId pulumi.StringPtrInput
}
func (DedicatedHostState) ElementType() reflect.Type {
return reflect.TypeOf((*dedicatedHostState)(nil)).Elem()
}
type dedicatedHostArgs struct {
// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: `Migrate`, `Stop`.
ActionOnMaintenance *string `pulumi:"actionOnMaintenance"`
// Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: `on`, `off`. Default: `on`.
AutoPlacement *string `pulumi:"autoPlacement"`
// The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
AutoReleaseTime *string `pulumi:"autoReleaseTime"`
// Specifies whether to automatically renew the subscription dedicated host.
AutoRenew *bool `pulumi:"autoRenew"`
// The auto-renewal period of the dedicated host. Unit: months. Valid values: `1`, `2`, `3`, `6`, and `12`. takes effect and is required only when the AutoRenew parameter is set to true.
AutoRenewPeriod *int `pulumi:"autoRenewPeriod"`
// The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
DedicatedHostName *string `pulumi:"dedicatedHostName"`
// The type of the dedicated host. You can call the [DescribeDedicatedHostTypes](https://www.alibabacloud.com/help/doc-detail/134240.htm) operation to obtain the most recent list of dedicated host types.
DedicatedHostType string `pulumi:"dedicatedHostType"`
// The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Description *string `pulumi:"description"`
// Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: `false`.
DetailFee *bool `pulumi:"detailFee"`
// Specifies whether to only validate the request. Default: `false`.
DryRun *bool `pulumi:"dryRun"`
// The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
ExpiredTime *string `pulumi:"expiredTime"`
// dedicated host network parameters. contains the following attributes:
NetworkAttributes []DedicatedHostNetworkAttribute `pulumi:"networkAttributes"`
// The billing method of the dedicated host. Valid values: `PrePaid`, `PostPaid`. Default: `PostPaid`.
PaymentType *string `pulumi:"paymentType"`
// The ID of the resource group to which the dedicated host belongs.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The unit of the subscription period of the dedicated host.
SaleCycle *string `pulumi:"saleCycle"`
// A mapping of tags to assign to the resource.
Tags map[string]interface{} `pulumi:"tags"`
// The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
ZoneId *string `pulumi:"zoneId"`
}
// The set of arguments for constructing a DedicatedHost resource.
type DedicatedHostArgs struct {
// The policy used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online. Valid values: `Migrate`, `Stop`.
ActionOnMaintenance pulumi.StringPtrInput
// Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values: `on`, `off`. Default: `on`.
AutoPlacement pulumi.StringPtrInput
// The automatic release time of the dedicated host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.
AutoReleaseTime pulumi.StringPtrInput
// Specifies whether to automatically renew the subscription dedicated host.
AutoRenew pulumi.BoolPtrInput
// The auto-renewal period of the dedicated host. Unit: months. Valid values: `1`, `2`, `3`, `6`, and `12`. takes effect and is required only when the AutoRenew parameter is set to true.
AutoRenewPeriod pulumi.IntPtrInput
// The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
DedicatedHostName pulumi.StringPtrInput
// The type of the dedicated host. You can call the [DescribeDedicatedHostTypes](https://www.alibabacloud.com/help/doc-detail/134240.htm) operation to obtain the most recent list of dedicated host types.
DedicatedHostType pulumi.StringInput
// The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Description pulumi.StringPtrInput
// Specifies whether to return the billing details of the order when the billing method is changed from subscription to pay-as-you-go. Default: `false`.
DetailFee pulumi.BoolPtrInput
// Specifies whether to only validate the request. Default: `false`.
DryRun pulumi.BoolPtrInput
// The subscription period of the dedicated host. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.
ExpiredTime pulumi.StringPtrInput
// dedicated host network parameters. contains the following attributes:
NetworkAttributes DedicatedHostNetworkAttributeArrayInput
// The billing method of the dedicated host. Valid values: `PrePaid`, `PostPaid`. Default: `PostPaid`.
PaymentType pulumi.StringPtrInput
// The ID of the resource group to which the dedicated host belongs.
ResourceGroupId pulumi.StringPtrInput
// The unit of the subscription period of the dedicated host.
SaleCycle pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.MapInput
// The zone ID of the dedicated host. This parameter is empty by default. If you do not specify this parameter, the system automatically selects a zone.
ZoneId pulumi.StringPtrInput
}
func (DedicatedHostArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dedicatedHostArgs)(nil)).Elem()
}
type DedicatedHostInput interface {
pulumi.Input
ToDedicatedHostOutput() DedicatedHostOutput
ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput
}
func (*DedicatedHost) ElementType() reflect.Type {
return reflect.TypeOf((*DedicatedHost)(nil))
}
func (i *DedicatedHost) ToDedicatedHostOutput() DedicatedHostOutput {
return i.ToDedicatedHostOutputWithContext(context.Background())
}
func (i *DedicatedHost) ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput {
return pulumi.ToOutputWithContext(ctx, i).(DedicatedHostOutput)
}
func (i *DedicatedHost) ToDedicatedHostPtrOutput() DedicatedHostPtrOutput {
return i.ToDedicatedHostPtrOutputWithContext(context.Background())
}
func (i *DedicatedHost) ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DedicatedHostPtrOutput)
}
type DedicatedHostPtrInput interface {
pulumi.Input
ToDedicatedHostPtrOutput() DedicatedHostPtrOutput
ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput
}
type dedicatedHostPtrType DedicatedHostArgs
func (*dedicatedHostPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DedicatedHost)(nil))
}
func (i *dedicatedHostPtrType) ToDedicatedHostPtrOutput() DedicatedHostPtrOutput {
return i.ToDedicatedHostPtrOutputWithContext(context.Background())
}
func (i *dedicatedHostPtrType) ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DedicatedHostPtrOutput)
}
// DedicatedHostArrayInput is an input type that accepts DedicatedHostArray and DedicatedHostArrayOutput values.
// You can construct a concrete instance of `DedicatedHostArrayInput` via:
//
// DedicatedHostArray{ DedicatedHostArgs{...} }
type DedicatedHostArrayInput interface {
pulumi.Input
ToDedicatedHostArrayOutput() DedicatedHostArrayOutput
ToDedicatedHostArrayOutputWithContext(context.Context) DedicatedHostArrayOutput
}
type DedicatedHostArray []DedicatedHostInput
func (DedicatedHostArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*DedicatedHost)(nil))
}
func (i DedicatedHostArray) ToDedicatedHostArrayOutput() DedicatedHostArrayOutput {
return i.ToDedicatedHostArrayOutputWithContext(context.Background())
}
func (i DedicatedHostArray) ToDedicatedHostArrayOutputWithContext(ctx context.Context) DedicatedHostArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DedicatedHostArrayOutput)
}
// DedicatedHostMapInput is an input type that accepts DedicatedHostMap and DedicatedHostMapOutput values.
// You can construct a concrete instance of `DedicatedHostMapInput` via:
//
// DedicatedHostMap{ "key": DedicatedHostArgs{...} }
type DedicatedHostMapInput interface {
pulumi.Input
ToDedicatedHostMapOutput() DedicatedHostMapOutput
ToDedicatedHostMapOutputWithContext(context.Context) DedicatedHostMapOutput
}
type DedicatedHostMap map[string]DedicatedHostInput
func (DedicatedHostMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*DedicatedHost)(nil))
}
func (i DedicatedHostMap) ToDedicatedHostMapOutput() DedicatedHostMapOutput {
return i.ToDedicatedHostMapOutputWithContext(context.Background())
}
func (i DedicatedHostMap) ToDedicatedHostMapOutputWithContext(ctx context.Context) DedicatedHostMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DedicatedHostMapOutput)
}
type DedicatedHostOutput struct {
*pulumi.OutputState
}
func (DedicatedHostOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DedicatedHost)(nil))
}
func (o DedicatedHostOutput) ToDedicatedHostOutput() DedicatedHostOutput {
return o
}
func (o DedicatedHostOutput) ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput {
return o
}
func (o DedicatedHostOutput) ToDedicatedHostPtrOutput() DedicatedHostPtrOutput {
return o.ToDedicatedHostPtrOutputWithContext(context.Background())
}
func (o DedicatedHostOutput) ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput {
return o.ApplyT(func(v DedicatedHost) *DedicatedHost {
return &v
}).(DedicatedHostPtrOutput)
}
type DedicatedHostPtrOutput struct {
*pulumi.OutputState
}
func (DedicatedHostPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DedicatedHost)(nil))
}
func (o DedicatedHostPtrOutput) ToDedicatedHostPtrOutput() DedicatedHostPtrOutput {
return o
}
func (o DedicatedHostPtrOutput) ToDedicatedHostPtrOutputWithContext(ctx context.Context) DedicatedHostPtrOutput {
return o
}
type DedicatedHostArrayOutput struct{ *pulumi.OutputState }
func (DedicatedHostArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]DedicatedHost)(nil))
}
func (o DedicatedHostArrayOutput) ToDedicatedHostArrayOutput() DedicatedHostArrayOutput {
return o
}
func (o DedicatedHostArrayOutput) ToDedicatedHostArrayOutputWithContext(ctx context.Context) DedicatedHostArrayOutput {
return o
}
func (o DedicatedHostArrayOutput) Index(i pulumi.IntInput) DedicatedHostOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) DedicatedHost {
return vs[0].([]DedicatedHost)[vs[1].(int)]
}).(DedicatedHostOutput)
}
type DedicatedHostMapOutput struct{ *pulumi.OutputState }
func (DedicatedHostMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]DedicatedHost)(nil))
}
func (o DedicatedHostMapOutput) ToDedicatedHostMapOutput() DedicatedHostMapOutput {
return o
}
func (o DedicatedHostMapOutput) ToDedicatedHostMapOutputWithContext(ctx context.Context) DedicatedHostMapOutput {
return o
}
func (o DedicatedHostMapOutput) MapIndex(k pulumi.StringInput) DedicatedHostOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) DedicatedHost {
return vs[0].(map[string]DedicatedHost)[vs[1].(string)]
}).(DedicatedHostOutput)
}
func init() {
pulumi.RegisterOutputType(DedicatedHostOutput{})
pulumi.RegisterOutputType(DedicatedHostPtrOutput{})
pulumi.RegisterOutputType(DedicatedHostArrayOutput{})
pulumi.RegisterOutputType(DedicatedHostMapOutput{})
}