/
trail.go
517 lines (458 loc) · 21.6 KB
/
trail.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
// 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 actiontrail
import (
"context"
"reflect"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a ActionTrail Trail resource. For information about alicloud actiontrail trail and how to use it, see [What is Resource Alicloud ActionTrail Trail](https://www.alibabacloud.com/help/en/actiontrail/latest/api-actiontrail-2020-07-06-createtrail).
//
// > **NOTE:** Available since v1.95.0.
//
// > **NOTE:** You can create a trail to deliver events to Log Service, Object Storage Service (OSS), or both. Before you call this operation to create a trail, make sure that the following requirements are met.
// - Deliver events to Log Service: A project is created in Log Service.
// - Deliver events to OSS: A bucket is created in OSS.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/actiontrail"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
// "github.com/pulumi/pulumi-random/sdk/v4/go/random"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// cfg := config.New(ctx, "")
// name := "tf-example"
// if param := cfg.Get("name"); param != "" {
// name = param
// }
// _, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
// Min: 10000,
// Max: 99999,
// })
// if err != nil {
// return err
// }
// example, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
// Current: pulumi.BoolRef(true),
// }, nil)
// if err != nil {
// return err
// }
// exampleGetAccount, err := alicloud.GetAccount(ctx, nil, nil)
// if err != nil {
// return err
// }
// exampleProject, err := log.NewProject(ctx, "example", &log.ProjectArgs{
// ProjectName: pulumi.String(fmt.Sprintf("%v-%v", name, _default.Result)),
// Description: pulumi.String("tf actiontrail example"),
// })
// if err != nil {
// return err
// }
// exampleGetRoles, err := ram.GetRoles(ctx, &ram.GetRolesArgs{
// NameRegex: pulumi.StringRef("AliyunServiceRoleForActionTrail"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = actiontrail.NewTrail(ctx, "example", &actiontrail.TrailArgs{
// TrailName: pulumi.String(name),
// SlsWriteRoleArn: pulumi.String(exampleGetRoles.Roles[0].Arn),
// SlsProjectArn: exampleProject.Name.ApplyT(func(name string) (string, error) {
// return fmt.Sprintf("acs:log:%v:%v:project/%v", example.Regions[0].Id, exampleGetAccount.Id, name), nil
// }).(pulumi.StringOutput),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Action trail can be imported using the id or trail_name, e.g.
//
// ```sh
// $ pulumi import alicloud:actiontrail/trail:Trail default abc12345678
// ```
type Trail struct {
pulumi.CustomResourceState
// Indicates whether the event is a read or a write event. Valid values: `Read`, `Write`, and `All`. Default to `Write`.
EventRw pulumi.StringPtrOutput `pulumi:"eventRw"`
// Specifies whether to create a multi-account trail. Valid values:`true`: Create a multi-account trail.`false`: Create a single-account trail. It is the default value.
IsOrganizationTrail pulumi.BoolPtrOutput `pulumi:"isOrganizationTrail"`
// Field `mnsTopicArn` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'mns_topic_arn' has been deprecated from version 1.118.0
MnsTopicArn pulumi.StringPtrOutput `pulumi:"mnsTopicArn"`
// Field `name` has been deprecated from version 1.95.0. Use `trailName` instead.
//
// Deprecated: Field 'name' has been deprecated from version 1.95.0. Use 'trail_name' instead.
Name pulumi.StringOutput `pulumi:"name"`
// The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
OssBucketName pulumi.StringPtrOutput `pulumi:"ossBucketName"`
// The prefix of the specified OSS bucket name. This parameter can be left empty.
OssKeyPrefix pulumi.StringPtrOutput `pulumi:"ossKeyPrefix"`
// The unique ARN of the Oss role.
OssWriteRoleArn pulumi.StringPtrOutput `pulumi:"ossWriteRoleArn"`
// Field `name` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'role_name' has been deprecated from version 1.118.0
RoleName pulumi.StringOutput `pulumi:"roleName"`
// The unique ARN of the Log Service project. Ensure that `slsProjectArn` is valid .
SlsProjectArn pulumi.StringPtrOutput `pulumi:"slsProjectArn"`
// The unique ARN of the Log Service role.
SlsWriteRoleArn pulumi.StringOutput `pulumi:"slsWriteRoleArn"`
// The status of ActionTrail Trail. After creation, tracking is turned on by default, and you can set the status value to `Disable` to turn off tracking. Valid values: `Enable`, `Disable`. Default to `Enable`.
Status pulumi.StringPtrOutput `pulumi:"status"`
// The name of the trail to be created, which must be unique for an account.
TrailName pulumi.StringOutput `pulumi:"trailName"`
// The regions to which the trail is applied. Default to `All`.
TrailRegion pulumi.StringOutput `pulumi:"trailRegion"`
}
// NewTrail registers a new resource with the given unique name, arguments, and options.
func NewTrail(ctx *pulumi.Context,
name string, args *TrailArgs, opts ...pulumi.ResourceOption) (*Trail, error) {
if args == nil {
args = &TrailArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Trail
err := ctx.RegisterResource("alicloud:actiontrail/trail:Trail", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTrail gets an existing Trail 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 GetTrail(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TrailState, opts ...pulumi.ResourceOption) (*Trail, error) {
var resource Trail
err := ctx.ReadResource("alicloud:actiontrail/trail:Trail", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Trail resources.
type trailState struct {
// Indicates whether the event is a read or a write event. Valid values: `Read`, `Write`, and `All`. Default to `Write`.
EventRw *string `pulumi:"eventRw"`
// Specifies whether to create a multi-account trail. Valid values:`true`: Create a multi-account trail.`false`: Create a single-account trail. It is the default value.
IsOrganizationTrail *bool `pulumi:"isOrganizationTrail"`
// Field `mnsTopicArn` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'mns_topic_arn' has been deprecated from version 1.118.0
MnsTopicArn *string `pulumi:"mnsTopicArn"`
// Field `name` has been deprecated from version 1.95.0. Use `trailName` instead.
//
// Deprecated: Field 'name' has been deprecated from version 1.95.0. Use 'trail_name' instead.
Name *string `pulumi:"name"`
// The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
OssBucketName *string `pulumi:"ossBucketName"`
// The prefix of the specified OSS bucket name. This parameter can be left empty.
OssKeyPrefix *string `pulumi:"ossKeyPrefix"`
// The unique ARN of the Oss role.
OssWriteRoleArn *string `pulumi:"ossWriteRoleArn"`
// Field `name` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'role_name' has been deprecated from version 1.118.0
RoleName *string `pulumi:"roleName"`
// The unique ARN of the Log Service project. Ensure that `slsProjectArn` is valid .
SlsProjectArn *string `pulumi:"slsProjectArn"`
// The unique ARN of the Log Service role.
SlsWriteRoleArn *string `pulumi:"slsWriteRoleArn"`
// The status of ActionTrail Trail. After creation, tracking is turned on by default, and you can set the status value to `Disable` to turn off tracking. Valid values: `Enable`, `Disable`. Default to `Enable`.
Status *string `pulumi:"status"`
// The name of the trail to be created, which must be unique for an account.
TrailName *string `pulumi:"trailName"`
// The regions to which the trail is applied. Default to `All`.
TrailRegion *string `pulumi:"trailRegion"`
}
type TrailState struct {
// Indicates whether the event is a read or a write event. Valid values: `Read`, `Write`, and `All`. Default to `Write`.
EventRw pulumi.StringPtrInput
// Specifies whether to create a multi-account trail. Valid values:`true`: Create a multi-account trail.`false`: Create a single-account trail. It is the default value.
IsOrganizationTrail pulumi.BoolPtrInput
// Field `mnsTopicArn` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'mns_topic_arn' has been deprecated from version 1.118.0
MnsTopicArn pulumi.StringPtrInput
// Field `name` has been deprecated from version 1.95.0. Use `trailName` instead.
//
// Deprecated: Field 'name' has been deprecated from version 1.95.0. Use 'trail_name' instead.
Name pulumi.StringPtrInput
// The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
OssBucketName pulumi.StringPtrInput
// The prefix of the specified OSS bucket name. This parameter can be left empty.
OssKeyPrefix pulumi.StringPtrInput
// The unique ARN of the Oss role.
OssWriteRoleArn pulumi.StringPtrInput
// Field `name` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'role_name' has been deprecated from version 1.118.0
RoleName pulumi.StringPtrInput
// The unique ARN of the Log Service project. Ensure that `slsProjectArn` is valid .
SlsProjectArn pulumi.StringPtrInput
// The unique ARN of the Log Service role.
SlsWriteRoleArn pulumi.StringPtrInput
// The status of ActionTrail Trail. After creation, tracking is turned on by default, and you can set the status value to `Disable` to turn off tracking. Valid values: `Enable`, `Disable`. Default to `Enable`.
Status pulumi.StringPtrInput
// The name of the trail to be created, which must be unique for an account.
TrailName pulumi.StringPtrInput
// The regions to which the trail is applied. Default to `All`.
TrailRegion pulumi.StringPtrInput
}
func (TrailState) ElementType() reflect.Type {
return reflect.TypeOf((*trailState)(nil)).Elem()
}
type trailArgs struct {
// Indicates whether the event is a read or a write event. Valid values: `Read`, `Write`, and `All`. Default to `Write`.
EventRw *string `pulumi:"eventRw"`
// Specifies whether to create a multi-account trail. Valid values:`true`: Create a multi-account trail.`false`: Create a single-account trail. It is the default value.
IsOrganizationTrail *bool `pulumi:"isOrganizationTrail"`
// Field `mnsTopicArn` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'mns_topic_arn' has been deprecated from version 1.118.0
MnsTopicArn *string `pulumi:"mnsTopicArn"`
// Field `name` has been deprecated from version 1.95.0. Use `trailName` instead.
//
// Deprecated: Field 'name' has been deprecated from version 1.95.0. Use 'trail_name' instead.
Name *string `pulumi:"name"`
// The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
OssBucketName *string `pulumi:"ossBucketName"`
// The prefix of the specified OSS bucket name. This parameter can be left empty.
OssKeyPrefix *string `pulumi:"ossKeyPrefix"`
// The unique ARN of the Oss role.
OssWriteRoleArn *string `pulumi:"ossWriteRoleArn"`
// Field `name` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'role_name' has been deprecated from version 1.118.0
RoleName *string `pulumi:"roleName"`
// The unique ARN of the Log Service project. Ensure that `slsProjectArn` is valid .
SlsProjectArn *string `pulumi:"slsProjectArn"`
// The unique ARN of the Log Service role.
SlsWriteRoleArn *string `pulumi:"slsWriteRoleArn"`
// The status of ActionTrail Trail. After creation, tracking is turned on by default, and you can set the status value to `Disable` to turn off tracking. Valid values: `Enable`, `Disable`. Default to `Enable`.
Status *string `pulumi:"status"`
// The name of the trail to be created, which must be unique for an account.
TrailName *string `pulumi:"trailName"`
// The regions to which the trail is applied. Default to `All`.
TrailRegion *string `pulumi:"trailRegion"`
}
// The set of arguments for constructing a Trail resource.
type TrailArgs struct {
// Indicates whether the event is a read or a write event. Valid values: `Read`, `Write`, and `All`. Default to `Write`.
EventRw pulumi.StringPtrInput
// Specifies whether to create a multi-account trail. Valid values:`true`: Create a multi-account trail.`false`: Create a single-account trail. It is the default value.
IsOrganizationTrail pulumi.BoolPtrInput
// Field `mnsTopicArn` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'mns_topic_arn' has been deprecated from version 1.118.0
MnsTopicArn pulumi.StringPtrInput
// Field `name` has been deprecated from version 1.95.0. Use `trailName` instead.
//
// Deprecated: Field 'name' has been deprecated from version 1.95.0. Use 'trail_name' instead.
Name pulumi.StringPtrInput
// The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
OssBucketName pulumi.StringPtrInput
// The prefix of the specified OSS bucket name. This parameter can be left empty.
OssKeyPrefix pulumi.StringPtrInput
// The unique ARN of the Oss role.
OssWriteRoleArn pulumi.StringPtrInput
// Field `name` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'role_name' has been deprecated from version 1.118.0
RoleName pulumi.StringPtrInput
// The unique ARN of the Log Service project. Ensure that `slsProjectArn` is valid .
SlsProjectArn pulumi.StringPtrInput
// The unique ARN of the Log Service role.
SlsWriteRoleArn pulumi.StringPtrInput
// The status of ActionTrail Trail. After creation, tracking is turned on by default, and you can set the status value to `Disable` to turn off tracking. Valid values: `Enable`, `Disable`. Default to `Enable`.
Status pulumi.StringPtrInput
// The name of the trail to be created, which must be unique for an account.
TrailName pulumi.StringPtrInput
// The regions to which the trail is applied. Default to `All`.
TrailRegion pulumi.StringPtrInput
}
func (TrailArgs) ElementType() reflect.Type {
return reflect.TypeOf((*trailArgs)(nil)).Elem()
}
type TrailInput interface {
pulumi.Input
ToTrailOutput() TrailOutput
ToTrailOutputWithContext(ctx context.Context) TrailOutput
}
func (*Trail) ElementType() reflect.Type {
return reflect.TypeOf((**Trail)(nil)).Elem()
}
func (i *Trail) ToTrailOutput() TrailOutput {
return i.ToTrailOutputWithContext(context.Background())
}
func (i *Trail) ToTrailOutputWithContext(ctx context.Context) TrailOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailOutput)
}
// TrailArrayInput is an input type that accepts TrailArray and TrailArrayOutput values.
// You can construct a concrete instance of `TrailArrayInput` via:
//
// TrailArray{ TrailArgs{...} }
type TrailArrayInput interface {
pulumi.Input
ToTrailArrayOutput() TrailArrayOutput
ToTrailArrayOutputWithContext(context.Context) TrailArrayOutput
}
type TrailArray []TrailInput
func (TrailArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Trail)(nil)).Elem()
}
func (i TrailArray) ToTrailArrayOutput() TrailArrayOutput {
return i.ToTrailArrayOutputWithContext(context.Background())
}
func (i TrailArray) ToTrailArrayOutputWithContext(ctx context.Context) TrailArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailArrayOutput)
}
// TrailMapInput is an input type that accepts TrailMap and TrailMapOutput values.
// You can construct a concrete instance of `TrailMapInput` via:
//
// TrailMap{ "key": TrailArgs{...} }
type TrailMapInput interface {
pulumi.Input
ToTrailMapOutput() TrailMapOutput
ToTrailMapOutputWithContext(context.Context) TrailMapOutput
}
type TrailMap map[string]TrailInput
func (TrailMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Trail)(nil)).Elem()
}
func (i TrailMap) ToTrailMapOutput() TrailMapOutput {
return i.ToTrailMapOutputWithContext(context.Background())
}
func (i TrailMap) ToTrailMapOutputWithContext(ctx context.Context) TrailMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailMapOutput)
}
type TrailOutput struct{ *pulumi.OutputState }
func (TrailOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Trail)(nil)).Elem()
}
func (o TrailOutput) ToTrailOutput() TrailOutput {
return o
}
func (o TrailOutput) ToTrailOutputWithContext(ctx context.Context) TrailOutput {
return o
}
// Indicates whether the event is a read or a write event. Valid values: `Read`, `Write`, and `All`. Default to `Write`.
func (o TrailOutput) EventRw() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Trail) pulumi.StringPtrOutput { return v.EventRw }).(pulumi.StringPtrOutput)
}
// Specifies whether to create a multi-account trail. Valid values:`true`: Create a multi-account trail.`false`: Create a single-account trail. It is the default value.
func (o TrailOutput) IsOrganizationTrail() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Trail) pulumi.BoolPtrOutput { return v.IsOrganizationTrail }).(pulumi.BoolPtrOutput)
}
// Field `mnsTopicArn` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'mns_topic_arn' has been deprecated from version 1.118.0
func (o TrailOutput) MnsTopicArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Trail) pulumi.StringPtrOutput { return v.MnsTopicArn }).(pulumi.StringPtrOutput)
}
// Field `name` has been deprecated from version 1.95.0. Use `trailName` instead.
//
// Deprecated: Field 'name' has been deprecated from version 1.95.0. Use 'trail_name' instead.
func (o TrailOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Trail) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
func (o TrailOutput) OssBucketName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Trail) pulumi.StringPtrOutput { return v.OssBucketName }).(pulumi.StringPtrOutput)
}
// The prefix of the specified OSS bucket name. This parameter can be left empty.
func (o TrailOutput) OssKeyPrefix() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Trail) pulumi.StringPtrOutput { return v.OssKeyPrefix }).(pulumi.StringPtrOutput)
}
// The unique ARN of the Oss role.
func (o TrailOutput) OssWriteRoleArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Trail) pulumi.StringPtrOutput { return v.OssWriteRoleArn }).(pulumi.StringPtrOutput)
}
// Field `name` has been deprecated from version 1.118.0.
//
// Deprecated: Field 'role_name' has been deprecated from version 1.118.0
func (o TrailOutput) RoleName() pulumi.StringOutput {
return o.ApplyT(func(v *Trail) pulumi.StringOutput { return v.RoleName }).(pulumi.StringOutput)
}
// The unique ARN of the Log Service project. Ensure that `slsProjectArn` is valid .
func (o TrailOutput) SlsProjectArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Trail) pulumi.StringPtrOutput { return v.SlsProjectArn }).(pulumi.StringPtrOutput)
}
// The unique ARN of the Log Service role.
func (o TrailOutput) SlsWriteRoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *Trail) pulumi.StringOutput { return v.SlsWriteRoleArn }).(pulumi.StringOutput)
}
// The status of ActionTrail Trail. After creation, tracking is turned on by default, and you can set the status value to `Disable` to turn off tracking. Valid values: `Enable`, `Disable`. Default to `Enable`.
func (o TrailOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Trail) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
}
// The name of the trail to be created, which must be unique for an account.
func (o TrailOutput) TrailName() pulumi.StringOutput {
return o.ApplyT(func(v *Trail) pulumi.StringOutput { return v.TrailName }).(pulumi.StringOutput)
}
// The regions to which the trail is applied. Default to `All`.
func (o TrailOutput) TrailRegion() pulumi.StringOutput {
return o.ApplyT(func(v *Trail) pulumi.StringOutput { return v.TrailRegion }).(pulumi.StringOutput)
}
type TrailArrayOutput struct{ *pulumi.OutputState }
func (TrailArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Trail)(nil)).Elem()
}
func (o TrailArrayOutput) ToTrailArrayOutput() TrailArrayOutput {
return o
}
func (o TrailArrayOutput) ToTrailArrayOutputWithContext(ctx context.Context) TrailArrayOutput {
return o
}
func (o TrailArrayOutput) Index(i pulumi.IntInput) TrailOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Trail {
return vs[0].([]*Trail)[vs[1].(int)]
}).(TrailOutput)
}
type TrailMapOutput struct{ *pulumi.OutputState }
func (TrailMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Trail)(nil)).Elem()
}
func (o TrailMapOutput) ToTrailMapOutput() TrailMapOutput {
return o
}
func (o TrailMapOutput) ToTrailMapOutputWithContext(ctx context.Context) TrailMapOutput {
return o
}
func (o TrailMapOutput) MapIndex(k pulumi.StringInput) TrailOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Trail {
return vs[0].(map[string]*Trail)[vs[1].(string)]
}).(TrailOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TrailInput)(nil)).Elem(), &Trail{})
pulumi.RegisterInputType(reflect.TypeOf((*TrailArrayInput)(nil)).Elem(), TrailArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TrailMapInput)(nil)).Elem(), TrailMap{})
pulumi.RegisterOutputType(TrailOutput{})
pulumi.RegisterOutputType(TrailArrayOutput{})
pulumi.RegisterOutputType(TrailMapOutput{})
}