forked from scottdware/go-bigip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ltm.go
2173 lines (1909 loc) · 79.2 KB
/
ltm.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
package bigip
import (
"encoding/json"
"fmt"
"strings"
)
// ServerSSLProfiles
// Documentation: https://devcentral.f5.com/wiki/iControlREST.APIRef_tm_ltm_profile_server-ssl.ashx
// ServerSSLProfiles contains a list of every server-ssl profile on the BIG-IP system.
type ServerSSLProfiles struct {
ServerSSLProfiles []ServerSSLProfile `json:"items"`
}
// ServerSSLProfile contains information about each server-ssl profile. You can use all
// of these fields when modifying a server-ssl profile.
type ServerSSLProfile struct {
Name string `json:"name,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
AlertTimeout string `json:"alertTimeout,omitempty"`
Authenticate string `json:"authenticate,omitempty"`
AuthenticateDepth int `json:"authenticateDepth,omitempty"`
CaFile string `json:"caFile,omitempty"`
CacheSize int `json:"cacheSize,omitempty"`
CacheTimeout int `json:"cacheTimeout,omitempty"`
Cert string `json:"cert,omitempty"`
Chain string `json:"chain,omitempty"`
CipherGroup string `json:"cipherGroup,omitempty"`
Ciphers string `json:"ciphers,omitempty"`
DefaultsFrom string `json:"defaultsFrom,omitempty"`
ExpireCertResponseControl string `json:"expireCertResponseControl,omitempty"`
GenericAlert string `json:"genericAlert,omitempty"`
HandshakeTimeout string `json:"handshakeTimeout,omitempty"`
Key string `json:"key,omitempty"`
ModSslMethods string `json:"modSslMethods,omitempty"`
Mode string `json:"mode,omitempty"`
TmOptions string `json:"tmOptions,omitempty"`
Passphrase string `json:"passphrase,omitempty"`
PeerCertMode string `json:"peerCertMode,omitempty"`
ProxySsl string `json:"proxySsl,omitempty"`
RenegotiatePeriod string `json:"renegotiatePeriod,omitempty"`
RenegotiateSize string `json:"renegotiateSize,omitempty"`
Renegotiation string `json:"renegotiation,omitempty"`
RetainCertificate string `json:"retainCertificate,omitempty"`
SecureRenegotiation string `json:"secureRenegotiation,omitempty"`
ServerName string `json:"serverName,omitempty"`
SessionMirroring string `json:"sessionMirroring,omitempty"`
SessionTicket string `json:"sessionTicket,omitempty"`
SniDefault string `json:"sniDefault,omitempty"`
SniRequire string `json:"sniRequire,omitempty"`
SslForwardProxy string `json:"sslForwardProxy,omitempty"`
SslForwardProxyBypass string `json:"sslForwardProxyBypass,omitempty"`
SslSignHash string `json:"sslSignHash,omitempty"`
StrictResume string `json:"strictResume,omitempty"`
UncleanShutdown string `json:"uncleanShutdown,omitempty"`
UntrustedCertResponseControl string `json:"untrustedCertResponseControl,omitempty"`
}
// ClientSSLProfiles
// Documentation: https://devcentral.f5.com/wiki/iControlREST.APIRef_tm_ltm_profile_client-ssl.ashx
// ClientSSLProfiles contains a list of every client-ssl profile on the BIG-IP system.
type ClientSSLProfiles struct {
ClientSSLProfiles []ClientSSLProfile `json:"items"`
}
// ClientSSLProfile contains information about each client-ssl profile. You can use all
// of these fields when modifying a client-ssl profile.
type ClientSSLProfile struct {
Name string `json:"name,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
AlertTimeout string `json:"alertTimeout,omitempty"`
AllowNonSsl string `json:"allowNonSsl,omitempty"`
Authenticate string `json:"authenticate,omitempty"`
AuthenticateDepth int `json:"authenticateDepth,omitempty"`
CaFile string `json:"caFile,omitempty"`
CacheSize int `json:"cacheSize,omitempty"`
CacheTimeout int `json:"cacheTimeout,omitempty"`
Cert string `json:"cert,omitempty"`
CertKeyChain []struct {
Name string `json:"name,omitempty"`
Cert string `json:"cert,omitempty"`
Chain string `json:"chain,omitempty"`
Key string `json:"key,omitempty"`
Passphrase string `json:"passphrase,omitempty"`
} `json:"certKeyChain,omitempty"`
CertExtensionIncludes []string `json:"certExtensionIncludes,omitempty"`
CertLifespan int `json:"certLifespan,omitempty"`
CertLookupByIpaddrPort string `json:"certLookupByIpaddrPort,omitempty"`
Chain string `json:"chain,omitempty"`
CipherGroup string `json:"cipherGroup,omitempty"`
Ciphers string `json:"ciphers,omitempty"`
ClientCertCa string `json:"clientCertCa,omitempty"`
CrlFile string `json:"crlFile,omitempty"`
DefaultsFrom string `json:"defaultsFrom,omitempty"`
ForwardProxyBypassDefaultAction string `json:"forwardProxyBypassDefaultAction,omitempty"`
GenericAlert string `json:"genericAlert,omitempty"`
HandshakeTimeout string `json:"handshakeTimeout,omitempty"`
InheritCertkeychain string `json:"inheritCertkeychain,omitempty"`
Key string `json:"key,omitempty"`
ModSslMethods string `json:"modSslMethods,omitempty"`
Mode string `json:"mode,omitempty"`
TmOptions string `json:"tmOptions,omitempty"`
Passphrase string `json:"passphrase,omitempty"`
PeerCertMode string `json:"peerCertMode,omitempty"`
ProxyCaCert string `json:"proxyCaCert,omitempty"`
ProxyCaKey string `json:"proxyCaKey,omitempty"`
ProxyCaPassphrase string `json:"proxyCaPassphrase,omitempty"`
ProxySsl string `json:"proxySsl,omitempty"`
ProxySslPassthrough string `json:"proxySslPassthrough,omitempty"`
RenegotiatePeriod string `json:"renegotiatePeriod,omitempty"`
RenegotiateSize string `json:"renegotiateSize,omitempty"`
Renegotiation string `json:"renegotiation,omitempty"`
RetainCertificate string `json:"retainCertificate,omitempty"`
SecureRenegotiation string `json:"secureRenegotiation,omitempty"`
ServerName string `json:"serverName,omitempty"`
SessionMirroring string `json:"sessionMirroring,omitempty"`
SessionTicket string `json:"sessionTicket,omitempty"`
SniDefault string `json:"sniDefault,omitempty"`
SniRequire string `json:"sniRequire,omitempty"`
SslForwardProxy string `json:"sslForwardProxy,omitempty"`
SslForwardProxyBypass string `json:"sslForwardProxyBypass,omitempty"`
SslSignHash string `json:"sslSignHash,omitempty"`
StrictResume string `json:"strictResume,omitempty"`
UncleanShutdown string `json:"uncleanShutdown,omitempty"`
}
// TcpProfiles contains a list of every tcp profile on the BIG-IP system.
type TcpProfiles struct {
TcpProfiles []TcpProfile `json:"items"`
}
type TcpProfile struct {
Abc string `json:"abc,omitempty"`
AckOnPush string `json:"ackOnPush,omitempty"`
AppService string `json:"appService,omitempty"`
AutoProxyBufferSize string `json:"autoProxyBufferSize,omitempty"`
AutoReceiveWindowSize string `json:"autoReceiveWindowSize,omitempty"`
AutoSendBufferSize string `json:"autoSendBufferSize,omitempty"`
CloseWaitTimeout int `json:"closeWaitTimeout,omitempty"`
CmetricsCache string `json:"cmetricsCache,omitempty"`
CmetricsCacheTimeout int `json:"cmetricsCacheTimeout,omitempty"`
CongestionControl string `json:"congestionControl,omitempty"`
DefaultsFrom string `json:"defaultsFrom,omitempty"`
DeferredAccept string `json:"deferredAccept,omitempty"`
DelayWindowControl string `json:"delayWindowControl,omitempty"`
DelayedAcks string `json:"delayedAcks,omitempty"`
Description string `json:"description,omitempty"`
Dsack string `json:"dsack,omitempty"`
EarlyRetransmit string `json:"earlyRetransmit,omitempty"`
Ecn string `json:"ecn,omitempty"`
EnhancedLossRecovery string `json:"enhancedLossRecovery,omitempty"`
FastOpen string `json:"fastOpen,omitempty"`
FastOpenCookieExpiration int `json:"fastOpenCookieExpiration,omitempty"`
FinWait_2Timeout int `json:"finWait_2Timeout,omitempty"`
FinWaitTimeout int `json:"finWaitTimeout,omitempty"`
HardwareSynCookie string `json:"hardwareSynCookie,omitempty"`
IdleTimeout int `json:"idleTimeout,omitempty"`
InitCwnd int `json:"initCwnd,omitempty"`
InitRwnd int `json:"initRwnd,omitempty"`
IpDfMode string `json:"ipDfMode,omitempty"`
IpTosToClient string `json:"ipTosToClient,omitempty"`
IpTtlMode string `json:"ipTtlMode,omitempty"`
IpTtlV4 int `json:"ipTtlV4,omitempty"`
IpTtlV6 int `json:"ipTtlV6,omitempty"`
KeepAliveInterval int `json:"keepAliveInterval,omitempty"`
LimitedTransmit string `json:"limitedTransmit,omitempty"`
LinkQosToClient string `json:"linkQosToClient,omitempty"`
MaxRetrans int `json:"maxRetrans,omitempty"`
MaxSegmentSize int `json:"maxSegmentSize,omitempty"`
Md5Signature string `json:"md5Signature,omitempty"`
Md5SignaturePassphrase string `json:"md5SignaturePassphrase,omitempty"`
MinimumRto int `json:"minimumRto,omitempty"`
Mptcp string `json:"mptcp,omitempty"`
MptcpCsum string `json:"mptcpCsum,omitempty"`
MptcpCsumVerify string `json:"mptcpCsumVerify,omitempty"`
MptcpDebug string `json:"mptcpDebug,omitempty"`
MptcpFallback string `json:"mptcpFallback,omitempty"`
MptcpFastjoin string `json:"mptcpFastjoin,omitempty"`
MptcpIdleTimeout int `json:"mptcpIdleTimeout,omitempty"`
MptcpJoinMax int `json:"mptcpJoinMax,omitempty"`
MptcpMakeafterbreak string `json:"mptcpMakeafterbreak,omitempty"`
MptcpNojoindssack string `json:"mptcpNojoindssack,omitempty"`
MptcpRtomax int `json:"mptcpRtomax,omitempty"`
MptcpRxmitmin int `json:"mptcpRxmitmin,omitempty"`
MptcpSubflowmax int `json:"mptcpSubflowmax,omitempty"`
MptcpTimeout int `json:"mptcpTimeout,omitempty"`
Nagle string `json:"nagle,omitempty"`
Name string `json:"name,omitempty"`
TmPartition string `json:"tmPartition,omitempty"`
PktLossIgnoreBurst int `json:"pktLossIgnoreBurst,omitempty"`
PktLossIgnoreRate int `json:"pktLossIgnoreRate,omitempty"`
ProxyBufferHigh int `json:"proxyBufferHigh,omitempty"`
ProxyBufferLow int `json:"proxyBufferLow,omitempty"`
ProxyMss string `json:"proxyMss,omitempty"`
ProxyOptions string `json:"proxyOptions,omitempty"`
RatePace string `json:"ratePace,omitempty"`
RatePaceMaxRate int `json:"ratePaceMaxRate,omitempty"`
ReceiveWindowSize int `json:"receiveWindowSize,omitempty"`
ResetOnTimeout string `json:"resetOnTimeout,omitempty"`
RexmtThresh int `json:"rexmtThresh,omitempty"`
SelectiveAcks string `json:"selectiveAcks,omitempty"`
SelectiveNack string `json:"selectiveNack,omitempty"`
SendBufferSize int `json:"sendBufferSize,omitempty"`
SlowStart string `json:"slowStart,omitempty"`
SynCookieEnable string `json:"synCookieEnable,omitempty"`
SynCookieWhitelist string `json:"synCookieWhitelist,omitempty"`
SynMaxRetrans int `json:"synMaxRetrans,omitempty"`
SynRtoBase int `json:"synRtoBase,omitempty"`
TailLossProbe string `json:"tailLossProbe,omitempty"`
TcpOptions string `json:"tcpOptions,omitempty"`
TimeWaitRecycle string `json:"timeWaitRecycle,omitempty"`
TimeWaitTimeout string `json:"timeWaitTimeout,omitempty"`
Timestamps string `json:"timestamps,omitempty"`
VerifiedAccept string `json:"verifiedAccept,omitempty"`
}
// UdpProfiles contains a list of every tcp profile on the BIG-IP system.
type UdpProfiles struct {
UdpProfiles []UdpProfile `json:"items"`
}
type UdpProfile struct {
AllowNoPayload string `json:"allowNoPayload,omitempty"`
AppService string `json:"appService,omitempty"`
BufferMaxBytes int `json:"bufferMaxBytes,omitempty"`
BufferMaxPackets int `json:"bufferMaxPackets,omitempty"`
DatagramLoadBalancing string `json:"datagramLoadBalancing,omitempty"`
DefaultsFrom string `json:"defaultsFrom,omitempty"`
Description string `json:"description,omitempty"`
IdleTimeout string `json:"idleTimeout,omitempty"`
IpDfMode string `json:"ipDfMode,omitempty"`
IpTosToClient string `json:"ipTosToClient,omitempty"`
IpTtlMode string `json:"ipTtlMode,omitempty"`
IpTtlV4 int `json:"ipTtlV4,omitempty"`
IpTtlV6 int `json:"ipTtlV6,omitempty"`
LinkQosToClient string `json:"linkQosToClient,omitempty"`
Name string `json:"name,omitempty"`
NoChecksum string `json:"noChecksum,omitempty"`
TmPartition string `json:"tmPartition,omitempty"`
ProxyMss string `json:"proxyMss,omitempty"`
}
type HttpProfiles struct {
HttpProfiles []HttpProfile `json:"items"`
}
type HttpProfile struct {
AcceptXff string `json:"acceptXff,omitempty"`
AppService string `json:"appService,omitempty"`
BasicAuthRealm string `json:"basicAuthRealm,omitempty"`
DefaultsFrom string `json:"defaultsFrom,omitempty"`
Description string `json:"description,omitempty"`
EncryptCookieSecret string `json:"encryptCookieSecret,omitempty"`
EncryptCookies string `json:"encryptCookies,omitempty"`
FallbackHost string `json:"fallbackHost,omitempty"`
FallbackStatusCodes string `json:"fallbackStatusCodes,omitempty"`
HeaderErase string `json:"headerErase,omitempty"`
HeaderInsert string `json:"headerInsert,omitempty"`
InsertXforwardedFor string `json:"insertXforwardedFor,omitempty"`
LwsSeparator string `json:"lwsSeparator,omitempty"`
LwsWidth int `json:"lwsWidth,omitempty"`
Name string `json:"name,omitempty"`
OneconnectTransformations string `json:"oneconnectTransformations,omitempty"`
TmPartition string `json:"tmPartition,omitempty"`
ProxyType string `json:"proxyType,omitempty"`
RedirectRewrite string `json:"redirectRewrite,omitempty"`
RequestChunking string `json:"requestChunking,omitempty"`
ResponseChunking string `json:"responseChunking,omitempty"`
ResponseHeadersPermitted string `json:"responseHeadersPermitted,omitempty"`
ServerAgentName string `json:"serverAgentName,omitempty"`
ViaHostName string `json:"viaHostName,omitempty"`
ViaRequest string `json:"viaRequest,omitempty"`
ViaResponse string `json:"viaResponse,omitempty"`
XffAlternativeNames string `json:"xffAlternativeNames,omitempty"`
}
type OneconnectProfiles struct {
OneconnectProfiles []OneconnectProfile `json:"items"`
}
type OneconnectProfile struct {
AppService string `json:"appService,omitempty"`
DefaultsFrom string `json:"defaultsFrom,omitempty"`
Description string `json:"description,omitempty"`
IdleTimeoutOverride string `json:"idleTimeoutOverride,omitempty"`
LimitType string `json:"limitType,omitempty"`
MaxAge int `json:"maxAge,omitempty"`
MaxReuse int `json:"maxReuse,omitempty"`
MaxSize int `json:"maxSize,omitempty"`
Name string `json:"name,omitempty"`
TmPartition string `json:"tmPartition,omitempty"`
SharePools string `json:"sharePools,omitempty"`
SourceMask string `json:"sourceMask,omitempty"`
}
type HttpCompressionProfiles struct {
HttpCompressionProfiles []HttpCompressionProfile `json:"items"`
}
type HttpCompressionProfile struct {
AllowHttp_10 string `json:"allowHttp_10,omitempty"`
AppService string `json:"appService,omitempty"`
BrowserWorkarounds string `json:"browserWorkarounds,omitempty"`
BufferSize int `json:"bufferSize,omitempty"`
ContentTypeExclude []string `json:"contentTypeExclude,omitempty"`
ContentTypeInclude []string `json:"contentTypeInclude,omitempty"`
CpuSaver string `json:"cpuSaver,omitempty"`
CpuSaverHigh int `json:"cpuSaverHigh,omitempty"`
CpuSaverLow int `json:"cpuSaverLow,omitempty"`
DefaultsFrom string `json:"defaultsFrom,omitempty"`
Description string `json:"description,omitempty"`
GzipLevel int `json:"gzipLevel,omitempty"`
GzipMemoryLevel int `json:"gzipMemoryLevel,omitempty"`
GzipWindowSize int `json:"gzipWindowSize,omitempty"`
KeepAcceptEncoding string `json:"keepAcceptEncoding,omitempty"`
MethodPrefer string `json:"methodPrefer,omitempty"`
MinSize int `json:"minSize,omitempty"`
Name string `json:"name,omitempty"`
TmPartition string `json:"tmPartition,omitempty"`
Selective string `json:"selective,omitempty"`
UriExclude []string `json:"uriExclude,omitempty"`
UriInclude []string `json:"uriInclude,omitempty"`
VaryHeader string `json:"varyHeader,omitempty"`
}
// Nodes contains a list of every node on the BIG-IP system.
type Nodes struct {
Nodes []Node `json:"items"`
}
// Node contains information about each individual node. You can use all
// of these fields when modifying a node.
type Node struct {
Name string `json:"name,omitempty"`
AppService string `json:"appService,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
Address string `json:"address,omitempty"`
ConnectionLimit int `json:"connectionLimit,omitempty"`
DynamicRatio int `json:"dynamicRatio,omitempty"`
Logging string `json:"logging,omitempty"`
Monitor string `json:"monitor,omitempty"`
RateLimit string `json:"rateLimit,omitempty"`
Ratio int `json:"ratio,omitempty"`
Session string `json:"session,omitempty"`
State string `json:"state,omitempty"`
FQDN struct {
AddressFamily string `json:"addressFamily,omitempty"`
AutoPopulate string `json:"autopopulate,omitempty"`
DownInterval int `json:"downInterval,omitempty"`
Interval string `json:"interval,omitempty"`
Name string `json:"tmName,omitempty"`
} `json:"fqdn,omitempty"`
}
// DataGroups contains a list of data groups on the BIG-IP system.
type DataGroups struct {
DataGroups []DataGroup `json:"items"`
}
// DataGroups contains information about each data group.
type DataGroup struct {
Name string
Partition string
FullPath string
Generation int
Type string
Records []DataGroupRecord
}
type DataGroupRecord struct {
Name string `json:"name,omitempty"`
Data string `json:"data,omitempty"`
}
type dataGroupDTO struct {
Name string `json:"name,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
Type string `json:"type,omitempty"`
// Records contains a list of DataGroupRecord objects.
// `omitempty` tag is removed on purpose. See issue https://github.com/scottdware/go-bigip/issues/90
Records []DataGroupRecord `json:"records"`
}
func (p *DataGroup) MarshalJSON() ([]byte, error) {
var dto dataGroupDTO
marshal(&dto, p)
return json.Marshal(dto)
}
func (p *DataGroup) UnmarshalJSON(b []byte) error {
var dto dataGroupDTO
err := json.Unmarshal(b, &dto)
if err != nil {
return err
}
return marshal(p, &dto)
}
// SnatPools contains a list of every snatpool on the BIG-IP system.
type SnatPools struct {
SnatPools []SnatPool `json:"items"`
}
// SnatPool contains information about each individual snatpool. You can use all
// of these fields when modifying a snatpool.
type SnatPool struct {
Name string `json:"name,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Description string `json:"description,omitempty"`
Generation int `json:"generation,omitempty"`
Members []string `json:"members,omitempty"`
}
// Pools contains a list of pools on the BIG-IP system.
type Pools struct {
Pools []Pool `json:"items"`
}
// Pool contains information about each pool. You can use all of these
// fields when modifying a pool.
type Pool struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
AllowNAT string `json:"allowNat,omitempty"`
AllowSNAT string `json:"allowSnat,omitempty"`
IgnorePersistedWeight string `json:"ignorePersistedWeight,omitempty"`
IPTOSToClient string `json:"ipTosToClient,omitempty"`
IPTOSToServer string `json:"ipTosToServer,omitempty"`
LinkQoSToClient string `json:"linkQosToClient,omitempty"`
LinkQoSToServer string `json:"linkQosToServer,omitempty"`
LoadBalancingMode string `json:"loadBalancingMode,omitempty"`
MinActiveMembers int `json:"minActiveMembers,omitempty"`
MinUpMembers int `json:"minUpMembers,omitempty"`
MinUpMembersAction string `json:"minUpMembersAction,omitempty"`
MinUpMembersChecking string `json:"minUpMembersChecking,omitempty"`
Monitor string `json:"monitor,omitempty"`
QueueDepthLimit int `json:"queueDepthLimit,omitempty"`
QueueOnConnectionLimit string `json:"queueOnConnectionLimit,omitempty"`
QueueTimeLimit int `json:"queueTimeLimit,omitempty"`
ReselectTries int `json:"reselectTries,omitempty"`
ServiceDownAction string `json:"serviceDownAction,omitempty"`
SlowRampTime int `json:"slowRampTime,omitempty"`
// Setting this field atomically updates all members.
Members *[]PoolMember `json:"members,omitempty"`
}
// Pool Members contains a list of pool members within a pool on the BIG-IP system.
type PoolMembers struct {
PoolMembers []PoolMember `json:"items"`
}
// poolMember is used only when adding members to a pool.
type poolMember struct {
Name string `json:"name"`
}
// poolMembers is used only when modifying members on a pool.
type poolMembers struct {
Members []PoolMember `json:"members"`
}
// Pool Member contains information about each individual member in a pool. You can use all
// of these fields when modifying a pool member.
type PoolMember struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
AppService string `json:"appService,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
Address string `json:"address,omitempty"`
ConnectionLimit int `json:"connectionLimit,omitempty"`
DynamicRatio int `json:"dynamicRatio,omitempty"`
InheritProfile string `json:"inheritProfile,omitempty"`
Logging string `json:"logging,omitempty"`
Monitor string `json:"monitor,omitempty"`
PriorityGroup int `json:"priorityGroup,omitempty"`
RateLimit string `json:"rateLimit,omitempty"`
Ratio int `json:"ratio,omitempty"`
Session string `json:"session,omitempty"`
State string `json:"state,omitempty"`
}
// VirtualServers contains a list of all virtual servers on the BIG-IP system.
type VirtualServers struct {
VirtualServers []VirtualServer `json:"items"`
}
// VirtualServer contains information about each individual virtual server.
type VirtualServer struct {
Name string `json:"name,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
AddressStatus string `json:"addressStatus,omitempty"`
AutoLastHop string `json:"autoLastHop,omitempty"`
CMPEnabled string `json:"cmpEnabled,omitempty"`
ConnectionLimit int `json:"connectionLimit,omitempty"`
Destination string `json:"destination,omitempty"`
Description string `json:"description,omitempty"`
Enabled bool `json:"enabled,omitempty"`
GTMScore int `json:"gtmScore,omitempty"`
IPForward bool `json:"ipForward,omitempty"`
IPProtocol string `json:"ipProtocol,omitempty"`
Mask string `json:"mask,omitempty"`
Mirror string `json:"mirror,omitempty"`
MobileAppTunnel string `json:"mobileAppTunnel,omitempty"`
NAT64 string `json:"nat64,omitempty"`
Pool string `json:"pool,omitempty"`
RateLimit string `json:"rateLimit,omitempty"`
RateLimitDestinationMask int `json:"rateLimitDstMask,omitempty"`
RateLimitMode string `json:"rateLimitMode,omitempty"`
RateLimitSourceMask int `json:"rateLimitSrcMask,omitempty"`
Source string `json:"source,omitempty"`
SourceAddressTranslation struct {
Type string `json:"type,omitempty"`
Pool string `json:"pool,omitempty"`
} `json:"sourceAddressTranslation,omitempty"`
SourcePort string `json:"sourcePort,omitempty"`
SYNCookieStatus string `json:"synCookieStatus,omitempty"`
TranslateAddress string `json:"translateAddress,omitempty"`
TranslatePort string `json:"translatePort,omitempty"`
VlansEnabled bool `json:"vlansEnabled,omitempty"`
VlansDisabled bool `json:"vlansDisabled,omitempty"`
VSIndex int `json:"vsIndex,omitempty"`
Vlans []string `json:"vlans,omitempty"`
Rules []string `json:"rules,omitempty"`
Profiles []Profile `json:"profiles,omitempty"`
Policies []string `json:"policies,omitempty"`
Metadata []Metadata `json:"metadata,omitempty"`
}
// Metadata are key/value pairs of arbitrary metadata
type Metadata struct {
Name string `json:"name"`
Persist bool `json:"persist,string"`
Value string `json:"value"`
}
// VirtualAddresses contains a list of all virtual addresses on the BIG-IP system.
type VirtualAddresses struct {
VirtualAddresses []VirtualAddress `json:"items"`
}
// VirtualAddress contains information about each individual virtual address.
type VirtualAddress struct {
Name string
Partition string
FullPath string
Generation int
Address string
ARP bool
AutoDelete bool
ConnectionLimit int
Enabled bool
Floating bool
ICMPEcho bool
InheritedTrafficGroup bool
Mask string
RouteAdvertisement string
ServerScope string
TrafficGroup string
Unit int
}
type virtualAddressDTO struct {
Name string `json:"name"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
Address string `json:"address,omitempty"`
ARP string `json:"arp,omitempty" bool:"enabled"`
AutoDelete string `json:"autoDelete,omitempty" bool:"true"`
ConnectionLimit int `json:"connectionLimit,omitempty"`
Enabled string `json:"enabled,omitempty" bool:"yes"`
Floating string `json:"floating,omitempty" bool:"enabled"`
ICMPEcho string `json:"icmpEcho,omitempty" bool:"enabled"`
InheritedTrafficGroup string `json:"inheritedTrafficGroup,omitempty" bool:"yes"`
Mask string `json:"mask,omitempty"`
RouteAdvertisement string `json:"routeAdvertisement,omitempty"`
ServerScope string `json:"serverScope,omitempty"`
TrafficGroup string `json:"trafficGroup,omitempty"`
Unit int `json:"unit,omitempty"`
}
type Policies struct {
Policies []Policy `json:"items"`
}
type Policy struct {
Name string
Partition string
FullPath string
Controls []string
Requires []string
Strategy string
Rules []PolicyRule
}
type policyDTO struct {
Name string `json:"name"`
Partition string `json:"partition,omitempty"`
Controls []string `json:"controls,omitempty"`
Requires []string `json:"requires,omitempty"`
Strategy string `json:"strategy,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Rules struct {
Items []PolicyRule `json:"items,omitempty"`
} `json:"rulesReference,omitempty"`
}
func (p *Policy) MarshalJSON() ([]byte, error) {
return json.Marshal(policyDTO{
Name: p.Name,
Partition: p.Partition,
Controls: p.Controls,
Requires: p.Requires,
Strategy: p.Strategy,
FullPath: p.FullPath,
Rules: struct {
Items []PolicyRule `json:"items,omitempty"`
}{Items: p.Rules},
})
}
func (p *Policy) UnmarshalJSON(b []byte) error {
var dto policyDTO
err := json.Unmarshal(b, &dto)
if err != nil {
return err
}
p.Name = dto.Name
p.Partition = dto.Partition
p.Controls = dto.Controls
p.Requires = dto.Requires
p.Strategy = dto.Strategy
p.Rules = dto.Rules.Items
p.FullPath = dto.FullPath
return nil
}
type PolicyRules struct {
Items []PolicyRule `json:"items,omitempty"`
}
type PolicyRule struct {
Name string `json:"name,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Ordinal int `json:"ordinal,omitempty"`
Description string `json:"description,omitempty"`
Conditions []PolicyRuleCondition `json:"conditions,omitempty"`
Actions []PolicyRuleAction `json:"actions,omitempty"`
}
type policyRuleDTO struct {
Name string `json:"name"`
Ordinal int `json:"ordinal"`
FullPath string `json:"fullPath,omitempty"`
Conditions struct {
Items []PolicyRuleCondition `json:"items,omitempty"`
} `json:"conditionsReference,omitempty"`
Actions struct {
Items []PolicyRuleAction `json:"items,omitempty"`
} `json:"actionsReference,omitempty"`
}
func (p *PolicyRule) MarshalJSON() ([]byte, error) {
return json.Marshal(policyRuleDTO{
Name: p.Name,
Ordinal: p.Ordinal,
FullPath: p.FullPath,
Conditions: struct {
Items []PolicyRuleCondition `json:"items,omitempty"`
}{Items: p.Conditions},
Actions: struct {
Items []PolicyRuleAction `json:"items,omitempty"`
}{Items: p.Actions},
})
}
func (p *PolicyRule) UnmarshalJSON(b []byte) error {
var dto policyRuleDTO
err := json.Unmarshal(b, &dto)
if err != nil {
return err
}
p.Name = dto.Name
p.Ordinal = dto.Ordinal
p.Actions = dto.Actions.Items
p.Conditions = dto.Conditions.Items
p.FullPath = dto.FullPath
return nil
}
type PolicyRuleActions struct {
Items []PolicyRuleAction `json:"items"`
}
type PolicyRuleAction struct {
Name string `json:"name,omitempty"`
AppService string `json:"appService,omitempty"`
Application string `json:"application,omitempty"`
Asm bool `json:"asm,omitempty"`
Avr bool `json:"avr,omitempty"`
Cache bool `json:"cache,omitempty"`
Carp bool `json:"carp,omitempty"`
Category string `json:"category,omitempty"`
Classify bool `json:"classify,omitempty"`
ClonePool string `json:"clonePool,omitempty"`
Code int `json:"code,omitempty"`
Compress bool `json:"compress,omitempty"`
Content string `json:"content,omitempty"`
CookieHash bool `json:"cookieHash,omitempty"`
CookieInsert bool `json:"cookieInsert,omitempty"`
CookiePassive bool `json:"cookiePassive,omitempty"`
CookieRewrite bool `json:"cookieRewrite,omitempty"`
Decompress bool `json:"decompress,omitempty"`
Defer bool `json:"defer,omitempty"`
DestinationAddress bool `json:"destinationAddress,omitempty"`
Disable bool `json:"disable,omitempty"`
Domain string `json:"domain,omitempty"`
Enable bool `json:"enable,omitempty"`
Expiry string `json:"expiry,omitempty"`
ExpirySecs int `json:"expirySecs,omitempty"`
Expression string `json:"expression,omitempty"`
Extension string `json:"extension,omitempty"`
Facility string `json:"facility,omitempty"`
Forward bool `json:"forward,omitempty"`
FromProfile string `json:"fromProfile,omitempty"`
Hash bool `json:"hash,omitempty"`
Host string `json:"host,omitempty"`
Http bool `json:"http,omitempty"`
HttpBasicAuth bool `json:"httpBasicAuth,omitempty"`
HttpCookie bool `json:"httpCookie,omitempty"`
HttpHeader bool `json:"httpHeader,omitempty"`
HttpHost bool `json:"httpHost,omitempty"`
HttpReferer bool `json:"httpReferer,omitempty"`
HttpReply bool `json:"httpReply,omitempty"`
HttpSetCookie bool `json:"httpSetCookie,omitempty"`
HttpUri bool `json:"httpUri,omitempty"`
Ifile string `json:"ifile,omitempty"`
Insert bool `json:"insert,omitempty"`
InternalVirtual string `json:"internalVirtual,omitempty"`
IpAddress string `json:"ipAddress,omitempty"`
Key string `json:"key,omitempty"`
L7dos bool `json:"l7dos,omitempty"`
Length int `json:"length,omitempty"`
Location string `json:"location,omitempty"`
Log bool `json:"log,omitempty"`
LtmPolicy bool `json:"ltmPolicy,omitempty"`
Member string `json:"member,omitempty"`
Message string `json:"message,omitempty"`
TmName string `json:"tmName,omitempty"`
Netmask string `json:"netmask,omitempty"`
Nexthop string `json:"nexthop,omitempty"`
Node string `json:"node,omitempty"`
Offset int `json:"offset,omitempty"`
Path string `json:"path,omitempty"`
Pem bool `json:"pem,omitempty"`
Persist bool `json:"persist,omitempty"`
Pin bool `json:"pin,omitempty"`
Policy string `json:"policy,omitempty"`
Pool string `json:"pool,omitempty"`
Port int `json:"port,omitempty"`
Priority string `json:"priority,omitempty"`
Profile string `json:"profile,omitempty"`
Protocol string `json:"protocol,omitempty"`
QueryString string `json:"queryString,omitempty"`
Rateclass string `json:"rateclass,omitempty"`
Redirect bool `json:"redirect,omitempty"`
Remove bool `json:"remove,omitempty"`
Replace bool `json:"replace,omitempty"`
Request bool `json:"request,omitempty"`
RequestAdapt bool `json:"requestAdapt,omitempty"`
Reset bool `json:"reset,omitempty"`
Response bool `json:"response,omitempty"`
ResponseAdapt bool `json:"responseAdapt,omitempty"`
Scheme string `json:"scheme,omitempty"`
Script string `json:"script,omitempty"`
Select bool `json:"select,omitempty"`
ServerSsl bool `json:"serverSsl,omitempty"`
SetVariable bool `json:"setVariable,omitempty"`
Snat string `json:"snat,omitempty"`
Snatpool string `json:"snatpool,omitempty"`
SourceAddress bool `json:"sourceAddress,omitempty"`
SslClientHello bool `json:"sslClientHello,omitempty"`
SslServerHandshake bool `json:"sslServerHandshake,omitempty"`
SslServerHello bool `json:"sslServerHello,omitempty"`
SslSessionId bool `json:"sslSessionId,omitempty"`
Status int `json:"status,omitempty"`
Tcl bool `json:"tcl,omitempty"`
TcpNagle bool `json:"tcpNagle,omitempty"`
Text string `json:"text,omitempty"`
Timeout int `json:"timeout,omitempty"`
Uie bool `json:"uie,omitempty"`
Universal bool `json:"universal,omitempty"`
Value string `json:"value,omitempty"`
Virtual string `json:"virtual,omitempty"`
Vlan string `json:"vlan,omitempty"`
VlanId int `json:"vlanId,omitempty"`
Wam bool `json:"wam,omitempty"`
Write bool `json:"write,omitempty"`
}
type PolicyRuleConditions struct {
Items []PolicyRuleCondition `json:"items"`
}
type PolicyRuleCondition struct {
Name string `json:"name,omitempty"`
Generation int `json:"generation,omitempty"`
Address bool `json:"address,omitempty"`
All bool `json:"all,omitempty"`
AppService string `json:"appService,omitempty"`
BrowserType bool `json:"browserType,omitempty"`
BrowserVersion bool `json:"browserVersion,omitempty"`
CaseInsensitive bool `json:"caseInsensitive,omitempty"`
CaseSensitive bool `json:"caseSensitive,omitempty"`
Cipher bool `json:"cipher,omitempty"`
CipherBits bool `json:"cipherBits,omitempty"`
ClientSsl bool `json:"clientSsl,omitempty"`
Code bool `json:"code,omitempty"`
CommonName bool `json:"commonName,omitempty"`
Contains bool `json:"contains,omitempty"`
Continent bool `json:"continent,omitempty"`
CountryCode bool `json:"countryCode,omitempty"`
CountryName bool `json:"countryName,omitempty"`
CpuUsage bool `json:"cpuUsage,omitempty"`
DeviceMake bool `json:"deviceMake,omitempty"`
DeviceModel bool `json:"deviceModel,omitempty"`
Domain bool `json:"domain,omitempty"`
EndsWith bool `json:"endsWith,omitempty"`
Equals bool `json:"equals,omitempty"`
Expiry bool `json:"expiry,omitempty"`
Extension bool `json:"extension,omitempty"`
External bool `json:"external,omitempty"`
Geoip bool `json:"geoip,omitempty"`
Greater bool `json:"greater,omitempty"`
GreaterOrEqual bool `json:"greaterOrEqual,omitempty"`
Host bool `json:"host,omitempty"`
HttpBasicAuth bool `json:"httpBasicAuth,omitempty"`
HttpCookie bool `json:"httpCookie,omitempty"`
HttpHeader bool `json:"httpHeader,omitempty"`
HttpHost bool `json:"httpHost,omitempty"`
HttpMethod bool `json:"httpMethod,omitempty"`
HttpReferer bool `json:"httpReferer,omitempty"`
HttpSetCookie bool `json:"httpSetCookie,omitempty"`
HttpStatus bool `json:"httpStatus,omitempty"`
HttpUri bool `json:"httpUri,omitempty"`
HttpUserAgent bool `json:"httpUserAgent,omitempty"`
HttpVersion bool `json:"httpVersion,omitempty"`
Index int `json:"index,omitempty"`
Internal bool `json:"internal,omitempty"`
Isp bool `json:"isp,omitempty"`
Last_15secs bool `json:"last_15secs,omitempty"`
Last_1min bool `json:"last_1min,omitempty"`
Last_5mins bool `json:"last_5mins,omitempty"`
Less bool `json:"less,omitempty"`
LessOrEqual bool `json:"lessOrEqual,omitempty"`
Local bool `json:"local,omitempty"`
Major bool `json:"major,omitempty"`
Matches bool `json:"matches,omitempty"`
Minor bool `json:"minor,omitempty"`
Missing bool `json:"missing,omitempty"`
Mss bool `json:"mss,omitempty"`
TmName string `json:"tmName,omitempty"`
Not bool `json:"not,omitempty"`
Org bool `json:"org,omitempty"`
Password bool `json:"password,omitempty"`
Path bool `json:"path,omitempty"`
PathSegment bool `json:"pathSegment,omitempty"`
Port bool `json:"port,omitempty"`
Present bool `json:"present,omitempty"`
Protocol bool `json:"protocol,omitempty"`
QueryParameter bool `json:"queryParameter,omitempty"`
QueryString bool `json:"queryString,omitempty"`
RegionCode bool `json:"regionCode,omitempty"`
RegionName bool `json:"regionName,omitempty"`
Remote bool `json:"remote,omitempty"`
Request bool `json:"request,omitempty"`
Response bool `json:"response,omitempty"`
RouteDomain bool `json:"routeDomain,omitempty"`
Rtt bool `json:"rtt,omitempty"`
Scheme bool `json:"scheme,omitempty"`
ServerName bool `json:"serverName,omitempty"`
SslCert bool `json:"sslCert,omitempty"`
SslClientHello bool `json:"sslClientHello,omitempty"`
SslExtension bool `json:"sslExtension,omitempty"`
SslServerHandshake bool `json:"sslServerHandshake,omitempty"`
SslServerHello bool `json:"sslServerHello,omitempty"`
StartsWith bool `json:"startsWith,omitempty"`
Tcp bool `json:"tcp,omitempty"`
Text bool `json:"text,omitempty"`
UnnamedQueryParameter bool `json:"unnamedQueryParameter,omitempty"`
UserAgentToken bool `json:"userAgentToken,omitempty"`
Username bool `json:"username,omitempty"`
Value bool `json:"value,omitempty"`
Values []string `json:"values,omitempty"`
Version bool `json:"version,omitempty"`
Vlan bool `json:"vlan,omitempty"`
VlanId bool `json:"vlanId,omitempty"`
}
func (p *VirtualAddress) MarshalJSON() ([]byte, error) {
var dto virtualAddressDTO
marshal(&dto, p)
return json.Marshal(dto)
}
func (p *VirtualAddress) UnmarshalJSON(b []byte) error {
var dto virtualAddressDTO
err := json.Unmarshal(b, &dto)
if err != nil {
return err
}
return marshal(p, &dto)
}
// Monitors contains a list of all monitors on the BIG-IP system.
type Monitors struct {
Monitors []Monitor `json:"items"`
}
// Monitor contains information about each individual monitor.
type Monitor struct {
Name string
Partition string
FullPath string
Generation int
ParentMonitor string
Database string
Description string
Destination string
Interval int
IPDSCP int
ManualResume bool
MonitorType string
Password string
ReceiveColumn string
ReceiveRow string
ReceiveString string
ReceiveDisable string
Reverse bool
ResponseTime int
RetryTime int
SendString string
TimeUntilUp int
Timeout int
Transparent bool
UpInterval int
Username string
}
type monitorDTO struct {
Name string `json:"name,omitempty"`
Partition string `json:"partition,omitempty"`
FullPath string `json:"fullPath,omitempty"`
Generation int `json:"generation,omitempty"`
ParentMonitor string `json:"defaultsFrom,omitempty"`
Database string `json:"database,omitempty"`
Description string `json:"description,omitempty"`
Destination string `json:"destination,omitempty"`
Interval int `json:"interval,omitempty"`
IPDSCP int `json:"ipDscp,omitempty"`
ManualResume string `json:"manualResume,omitempty" bool:"enabled"`
MonitorType string `json:"monitorType,omitempty"`
Password string `json:"password,omitempty"`
ReceiveColumn string `json:"recvColumn,omitempty"`
ReceiveRow string `json:"recvRow,omitempty"`
ReceiveString string `json:"recv,omitempty"`
ReceiveDisable string `json:"recvDisable,omitempty"`
Reverse string `json:"reverse,omitempty" bool:"enabled"`
ResponseTime int `json:"responseTime"`
RetryTime int `json:"retryTime"`
SendString string `json:"send,omitempty"`
TimeUntilUp int `json:"timeUntilUp,omitempty"`
Timeout int `json:"timeout,omitempty"`
Transparent string `json:"transparent,omitempty" bool:"enabled"`
UpInterval int `json:"upInterval,omitempty"`