generated from pulumi/pulumi-tf-provider-boilerplate
/
segment.go
528 lines (468 loc) · 25 KB
/
segment.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
// 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 launchdarkly
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-launchdarkly/sdk/go/launchdarkly/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a LaunchDarkly segment resource.
//
// This resource allows you to create and manage segments within your LaunchDarkly organization.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-launchdarkly/sdk/go/launchdarkly"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := launchdarkly.NewSegment(ctx, "example", &launchdarkly.SegmentArgs{
// Key: pulumi.String("example-segment-key"),
// ProjectKey: pulumi.Any(launchdarkly_project.Example.Key),
// EnvKey: pulumi.Any(launchdarkly_environment.Example.Key),
// Description: pulumi.String("This segment is managed by Terraform"),
// Tags: pulumi.StringArray{
// pulumi.String("segment-tag-1"),
// pulumi.String("segment-tag-2"),
// },
// Includeds: pulumi.StringArray{
// pulumi.String("user1"),
// pulumi.String("user2"),
// },
// Excludeds: pulumi.StringArray{
// pulumi.String("user3"),
// pulumi.String("user4"),
// },
// IncludedContexts: launchdarkly.SegmentIncludedContextArray{
// &launchdarkly.SegmentIncludedContextArgs{
// Values: pulumi.StringArray{
// pulumi.String("account1"),
// pulumi.String("account2"),
// },
// ContextKind: pulumi.String("account"),
// },
// },
// Rules: launchdarkly.SegmentRuleArray{
// &launchdarkly.SegmentRuleArgs{
// Clauses: launchdarkly.SegmentRuleClauseArray{
// &launchdarkly.SegmentRuleClauseArgs{
// Attribute: pulumi.String("country"),
// Op: pulumi.String("startsWith"),
// Values: pulumi.StringArray{
// pulumi.String("en"),
// pulumi.String("de"),
// pulumi.String("un"),
// },
// Negate: pulumi.Bool(false),
// ContextKind: pulumi.String("location-data"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = launchdarkly.NewSegment(ctx, "big-example", &launchdarkly.SegmentArgs{
// Key: pulumi.String("example-big-segment-key"),
// ProjectKey: pulumi.Any(launchdarkly_project.Example.Key),
// EnvKey: pulumi.Any(launchdarkly_environment.Example.Key),
// Description: pulumi.String("This big segment is managed by Terraform"),
// Tags: pulumi.StringArray{
// pulumi.String("segment-tag-1"),
// pulumi.String("segment-tag-2"),
// },
// Unbounded: pulumi.Bool(true),
// UnboundedContextKind: pulumi.String("user"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// #LaunchDarkly segments can be imported using the segment's ID in the form `project_key/env_key/segment_key`
//
// ```sh
//
// $ pulumi import launchdarkly:index/segment:Segment example example-project/example-environment/example-segment-key
//
// ```
type Segment struct {
pulumi.CustomResourceState
// The segment's creation date represented as a UNIX epoch timestamp.
CreationDate pulumi.IntOutput `pulumi:"creationDate"`
// The description of the segment's purpose.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The segment's environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
EnvKey pulumi.StringOutput `pulumi:"envKey"`
// List of non-user target objects excluded from the segment. This attribute is not valid when `unbounded` is set to `true`.
ExcludedContexts SegmentExcludedContextArrayOutput `pulumi:"excludedContexts"`
// List of user keys excluded from the segment. To target on other context kinds, use the excludedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Excludeds pulumi.StringArrayOutput `pulumi:"excludeds"`
// List of non-user target objects included in the segment. This attribute is not valid when `unbounded` is set to `true`.
IncludedContexts SegmentIncludedContextArrayOutput `pulumi:"includedContexts"`
// List of user keys included in the segment. To target on other context kinds, use the includedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Includeds pulumi.StringArrayOutput `pulumi:"includeds"`
// The unique key that references the segment. A change in this field will force the destruction of the existing resource and the creation of a new one.
Key pulumi.StringOutput `pulumi:"key"`
// The human-friendly name for the segment.
Name pulumi.StringOutput `pulumi:"name"`
// The segment's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
ProjectKey pulumi.StringOutput `pulumi:"projectKey"`
// List of nested custom rule blocks to apply to the segment. This attribute is not valid when `unbounded` is set to `true`.
Rules SegmentRuleArrayOutput `pulumi:"rules"`
// Tags associated with your resource.
Tags pulumi.StringArrayOutput `pulumi:"tags"`
// Whether to create a standard segment (`false`) or a Big Segment (`true`). Standard segments include rule-based and
// smaller list-based segments. Big Segments include larger list-based segments and synced segments. Only use a Big Segment
// if you need to add more than 15,000 individual targets. It is not possible to manage the list of targeted contexts for
// Big Segments with Terraform.
Unbounded pulumi.BoolPtrOutput `pulumi:"unbounded"`
// For Big Segments, the targeted context kind. If this attribute is not specified it will default to `user`.
UnboundedContextKind pulumi.StringOutput `pulumi:"unboundedContextKind"`
}
// NewSegment registers a new resource with the given unique name, arguments, and options.
func NewSegment(ctx *pulumi.Context,
name string, args *SegmentArgs, opts ...pulumi.ResourceOption) (*Segment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EnvKey == nil {
return nil, errors.New("invalid value for required argument 'EnvKey'")
}
if args.Key == nil {
return nil, errors.New("invalid value for required argument 'Key'")
}
if args.ProjectKey == nil {
return nil, errors.New("invalid value for required argument 'ProjectKey'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Segment
err := ctx.RegisterResource("launchdarkly:index/segment:Segment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSegment gets an existing Segment 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 GetSegment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SegmentState, opts ...pulumi.ResourceOption) (*Segment, error) {
var resource Segment
err := ctx.ReadResource("launchdarkly:index/segment:Segment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Segment resources.
type segmentState struct {
// The segment's creation date represented as a UNIX epoch timestamp.
CreationDate *int `pulumi:"creationDate"`
// The description of the segment's purpose.
Description *string `pulumi:"description"`
// The segment's environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
EnvKey *string `pulumi:"envKey"`
// List of non-user target objects excluded from the segment. This attribute is not valid when `unbounded` is set to `true`.
ExcludedContexts []SegmentExcludedContext `pulumi:"excludedContexts"`
// List of user keys excluded from the segment. To target on other context kinds, use the excludedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Excludeds []string `pulumi:"excludeds"`
// List of non-user target objects included in the segment. This attribute is not valid when `unbounded` is set to `true`.
IncludedContexts []SegmentIncludedContext `pulumi:"includedContexts"`
// List of user keys included in the segment. To target on other context kinds, use the includedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Includeds []string `pulumi:"includeds"`
// The unique key that references the segment. A change in this field will force the destruction of the existing resource and the creation of a new one.
Key *string `pulumi:"key"`
// The human-friendly name for the segment.
Name *string `pulumi:"name"`
// The segment's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
ProjectKey *string `pulumi:"projectKey"`
// List of nested custom rule blocks to apply to the segment. This attribute is not valid when `unbounded` is set to `true`.
Rules []SegmentRule `pulumi:"rules"`
// Tags associated with your resource.
Tags []string `pulumi:"tags"`
// Whether to create a standard segment (`false`) or a Big Segment (`true`). Standard segments include rule-based and
// smaller list-based segments. Big Segments include larger list-based segments and synced segments. Only use a Big Segment
// if you need to add more than 15,000 individual targets. It is not possible to manage the list of targeted contexts for
// Big Segments with Terraform.
Unbounded *bool `pulumi:"unbounded"`
// For Big Segments, the targeted context kind. If this attribute is not specified it will default to `user`.
UnboundedContextKind *string `pulumi:"unboundedContextKind"`
}
type SegmentState struct {
// The segment's creation date represented as a UNIX epoch timestamp.
CreationDate pulumi.IntPtrInput
// The description of the segment's purpose.
Description pulumi.StringPtrInput
// The segment's environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
EnvKey pulumi.StringPtrInput
// List of non-user target objects excluded from the segment. This attribute is not valid when `unbounded` is set to `true`.
ExcludedContexts SegmentExcludedContextArrayInput
// List of user keys excluded from the segment. To target on other context kinds, use the excludedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Excludeds pulumi.StringArrayInput
// List of non-user target objects included in the segment. This attribute is not valid when `unbounded` is set to `true`.
IncludedContexts SegmentIncludedContextArrayInput
// List of user keys included in the segment. To target on other context kinds, use the includedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Includeds pulumi.StringArrayInput
// The unique key that references the segment. A change in this field will force the destruction of the existing resource and the creation of a new one.
Key pulumi.StringPtrInput
// The human-friendly name for the segment.
Name pulumi.StringPtrInput
// The segment's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
ProjectKey pulumi.StringPtrInput
// List of nested custom rule blocks to apply to the segment. This attribute is not valid when `unbounded` is set to `true`.
Rules SegmentRuleArrayInput
// Tags associated with your resource.
Tags pulumi.StringArrayInput
// Whether to create a standard segment (`false`) or a Big Segment (`true`). Standard segments include rule-based and
// smaller list-based segments. Big Segments include larger list-based segments and synced segments. Only use a Big Segment
// if you need to add more than 15,000 individual targets. It is not possible to manage the list of targeted contexts for
// Big Segments with Terraform.
Unbounded pulumi.BoolPtrInput
// For Big Segments, the targeted context kind. If this attribute is not specified it will default to `user`.
UnboundedContextKind pulumi.StringPtrInput
}
func (SegmentState) ElementType() reflect.Type {
return reflect.TypeOf((*segmentState)(nil)).Elem()
}
type segmentArgs struct {
// The description of the segment's purpose.
Description *string `pulumi:"description"`
// The segment's environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
EnvKey string `pulumi:"envKey"`
// List of non-user target objects excluded from the segment. This attribute is not valid when `unbounded` is set to `true`.
ExcludedContexts []SegmentExcludedContext `pulumi:"excludedContexts"`
// List of user keys excluded from the segment. To target on other context kinds, use the excludedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Excludeds []string `pulumi:"excludeds"`
// List of non-user target objects included in the segment. This attribute is not valid when `unbounded` is set to `true`.
IncludedContexts []SegmentIncludedContext `pulumi:"includedContexts"`
// List of user keys included in the segment. To target on other context kinds, use the includedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Includeds []string `pulumi:"includeds"`
// The unique key that references the segment. A change in this field will force the destruction of the existing resource and the creation of a new one.
Key string `pulumi:"key"`
// The human-friendly name for the segment.
Name *string `pulumi:"name"`
// The segment's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
ProjectKey string `pulumi:"projectKey"`
// List of nested custom rule blocks to apply to the segment. This attribute is not valid when `unbounded` is set to `true`.
Rules []SegmentRule `pulumi:"rules"`
// Tags associated with your resource.
Tags []string `pulumi:"tags"`
// Whether to create a standard segment (`false`) or a Big Segment (`true`). Standard segments include rule-based and
// smaller list-based segments. Big Segments include larger list-based segments and synced segments. Only use a Big Segment
// if you need to add more than 15,000 individual targets. It is not possible to manage the list of targeted contexts for
// Big Segments with Terraform.
Unbounded *bool `pulumi:"unbounded"`
// For Big Segments, the targeted context kind. If this attribute is not specified it will default to `user`.
UnboundedContextKind *string `pulumi:"unboundedContextKind"`
}
// The set of arguments for constructing a Segment resource.
type SegmentArgs struct {
// The description of the segment's purpose.
Description pulumi.StringPtrInput
// The segment's environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
EnvKey pulumi.StringInput
// List of non-user target objects excluded from the segment. This attribute is not valid when `unbounded` is set to `true`.
ExcludedContexts SegmentExcludedContextArrayInput
// List of user keys excluded from the segment. To target on other context kinds, use the excludedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Excludeds pulumi.StringArrayInput
// List of non-user target objects included in the segment. This attribute is not valid when `unbounded` is set to `true`.
IncludedContexts SegmentIncludedContextArrayInput
// List of user keys included in the segment. To target on other context kinds, use the includedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
Includeds pulumi.StringArrayInput
// The unique key that references the segment. A change in this field will force the destruction of the existing resource and the creation of a new one.
Key pulumi.StringInput
// The human-friendly name for the segment.
Name pulumi.StringPtrInput
// The segment's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
ProjectKey pulumi.StringInput
// List of nested custom rule blocks to apply to the segment. This attribute is not valid when `unbounded` is set to `true`.
Rules SegmentRuleArrayInput
// Tags associated with your resource.
Tags pulumi.StringArrayInput
// Whether to create a standard segment (`false`) or a Big Segment (`true`). Standard segments include rule-based and
// smaller list-based segments. Big Segments include larger list-based segments and synced segments. Only use a Big Segment
// if you need to add more than 15,000 individual targets. It is not possible to manage the list of targeted contexts for
// Big Segments with Terraform.
Unbounded pulumi.BoolPtrInput
// For Big Segments, the targeted context kind. If this attribute is not specified it will default to `user`.
UnboundedContextKind pulumi.StringPtrInput
}
func (SegmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*segmentArgs)(nil)).Elem()
}
type SegmentInput interface {
pulumi.Input
ToSegmentOutput() SegmentOutput
ToSegmentOutputWithContext(ctx context.Context) SegmentOutput
}
func (*Segment) ElementType() reflect.Type {
return reflect.TypeOf((**Segment)(nil)).Elem()
}
func (i *Segment) ToSegmentOutput() SegmentOutput {
return i.ToSegmentOutputWithContext(context.Background())
}
func (i *Segment) ToSegmentOutputWithContext(ctx context.Context) SegmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(SegmentOutput)
}
// SegmentArrayInput is an input type that accepts SegmentArray and SegmentArrayOutput values.
// You can construct a concrete instance of `SegmentArrayInput` via:
//
// SegmentArray{ SegmentArgs{...} }
type SegmentArrayInput interface {
pulumi.Input
ToSegmentArrayOutput() SegmentArrayOutput
ToSegmentArrayOutputWithContext(context.Context) SegmentArrayOutput
}
type SegmentArray []SegmentInput
func (SegmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Segment)(nil)).Elem()
}
func (i SegmentArray) ToSegmentArrayOutput() SegmentArrayOutput {
return i.ToSegmentArrayOutputWithContext(context.Background())
}
func (i SegmentArray) ToSegmentArrayOutputWithContext(ctx context.Context) SegmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SegmentArrayOutput)
}
// SegmentMapInput is an input type that accepts SegmentMap and SegmentMapOutput values.
// You can construct a concrete instance of `SegmentMapInput` via:
//
// SegmentMap{ "key": SegmentArgs{...} }
type SegmentMapInput interface {
pulumi.Input
ToSegmentMapOutput() SegmentMapOutput
ToSegmentMapOutputWithContext(context.Context) SegmentMapOutput
}
type SegmentMap map[string]SegmentInput
func (SegmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Segment)(nil)).Elem()
}
func (i SegmentMap) ToSegmentMapOutput() SegmentMapOutput {
return i.ToSegmentMapOutputWithContext(context.Background())
}
func (i SegmentMap) ToSegmentMapOutputWithContext(ctx context.Context) SegmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SegmentMapOutput)
}
type SegmentOutput struct{ *pulumi.OutputState }
func (SegmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Segment)(nil)).Elem()
}
func (o SegmentOutput) ToSegmentOutput() SegmentOutput {
return o
}
func (o SegmentOutput) ToSegmentOutputWithContext(ctx context.Context) SegmentOutput {
return o
}
// The segment's creation date represented as a UNIX epoch timestamp.
func (o SegmentOutput) CreationDate() pulumi.IntOutput {
return o.ApplyT(func(v *Segment) pulumi.IntOutput { return v.CreationDate }).(pulumi.IntOutput)
}
// The description of the segment's purpose.
func (o SegmentOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Segment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The segment's environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
func (o SegmentOutput) EnvKey() pulumi.StringOutput {
return o.ApplyT(func(v *Segment) pulumi.StringOutput { return v.EnvKey }).(pulumi.StringOutput)
}
// List of non-user target objects excluded from the segment. This attribute is not valid when `unbounded` is set to `true`.
func (o SegmentOutput) ExcludedContexts() SegmentExcludedContextArrayOutput {
return o.ApplyT(func(v *Segment) SegmentExcludedContextArrayOutput { return v.ExcludedContexts }).(SegmentExcludedContextArrayOutput)
}
// List of user keys excluded from the segment. To target on other context kinds, use the excludedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
func (o SegmentOutput) Excludeds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Segment) pulumi.StringArrayOutput { return v.Excludeds }).(pulumi.StringArrayOutput)
}
// List of non-user target objects included in the segment. This attribute is not valid when `unbounded` is set to `true`.
func (o SegmentOutput) IncludedContexts() SegmentIncludedContextArrayOutput {
return o.ApplyT(func(v *Segment) SegmentIncludedContextArrayOutput { return v.IncludedContexts }).(SegmentIncludedContextArrayOutput)
}
// List of user keys included in the segment. To target on other context kinds, use the includedContexts block attribute. This attribute is not valid when `unbounded` is set to `true`.
func (o SegmentOutput) Includeds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Segment) pulumi.StringArrayOutput { return v.Includeds }).(pulumi.StringArrayOutput)
}
// The unique key that references the segment. A change in this field will force the destruction of the existing resource and the creation of a new one.
func (o SegmentOutput) Key() pulumi.StringOutput {
return o.ApplyT(func(v *Segment) pulumi.StringOutput { return v.Key }).(pulumi.StringOutput)
}
// The human-friendly name for the segment.
func (o SegmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Segment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The segment's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
func (o SegmentOutput) ProjectKey() pulumi.StringOutput {
return o.ApplyT(func(v *Segment) pulumi.StringOutput { return v.ProjectKey }).(pulumi.StringOutput)
}
// List of nested custom rule blocks to apply to the segment. This attribute is not valid when `unbounded` is set to `true`.
func (o SegmentOutput) Rules() SegmentRuleArrayOutput {
return o.ApplyT(func(v *Segment) SegmentRuleArrayOutput { return v.Rules }).(SegmentRuleArrayOutput)
}
// Tags associated with your resource.
func (o SegmentOutput) Tags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Segment) pulumi.StringArrayOutput { return v.Tags }).(pulumi.StringArrayOutput)
}
// Whether to create a standard segment (`false`) or a Big Segment (`true`). Standard segments include rule-based and
// smaller list-based segments. Big Segments include larger list-based segments and synced segments. Only use a Big Segment
// if you need to add more than 15,000 individual targets. It is not possible to manage the list of targeted contexts for
// Big Segments with Terraform.
func (o SegmentOutput) Unbounded() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Segment) pulumi.BoolPtrOutput { return v.Unbounded }).(pulumi.BoolPtrOutput)
}
// For Big Segments, the targeted context kind. If this attribute is not specified it will default to `user`.
func (o SegmentOutput) UnboundedContextKind() pulumi.StringOutput {
return o.ApplyT(func(v *Segment) pulumi.StringOutput { return v.UnboundedContextKind }).(pulumi.StringOutput)
}
type SegmentArrayOutput struct{ *pulumi.OutputState }
func (SegmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Segment)(nil)).Elem()
}
func (o SegmentArrayOutput) ToSegmentArrayOutput() SegmentArrayOutput {
return o
}
func (o SegmentArrayOutput) ToSegmentArrayOutputWithContext(ctx context.Context) SegmentArrayOutput {
return o
}
func (o SegmentArrayOutput) Index(i pulumi.IntInput) SegmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Segment {
return vs[0].([]*Segment)[vs[1].(int)]
}).(SegmentOutput)
}
type SegmentMapOutput struct{ *pulumi.OutputState }
func (SegmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Segment)(nil)).Elem()
}
func (o SegmentMapOutput) ToSegmentMapOutput() SegmentMapOutput {
return o
}
func (o SegmentMapOutput) ToSegmentMapOutputWithContext(ctx context.Context) SegmentMapOutput {
return o
}
func (o SegmentMapOutput) MapIndex(k pulumi.StringInput) SegmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Segment {
return vs[0].(map[string]*Segment)[vs[1].(string)]
}).(SegmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SegmentInput)(nil)).Elem(), &Segment{})
pulumi.RegisterInputType(reflect.TypeOf((*SegmentArrayInput)(nil)).Elem(), SegmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SegmentMapInput)(nil)).Elem(), SegmentMap{})
pulumi.RegisterOutputType(SegmentOutput{})
pulumi.RegisterOutputType(SegmentArrayOutput{})
pulumi.RegisterOutputType(SegmentMapOutput{})
}