generated from pulumi/pulumi-tf-provider-boilerplate
/
loadBalancer.go
478 lines (416 loc) · 23.8 KB
/
loadBalancer.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
// 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 alb
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a ALB Load Balancer resource.
//
// For information about ALB Load Balancer and how to use it, see [What is Load Balancer](https://www.alibabacloud.com/help/doc-detail/197341.htm).
//
// > **NOTE:** Available in v1.132.0+.
//
// ## Import
//
// ALB Load Balancer can be imported using the id, e.g.
//
// ```sh
//
// $ pulumi import alicloud:alb/loadBalancer:LoadBalancer example <id>
//
// ```
type LoadBalancer struct {
pulumi.CustomResourceState
// The Access Logging Configuration Structure. See the following `Block accessLogConfig`.
AccessLogConfig LoadBalancerAccessLogConfigPtrOutput `pulumi:"accessLogConfig"`
// The method in which IP addresses are assigned. Valid values: `Fixed` and `Dynamic`. Default value: `Dynamic`.
// *`Fixed`: The ALB instance uses a fixed IP address.
// *`Dynamic`: An IP address is dynamically assigned to each zone of the ALB instance.
AddressAllocatedMode pulumi.StringPtrOutput `pulumi:"addressAllocatedMode"`
// The IP version. Valid values: `Ipv4`, `DualStack`.
AddressIpVersion pulumi.StringOutput `pulumi:"addressIpVersion"`
// The type of IP address that the ALB instance uses to provide services. Valid values: `Intranet`, `Internet`. **NOTE:** From version 1.193.1, `addressType` can be modified.
AddressType pulumi.StringOutput `pulumi:"addressType"`
// The deletion protection enabled. Valid values: `true` and `false`. Default value: `false`.
DeletionProtectionEnabled pulumi.BoolPtrOutput `pulumi:"deletionProtectionEnabled"`
// The domain name of the ALB instance. **NOTE:** Available in v1.158.0+.
DnsName pulumi.StringOutput `pulumi:"dnsName"`
// Specifies whether to precheck the API request. Valid values: `true` and `false`.
DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`
// The configuration of the billing method. See the following `Block loadBalancerBillingConfig`.
LoadBalancerBillingConfig LoadBalancerLoadBalancerBillingConfigOutput `pulumi:"loadBalancerBillingConfig"`
// The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: `Basic`, `Standard` and `StandardWithWaf`(Available in v1.193.1+).
LoadBalancerEdition pulumi.StringOutput `pulumi:"loadBalancerEdition"`
// The name of the resource.
LoadBalancerName pulumi.StringOutput `pulumi:"loadBalancerName"`
// Modify the Protection Configuration. See the following `Block modificationProtectionConfig`.
ModificationProtectionConfig LoadBalancerModificationProtectionConfigOutput `pulumi:"modificationProtectionConfig"`
// The ID of the resource group.
ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"`
// Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: `NonProtection` and `ConsoleProtection`.
Status pulumi.StringOutput `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags pulumi.MapOutput `pulumi:"tags"`
// The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
VpcId pulumi.StringOutput `pulumi:"vpcId"`
// The zones and vSwitches. You must specify at least two zones. See the following `Block zoneMappings`.
ZoneMappings LoadBalancerZoneMappingArrayOutput `pulumi:"zoneMappings"`
}
// NewLoadBalancer registers a new resource with the given unique name, arguments, and options.
func NewLoadBalancer(ctx *pulumi.Context,
name string, args *LoadBalancerArgs, opts ...pulumi.ResourceOption) (*LoadBalancer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AddressType == nil {
return nil, errors.New("invalid value for required argument 'AddressType'")
}
if args.LoadBalancerBillingConfig == nil {
return nil, errors.New("invalid value for required argument 'LoadBalancerBillingConfig'")
}
if args.LoadBalancerEdition == nil {
return nil, errors.New("invalid value for required argument 'LoadBalancerEdition'")
}
if args.LoadBalancerName == nil {
return nil, errors.New("invalid value for required argument 'LoadBalancerName'")
}
if args.VpcId == nil {
return nil, errors.New("invalid value for required argument 'VpcId'")
}
if args.ZoneMappings == nil {
return nil, errors.New("invalid value for required argument 'ZoneMappings'")
}
opts = pkgResourceDefaultOpts(opts)
var resource LoadBalancer
err := ctx.RegisterResource("alicloud:alb/loadBalancer:LoadBalancer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLoadBalancer gets an existing LoadBalancer 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 GetLoadBalancer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LoadBalancerState, opts ...pulumi.ResourceOption) (*LoadBalancer, error) {
var resource LoadBalancer
err := ctx.ReadResource("alicloud:alb/loadBalancer:LoadBalancer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LoadBalancer resources.
type loadBalancerState struct {
// The Access Logging Configuration Structure. See the following `Block accessLogConfig`.
AccessLogConfig *LoadBalancerAccessLogConfig `pulumi:"accessLogConfig"`
// The method in which IP addresses are assigned. Valid values: `Fixed` and `Dynamic`. Default value: `Dynamic`.
// *`Fixed`: The ALB instance uses a fixed IP address.
// *`Dynamic`: An IP address is dynamically assigned to each zone of the ALB instance.
AddressAllocatedMode *string `pulumi:"addressAllocatedMode"`
// The IP version. Valid values: `Ipv4`, `DualStack`.
AddressIpVersion *string `pulumi:"addressIpVersion"`
// The type of IP address that the ALB instance uses to provide services. Valid values: `Intranet`, `Internet`. **NOTE:** From version 1.193.1, `addressType` can be modified.
AddressType *string `pulumi:"addressType"`
// The deletion protection enabled. Valid values: `true` and `false`. Default value: `false`.
DeletionProtectionEnabled *bool `pulumi:"deletionProtectionEnabled"`
// The domain name of the ALB instance. **NOTE:** Available in v1.158.0+.
DnsName *string `pulumi:"dnsName"`
// Specifies whether to precheck the API request. Valid values: `true` and `false`.
DryRun *bool `pulumi:"dryRun"`
// The configuration of the billing method. See the following `Block loadBalancerBillingConfig`.
LoadBalancerBillingConfig *LoadBalancerLoadBalancerBillingConfig `pulumi:"loadBalancerBillingConfig"`
// The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: `Basic`, `Standard` and `StandardWithWaf`(Available in v1.193.1+).
LoadBalancerEdition *string `pulumi:"loadBalancerEdition"`
// The name of the resource.
LoadBalancerName *string `pulumi:"loadBalancerName"`
// Modify the Protection Configuration. See the following `Block modificationProtectionConfig`.
ModificationProtectionConfig *LoadBalancerModificationProtectionConfig `pulumi:"modificationProtectionConfig"`
// The ID of the resource group.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: `NonProtection` and `ConsoleProtection`.
Status *string `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags map[string]interface{} `pulumi:"tags"`
// The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
VpcId *string `pulumi:"vpcId"`
// The zones and vSwitches. You must specify at least two zones. See the following `Block zoneMappings`.
ZoneMappings []LoadBalancerZoneMapping `pulumi:"zoneMappings"`
}
type LoadBalancerState struct {
// The Access Logging Configuration Structure. See the following `Block accessLogConfig`.
AccessLogConfig LoadBalancerAccessLogConfigPtrInput
// The method in which IP addresses are assigned. Valid values: `Fixed` and `Dynamic`. Default value: `Dynamic`.
// *`Fixed`: The ALB instance uses a fixed IP address.
// *`Dynamic`: An IP address is dynamically assigned to each zone of the ALB instance.
AddressAllocatedMode pulumi.StringPtrInput
// The IP version. Valid values: `Ipv4`, `DualStack`.
AddressIpVersion pulumi.StringPtrInput
// The type of IP address that the ALB instance uses to provide services. Valid values: `Intranet`, `Internet`. **NOTE:** From version 1.193.1, `addressType` can be modified.
AddressType pulumi.StringPtrInput
// The deletion protection enabled. Valid values: `true` and `false`. Default value: `false`.
DeletionProtectionEnabled pulumi.BoolPtrInput
// The domain name of the ALB instance. **NOTE:** Available in v1.158.0+.
DnsName pulumi.StringPtrInput
// Specifies whether to precheck the API request. Valid values: `true` and `false`.
DryRun pulumi.BoolPtrInput
// The configuration of the billing method. See the following `Block loadBalancerBillingConfig`.
LoadBalancerBillingConfig LoadBalancerLoadBalancerBillingConfigPtrInput
// The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: `Basic`, `Standard` and `StandardWithWaf`(Available in v1.193.1+).
LoadBalancerEdition pulumi.StringPtrInput
// The name of the resource.
LoadBalancerName pulumi.StringPtrInput
// Modify the Protection Configuration. See the following `Block modificationProtectionConfig`.
ModificationProtectionConfig LoadBalancerModificationProtectionConfigPtrInput
// The ID of the resource group.
ResourceGroupId pulumi.StringPtrInput
// Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: `NonProtection` and `ConsoleProtection`.
Status pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.MapInput
// The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
VpcId pulumi.StringPtrInput
// The zones and vSwitches. You must specify at least two zones. See the following `Block zoneMappings`.
ZoneMappings LoadBalancerZoneMappingArrayInput
}
func (LoadBalancerState) ElementType() reflect.Type {
return reflect.TypeOf((*loadBalancerState)(nil)).Elem()
}
type loadBalancerArgs struct {
// The Access Logging Configuration Structure. See the following `Block accessLogConfig`.
AccessLogConfig *LoadBalancerAccessLogConfig `pulumi:"accessLogConfig"`
// The method in which IP addresses are assigned. Valid values: `Fixed` and `Dynamic`. Default value: `Dynamic`.
// *`Fixed`: The ALB instance uses a fixed IP address.
// *`Dynamic`: An IP address is dynamically assigned to each zone of the ALB instance.
AddressAllocatedMode *string `pulumi:"addressAllocatedMode"`
// The IP version. Valid values: `Ipv4`, `DualStack`.
AddressIpVersion *string `pulumi:"addressIpVersion"`
// The type of IP address that the ALB instance uses to provide services. Valid values: `Intranet`, `Internet`. **NOTE:** From version 1.193.1, `addressType` can be modified.
AddressType string `pulumi:"addressType"`
// The deletion protection enabled. Valid values: `true` and `false`. Default value: `false`.
DeletionProtectionEnabled *bool `pulumi:"deletionProtectionEnabled"`
// Specifies whether to precheck the API request. Valid values: `true` and `false`.
DryRun *bool `pulumi:"dryRun"`
// The configuration of the billing method. See the following `Block loadBalancerBillingConfig`.
LoadBalancerBillingConfig LoadBalancerLoadBalancerBillingConfig `pulumi:"loadBalancerBillingConfig"`
// The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: `Basic`, `Standard` and `StandardWithWaf`(Available in v1.193.1+).
LoadBalancerEdition string `pulumi:"loadBalancerEdition"`
// The name of the resource.
LoadBalancerName string `pulumi:"loadBalancerName"`
// Modify the Protection Configuration. See the following `Block modificationProtectionConfig`.
ModificationProtectionConfig *LoadBalancerModificationProtectionConfig `pulumi:"modificationProtectionConfig"`
// The ID of the resource group.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// A mapping of tags to assign to the resource.
Tags map[string]interface{} `pulumi:"tags"`
// The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
VpcId string `pulumi:"vpcId"`
// The zones and vSwitches. You must specify at least two zones. See the following `Block zoneMappings`.
ZoneMappings []LoadBalancerZoneMapping `pulumi:"zoneMappings"`
}
// The set of arguments for constructing a LoadBalancer resource.
type LoadBalancerArgs struct {
// The Access Logging Configuration Structure. See the following `Block accessLogConfig`.
AccessLogConfig LoadBalancerAccessLogConfigPtrInput
// The method in which IP addresses are assigned. Valid values: `Fixed` and `Dynamic`. Default value: `Dynamic`.
// *`Fixed`: The ALB instance uses a fixed IP address.
// *`Dynamic`: An IP address is dynamically assigned to each zone of the ALB instance.
AddressAllocatedMode pulumi.StringPtrInput
// The IP version. Valid values: `Ipv4`, `DualStack`.
AddressIpVersion pulumi.StringPtrInput
// The type of IP address that the ALB instance uses to provide services. Valid values: `Intranet`, `Internet`. **NOTE:** From version 1.193.1, `addressType` can be modified.
AddressType pulumi.StringInput
// The deletion protection enabled. Valid values: `true` and `false`. Default value: `false`.
DeletionProtectionEnabled pulumi.BoolPtrInput
// Specifies whether to precheck the API request. Valid values: `true` and `false`.
DryRun pulumi.BoolPtrInput
// The configuration of the billing method. See the following `Block loadBalancerBillingConfig`.
LoadBalancerBillingConfig LoadBalancerLoadBalancerBillingConfigInput
// The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: `Basic`, `Standard` and `StandardWithWaf`(Available in v1.193.1+).
LoadBalancerEdition pulumi.StringInput
// The name of the resource.
LoadBalancerName pulumi.StringInput
// Modify the Protection Configuration. See the following `Block modificationProtectionConfig`.
ModificationProtectionConfig LoadBalancerModificationProtectionConfigPtrInput
// The ID of the resource group.
ResourceGroupId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.MapInput
// The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
VpcId pulumi.StringInput
// The zones and vSwitches. You must specify at least two zones. See the following `Block zoneMappings`.
ZoneMappings LoadBalancerZoneMappingArrayInput
}
func (LoadBalancerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*loadBalancerArgs)(nil)).Elem()
}
type LoadBalancerInput interface {
pulumi.Input
ToLoadBalancerOutput() LoadBalancerOutput
ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput
}
func (*LoadBalancer) ElementType() reflect.Type {
return reflect.TypeOf((**LoadBalancer)(nil)).Elem()
}
func (i *LoadBalancer) ToLoadBalancerOutput() LoadBalancerOutput {
return i.ToLoadBalancerOutputWithContext(context.Background())
}
func (i *LoadBalancer) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerOutput)
}
// LoadBalancerArrayInput is an input type that accepts LoadBalancerArray and LoadBalancerArrayOutput values.
// You can construct a concrete instance of `LoadBalancerArrayInput` via:
//
// LoadBalancerArray{ LoadBalancerArgs{...} }
type LoadBalancerArrayInput interface {
pulumi.Input
ToLoadBalancerArrayOutput() LoadBalancerArrayOutput
ToLoadBalancerArrayOutputWithContext(context.Context) LoadBalancerArrayOutput
}
type LoadBalancerArray []LoadBalancerInput
func (LoadBalancerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem()
}
func (i LoadBalancerArray) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput {
return i.ToLoadBalancerArrayOutputWithContext(context.Background())
}
func (i LoadBalancerArray) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerArrayOutput)
}
// LoadBalancerMapInput is an input type that accepts LoadBalancerMap and LoadBalancerMapOutput values.
// You can construct a concrete instance of `LoadBalancerMapInput` via:
//
// LoadBalancerMap{ "key": LoadBalancerArgs{...} }
type LoadBalancerMapInput interface {
pulumi.Input
ToLoadBalancerMapOutput() LoadBalancerMapOutput
ToLoadBalancerMapOutputWithContext(context.Context) LoadBalancerMapOutput
}
type LoadBalancerMap map[string]LoadBalancerInput
func (LoadBalancerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem()
}
func (i LoadBalancerMap) ToLoadBalancerMapOutput() LoadBalancerMapOutput {
return i.ToLoadBalancerMapOutputWithContext(context.Background())
}
func (i LoadBalancerMap) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerMapOutput)
}
type LoadBalancerOutput struct{ *pulumi.OutputState }
func (LoadBalancerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LoadBalancer)(nil)).Elem()
}
func (o LoadBalancerOutput) ToLoadBalancerOutput() LoadBalancerOutput {
return o
}
func (o LoadBalancerOutput) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput {
return o
}
// The Access Logging Configuration Structure. See the following `Block accessLogConfig`.
func (o LoadBalancerOutput) AccessLogConfig() LoadBalancerAccessLogConfigPtrOutput {
return o.ApplyT(func(v *LoadBalancer) LoadBalancerAccessLogConfigPtrOutput { return v.AccessLogConfig }).(LoadBalancerAccessLogConfigPtrOutput)
}
// The method in which IP addresses are assigned. Valid values: `Fixed` and `Dynamic`. Default value: `Dynamic`.
// *`Fixed`: The ALB instance uses a fixed IP address.
// *`Dynamic`: An IP address is dynamically assigned to each zone of the ALB instance.
func (o LoadBalancerOutput) AddressAllocatedMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.AddressAllocatedMode }).(pulumi.StringPtrOutput)
}
// The IP version. Valid values: `Ipv4`, `DualStack`.
func (o LoadBalancerOutput) AddressIpVersion() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.AddressIpVersion }).(pulumi.StringOutput)
}
// The type of IP address that the ALB instance uses to provide services. Valid values: `Intranet`, `Internet`. **NOTE:** From version 1.193.1, `addressType` can be modified.
func (o LoadBalancerOutput) AddressType() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.AddressType }).(pulumi.StringOutput)
}
// The deletion protection enabled. Valid values: `true` and `false`. Default value: `false`.
func (o LoadBalancerOutput) DeletionProtectionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.DeletionProtectionEnabled }).(pulumi.BoolPtrOutput)
}
// The domain name of the ALB instance. **NOTE:** Available in v1.158.0+.
func (o LoadBalancerOutput) DnsName() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput)
}
// Specifies whether to precheck the API request. Valid values: `true` and `false`.
func (o LoadBalancerOutput) DryRun() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.BoolPtrOutput { return v.DryRun }).(pulumi.BoolPtrOutput)
}
// The configuration of the billing method. See the following `Block loadBalancerBillingConfig`.
func (o LoadBalancerOutput) LoadBalancerBillingConfig() LoadBalancerLoadBalancerBillingConfigOutput {
return o.ApplyT(func(v *LoadBalancer) LoadBalancerLoadBalancerBillingConfigOutput { return v.LoadBalancerBillingConfig }).(LoadBalancerLoadBalancerBillingConfigOutput)
}
// The edition of the ALB instance. Different editions have different limits and billing methods. Valid values: `Basic`, `Standard` and `StandardWithWaf`(Available in v1.193.1+).
func (o LoadBalancerOutput) LoadBalancerEdition() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.LoadBalancerEdition }).(pulumi.StringOutput)
}
// The name of the resource.
func (o LoadBalancerOutput) LoadBalancerName() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.LoadBalancerName }).(pulumi.StringOutput)
}
// Modify the Protection Configuration. See the following `Block modificationProtectionConfig`.
func (o LoadBalancerOutput) ModificationProtectionConfig() LoadBalancerModificationProtectionConfigOutput {
return o.ApplyT(func(v *LoadBalancer) LoadBalancerModificationProtectionConfigOutput {
return v.ModificationProtectionConfig
}).(LoadBalancerModificationProtectionConfigOutput)
}
// The ID of the resource group.
func (o LoadBalancerOutput) ResourceGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.ResourceGroupId }).(pulumi.StringOutput)
}
// Specifies whether to enable the configuration read-only mode for the ALB instance. Valid values: `NonProtection` and `ConsoleProtection`.
func (o LoadBalancerOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o LoadBalancerOutput) Tags() pulumi.MapOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.MapOutput { return v.Tags }).(pulumi.MapOutput)
}
// The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
func (o LoadBalancerOutput) VpcId() pulumi.StringOutput {
return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
}
// The zones and vSwitches. You must specify at least two zones. See the following `Block zoneMappings`.
func (o LoadBalancerOutput) ZoneMappings() LoadBalancerZoneMappingArrayOutput {
return o.ApplyT(func(v *LoadBalancer) LoadBalancerZoneMappingArrayOutput { return v.ZoneMappings }).(LoadBalancerZoneMappingArrayOutput)
}
type LoadBalancerArrayOutput struct{ *pulumi.OutputState }
func (LoadBalancerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem()
}
func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput {
return o
}
func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput {
return o
}
func (o LoadBalancerArrayOutput) Index(i pulumi.IntInput) LoadBalancerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LoadBalancer {
return vs[0].([]*LoadBalancer)[vs[1].(int)]
}).(LoadBalancerOutput)
}
type LoadBalancerMapOutput struct{ *pulumi.OutputState }
func (LoadBalancerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem()
}
func (o LoadBalancerMapOutput) ToLoadBalancerMapOutput() LoadBalancerMapOutput {
return o
}
func (o LoadBalancerMapOutput) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput {
return o
}
func (o LoadBalancerMapOutput) MapIndex(k pulumi.StringInput) LoadBalancerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LoadBalancer {
return vs[0].(map[string]*LoadBalancer)[vs[1].(string)]
}).(LoadBalancerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerInput)(nil)).Elem(), &LoadBalancer{})
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerArrayInput)(nil)).Elem(), LoadBalancerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerMapInput)(nil)).Elem(), LoadBalancerMap{})
pulumi.RegisterOutputType(LoadBalancerOutput{})
pulumi.RegisterOutputType(LoadBalancerArrayOutput{})
pulumi.RegisterOutputType(LoadBalancerMapOutput{})
}