/
ossShipper.go
566 lines (506 loc) · 25.7 KB
/
ossShipper.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
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
// *** 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 log
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Log service data delivery management, this service provides the function of delivering data in logstore to oss product storage.
// [Refer to details](https://www.alibabacloud.com/help/en/doc-detail/43724.htm).
//
// > **NOTE:** Available in 1.121.0+
//
// ## Example Usage
//
// Basic Usage
//
// ```go
// package main
//
// import (
// "fmt"
//
// "github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/log"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleProject, err := log.NewProject(ctx, "exampleProject", &log.ProjectArgs{
// Description: pulumi.String("created by terraform"),
// Tags: pulumi.StringMap{
// "test": pulumi.String("test"),
// },
// })
// if err != nil {
// return err
// }
// _, err = log.NewStore(ctx, "exampleStore", &log.StoreArgs{
// Project: exampleProject.Name,
// RetentionPeriod: pulumi.Int(3650),
// ShardCount: pulumi.Int(3),
// AutoSplit: pulumi.Bool(true),
// MaxSplitShardCount: pulumi.Int(60),
// AppendMeta: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = log.NewOssShipper(ctx, "exampleOssShipper", &log.OssShipperArgs{
// ProjectName: exampleProject.Name,
// LogstoreName: pulumi.Any(alicloud_log_logstore.Example.Name),
// ShipperName: pulumi.String("oss_shipper_name"),
// OssBucket: pulumi.String("test_bucket"),
// OssPrefix: pulumi.String("/root"),
// BufferInterval: pulumi.Int(300),
// BufferSize: pulumi.Int(250),
// CompressType: pulumi.String("none"),
// PathFormat: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v", "%", "Y/", "%", "m/", "%", "d/", "%", "H/", "%", "M")),
// Format: pulumi.String("json"),
// JsonEnableTag: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// Log oss shipper can be imported using the id or name, e.g.
//
// ```sh
// $ pulumi import alicloud:log/ossShipper:OssShipper example tf-log-project:tf-log-logstore:tf-log-shipper
// ```
type OssShipper struct {
pulumi.CustomResourceState
// How often is it delivered every interval.
BufferInterval pulumi.IntOutput `pulumi:"bufferInterval"`
// Automatically control the creation interval of delivery tasks and set the upper limit of an OSS object size (calculated in uncompressed), unit: `MB`.
BufferSize pulumi.IntOutput `pulumi:"bufferSize"`
// OSS data storage compression method, support: none, snappy. Among them, none means that the original data is not compressed, and snappy means that the data is compressed using the snappy algorithm, which can reduce the storage space usage of the `OSS Bucket`.
CompressType pulumi.StringPtrOutput `pulumi:"compressType"`
CsvConfigColumns pulumi.StringArrayOutput `pulumi:"csvConfigColumns"`
CsvConfigDelimiter pulumi.StringPtrOutput `pulumi:"csvConfigDelimiter"`
CsvConfigHeader pulumi.BoolPtrOutput `pulumi:"csvConfigHeader"`
CsvConfigLinefeed pulumi.StringPtrOutput `pulumi:"csvConfigLinefeed"`
CsvConfigNullidentifier pulumi.StringPtrOutput `pulumi:"csvConfigNullidentifier"`
CsvConfigQuote pulumi.StringPtrOutput `pulumi:"csvConfigQuote"`
// Storage format, only supports three types: `json`, `parquet`, `csv`.
// **According to the different format, please select the following parameters**
// - format = `json`
// `jsonEnableTag` - (Optional) Whether to deliver the label.
// - format = `csv`
// `csvConfigDelimiter` - (Optional) Separator configuration in csv configuration format.
// `csvConfigColumns` - (Optional) Field configuration in csv configuration format.
// `csvConfigNullidentifier` - (Optional) Invalid field content.
// `csvConfigQuote` - (Optional) Escape character under csv configuration.
// `csvConfigHeader` - (Optional) Indicates whether to write the field name to the CSV file, the default value is `false`.
// `csvConfigLinefeed` - (Optional) Separator in csv configuration.
// - format = `parquet`
// `parquetConfig` - (Optional) Configure to use parquet storage format.
// `name` - (Required) The name of the key.
// `type` - (Required) Type of configuration name.
Format pulumi.StringOutput `pulumi:"format"`
JsonEnableTag pulumi.BoolPtrOutput `pulumi:"jsonEnableTag"`
// The name of the log logstore.
LogstoreName pulumi.StringOutput `pulumi:"logstoreName"`
// The name of the oss bucket.
OssBucket pulumi.StringOutput `pulumi:"ossBucket"`
// The data synchronized from Log Service to OSS will be stored in this directory of Bucket.
OssPrefix pulumi.StringPtrOutput `pulumi:"ossPrefix"`
ParquetConfigs OssShipperParquetConfigArrayOutput `pulumi:"parquetConfigs"`
// The OSS Bucket directory is dynamically generated according to the creation time of the shipper task, it cannot start with a forward slash `/`, the default value is `%Y/%m/%d/%H/%M`.
PathFormat pulumi.StringOutput `pulumi:"pathFormat"`
// The name of the log project. It is the only in one Alicloud account.
ProjectName pulumi.StringOutput `pulumi:"projectName"`
// Used for access control, the OSS Bucket owner creates the role mark, such as `acs:ram::13234:role/logrole`
RoleArn pulumi.StringPtrOutput `pulumi:"roleArn"`
// Delivery configuration name, it can only contain lowercase letters, numbers, dashes `-` and underscores `_`. It must start and end with lowercase letters or numbers, and the name must be 2 to 128 characters long.
ShipperName pulumi.StringOutput `pulumi:"shipperName"`
}
// NewOssShipper registers a new resource with the given unique name, arguments, and options.
func NewOssShipper(ctx *pulumi.Context,
name string, args *OssShipperArgs, opts ...pulumi.ResourceOption) (*OssShipper, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BufferInterval == nil {
return nil, errors.New("invalid value for required argument 'BufferInterval'")
}
if args.BufferSize == nil {
return nil, errors.New("invalid value for required argument 'BufferSize'")
}
if args.Format == nil {
return nil, errors.New("invalid value for required argument 'Format'")
}
if args.LogstoreName == nil {
return nil, errors.New("invalid value for required argument 'LogstoreName'")
}
if args.OssBucket == nil {
return nil, errors.New("invalid value for required argument 'OssBucket'")
}
if args.PathFormat == nil {
return nil, errors.New("invalid value for required argument 'PathFormat'")
}
if args.ProjectName == nil {
return nil, errors.New("invalid value for required argument 'ProjectName'")
}
if args.ShipperName == nil {
return nil, errors.New("invalid value for required argument 'ShipperName'")
}
var resource OssShipper
err := ctx.RegisterResource("alicloud:log/ossShipper:OssShipper", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOssShipper gets an existing OssShipper 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 GetOssShipper(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OssShipperState, opts ...pulumi.ResourceOption) (*OssShipper, error) {
var resource OssShipper
err := ctx.ReadResource("alicloud:log/ossShipper:OssShipper", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OssShipper resources.
type ossShipperState struct {
// How often is it delivered every interval.
BufferInterval *int `pulumi:"bufferInterval"`
// Automatically control the creation interval of delivery tasks and set the upper limit of an OSS object size (calculated in uncompressed), unit: `MB`.
BufferSize *int `pulumi:"bufferSize"`
// OSS data storage compression method, support: none, snappy. Among them, none means that the original data is not compressed, and snappy means that the data is compressed using the snappy algorithm, which can reduce the storage space usage of the `OSS Bucket`.
CompressType *string `pulumi:"compressType"`
CsvConfigColumns []string `pulumi:"csvConfigColumns"`
CsvConfigDelimiter *string `pulumi:"csvConfigDelimiter"`
CsvConfigHeader *bool `pulumi:"csvConfigHeader"`
CsvConfigLinefeed *string `pulumi:"csvConfigLinefeed"`
CsvConfigNullidentifier *string `pulumi:"csvConfigNullidentifier"`
CsvConfigQuote *string `pulumi:"csvConfigQuote"`
// Storage format, only supports three types: `json`, `parquet`, `csv`.
// **According to the different format, please select the following parameters**
// - format = `json`
// `jsonEnableTag` - (Optional) Whether to deliver the label.
// - format = `csv`
// `csvConfigDelimiter` - (Optional) Separator configuration in csv configuration format.
// `csvConfigColumns` - (Optional) Field configuration in csv configuration format.
// `csvConfigNullidentifier` - (Optional) Invalid field content.
// `csvConfigQuote` - (Optional) Escape character under csv configuration.
// `csvConfigHeader` - (Optional) Indicates whether to write the field name to the CSV file, the default value is `false`.
// `csvConfigLinefeed` - (Optional) Separator in csv configuration.
// - format = `parquet`
// `parquetConfig` - (Optional) Configure to use parquet storage format.
// `name` - (Required) The name of the key.
// `type` - (Required) Type of configuration name.
Format *string `pulumi:"format"`
JsonEnableTag *bool `pulumi:"jsonEnableTag"`
// The name of the log logstore.
LogstoreName *string `pulumi:"logstoreName"`
// The name of the oss bucket.
OssBucket *string `pulumi:"ossBucket"`
// The data synchronized from Log Service to OSS will be stored in this directory of Bucket.
OssPrefix *string `pulumi:"ossPrefix"`
ParquetConfigs []OssShipperParquetConfig `pulumi:"parquetConfigs"`
// The OSS Bucket directory is dynamically generated according to the creation time of the shipper task, it cannot start with a forward slash `/`, the default value is `%Y/%m/%d/%H/%M`.
PathFormat *string `pulumi:"pathFormat"`
// The name of the log project. It is the only in one Alicloud account.
ProjectName *string `pulumi:"projectName"`
// Used for access control, the OSS Bucket owner creates the role mark, such as `acs:ram::13234:role/logrole`
RoleArn *string `pulumi:"roleArn"`
// Delivery configuration name, it can only contain lowercase letters, numbers, dashes `-` and underscores `_`. It must start and end with lowercase letters or numbers, and the name must be 2 to 128 characters long.
ShipperName *string `pulumi:"shipperName"`
}
type OssShipperState struct {
// How often is it delivered every interval.
BufferInterval pulumi.IntPtrInput
// Automatically control the creation interval of delivery tasks and set the upper limit of an OSS object size (calculated in uncompressed), unit: `MB`.
BufferSize pulumi.IntPtrInput
// OSS data storage compression method, support: none, snappy. Among them, none means that the original data is not compressed, and snappy means that the data is compressed using the snappy algorithm, which can reduce the storage space usage of the `OSS Bucket`.
CompressType pulumi.StringPtrInput
CsvConfigColumns pulumi.StringArrayInput
CsvConfigDelimiter pulumi.StringPtrInput
CsvConfigHeader pulumi.BoolPtrInput
CsvConfigLinefeed pulumi.StringPtrInput
CsvConfigNullidentifier pulumi.StringPtrInput
CsvConfigQuote pulumi.StringPtrInput
// Storage format, only supports three types: `json`, `parquet`, `csv`.
// **According to the different format, please select the following parameters**
// - format = `json`
// `jsonEnableTag` - (Optional) Whether to deliver the label.
// - format = `csv`
// `csvConfigDelimiter` - (Optional) Separator configuration in csv configuration format.
// `csvConfigColumns` - (Optional) Field configuration in csv configuration format.
// `csvConfigNullidentifier` - (Optional) Invalid field content.
// `csvConfigQuote` - (Optional) Escape character under csv configuration.
// `csvConfigHeader` - (Optional) Indicates whether to write the field name to the CSV file, the default value is `false`.
// `csvConfigLinefeed` - (Optional) Separator in csv configuration.
// - format = `parquet`
// `parquetConfig` - (Optional) Configure to use parquet storage format.
// `name` - (Required) The name of the key.
// `type` - (Required) Type of configuration name.
Format pulumi.StringPtrInput
JsonEnableTag pulumi.BoolPtrInput
// The name of the log logstore.
LogstoreName pulumi.StringPtrInput
// The name of the oss bucket.
OssBucket pulumi.StringPtrInput
// The data synchronized from Log Service to OSS will be stored in this directory of Bucket.
OssPrefix pulumi.StringPtrInput
ParquetConfigs OssShipperParquetConfigArrayInput
// The OSS Bucket directory is dynamically generated according to the creation time of the shipper task, it cannot start with a forward slash `/`, the default value is `%Y/%m/%d/%H/%M`.
PathFormat pulumi.StringPtrInput
// The name of the log project. It is the only in one Alicloud account.
ProjectName pulumi.StringPtrInput
// Used for access control, the OSS Bucket owner creates the role mark, such as `acs:ram::13234:role/logrole`
RoleArn pulumi.StringPtrInput
// Delivery configuration name, it can only contain lowercase letters, numbers, dashes `-` and underscores `_`. It must start and end with lowercase letters or numbers, and the name must be 2 to 128 characters long.
ShipperName pulumi.StringPtrInput
}
func (OssShipperState) ElementType() reflect.Type {
return reflect.TypeOf((*ossShipperState)(nil)).Elem()
}
type ossShipperArgs struct {
// How often is it delivered every interval.
BufferInterval int `pulumi:"bufferInterval"`
// Automatically control the creation interval of delivery tasks and set the upper limit of an OSS object size (calculated in uncompressed), unit: `MB`.
BufferSize int `pulumi:"bufferSize"`
// OSS data storage compression method, support: none, snappy. Among them, none means that the original data is not compressed, and snappy means that the data is compressed using the snappy algorithm, which can reduce the storage space usage of the `OSS Bucket`.
CompressType *string `pulumi:"compressType"`
CsvConfigColumns []string `pulumi:"csvConfigColumns"`
CsvConfigDelimiter *string `pulumi:"csvConfigDelimiter"`
CsvConfigHeader *bool `pulumi:"csvConfigHeader"`
CsvConfigLinefeed *string `pulumi:"csvConfigLinefeed"`
CsvConfigNullidentifier *string `pulumi:"csvConfigNullidentifier"`
CsvConfigQuote *string `pulumi:"csvConfigQuote"`
// Storage format, only supports three types: `json`, `parquet`, `csv`.
// **According to the different format, please select the following parameters**
// - format = `json`
// `jsonEnableTag` - (Optional) Whether to deliver the label.
// - format = `csv`
// `csvConfigDelimiter` - (Optional) Separator configuration in csv configuration format.
// `csvConfigColumns` - (Optional) Field configuration in csv configuration format.
// `csvConfigNullidentifier` - (Optional) Invalid field content.
// `csvConfigQuote` - (Optional) Escape character under csv configuration.
// `csvConfigHeader` - (Optional) Indicates whether to write the field name to the CSV file, the default value is `false`.
// `csvConfigLinefeed` - (Optional) Separator in csv configuration.
// - format = `parquet`
// `parquetConfig` - (Optional) Configure to use parquet storage format.
// `name` - (Required) The name of the key.
// `type` - (Required) Type of configuration name.
Format string `pulumi:"format"`
JsonEnableTag *bool `pulumi:"jsonEnableTag"`
// The name of the log logstore.
LogstoreName string `pulumi:"logstoreName"`
// The name of the oss bucket.
OssBucket string `pulumi:"ossBucket"`
// The data synchronized from Log Service to OSS will be stored in this directory of Bucket.
OssPrefix *string `pulumi:"ossPrefix"`
ParquetConfigs []OssShipperParquetConfig `pulumi:"parquetConfigs"`
// The OSS Bucket directory is dynamically generated according to the creation time of the shipper task, it cannot start with a forward slash `/`, the default value is `%Y/%m/%d/%H/%M`.
PathFormat string `pulumi:"pathFormat"`
// The name of the log project. It is the only in one Alicloud account.
ProjectName string `pulumi:"projectName"`
// Used for access control, the OSS Bucket owner creates the role mark, such as `acs:ram::13234:role/logrole`
RoleArn *string `pulumi:"roleArn"`
// Delivery configuration name, it can only contain lowercase letters, numbers, dashes `-` and underscores `_`. It must start and end with lowercase letters or numbers, and the name must be 2 to 128 characters long.
ShipperName string `pulumi:"shipperName"`
}
// The set of arguments for constructing a OssShipper resource.
type OssShipperArgs struct {
// How often is it delivered every interval.
BufferInterval pulumi.IntInput
// Automatically control the creation interval of delivery tasks and set the upper limit of an OSS object size (calculated in uncompressed), unit: `MB`.
BufferSize pulumi.IntInput
// OSS data storage compression method, support: none, snappy. Among them, none means that the original data is not compressed, and snappy means that the data is compressed using the snappy algorithm, which can reduce the storage space usage of the `OSS Bucket`.
CompressType pulumi.StringPtrInput
CsvConfigColumns pulumi.StringArrayInput
CsvConfigDelimiter pulumi.StringPtrInput
CsvConfigHeader pulumi.BoolPtrInput
CsvConfigLinefeed pulumi.StringPtrInput
CsvConfigNullidentifier pulumi.StringPtrInput
CsvConfigQuote pulumi.StringPtrInput
// Storage format, only supports three types: `json`, `parquet`, `csv`.
// **According to the different format, please select the following parameters**
// - format = `json`
// `jsonEnableTag` - (Optional) Whether to deliver the label.
// - format = `csv`
// `csvConfigDelimiter` - (Optional) Separator configuration in csv configuration format.
// `csvConfigColumns` - (Optional) Field configuration in csv configuration format.
// `csvConfigNullidentifier` - (Optional) Invalid field content.
// `csvConfigQuote` - (Optional) Escape character under csv configuration.
// `csvConfigHeader` - (Optional) Indicates whether to write the field name to the CSV file, the default value is `false`.
// `csvConfigLinefeed` - (Optional) Separator in csv configuration.
// - format = `parquet`
// `parquetConfig` - (Optional) Configure to use parquet storage format.
// `name` - (Required) The name of the key.
// `type` - (Required) Type of configuration name.
Format pulumi.StringInput
JsonEnableTag pulumi.BoolPtrInput
// The name of the log logstore.
LogstoreName pulumi.StringInput
// The name of the oss bucket.
OssBucket pulumi.StringInput
// The data synchronized from Log Service to OSS will be stored in this directory of Bucket.
OssPrefix pulumi.StringPtrInput
ParquetConfigs OssShipperParquetConfigArrayInput
// The OSS Bucket directory is dynamically generated according to the creation time of the shipper task, it cannot start with a forward slash `/`, the default value is `%Y/%m/%d/%H/%M`.
PathFormat pulumi.StringInput
// The name of the log project. It is the only in one Alicloud account.
ProjectName pulumi.StringInput
// Used for access control, the OSS Bucket owner creates the role mark, such as `acs:ram::13234:role/logrole`
RoleArn pulumi.StringPtrInput
// Delivery configuration name, it can only contain lowercase letters, numbers, dashes `-` and underscores `_`. It must start and end with lowercase letters or numbers, and the name must be 2 to 128 characters long.
ShipperName pulumi.StringInput
}
func (OssShipperArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ossShipperArgs)(nil)).Elem()
}
type OssShipperInput interface {
pulumi.Input
ToOssShipperOutput() OssShipperOutput
ToOssShipperOutputWithContext(ctx context.Context) OssShipperOutput
}
func (*OssShipper) ElementType() reflect.Type {
return reflect.TypeOf((*OssShipper)(nil))
}
func (i *OssShipper) ToOssShipperOutput() OssShipperOutput {
return i.ToOssShipperOutputWithContext(context.Background())
}
func (i *OssShipper) ToOssShipperOutputWithContext(ctx context.Context) OssShipperOutput {
return pulumi.ToOutputWithContext(ctx, i).(OssShipperOutput)
}
func (i *OssShipper) ToOssShipperPtrOutput() OssShipperPtrOutput {
return i.ToOssShipperPtrOutputWithContext(context.Background())
}
func (i *OssShipper) ToOssShipperPtrOutputWithContext(ctx context.Context) OssShipperPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(OssShipperPtrOutput)
}
type OssShipperPtrInput interface {
pulumi.Input
ToOssShipperPtrOutput() OssShipperPtrOutput
ToOssShipperPtrOutputWithContext(ctx context.Context) OssShipperPtrOutput
}
type ossShipperPtrType OssShipperArgs
func (*ossShipperPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**OssShipper)(nil))
}
func (i *ossShipperPtrType) ToOssShipperPtrOutput() OssShipperPtrOutput {
return i.ToOssShipperPtrOutputWithContext(context.Background())
}
func (i *ossShipperPtrType) ToOssShipperPtrOutputWithContext(ctx context.Context) OssShipperPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(OssShipperPtrOutput)
}
// OssShipperArrayInput is an input type that accepts OssShipperArray and OssShipperArrayOutput values.
// You can construct a concrete instance of `OssShipperArrayInput` via:
//
// OssShipperArray{ OssShipperArgs{...} }
type OssShipperArrayInput interface {
pulumi.Input
ToOssShipperArrayOutput() OssShipperArrayOutput
ToOssShipperArrayOutputWithContext(context.Context) OssShipperArrayOutput
}
type OssShipperArray []OssShipperInput
func (OssShipperArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*OssShipper)(nil))
}
func (i OssShipperArray) ToOssShipperArrayOutput() OssShipperArrayOutput {
return i.ToOssShipperArrayOutputWithContext(context.Background())
}
func (i OssShipperArray) ToOssShipperArrayOutputWithContext(ctx context.Context) OssShipperArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(OssShipperArrayOutput)
}
// OssShipperMapInput is an input type that accepts OssShipperMap and OssShipperMapOutput values.
// You can construct a concrete instance of `OssShipperMapInput` via:
//
// OssShipperMap{ "key": OssShipperArgs{...} }
type OssShipperMapInput interface {
pulumi.Input
ToOssShipperMapOutput() OssShipperMapOutput
ToOssShipperMapOutputWithContext(context.Context) OssShipperMapOutput
}
type OssShipperMap map[string]OssShipperInput
func (OssShipperMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*OssShipper)(nil))
}
func (i OssShipperMap) ToOssShipperMapOutput() OssShipperMapOutput {
return i.ToOssShipperMapOutputWithContext(context.Background())
}
func (i OssShipperMap) ToOssShipperMapOutputWithContext(ctx context.Context) OssShipperMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(OssShipperMapOutput)
}
type OssShipperOutput struct {
*pulumi.OutputState
}
func (OssShipperOutput) ElementType() reflect.Type {
return reflect.TypeOf((*OssShipper)(nil))
}
func (o OssShipperOutput) ToOssShipperOutput() OssShipperOutput {
return o
}
func (o OssShipperOutput) ToOssShipperOutputWithContext(ctx context.Context) OssShipperOutput {
return o
}
func (o OssShipperOutput) ToOssShipperPtrOutput() OssShipperPtrOutput {
return o.ToOssShipperPtrOutputWithContext(context.Background())
}
func (o OssShipperOutput) ToOssShipperPtrOutputWithContext(ctx context.Context) OssShipperPtrOutput {
return o.ApplyT(func(v OssShipper) *OssShipper {
return &v
}).(OssShipperPtrOutput)
}
type OssShipperPtrOutput struct {
*pulumi.OutputState
}
func (OssShipperPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**OssShipper)(nil))
}
func (o OssShipperPtrOutput) ToOssShipperPtrOutput() OssShipperPtrOutput {
return o
}
func (o OssShipperPtrOutput) ToOssShipperPtrOutputWithContext(ctx context.Context) OssShipperPtrOutput {
return o
}
type OssShipperArrayOutput struct{ *pulumi.OutputState }
func (OssShipperArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]OssShipper)(nil))
}
func (o OssShipperArrayOutput) ToOssShipperArrayOutput() OssShipperArrayOutput {
return o
}
func (o OssShipperArrayOutput) ToOssShipperArrayOutputWithContext(ctx context.Context) OssShipperArrayOutput {
return o
}
func (o OssShipperArrayOutput) Index(i pulumi.IntInput) OssShipperOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) OssShipper {
return vs[0].([]OssShipper)[vs[1].(int)]
}).(OssShipperOutput)
}
type OssShipperMapOutput struct{ *pulumi.OutputState }
func (OssShipperMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]OssShipper)(nil))
}
func (o OssShipperMapOutput) ToOssShipperMapOutput() OssShipperMapOutput {
return o
}
func (o OssShipperMapOutput) ToOssShipperMapOutputWithContext(ctx context.Context) OssShipperMapOutput {
return o
}
func (o OssShipperMapOutput) MapIndex(k pulumi.StringInput) OssShipperOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) OssShipper {
return vs[0].(map[string]OssShipper)[vs[1].(string)]
}).(OssShipperOutput)
}
func init() {
pulumi.RegisterOutputType(OssShipperOutput{})
pulumi.RegisterOutputType(OssShipperPtrOutput{})
pulumi.RegisterOutputType(OssShipperArrayOutput{})
pulumi.RegisterOutputType(OssShipperMapOutput{})
}