-
Notifications
You must be signed in to change notification settings - Fork 113
/
pulumiTypes.go
1256 lines (1019 loc) · 49.9 KB
/
pulumiTypes.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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// *** WARNING: this file was generated by pulumigen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v1alpha1
import (
"context"
"reflect"
metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// AuditSink represents a cluster level audit sink
type AuditSinkType struct {
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `pulumi:"apiVersion"`
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `pulumi:"kind"`
Metadata *metav1.ObjectMeta `pulumi:"metadata"`
// Spec defines the audit configuration spec
Spec *AuditSinkSpec `pulumi:"spec"`
}
// AuditSinkTypeInput is an input type that accepts AuditSinkTypeArgs and AuditSinkTypeOutput values.
// You can construct a concrete instance of `AuditSinkTypeInput` via:
//
// AuditSinkTypeArgs{...}
type AuditSinkTypeInput interface {
pulumi.Input
ToAuditSinkTypeOutput() AuditSinkTypeOutput
ToAuditSinkTypeOutputWithContext(context.Context) AuditSinkTypeOutput
}
// AuditSink represents a cluster level audit sink
type AuditSinkTypeArgs struct {
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"`
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind pulumi.StringPtrInput `pulumi:"kind"`
Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"`
// Spec defines the audit configuration spec
Spec AuditSinkSpecPtrInput `pulumi:"spec"`
}
func (AuditSinkTypeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AuditSinkType)(nil)).Elem()
}
func (i AuditSinkTypeArgs) ToAuditSinkTypeOutput() AuditSinkTypeOutput {
return i.ToAuditSinkTypeOutputWithContext(context.Background())
}
func (i AuditSinkTypeArgs) ToAuditSinkTypeOutputWithContext(ctx context.Context) AuditSinkTypeOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuditSinkTypeOutput)
}
// AuditSinkTypeArrayInput is an input type that accepts AuditSinkTypeArray and AuditSinkTypeArrayOutput values.
// You can construct a concrete instance of `AuditSinkTypeArrayInput` via:
//
// AuditSinkTypeArray{ AuditSinkTypeArgs{...} }
type AuditSinkTypeArrayInput interface {
pulumi.Input
ToAuditSinkTypeArrayOutput() AuditSinkTypeArrayOutput
ToAuditSinkTypeArrayOutputWithContext(context.Context) AuditSinkTypeArrayOutput
}
type AuditSinkTypeArray []AuditSinkTypeInput
func (AuditSinkTypeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AuditSinkType)(nil)).Elem()
}
func (i AuditSinkTypeArray) ToAuditSinkTypeArrayOutput() AuditSinkTypeArrayOutput {
return i.ToAuditSinkTypeArrayOutputWithContext(context.Background())
}
func (i AuditSinkTypeArray) ToAuditSinkTypeArrayOutputWithContext(ctx context.Context) AuditSinkTypeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuditSinkTypeArrayOutput)
}
// AuditSink represents a cluster level audit sink
type AuditSinkTypeOutput struct{ *pulumi.OutputState }
func (AuditSinkTypeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AuditSinkType)(nil)).Elem()
}
func (o AuditSinkTypeOutput) ToAuditSinkTypeOutput() AuditSinkTypeOutput {
return o
}
func (o AuditSinkTypeOutput) ToAuditSinkTypeOutputWithContext(ctx context.Context) AuditSinkTypeOutput {
return o
}
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
func (o AuditSinkTypeOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v AuditSinkType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
func (o AuditSinkTypeOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v AuditSinkType) *string { return v.Kind }).(pulumi.StringPtrOutput)
}
func (o AuditSinkTypeOutput) Metadata() metav1.ObjectMetaPtrOutput {
return o.ApplyT(func(v AuditSinkType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput)
}
// Spec defines the audit configuration spec
func (o AuditSinkTypeOutput) Spec() AuditSinkSpecPtrOutput {
return o.ApplyT(func(v AuditSinkType) *AuditSinkSpec { return v.Spec }).(AuditSinkSpecPtrOutput)
}
type AuditSinkTypeArrayOutput struct{ *pulumi.OutputState }
func (AuditSinkTypeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AuditSinkType)(nil)).Elem()
}
func (o AuditSinkTypeArrayOutput) ToAuditSinkTypeArrayOutput() AuditSinkTypeArrayOutput {
return o
}
func (o AuditSinkTypeArrayOutput) ToAuditSinkTypeArrayOutputWithContext(ctx context.Context) AuditSinkTypeArrayOutput {
return o
}
func (o AuditSinkTypeArrayOutput) Index(i pulumi.IntInput) AuditSinkTypeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AuditSinkType {
return vs[0].([]AuditSinkType)[vs[1].(int)]
}).(AuditSinkTypeOutput)
}
// AuditSinkList is a list of AuditSink items.
type AuditSinkListType struct {
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `pulumi:"apiVersion"`
// List of audit configurations.
Items []AuditSinkType `pulumi:"items"`
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `pulumi:"kind"`
Metadata *metav1.ListMeta `pulumi:"metadata"`
}
// AuditSinkListTypeInput is an input type that accepts AuditSinkListTypeArgs and AuditSinkListTypeOutput values.
// You can construct a concrete instance of `AuditSinkListTypeInput` via:
//
// AuditSinkListTypeArgs{...}
type AuditSinkListTypeInput interface {
pulumi.Input
ToAuditSinkListTypeOutput() AuditSinkListTypeOutput
ToAuditSinkListTypeOutputWithContext(context.Context) AuditSinkListTypeOutput
}
// AuditSinkList is a list of AuditSink items.
type AuditSinkListTypeArgs struct {
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"`
// List of audit configurations.
Items AuditSinkTypeArrayInput `pulumi:"items"`
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind pulumi.StringPtrInput `pulumi:"kind"`
Metadata metav1.ListMetaPtrInput `pulumi:"metadata"`
}
func (AuditSinkListTypeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AuditSinkListType)(nil)).Elem()
}
func (i AuditSinkListTypeArgs) ToAuditSinkListTypeOutput() AuditSinkListTypeOutput {
return i.ToAuditSinkListTypeOutputWithContext(context.Background())
}
func (i AuditSinkListTypeArgs) ToAuditSinkListTypeOutputWithContext(ctx context.Context) AuditSinkListTypeOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuditSinkListTypeOutput)
}
// AuditSinkList is a list of AuditSink items.
type AuditSinkListTypeOutput struct{ *pulumi.OutputState }
func (AuditSinkListTypeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AuditSinkListType)(nil)).Elem()
}
func (o AuditSinkListTypeOutput) ToAuditSinkListTypeOutput() AuditSinkListTypeOutput {
return o
}
func (o AuditSinkListTypeOutput) ToAuditSinkListTypeOutputWithContext(ctx context.Context) AuditSinkListTypeOutput {
return o
}
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
func (o AuditSinkListTypeOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v AuditSinkListType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
// List of audit configurations.
func (o AuditSinkListTypeOutput) Items() AuditSinkTypeArrayOutput {
return o.ApplyT(func(v AuditSinkListType) []AuditSinkType { return v.Items }).(AuditSinkTypeArrayOutput)
}
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
func (o AuditSinkListTypeOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v AuditSinkListType) *string { return v.Kind }).(pulumi.StringPtrOutput)
}
func (o AuditSinkListTypeOutput) Metadata() metav1.ListMetaPtrOutput {
return o.ApplyT(func(v AuditSinkListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput)
}
// AuditSinkSpec holds the spec for the audit sink
type AuditSinkSpec struct {
// Policy defines the policy for selecting which events should be sent to the webhook required
Policy Policy `pulumi:"policy"`
// Webhook to send events required
Webhook Webhook `pulumi:"webhook"`
}
// AuditSinkSpecInput is an input type that accepts AuditSinkSpecArgs and AuditSinkSpecOutput values.
// You can construct a concrete instance of `AuditSinkSpecInput` via:
//
// AuditSinkSpecArgs{...}
type AuditSinkSpecInput interface {
pulumi.Input
ToAuditSinkSpecOutput() AuditSinkSpecOutput
ToAuditSinkSpecOutputWithContext(context.Context) AuditSinkSpecOutput
}
// AuditSinkSpec holds the spec for the audit sink
type AuditSinkSpecArgs struct {
// Policy defines the policy for selecting which events should be sent to the webhook required
Policy PolicyInput `pulumi:"policy"`
// Webhook to send events required
Webhook WebhookInput `pulumi:"webhook"`
}
func (AuditSinkSpecArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AuditSinkSpec)(nil)).Elem()
}
func (i AuditSinkSpecArgs) ToAuditSinkSpecOutput() AuditSinkSpecOutput {
return i.ToAuditSinkSpecOutputWithContext(context.Background())
}
func (i AuditSinkSpecArgs) ToAuditSinkSpecOutputWithContext(ctx context.Context) AuditSinkSpecOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuditSinkSpecOutput)
}
func (i AuditSinkSpecArgs) ToAuditSinkSpecPtrOutput() AuditSinkSpecPtrOutput {
return i.ToAuditSinkSpecPtrOutputWithContext(context.Background())
}
func (i AuditSinkSpecArgs) ToAuditSinkSpecPtrOutputWithContext(ctx context.Context) AuditSinkSpecPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuditSinkSpecOutput).ToAuditSinkSpecPtrOutputWithContext(ctx)
}
// AuditSinkSpecPtrInput is an input type that accepts AuditSinkSpecArgs, AuditSinkSpecPtr and AuditSinkSpecPtrOutput values.
// You can construct a concrete instance of `AuditSinkSpecPtrInput` via:
//
// AuditSinkSpecArgs{...}
//
// or:
//
// nil
type AuditSinkSpecPtrInput interface {
pulumi.Input
ToAuditSinkSpecPtrOutput() AuditSinkSpecPtrOutput
ToAuditSinkSpecPtrOutputWithContext(context.Context) AuditSinkSpecPtrOutput
}
type auditSinkSpecPtrType AuditSinkSpecArgs
func AuditSinkSpecPtr(v *AuditSinkSpecArgs) AuditSinkSpecPtrInput {
return (*auditSinkSpecPtrType)(v)
}
func (*auditSinkSpecPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AuditSinkSpec)(nil)).Elem()
}
func (i *auditSinkSpecPtrType) ToAuditSinkSpecPtrOutput() AuditSinkSpecPtrOutput {
return i.ToAuditSinkSpecPtrOutputWithContext(context.Background())
}
func (i *auditSinkSpecPtrType) ToAuditSinkSpecPtrOutputWithContext(ctx context.Context) AuditSinkSpecPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuditSinkSpecPtrOutput)
}
// AuditSinkSpec holds the spec for the audit sink
type AuditSinkSpecOutput struct{ *pulumi.OutputState }
func (AuditSinkSpecOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AuditSinkSpec)(nil)).Elem()
}
func (o AuditSinkSpecOutput) ToAuditSinkSpecOutput() AuditSinkSpecOutput {
return o
}
func (o AuditSinkSpecOutput) ToAuditSinkSpecOutputWithContext(ctx context.Context) AuditSinkSpecOutput {
return o
}
func (o AuditSinkSpecOutput) ToAuditSinkSpecPtrOutput() AuditSinkSpecPtrOutput {
return o.ToAuditSinkSpecPtrOutputWithContext(context.Background())
}
func (o AuditSinkSpecOutput) ToAuditSinkSpecPtrOutputWithContext(ctx context.Context) AuditSinkSpecPtrOutput {
return o.ApplyT(func(v AuditSinkSpec) *AuditSinkSpec {
return &v
}).(AuditSinkSpecPtrOutput)
}
// Policy defines the policy for selecting which events should be sent to the webhook required
func (o AuditSinkSpecOutput) Policy() PolicyOutput {
return o.ApplyT(func(v AuditSinkSpec) Policy { return v.Policy }).(PolicyOutput)
}
// Webhook to send events required
func (o AuditSinkSpecOutput) Webhook() WebhookOutput {
return o.ApplyT(func(v AuditSinkSpec) Webhook { return v.Webhook }).(WebhookOutput)
}
type AuditSinkSpecPtrOutput struct{ *pulumi.OutputState }
func (AuditSinkSpecPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AuditSinkSpec)(nil)).Elem()
}
func (o AuditSinkSpecPtrOutput) ToAuditSinkSpecPtrOutput() AuditSinkSpecPtrOutput {
return o
}
func (o AuditSinkSpecPtrOutput) ToAuditSinkSpecPtrOutputWithContext(ctx context.Context) AuditSinkSpecPtrOutput {
return o
}
func (o AuditSinkSpecPtrOutput) Elem() AuditSinkSpecOutput {
return o.ApplyT(func(v *AuditSinkSpec) AuditSinkSpec { return *v }).(AuditSinkSpecOutput)
}
// Policy defines the policy for selecting which events should be sent to the webhook required
func (o AuditSinkSpecPtrOutput) Policy() PolicyPtrOutput {
return o.ApplyT(func(v *AuditSinkSpec) *Policy {
if v == nil {
return nil
}
return &v.Policy
}).(PolicyPtrOutput)
}
// Webhook to send events required
func (o AuditSinkSpecPtrOutput) Webhook() WebhookPtrOutput {
return o.ApplyT(func(v *AuditSinkSpec) *Webhook {
if v == nil {
return nil
}
return &v.Webhook
}).(WebhookPtrOutput)
}
// Policy defines the configuration of how audit events are logged
type Policy struct {
// The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
Level string `pulumi:"level"`
// Stages is a list of stages for which events are created.
Stages []string `pulumi:"stages"`
}
// PolicyInput is an input type that accepts PolicyArgs and PolicyOutput values.
// You can construct a concrete instance of `PolicyInput` via:
//
// PolicyArgs{...}
type PolicyInput interface {
pulumi.Input
ToPolicyOutput() PolicyOutput
ToPolicyOutputWithContext(context.Context) PolicyOutput
}
// Policy defines the configuration of how audit events are logged
type PolicyArgs struct {
// The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
Level pulumi.StringInput `pulumi:"level"`
// Stages is a list of stages for which events are created.
Stages pulumi.StringArrayInput `pulumi:"stages"`
}
func (PolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*Policy)(nil)).Elem()
}
func (i PolicyArgs) ToPolicyOutput() PolicyOutput {
return i.ToPolicyOutputWithContext(context.Background())
}
func (i PolicyArgs) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyOutput)
}
func (i PolicyArgs) ToPolicyPtrOutput() PolicyPtrOutput {
return i.ToPolicyPtrOutputWithContext(context.Background())
}
func (i PolicyArgs) ToPolicyPtrOutputWithContext(ctx context.Context) PolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyOutput).ToPolicyPtrOutputWithContext(ctx)
}
// PolicyPtrInput is an input type that accepts PolicyArgs, PolicyPtr and PolicyPtrOutput values.
// You can construct a concrete instance of `PolicyPtrInput` via:
//
// PolicyArgs{...}
//
// or:
//
// nil
type PolicyPtrInput interface {
pulumi.Input
ToPolicyPtrOutput() PolicyPtrOutput
ToPolicyPtrOutputWithContext(context.Context) PolicyPtrOutput
}
type policyPtrType PolicyArgs
func PolicyPtr(v *PolicyArgs) PolicyPtrInput {
return (*policyPtrType)(v)
}
func (*policyPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**Policy)(nil)).Elem()
}
func (i *policyPtrType) ToPolicyPtrOutput() PolicyPtrOutput {
return i.ToPolicyPtrOutputWithContext(context.Background())
}
func (i *policyPtrType) ToPolicyPtrOutputWithContext(ctx context.Context) PolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyPtrOutput)
}
// Policy defines the configuration of how audit events are logged
type PolicyOutput struct{ *pulumi.OutputState }
func (PolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Policy)(nil)).Elem()
}
func (o PolicyOutput) ToPolicyOutput() PolicyOutput {
return o
}
func (o PolicyOutput) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput {
return o
}
func (o PolicyOutput) ToPolicyPtrOutput() PolicyPtrOutput {
return o.ToPolicyPtrOutputWithContext(context.Background())
}
func (o PolicyOutput) ToPolicyPtrOutputWithContext(ctx context.Context) PolicyPtrOutput {
return o.ApplyT(func(v Policy) *Policy {
return &v
}).(PolicyPtrOutput)
}
// The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
func (o PolicyOutput) Level() pulumi.StringOutput {
return o.ApplyT(func(v Policy) string { return v.Level }).(pulumi.StringOutput)
}
// Stages is a list of stages for which events are created.
func (o PolicyOutput) Stages() pulumi.StringArrayOutput {
return o.ApplyT(func(v Policy) []string { return v.Stages }).(pulumi.StringArrayOutput)
}
type PolicyPtrOutput struct{ *pulumi.OutputState }
func (PolicyPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Policy)(nil)).Elem()
}
func (o PolicyPtrOutput) ToPolicyPtrOutput() PolicyPtrOutput {
return o
}
func (o PolicyPtrOutput) ToPolicyPtrOutputWithContext(ctx context.Context) PolicyPtrOutput {
return o
}
func (o PolicyPtrOutput) Elem() PolicyOutput {
return o.ApplyT(func(v *Policy) Policy { return *v }).(PolicyOutput)
}
// The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
func (o PolicyPtrOutput) Level() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Policy) *string {
if v == nil {
return nil
}
return &v.Level
}).(pulumi.StringPtrOutput)
}
// Stages is a list of stages for which events are created.
func (o PolicyPtrOutput) Stages() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Policy) []string {
if v == nil {
return nil
}
return v.Stages
}).(pulumi.StringArrayOutput)
}
// ServiceReference holds a reference to Service.legacy.k8s.io
type ServiceReference struct {
// `name` is the name of the service. Required
Name string `pulumi:"name"`
// `namespace` is the namespace of the service. Required
Namespace string `pulumi:"namespace"`
// `path` is an optional URL path which will be sent in any request to this service.
Path *string `pulumi:"path"`
// If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).
Port *int `pulumi:"port"`
}
// ServiceReferenceInput is an input type that accepts ServiceReferenceArgs and ServiceReferenceOutput values.
// You can construct a concrete instance of `ServiceReferenceInput` via:
//
// ServiceReferenceArgs{...}
type ServiceReferenceInput interface {
pulumi.Input
ToServiceReferenceOutput() ServiceReferenceOutput
ToServiceReferenceOutputWithContext(context.Context) ServiceReferenceOutput
}
// ServiceReference holds a reference to Service.legacy.k8s.io
type ServiceReferenceArgs struct {
// `name` is the name of the service. Required
Name pulumi.StringInput `pulumi:"name"`
// `namespace` is the namespace of the service. Required
Namespace pulumi.StringInput `pulumi:"namespace"`
// `path` is an optional URL path which will be sent in any request to this service.
Path pulumi.StringPtrInput `pulumi:"path"`
// If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).
Port pulumi.IntPtrInput `pulumi:"port"`
}
func (ServiceReferenceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceReference)(nil)).Elem()
}
func (i ServiceReferenceArgs) ToServiceReferenceOutput() ServiceReferenceOutput {
return i.ToServiceReferenceOutputWithContext(context.Background())
}
func (i ServiceReferenceArgs) ToServiceReferenceOutputWithContext(ctx context.Context) ServiceReferenceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceReferenceOutput)
}
func (i ServiceReferenceArgs) ToServiceReferencePtrOutput() ServiceReferencePtrOutput {
return i.ToServiceReferencePtrOutputWithContext(context.Background())
}
func (i ServiceReferenceArgs) ToServiceReferencePtrOutputWithContext(ctx context.Context) ServiceReferencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceReferenceOutput).ToServiceReferencePtrOutputWithContext(ctx)
}
// ServiceReferencePtrInput is an input type that accepts ServiceReferenceArgs, ServiceReferencePtr and ServiceReferencePtrOutput values.
// You can construct a concrete instance of `ServiceReferencePtrInput` via:
//
// ServiceReferenceArgs{...}
//
// or:
//
// nil
type ServiceReferencePtrInput interface {
pulumi.Input
ToServiceReferencePtrOutput() ServiceReferencePtrOutput
ToServiceReferencePtrOutputWithContext(context.Context) ServiceReferencePtrOutput
}
type serviceReferencePtrType ServiceReferenceArgs
func ServiceReferencePtr(v *ServiceReferenceArgs) ServiceReferencePtrInput {
return (*serviceReferencePtrType)(v)
}
func (*serviceReferencePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceReference)(nil)).Elem()
}
func (i *serviceReferencePtrType) ToServiceReferencePtrOutput() ServiceReferencePtrOutput {
return i.ToServiceReferencePtrOutputWithContext(context.Background())
}
func (i *serviceReferencePtrType) ToServiceReferencePtrOutputWithContext(ctx context.Context) ServiceReferencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceReferencePtrOutput)
}
// ServiceReference holds a reference to Service.legacy.k8s.io
type ServiceReferenceOutput struct{ *pulumi.OutputState }
func (ServiceReferenceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceReference)(nil)).Elem()
}
func (o ServiceReferenceOutput) ToServiceReferenceOutput() ServiceReferenceOutput {
return o
}
func (o ServiceReferenceOutput) ToServiceReferenceOutputWithContext(ctx context.Context) ServiceReferenceOutput {
return o
}
func (o ServiceReferenceOutput) ToServiceReferencePtrOutput() ServiceReferencePtrOutput {
return o.ToServiceReferencePtrOutputWithContext(context.Background())
}
func (o ServiceReferenceOutput) ToServiceReferencePtrOutputWithContext(ctx context.Context) ServiceReferencePtrOutput {
return o.ApplyT(func(v ServiceReference) *ServiceReference {
return &v
}).(ServiceReferencePtrOutput)
}
// `name` is the name of the service. Required
func (o ServiceReferenceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ServiceReference) string { return v.Name }).(pulumi.StringOutput)
}
// `namespace` is the namespace of the service. Required
func (o ServiceReferenceOutput) Namespace() pulumi.StringOutput {
return o.ApplyT(func(v ServiceReference) string { return v.Namespace }).(pulumi.StringOutput)
}
// `path` is an optional URL path which will be sent in any request to this service.
func (o ServiceReferenceOutput) Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v ServiceReference) *string { return v.Path }).(pulumi.StringPtrOutput)
}
// If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).
func (o ServiceReferenceOutput) Port() pulumi.IntPtrOutput {
return o.ApplyT(func(v ServiceReference) *int { return v.Port }).(pulumi.IntPtrOutput)
}
type ServiceReferencePtrOutput struct{ *pulumi.OutputState }
func (ServiceReferencePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceReference)(nil)).Elem()
}
func (o ServiceReferencePtrOutput) ToServiceReferencePtrOutput() ServiceReferencePtrOutput {
return o
}
func (o ServiceReferencePtrOutput) ToServiceReferencePtrOutputWithContext(ctx context.Context) ServiceReferencePtrOutput {
return o
}
func (o ServiceReferencePtrOutput) Elem() ServiceReferenceOutput {
return o.ApplyT(func(v *ServiceReference) ServiceReference { return *v }).(ServiceReferenceOutput)
}
// `name` is the name of the service. Required
func (o ServiceReferencePtrOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceReference) *string {
if v == nil {
return nil
}
return &v.Name
}).(pulumi.StringPtrOutput)
}
// `namespace` is the namespace of the service. Required
func (o ServiceReferencePtrOutput) Namespace() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceReference) *string {
if v == nil {
return nil
}
return &v.Namespace
}).(pulumi.StringPtrOutput)
}
// `path` is an optional URL path which will be sent in any request to this service.
func (o ServiceReferencePtrOutput) Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceReference) *string {
if v == nil {
return nil
}
return v.Path
}).(pulumi.StringPtrOutput)
}
// If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).
func (o ServiceReferencePtrOutput) Port() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ServiceReference) *int {
if v == nil {
return nil
}
return v.Port
}).(pulumi.IntPtrOutput)
}
// Webhook holds the configuration of the webhook
type Webhook struct {
// ClientConfig holds the connection parameters for the webhook required
ClientConfig WebhookClientConfig `pulumi:"clientConfig"`
// Throttle holds the options for throttling the webhook
Throttle *WebhookThrottleConfig `pulumi:"throttle"`
}
// WebhookInput is an input type that accepts WebhookArgs and WebhookOutput values.
// You can construct a concrete instance of `WebhookInput` via:
//
// WebhookArgs{...}
type WebhookInput interface {
pulumi.Input
ToWebhookOutput() WebhookOutput
ToWebhookOutputWithContext(context.Context) WebhookOutput
}
// Webhook holds the configuration of the webhook
type WebhookArgs struct {
// ClientConfig holds the connection parameters for the webhook required
ClientConfig WebhookClientConfigInput `pulumi:"clientConfig"`
// Throttle holds the options for throttling the webhook
Throttle WebhookThrottleConfigPtrInput `pulumi:"throttle"`
}
func (WebhookArgs) ElementType() reflect.Type {
return reflect.TypeOf((*Webhook)(nil)).Elem()
}
func (i WebhookArgs) ToWebhookOutput() WebhookOutput {
return i.ToWebhookOutputWithContext(context.Background())
}
func (i WebhookArgs) ToWebhookOutputWithContext(ctx context.Context) WebhookOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookOutput)
}
func (i WebhookArgs) ToWebhookPtrOutput() WebhookPtrOutput {
return i.ToWebhookPtrOutputWithContext(context.Background())
}
func (i WebhookArgs) ToWebhookPtrOutputWithContext(ctx context.Context) WebhookPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookOutput).ToWebhookPtrOutputWithContext(ctx)
}
// WebhookPtrInput is an input type that accepts WebhookArgs, WebhookPtr and WebhookPtrOutput values.
// You can construct a concrete instance of `WebhookPtrInput` via:
//
// WebhookArgs{...}
//
// or:
//
// nil
type WebhookPtrInput interface {
pulumi.Input
ToWebhookPtrOutput() WebhookPtrOutput
ToWebhookPtrOutputWithContext(context.Context) WebhookPtrOutput
}
type webhookPtrType WebhookArgs
func WebhookPtr(v *WebhookArgs) WebhookPtrInput {
return (*webhookPtrType)(v)
}
func (*webhookPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**Webhook)(nil)).Elem()
}
func (i *webhookPtrType) ToWebhookPtrOutput() WebhookPtrOutput {
return i.ToWebhookPtrOutputWithContext(context.Background())
}
func (i *webhookPtrType) ToWebhookPtrOutputWithContext(ctx context.Context) WebhookPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookPtrOutput)
}
// Webhook holds the configuration of the webhook
type WebhookOutput struct{ *pulumi.OutputState }
func (WebhookOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Webhook)(nil)).Elem()
}
func (o WebhookOutput) ToWebhookOutput() WebhookOutput {
return o
}
func (o WebhookOutput) ToWebhookOutputWithContext(ctx context.Context) WebhookOutput {
return o
}
func (o WebhookOutput) ToWebhookPtrOutput() WebhookPtrOutput {
return o.ToWebhookPtrOutputWithContext(context.Background())
}
func (o WebhookOutput) ToWebhookPtrOutputWithContext(ctx context.Context) WebhookPtrOutput {
return o.ApplyT(func(v Webhook) *Webhook {
return &v
}).(WebhookPtrOutput)
}
// ClientConfig holds the connection parameters for the webhook required
func (o WebhookOutput) ClientConfig() WebhookClientConfigOutput {
return o.ApplyT(func(v Webhook) WebhookClientConfig { return v.ClientConfig }).(WebhookClientConfigOutput)
}
// Throttle holds the options for throttling the webhook
func (o WebhookOutput) Throttle() WebhookThrottleConfigPtrOutput {
return o.ApplyT(func(v Webhook) *WebhookThrottleConfig { return v.Throttle }).(WebhookThrottleConfigPtrOutput)
}
type WebhookPtrOutput struct{ *pulumi.OutputState }
func (WebhookPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Webhook)(nil)).Elem()
}
func (o WebhookPtrOutput) ToWebhookPtrOutput() WebhookPtrOutput {
return o
}
func (o WebhookPtrOutput) ToWebhookPtrOutputWithContext(ctx context.Context) WebhookPtrOutput {
return o
}
func (o WebhookPtrOutput) Elem() WebhookOutput {
return o.ApplyT(func(v *Webhook) Webhook { return *v }).(WebhookOutput)
}
// ClientConfig holds the connection parameters for the webhook required
func (o WebhookPtrOutput) ClientConfig() WebhookClientConfigPtrOutput {
return o.ApplyT(func(v *Webhook) *WebhookClientConfig {
if v == nil {
return nil
}
return &v.ClientConfig
}).(WebhookClientConfigPtrOutput)
}
// Throttle holds the options for throttling the webhook
func (o WebhookPtrOutput) Throttle() WebhookThrottleConfigPtrOutput {
return o.ApplyT(func(v *Webhook) *WebhookThrottleConfig {
if v == nil {
return nil
}
return v.Throttle
}).(WebhookThrottleConfigPtrOutput)
}
// WebhookClientConfig contains the information to make a connection with the webhook
type WebhookClientConfig struct {
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.
CaBundle *string `pulumi:"caBundle"`
// `service` is a reference to the service for this webhook. Either `service` or `url` must be specified.
//
// If the webhook is running within the cluster, then you should use `service`.
Service *ServiceReference `pulumi:"service"`
// `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.
//
// The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.
//
// Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.
//
// The scheme must be "https"; the URL must begin with "https://".
//
// A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.
//
// Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either.
Url *string `pulumi:"url"`
}
// WebhookClientConfigInput is an input type that accepts WebhookClientConfigArgs and WebhookClientConfigOutput values.
// You can construct a concrete instance of `WebhookClientConfigInput` via:
//
// WebhookClientConfigArgs{...}
type WebhookClientConfigInput interface {
pulumi.Input
ToWebhookClientConfigOutput() WebhookClientConfigOutput
ToWebhookClientConfigOutputWithContext(context.Context) WebhookClientConfigOutput
}
// WebhookClientConfig contains the information to make a connection with the webhook
type WebhookClientConfigArgs struct {
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.
CaBundle pulumi.StringPtrInput `pulumi:"caBundle"`
// `service` is a reference to the service for this webhook. Either `service` or `url` must be specified.
//
// If the webhook is running within the cluster, then you should use `service`.
Service ServiceReferencePtrInput `pulumi:"service"`
// `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.
//
// The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.
//
// Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.
//
// The scheme must be "https"; the URL must begin with "https://".
//
// A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.
//
// Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either.
Url pulumi.StringPtrInput `pulumi:"url"`
}
func (WebhookClientConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*WebhookClientConfig)(nil)).Elem()
}
func (i WebhookClientConfigArgs) ToWebhookClientConfigOutput() WebhookClientConfigOutput {
return i.ToWebhookClientConfigOutputWithContext(context.Background())
}
func (i WebhookClientConfigArgs) ToWebhookClientConfigOutputWithContext(ctx context.Context) WebhookClientConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookClientConfigOutput)
}
func (i WebhookClientConfigArgs) ToWebhookClientConfigPtrOutput() WebhookClientConfigPtrOutput {
return i.ToWebhookClientConfigPtrOutputWithContext(context.Background())
}
func (i WebhookClientConfigArgs) ToWebhookClientConfigPtrOutputWithContext(ctx context.Context) WebhookClientConfigPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookClientConfigOutput).ToWebhookClientConfigPtrOutputWithContext(ctx)
}
// WebhookClientConfigPtrInput is an input type that accepts WebhookClientConfigArgs, WebhookClientConfigPtr and WebhookClientConfigPtrOutput values.
// You can construct a concrete instance of `WebhookClientConfigPtrInput` via:
//
// WebhookClientConfigArgs{...}
//
// or:
//
// nil
type WebhookClientConfigPtrInput interface {
pulumi.Input
ToWebhookClientConfigPtrOutput() WebhookClientConfigPtrOutput
ToWebhookClientConfigPtrOutputWithContext(context.Context) WebhookClientConfigPtrOutput
}
type webhookClientConfigPtrType WebhookClientConfigArgs
func WebhookClientConfigPtr(v *WebhookClientConfigArgs) WebhookClientConfigPtrInput {
return (*webhookClientConfigPtrType)(v)
}
func (*webhookClientConfigPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**WebhookClientConfig)(nil)).Elem()
}
func (i *webhookClientConfigPtrType) ToWebhookClientConfigPtrOutput() WebhookClientConfigPtrOutput {
return i.ToWebhookClientConfigPtrOutputWithContext(context.Background())
}
func (i *webhookClientConfigPtrType) ToWebhookClientConfigPtrOutputWithContext(ctx context.Context) WebhookClientConfigPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookClientConfigPtrOutput)
}
// WebhookClientConfig contains the information to make a connection with the webhook
type WebhookClientConfigOutput struct{ *pulumi.OutputState }
func (WebhookClientConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((*WebhookClientConfig)(nil)).Elem()
}
func (o WebhookClientConfigOutput) ToWebhookClientConfigOutput() WebhookClientConfigOutput {
return o
}
func (o WebhookClientConfigOutput) ToWebhookClientConfigOutputWithContext(ctx context.Context) WebhookClientConfigOutput {
return o
}
func (o WebhookClientConfigOutput) ToWebhookClientConfigPtrOutput() WebhookClientConfigPtrOutput {
return o.ToWebhookClientConfigPtrOutputWithContext(context.Background())
}
func (o WebhookClientConfigOutput) ToWebhookClientConfigPtrOutputWithContext(ctx context.Context) WebhookClientConfigPtrOutput {
return o.ApplyT(func(v WebhookClientConfig) *WebhookClientConfig {
return &v
}).(WebhookClientConfigPtrOutput)
}
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.