generated from pulumi/pulumi-tf-provider-boilerplate
/
transitRouterVpcAttachment.go
544 lines (483 loc) · 26.1 KB
/
transitRouterVpcAttachment.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
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
// 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 cen
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a CEN transit router VPC attachment resource that associate the VPC with the CEN instance. [What is Cen Transit Router VPC Attachment](https://help.aliyun.com/document_detail/261358.html)
//
// > **NOTE:** Available in 1.126.0+
//
// ## Example Usage
//
// # Basic Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/cen"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
// "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/cen"
// "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/vpc"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// cfg := config.New(ctx, "")
// transitRouterAttachmentName := "sdk_rebot_cen_tr_yaochi"
// if param := cfg.Get("transitRouterAttachmentName"); param != "" {
// transitRouterAttachmentName = param
// }
// transitRouterAttachmentDescription := "sdk_rebot_cen_tr_yaochi"
// if param := cfg.Get("transitRouterAttachmentDescription"); param != "" {
// transitRouterAttachmentDescription = param
// }
// defaultTransitRouterAvailableResources, err := cen.GetTransitRouterAvailableResources(ctx, nil, nil)
// if err != nil {
// return err
// }
// defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
// VpcName: pulumi.String("sdk_rebot_cen_tr_yaochi"),
// CidrBlock: pulumi.String("192.168.0.0/16"),
// })
// if err != nil {
// return err
// }
// defaultMaster, err := vpc.NewSwitch(ctx, "defaultMaster", &vpc.SwitchArgs{
// VswitchName: pulumi.String("sdk_rebot_cen_tr_yaochi"),
// VpcId: defaultNetwork.ID(),
// CidrBlock: pulumi.String("192.168.1.0/24"),
// ZoneId: pulumi.String(defaultTransitRouterAvailableResources.Resources[0].MasterZones[0]),
// })
// if err != nil {
// return err
// }
// defaultSlave, err := vpc.NewSwitch(ctx, "defaultSlave", &vpc.SwitchArgs{
// VswitchName: pulumi.String("sdk_rebot_cen_tr_yaochi"),
// VpcId: defaultNetwork.ID(),
// CidrBlock: pulumi.String("192.168.2.0/24"),
// ZoneId: pulumi.String(defaultTransitRouterAvailableResources.Resources[0].SlaveZones[0]),
// })
// if err != nil {
// return err
// }
// defaultInstance, err := cen.NewInstance(ctx, "defaultInstance", &cen.InstanceArgs{
// CenInstanceName: pulumi.String("sdk_rebot_cen_tr_yaochi"),
// ProtectionLevel: pulumi.String("REDUCED"),
// })
// if err != nil {
// return err
// }
// defaultTransitRouter, err := cen.NewTransitRouter(ctx, "defaultTransitRouter", &cen.TransitRouterArgs{
// CenId: defaultInstance.ID(),
// })
// if err != nil {
// return err
// }
// _, err = cen.NewTransitRouterVpcAttachment(ctx, "defaultTransitRouterVpcAttachment", &cen.TransitRouterVpcAttachmentArgs{
// CenId: defaultInstance.ID(),
// TransitRouterId: defaultTransitRouter.ID(),
// VpcId: defaultNetwork.ID(),
// ZoneMappings: cen.TransitRouterVpcAttachmentZoneMappingArray{
// &cen.TransitRouterVpcAttachmentZoneMappingArgs{
// ZoneId: pulumi.Any(data.Alicloud_cen_transit_router_available_resource.Default.Zones[0].Master_zones[0]),
// VswitchId: defaultMaster.ID(),
// },
// &cen.TransitRouterVpcAttachmentZoneMappingArgs{
// ZoneId: pulumi.Any(data.Alicloud_cen_transit_router_available_resource.Default.Zones[0].Slave_zones[0]),
// VswitchId: defaultSlave.ID(),
// },
// },
// TransitRouterAttachmentName: pulumi.String(transitRouterAttachmentName),
// TransitRouterAttachmentDescription: pulumi.String(transitRouterAttachmentDescription),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// CEN instance can be imported using the id, e.g.
//
// ```sh
//
// $ pulumi import alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment example tr-********:tr-attach-********
//
// ```
type TransitRouterVpcAttachment struct {
pulumi.CustomResourceState
// The ID of the CEN.
CenId pulumi.StringOutput `pulumi:"cenId"`
// The dry run.
DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`
// The payment type of the resource. Valid values: `PayAsYouGo`.
PaymentType pulumi.StringOutput `pulumi:"paymentType"`
// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
ResourceType pulumi.StringPtrOutput `pulumi:"resourceType"`
// Deprecated: Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.
RouteTableAssociationEnabled pulumi.BoolPtrOutput `pulumi:"routeTableAssociationEnabled"`
// Deprecated: Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.
RouteTablePropagationEnabled pulumi.BoolPtrOutput `pulumi:"routeTablePropagationEnabled"`
// The associating status of the network.
Status pulumi.StringOutput `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags pulumi.MapOutput `pulumi:"tags"`
// The description of the transit router vbr attachment.
TransitRouterAttachmentDescription pulumi.StringPtrOutput `pulumi:"transitRouterAttachmentDescription"`
// The ID of transit router attachment.
TransitRouterAttachmentId pulumi.StringOutput `pulumi:"transitRouterAttachmentId"`
// The name of the transit router vbr attachment.
TransitRouterAttachmentName pulumi.StringPtrOutput `pulumi:"transitRouterAttachmentName"`
// The ID of the transit router.
TransitRouterId pulumi.StringPtrOutput `pulumi:"transitRouterId"`
// The ID of the VPC.
VpcId pulumi.StringOutput `pulumi:"vpcId"`
// The owner id of vpc.
VpcOwnerId pulumi.StringOutput `pulumi:"vpcOwnerId"`
// The list of zone mapping of the VPC. **NOTE:** From version 1.184.0, `zoneMappings` can be modified.
// > **NOTE:** The Zone of CEN has MasterZone and SlaveZone, first zoneId of zoneMapping need be MasterZone. We have a API to describeZones[API](https://help.aliyun.com/document_detail/261356.html)
ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayOutput `pulumi:"zoneMappings"`
}
// NewTransitRouterVpcAttachment registers a new resource with the given unique name, arguments, and options.
func NewTransitRouterVpcAttachment(ctx *pulumi.Context,
name string, args *TransitRouterVpcAttachmentArgs, opts ...pulumi.ResourceOption) (*TransitRouterVpcAttachment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CenId == nil {
return nil, errors.New("invalid value for required argument 'CenId'")
}
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 TransitRouterVpcAttachment
err := ctx.RegisterResource("alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTransitRouterVpcAttachment gets an existing TransitRouterVpcAttachment 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 GetTransitRouterVpcAttachment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TransitRouterVpcAttachmentState, opts ...pulumi.ResourceOption) (*TransitRouterVpcAttachment, error) {
var resource TransitRouterVpcAttachment
err := ctx.ReadResource("alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TransitRouterVpcAttachment resources.
type transitRouterVpcAttachmentState struct {
// The ID of the CEN.
CenId *string `pulumi:"cenId"`
// The dry run.
DryRun *bool `pulumi:"dryRun"`
// The payment type of the resource. Valid values: `PayAsYouGo`.
PaymentType *string `pulumi:"paymentType"`
// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
ResourceType *string `pulumi:"resourceType"`
// Deprecated: Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.
RouteTableAssociationEnabled *bool `pulumi:"routeTableAssociationEnabled"`
// Deprecated: Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.
RouteTablePropagationEnabled *bool `pulumi:"routeTablePropagationEnabled"`
// The associating status of the network.
Status *string `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags map[string]interface{} `pulumi:"tags"`
// The description of the transit router vbr attachment.
TransitRouterAttachmentDescription *string `pulumi:"transitRouterAttachmentDescription"`
// The ID of transit router attachment.
TransitRouterAttachmentId *string `pulumi:"transitRouterAttachmentId"`
// The name of the transit router vbr attachment.
TransitRouterAttachmentName *string `pulumi:"transitRouterAttachmentName"`
// The ID of the transit router.
TransitRouterId *string `pulumi:"transitRouterId"`
// The ID of the VPC.
VpcId *string `pulumi:"vpcId"`
// The owner id of vpc.
VpcOwnerId *string `pulumi:"vpcOwnerId"`
// The list of zone mapping of the VPC. **NOTE:** From version 1.184.0, `zoneMappings` can be modified.
// > **NOTE:** The Zone of CEN has MasterZone and SlaveZone, first zoneId of zoneMapping need be MasterZone. We have a API to describeZones[API](https://help.aliyun.com/document_detail/261356.html)
ZoneMappings []TransitRouterVpcAttachmentZoneMapping `pulumi:"zoneMappings"`
}
type TransitRouterVpcAttachmentState struct {
// The ID of the CEN.
CenId pulumi.StringPtrInput
// The dry run.
DryRun pulumi.BoolPtrInput
// The payment type of the resource. Valid values: `PayAsYouGo`.
PaymentType pulumi.StringPtrInput
// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
ResourceType pulumi.StringPtrInput
// Deprecated: Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.
RouteTableAssociationEnabled pulumi.BoolPtrInput
// Deprecated: Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.
RouteTablePropagationEnabled pulumi.BoolPtrInput
// The associating status of the network.
Status pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.MapInput
// The description of the transit router vbr attachment.
TransitRouterAttachmentDescription pulumi.StringPtrInput
// The ID of transit router attachment.
TransitRouterAttachmentId pulumi.StringPtrInput
// The name of the transit router vbr attachment.
TransitRouterAttachmentName pulumi.StringPtrInput
// The ID of the transit router.
TransitRouterId pulumi.StringPtrInput
// The ID of the VPC.
VpcId pulumi.StringPtrInput
// The owner id of vpc.
VpcOwnerId pulumi.StringPtrInput
// The list of zone mapping of the VPC. **NOTE:** From version 1.184.0, `zoneMappings` can be modified.
// > **NOTE:** The Zone of CEN has MasterZone and SlaveZone, first zoneId of zoneMapping need be MasterZone. We have a API to describeZones[API](https://help.aliyun.com/document_detail/261356.html)
ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayInput
}
func (TransitRouterVpcAttachmentState) ElementType() reflect.Type {
return reflect.TypeOf((*transitRouterVpcAttachmentState)(nil)).Elem()
}
type transitRouterVpcAttachmentArgs struct {
// The ID of the CEN.
CenId string `pulumi:"cenId"`
// The dry run.
DryRun *bool `pulumi:"dryRun"`
// The payment type of the resource. Valid values: `PayAsYouGo`.
PaymentType *string `pulumi:"paymentType"`
// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
ResourceType *string `pulumi:"resourceType"`
// Deprecated: Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.
RouteTableAssociationEnabled *bool `pulumi:"routeTableAssociationEnabled"`
// Deprecated: Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.
RouteTablePropagationEnabled *bool `pulumi:"routeTablePropagationEnabled"`
// A mapping of tags to assign to the resource.
Tags map[string]interface{} `pulumi:"tags"`
// The description of the transit router vbr attachment.
TransitRouterAttachmentDescription *string `pulumi:"transitRouterAttachmentDescription"`
// The name of the transit router vbr attachment.
TransitRouterAttachmentName *string `pulumi:"transitRouterAttachmentName"`
// The ID of the transit router.
TransitRouterId *string `pulumi:"transitRouterId"`
// The ID of the VPC.
VpcId string `pulumi:"vpcId"`
// The owner id of vpc.
VpcOwnerId *string `pulumi:"vpcOwnerId"`
// The list of zone mapping of the VPC. **NOTE:** From version 1.184.0, `zoneMappings` can be modified.
// > **NOTE:** The Zone of CEN has MasterZone and SlaveZone, first zoneId of zoneMapping need be MasterZone. We have a API to describeZones[API](https://help.aliyun.com/document_detail/261356.html)
ZoneMappings []TransitRouterVpcAttachmentZoneMapping `pulumi:"zoneMappings"`
}
// The set of arguments for constructing a TransitRouterVpcAttachment resource.
type TransitRouterVpcAttachmentArgs struct {
// The ID of the CEN.
CenId pulumi.StringInput
// The dry run.
DryRun pulumi.BoolPtrInput
// The payment type of the resource. Valid values: `PayAsYouGo`.
PaymentType pulumi.StringPtrInput
// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
ResourceType pulumi.StringPtrInput
// Deprecated: Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.
RouteTableAssociationEnabled pulumi.BoolPtrInput
// Deprecated: Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.
RouteTablePropagationEnabled pulumi.BoolPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.MapInput
// The description of the transit router vbr attachment.
TransitRouterAttachmentDescription pulumi.StringPtrInput
// The name of the transit router vbr attachment.
TransitRouterAttachmentName pulumi.StringPtrInput
// The ID of the transit router.
TransitRouterId pulumi.StringPtrInput
// The ID of the VPC.
VpcId pulumi.StringInput
// The owner id of vpc.
VpcOwnerId pulumi.StringPtrInput
// The list of zone mapping of the VPC. **NOTE:** From version 1.184.0, `zoneMappings` can be modified.
// > **NOTE:** The Zone of CEN has MasterZone and SlaveZone, first zoneId of zoneMapping need be MasterZone. We have a API to describeZones[API](https://help.aliyun.com/document_detail/261356.html)
ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayInput
}
func (TransitRouterVpcAttachmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*transitRouterVpcAttachmentArgs)(nil)).Elem()
}
type TransitRouterVpcAttachmentInput interface {
pulumi.Input
ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput
ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput
}
func (*TransitRouterVpcAttachment) ElementType() reflect.Type {
return reflect.TypeOf((**TransitRouterVpcAttachment)(nil)).Elem()
}
func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput {
return i.ToTransitRouterVpcAttachmentOutputWithContext(context.Background())
}
func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentOutput)
}
// TransitRouterVpcAttachmentArrayInput is an input type that accepts TransitRouterVpcAttachmentArray and TransitRouterVpcAttachmentArrayOutput values.
// You can construct a concrete instance of `TransitRouterVpcAttachmentArrayInput` via:
//
// TransitRouterVpcAttachmentArray{ TransitRouterVpcAttachmentArgs{...} }
type TransitRouterVpcAttachmentArrayInput interface {
pulumi.Input
ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput
ToTransitRouterVpcAttachmentArrayOutputWithContext(context.Context) TransitRouterVpcAttachmentArrayOutput
}
type TransitRouterVpcAttachmentArray []TransitRouterVpcAttachmentInput
func (TransitRouterVpcAttachmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TransitRouterVpcAttachment)(nil)).Elem()
}
func (i TransitRouterVpcAttachmentArray) ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput {
return i.ToTransitRouterVpcAttachmentArrayOutputWithContext(context.Background())
}
func (i TransitRouterVpcAttachmentArray) ToTransitRouterVpcAttachmentArrayOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentArrayOutput)
}
// TransitRouterVpcAttachmentMapInput is an input type that accepts TransitRouterVpcAttachmentMap and TransitRouterVpcAttachmentMapOutput values.
// You can construct a concrete instance of `TransitRouterVpcAttachmentMapInput` via:
//
// TransitRouterVpcAttachmentMap{ "key": TransitRouterVpcAttachmentArgs{...} }
type TransitRouterVpcAttachmentMapInput interface {
pulumi.Input
ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput
ToTransitRouterVpcAttachmentMapOutputWithContext(context.Context) TransitRouterVpcAttachmentMapOutput
}
type TransitRouterVpcAttachmentMap map[string]TransitRouterVpcAttachmentInput
func (TransitRouterVpcAttachmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TransitRouterVpcAttachment)(nil)).Elem()
}
func (i TransitRouterVpcAttachmentMap) ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput {
return i.ToTransitRouterVpcAttachmentMapOutputWithContext(context.Background())
}
func (i TransitRouterVpcAttachmentMap) ToTransitRouterVpcAttachmentMapOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentMapOutput)
}
type TransitRouterVpcAttachmentOutput struct{ *pulumi.OutputState }
func (TransitRouterVpcAttachmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TransitRouterVpcAttachment)(nil)).Elem()
}
func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput {
return o
}
func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput {
return o
}
// The ID of the CEN.
func (o TransitRouterVpcAttachmentOutput) CenId() pulumi.StringOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringOutput { return v.CenId }).(pulumi.StringOutput)
}
// The dry run.
func (o TransitRouterVpcAttachmentOutput) DryRun() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.BoolPtrOutput { return v.DryRun }).(pulumi.BoolPtrOutput)
}
// The payment type of the resource. Valid values: `PayAsYouGo`.
func (o TransitRouterVpcAttachmentOutput) PaymentType() pulumi.StringOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringOutput { return v.PaymentType }).(pulumi.StringOutput)
}
// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
func (o TransitRouterVpcAttachmentOutput) ResourceType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringPtrOutput { return v.ResourceType }).(pulumi.StringPtrOutput)
}
// Deprecated: Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.
func (o TransitRouterVpcAttachmentOutput) RouteTableAssociationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.BoolPtrOutput { return v.RouteTableAssociationEnabled }).(pulumi.BoolPtrOutput)
}
// Deprecated: Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.
func (o TransitRouterVpcAttachmentOutput) RouteTablePropagationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.BoolPtrOutput { return v.RouteTablePropagationEnabled }).(pulumi.BoolPtrOutput)
}
// The associating status of the network.
func (o TransitRouterVpcAttachmentOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o TransitRouterVpcAttachmentOutput) Tags() pulumi.MapOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.MapOutput { return v.Tags }).(pulumi.MapOutput)
}
// The description of the transit router vbr attachment.
func (o TransitRouterVpcAttachmentOutput) TransitRouterAttachmentDescription() pulumi.StringPtrOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringPtrOutput {
return v.TransitRouterAttachmentDescription
}).(pulumi.StringPtrOutput)
}
// The ID of transit router attachment.
func (o TransitRouterVpcAttachmentOutput) TransitRouterAttachmentId() pulumi.StringOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringOutput { return v.TransitRouterAttachmentId }).(pulumi.StringOutput)
}
// The name of the transit router vbr attachment.
func (o TransitRouterVpcAttachmentOutput) TransitRouterAttachmentName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringPtrOutput { return v.TransitRouterAttachmentName }).(pulumi.StringPtrOutput)
}
// The ID of the transit router.
func (o TransitRouterVpcAttachmentOutput) TransitRouterId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringPtrOutput { return v.TransitRouterId }).(pulumi.StringPtrOutput)
}
// The ID of the VPC.
func (o TransitRouterVpcAttachmentOutput) VpcId() pulumi.StringOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
}
// The owner id of vpc.
func (o TransitRouterVpcAttachmentOutput) VpcOwnerId() pulumi.StringOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) pulumi.StringOutput { return v.VpcOwnerId }).(pulumi.StringOutput)
}
// The list of zone mapping of the VPC. **NOTE:** From version 1.184.0, `zoneMappings` can be modified.
// > **NOTE:** The Zone of CEN has MasterZone and SlaveZone, first zoneId of zoneMapping need be MasterZone. We have a API to describeZones[API](https://help.aliyun.com/document_detail/261356.html)
func (o TransitRouterVpcAttachmentOutput) ZoneMappings() TransitRouterVpcAttachmentZoneMappingArrayOutput {
return o.ApplyT(func(v *TransitRouterVpcAttachment) TransitRouterVpcAttachmentZoneMappingArrayOutput {
return v.ZoneMappings
}).(TransitRouterVpcAttachmentZoneMappingArrayOutput)
}
type TransitRouterVpcAttachmentArrayOutput struct{ *pulumi.OutputState }
func (TransitRouterVpcAttachmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TransitRouterVpcAttachment)(nil)).Elem()
}
func (o TransitRouterVpcAttachmentArrayOutput) ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput {
return o
}
func (o TransitRouterVpcAttachmentArrayOutput) ToTransitRouterVpcAttachmentArrayOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentArrayOutput {
return o
}
func (o TransitRouterVpcAttachmentArrayOutput) Index(i pulumi.IntInput) TransitRouterVpcAttachmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TransitRouterVpcAttachment {
return vs[0].([]*TransitRouterVpcAttachment)[vs[1].(int)]
}).(TransitRouterVpcAttachmentOutput)
}
type TransitRouterVpcAttachmentMapOutput struct{ *pulumi.OutputState }
func (TransitRouterVpcAttachmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TransitRouterVpcAttachment)(nil)).Elem()
}
func (o TransitRouterVpcAttachmentMapOutput) ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput {
return o
}
func (o TransitRouterVpcAttachmentMapOutput) ToTransitRouterVpcAttachmentMapOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentMapOutput {
return o
}
func (o TransitRouterVpcAttachmentMapOutput) MapIndex(k pulumi.StringInput) TransitRouterVpcAttachmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TransitRouterVpcAttachment {
return vs[0].(map[string]*TransitRouterVpcAttachment)[vs[1].(string)]
}).(TransitRouterVpcAttachmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TransitRouterVpcAttachmentInput)(nil)).Elem(), &TransitRouterVpcAttachment{})
pulumi.RegisterInputType(reflect.TypeOf((*TransitRouterVpcAttachmentArrayInput)(nil)).Elem(), TransitRouterVpcAttachmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TransitRouterVpcAttachmentMapInput)(nil)).Elem(), TransitRouterVpcAttachmentMap{})
pulumi.RegisterOutputType(TransitRouterVpcAttachmentOutput{})
pulumi.RegisterOutputType(TransitRouterVpcAttachmentArrayOutput{})
pulumi.RegisterOutputType(TransitRouterVpcAttachmentMapOutput{})
}