/
authorization_profile.go
622 lines (509 loc) · 45.3 KB
/
authorization_profile.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
package isegosdk
import (
"fmt"
"strings"
"github.com/go-resty/resty/v2"
"github.com/google/go-querystring/query"
)
type AuthorizationProfileService service
type GetAuthorizationProfilesQueryParams struct {
Page int `url:"page,omitempty"` //Page number
Size int `url:"size,omitempty"` //Number of objects returned per page
}
type ResponseAuthorizationProfileGetAuthorizationProfileByName struct {
AuthorizationProfile *ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfile `json:"AuthorizationProfile,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfile struct {
ID string `json:"id,omitempty"` // Resource UUID value
Name string `json:"name,omitempty"` // Resource Name
Description string `json:"description,omitempty"` //
AdvancedAttributes *[]ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileAdvancedAttributes `json:"advancedAttributes,omitempty"` //
AccessType string `json:"accessType,omitempty"` // Allowed Values: - ACCESS_ACCEPT, - ACCESS_REJECT
AuthzProfileType string `json:"authzProfileType,omitempty"` // Allowed Values: - SWITCH, - TRUSTSEC, - TACACS SWITCH is used for Standard Authorization Profiles
VLAN *ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileVLAN `json:"vlan,omitempty"` //
Reauth *ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileReauth `json:"reauth,omitempty"` //
AirespaceACL string `json:"airespaceACL,omitempty"` //
AirespaceIPv6ACL string `json:"airespaceIPv6ACL,omitempty"` //
WebRedirection *ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileWebRedirection `json:"webRedirection,omitempty"` //
ACL string `json:"acl,omitempty"` //
TrackMovement *bool `json:"trackMovement,omitempty"` //
AgentlessPosture *bool `json:"agentlessPosture,omitempty"` //
ServiceTemplate *bool `json:"serviceTemplate,omitempty"` //
EasywiredSessionCandidate *bool `json:"easywiredSessionCandidate,omitempty"` //
DaclName string `json:"daclName,omitempty"` //
VoiceDomainPermission *bool `json:"voiceDomainPermission,omitempty"` //
Neat *bool `json:"neat,omitempty"` //
WebAuth *bool `json:"webAuth,omitempty"` //
AutoSmartPort string `json:"autoSmartPort,omitempty"` //
InterfaceTemplate string `json:"interfaceTemplate,omitempty"` //
IPv6ACLFilter string `json:"ipv6ACLFilter,omitempty"` //
AvcProfile string `json:"avcProfile,omitempty"` //
MacSecPolicy string `json:"macSecPolicy,omitempty"` // Allowed Values: - MUST_SECURE, - MUST_NOT_SECURE, - SHOULD_SECURE
AsaVpn string `json:"asaVpn,omitempty"` //
ProfileName string `json:"profileName,omitempty"` //
IPv6DaclName string `json:"ipv6DaclName,omitempty"` //
Link *ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileLink `json:"link,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileAdvancedAttributes struct {
LeftHandSideDictionaryAttribue *ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileAdvancedAttributesLeftHandSideDictionaryAttribue `json:"leftHandSideDictionaryAttribue,omitempty"` //
RightHandSideAttribueValue *ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileAdvancedAttributesRightHandSideAttribueValue `json:"rightHandSideAttribueValue,omitempty"` // Attribute value can be of type AttributeValue or AdvancedDictionaryAttribute. For AttributeValue the value is String, For AdvancedDictionaryAttribute the value is dictionaryName and attributeName properties
}
type ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileAdvancedAttributesLeftHandSideDictionaryAttribue struct {
AdvancedAttributeValueType string `json:"AdvancedAttributeValueType,omitempty"` //
DictionaryName string `json:"dictionaryName,omitempty"` //
AttributeName string `json:"attributeName,omitempty"` //
Value string `json:"value,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileAdvancedAttributesRightHandSideAttribueValue struct {
AdvancedAttributeValueType string `json:"AdvancedAttributeValueType,omitempty"` //
DictionaryName string `json:"dictionaryName,omitempty"` //
AttributeName string `json:"attributeName,omitempty"` //
Value string `json:"value,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileVLAN struct {
NameID string `json:"nameID,omitempty"` //
TagID *int `json:"tagID,omitempty"` // Valid range is 0-31
}
type ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileReauth struct {
Timer *int `json:"timer,omitempty"` // Valid range is 1-65535
Connectivity string `json:"connectivity,omitempty"` // Allowed Values: - DEFAULT, - RADIUS_REQUEST
}
type ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileWebRedirection struct {
WebRedirectionType string `json:"WebRedirectionType,omitempty"` // Value MUST be one of the following:CentralizedWebAuth, HotSpot, NativeSupplicanProvisioning, ClientProvisioning. The WebRedirectionType must fit the portalName
ACL string `json:"acl,omitempty"` //
PortalName string `json:"portalName,omitempty"` // A portal that exist in the DB and fits the WebRedirectionType
StaticIPHostNameFQDN string `json:"staticIPHostNameFQDN,omitempty"` //
DisplayCertificatesRenewalMessages *bool `json:"displayCertificatesRenewalMessages,omitempty"` // The displayCertificatesRenewalMessages is mandatory when 'WebRedirectionType' value is 'CentralizedWebAuth'. For all other 'WebRedirectionType' values the field must be ignored
}
type ResponseAuthorizationProfileGetAuthorizationProfileByNameAuthorizationProfileLink struct {
Rel string `json:"rel,omitempty"` //
Href string `json:"href,omitempty"` //
Type string `json:"type,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByID struct {
AuthorizationProfile *ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfile `json:"AuthorizationProfile,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfile struct {
ID string `json:"id,omitempty"` // Resource UUID value
Name string `json:"name,omitempty"` // Resource Name
Description string `json:"description,omitempty"` //
AdvancedAttributes *[]ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileAdvancedAttributes `json:"advancedAttributes,omitempty"` //
AccessType string `json:"accessType,omitempty"` // Allowed Values: - ACCESS_ACCEPT, - ACCESS_REJECT
AuthzProfileType string `json:"authzProfileType,omitempty"` // Allowed Values: - SWITCH, - TRUSTSEC, - TACACS SWITCH is used for Standard Authorization Profiles
VLAN *ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileVLAN `json:"vlan,omitempty"` //
Reauth *ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileReauth `json:"reauth,omitempty"` //
AirespaceACL string `json:"airespaceACL,omitempty"` //
AirespaceIPv6ACL string `json:"airespaceIPv6ACL,omitempty"` //
WebRedirection *ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileWebRedirection `json:"webRedirection,omitempty"` //
ACL string `json:"acl,omitempty"` //
TrackMovement *bool `json:"trackMovement,omitempty"` //
AgentlessPosture *bool `json:"agentlessPosture,omitempty"` //
ServiceTemplate *bool `json:"serviceTemplate,omitempty"` //
EasywiredSessionCandidate *bool `json:"easywiredSessionCandidate,omitempty"` //
DaclName string `json:"daclName,omitempty"` //
VoiceDomainPermission *bool `json:"voiceDomainPermission,omitempty"` //
Neat *bool `json:"neat,omitempty"` //
WebAuth *bool `json:"webAuth,omitempty"` //
AutoSmartPort string `json:"autoSmartPort,omitempty"` //
InterfaceTemplate string `json:"interfaceTemplate,omitempty"` //
IPv6ACLFilter string `json:"ipv6ACLFilter,omitempty"` //
AvcProfile string `json:"avcProfile,omitempty"` //
MacSecPolicy string `json:"macSecPolicy,omitempty"` // Allowed Values: - MUST_SECURE, - MUST_NOT_SECURE, - SHOULD_SECURE
AsaVpn string `json:"asaVpn,omitempty"` //
ProfileName string `json:"profileName,omitempty"` //
IPv6DaclName string `json:"ipv6DaclName,omitempty"` //
Link *ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileLink `json:"link,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileAdvancedAttributes struct {
LeftHandSideDictionaryAttribue *ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileAdvancedAttributesLeftHandSideDictionaryAttribue `json:"leftHandSideDictionaryAttribue,omitempty"` //
RightHandSideAttribueValue *ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileAdvancedAttributesRightHandSideAttribueValue `json:"rightHandSideAttribueValue,omitempty"` // Attribute value can be of type AttributeValue or AdvancedDictionaryAttribute. For AttributeValue the value is String, For AdvancedDictionaryAttribute the value is dictionaryName and attributeName properties
}
type ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileAdvancedAttributesLeftHandSideDictionaryAttribue struct {
AdvancedAttributeValueType string `json:"AdvancedAttributeValueType,omitempty"` //
DictionaryName string `json:"dictionaryName,omitempty"` //
AttributeName string `json:"attributeName,omitempty"` //
Value string `json:"value,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileAdvancedAttributesRightHandSideAttribueValue struct {
AdvancedAttributeValueType string `json:"AdvancedAttributeValueType,omitempty"` //
DictionaryName string `json:"dictionaryName,omitempty"` //
AttributeName string `json:"attributeName,omitempty"` //
Value string `json:"value,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileVLAN struct {
NameID string `json:"nameID,omitempty"` //
TagID *int `json:"tagID,omitempty"` // Valid range is 0-31
}
type ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileReauth struct {
Timer *int `json:"timer,omitempty"` // Valid range is 1-65535
Connectivity string `json:"connectivity,omitempty"` // Allowed Values: - DEFAULT, - RADIUS_REQUEST
}
type ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileWebRedirection struct {
WebRedirectionType string `json:"WebRedirectionType,omitempty"` // Value MUST be one of the following:CentralizedWebAuth, HotSpot, NativeSupplicanProvisioning, ClientProvisioning. The WebRedirectionType must fit the portalName
ACL string `json:"acl,omitempty"` //
PortalName string `json:"portalName,omitempty"` // A portal that exist in the DB and fits the WebRedirectionType
StaticIPHostNameFQDN string `json:"staticIPHostNameFQDN,omitempty"` //
DisplayCertificatesRenewalMessages *bool `json:"displayCertificatesRenewalMessages,omitempty"` // The displayCertificatesRenewalMessages is mandatory when 'WebRedirectionType' value is 'CentralizedWebAuth'. For all other 'WebRedirectionType' values the field must be ignored
}
type ResponseAuthorizationProfileGetAuthorizationProfileByIDAuthorizationProfileLink struct {
Rel string `json:"rel,omitempty"` //
Href string `json:"href,omitempty"` //
Type string `json:"type,omitempty"` //
}
type ResponseAuthorizationProfileUpdateAuthorizationProfileByID struct {
UpdatedFieldsList *ResponseAuthorizationProfileUpdateAuthorizationProfileByIDUpdatedFieldsList `json:"UpdatedFieldsList,omitempty"` //
}
type ResponseAuthorizationProfileUpdateAuthorizationProfileByIDUpdatedFieldsList struct {
UpdatedField *[]ResponseAuthorizationProfileUpdateAuthorizationProfileByIDUpdatedFieldsListUpdatedField `json:"updatedField,omitempty"` //
Field string `json:"field,omitempty"` //
OldValue string `json:"oldValue,omitempty"` //
NewValue string `json:"newValue,omitempty"` //
}
type ResponseAuthorizationProfileUpdateAuthorizationProfileByIDUpdatedFieldsListUpdatedField struct {
Field string `json:"field,omitempty"` //
OldValue string `json:"oldValue,omitempty"` //
NewValue string `json:"newValue,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfiles struct {
SearchResult *ResponseAuthorizationProfileGetAuthorizationProfilesSearchResult `json:"SearchResult,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfilesSearchResult struct {
Total *int `json:"total,omitempty"` //
Resources *[]ResponseAuthorizationProfileGetAuthorizationProfilesSearchResultResources `json:"resources,omitempty"` //
NextPage *ResponseAuthorizationProfileGetAuthorizationProfilesSearchResultNextPage `json:"nextPage,omitempty"` //
PreviousPage *ResponseAuthorizationProfileGetAuthorizationProfilesSearchResultPreviousPage `json:"previousPage,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfilesSearchResultResources struct {
ID string `json:"id,omitempty"` //
Name string `json:"name,omitempty"` //
Description string `json:"description,omitempty"` //
Link *ResponseAuthorizationProfileGetAuthorizationProfilesSearchResultResourcesLink `json:"link,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfilesSearchResultResourcesLink struct {
Rel string `json:"rel,omitempty"` //
Href string `json:"href,omitempty"` //
Type string `json:"type,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfilesSearchResultNextPage struct {
Rel string `json:"rel,omitempty"` //
Href string `json:"href,omitempty"` //
Type string `json:"type,omitempty"` //
}
type ResponseAuthorizationProfileGetAuthorizationProfilesSearchResultPreviousPage struct {
Rel string `json:"rel,omitempty"` //
Href string `json:"href,omitempty"` //
Type string `json:"type,omitempty"` //
}
type ResponseAuthorizationProfileGetVersion struct {
VersionInfo *ResponseAuthorizationProfileGetVersionVersionInfo `json:"VersionInfo,omitempty"` //
}
type ResponseAuthorizationProfileGetVersionVersionInfo struct {
CurrentServerVersion string `json:"currentServerVersion,omitempty"` //
SupportedVersions string `json:"supportedVersions,omitempty"` //
Link *ResponseAuthorizationProfileGetVersionVersionInfoLink `json:"link,omitempty"` //
}
type ResponseAuthorizationProfileGetVersionVersionInfoLink struct {
Rel string `json:"rel,omitempty"` //
Href string `json:"href,omitempty"` //
Type string `json:"type,omitempty"` //
}
type RequestAuthorizationProfileUpdateAuthorizationProfileByID struct {
AuthorizationProfile *RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfile `json:"AuthorizationProfile,omitempty"` //
}
type RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfile struct {
ID string `json:"id,omitempty"` // Resource UUID value
Name string `json:"name,omitempty"` // Resource Name
Description string `json:"description,omitempty"` //
AdvancedAttributes *[]RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileAdvancedAttributes `json:"advancedAttributes,omitempty"` //
AccessType string `json:"accessType,omitempty"` // Allowed Values: - ACCESS_ACCEPT, - ACCESS_REJECT
AuthzProfileType string `json:"authzProfileType,omitempty"` // Allowed Values: - SWITCH, - TRUSTSEC, - TACACS SWITCH is used for Standard Authorization Profiles
VLAN *RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileVLAN `json:"vlan,omitempty"` //
Reauth *RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileReauth `json:"reauth,omitempty"` //
AirespaceACL string `json:"airespaceACL,omitempty"` //
AirespaceIPv6ACL string `json:"airespaceIPv6ACL,omitempty"` //
WebRedirection *RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileWebRedirection `json:"webRedirection,omitempty"` //
ACL string `json:"acl,omitempty"` //
TrackMovement *bool `json:"trackMovement,omitempty"` //
AgentlessPosture *bool `json:"agentlessPosture,omitempty"` //
ServiceTemplate *bool `json:"serviceTemplate,omitempty"` //
EasywiredSessionCandidate *bool `json:"easywiredSessionCandidate,omitempty"` //
DaclName string `json:"daclName,omitempty"` //
VoiceDomainPermission *bool `json:"voiceDomainPermission,omitempty"` //
Neat *bool `json:"neat,omitempty"` //
WebAuth *bool `json:"webAuth,omitempty"` //
AutoSmartPort string `json:"autoSmartPort,omitempty"` //
InterfaceTemplate string `json:"interfaceTemplate,omitempty"` //
IPv6ACLFilter string `json:"ipv6ACLFilter,omitempty"` //
AvcProfile string `json:"avcProfile,omitempty"` //
MacSecPolicy string `json:"macSecPolicy,omitempty"` // Allowed Values: - MUST_SECURE, - MUST_NOT_SECURE, - SHOULD_SECURE
AsaVpn string `json:"asaVpn,omitempty"` //
ProfileName string `json:"profileName,omitempty"` //
IPv6DaclName string `json:"ipv6DaclName,omitempty"` //
}
type RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileAdvancedAttributes struct {
LeftHandSideDictionaryAttribue *RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileAdvancedAttributesLeftHandSideDictionaryAttribue `json:"leftHandSideDictionaryAttribue,omitempty"` //
RightHandSideAttribueValue *RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileAdvancedAttributesRightHandSideAttribueValue `json:"rightHandSideAttribueValue,omitempty"` // Attribute value can be of type AttributeValue or AdvancedDictionaryAttribute. For AttributeValue the value is String, For AdvancedDictionaryAttribute the value is dictionaryName and attributeName properties
}
type RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileAdvancedAttributesLeftHandSideDictionaryAttribue struct {
AdvancedAttributeValueType string `json:"AdvancedAttributeValueType,omitempty"` //
DictionaryName string `json:"dictionaryName,omitempty"` //
AttributeName string `json:"attributeName,omitempty"` //
Value string `json:"value,omitempty"` //
}
type RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileAdvancedAttributesRightHandSideAttribueValue struct {
AdvancedAttributeValueType string `json:"AdvancedAttributeValueType,omitempty"` //
DictionaryName string `json:"dictionaryName,omitempty"` //
AttributeName string `json:"attributeName,omitempty"` //
Value string `json:"value,omitempty"` //
}
type RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileVLAN struct {
NameID string `json:"nameID,omitempty"` //
TagID *int `json:"tagID,omitempty"` // Valid range is 0-31
}
type RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileReauth struct {
Timer *int `json:"timer,omitempty"` // Valid range is 1-65535
Connectivity string `json:"connectivity,omitempty"` // Allowed Values: - DEFAULT, - RADIUS_REQUEST
}
type RequestAuthorizationProfileUpdateAuthorizationProfileByIDAuthorizationProfileWebRedirection struct {
WebRedirectionType string `json:"WebRedirectionType,omitempty"` // Value MUST be one of the following:CentralizedWebAuth, HotSpot, NativeSupplicanProvisioning, ClientProvisioning. The WebRedirectionType must fit the portalName
ACL string `json:"acl,omitempty"` //
PortalName string `json:"portalName,omitempty"` // A portal that exist in the DB and fits the WebRedirectionType
StaticIPHostNameFQDN string `json:"staticIPHostNameFQDN,omitempty"` //
DisplayCertificatesRenewalMessages *bool `json:"displayCertificatesRenewalMessages,omitempty"` // The displayCertificatesRenewalMessages is mandatory when 'WebRedirectionType' value is 'CentralizedWebAuth'. For all other 'WebRedirectionType' values the field must be ignored
}
type RequestAuthorizationProfileCreateAuthorizationProfile struct {
AuthorizationProfile *RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfile `json:"AuthorizationProfile,omitempty"` //
}
type RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfile struct {
ID string `json:"id,omitempty"` // Resource UUID value
Name string `json:"name,omitempty"` // Resource Name
Description string `json:"description,omitempty"` //
AdvancedAttributes *[]RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileAdvancedAttributes `json:"advancedAttributes,omitempty"` //
AccessType string `json:"accessType,omitempty"` // Allowed Values: - ACCESS_ACCEPT, - ACCESS_REJECT
AuthzProfileType string `json:"authzProfileType,omitempty"` // Allowed Values: - SWITCH, - TRUSTSEC, - TACACS SWITCH is used for Standard Authorization Profiles
VLAN *RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileVLAN `json:"vlan,omitempty"` //
Reauth *RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileReauth `json:"reauth,omitempty"` //
AirespaceACL string `json:"airespaceACL,omitempty"` //
AirespaceIPv6ACL string `json:"airespaceIPv6ACL,omitempty"` //
WebRedirection *RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileWebRedirection `json:"webRedirection,omitempty"` //
ACL string `json:"acl,omitempty"` //
TrackMovement *bool `json:"trackMovement,omitempty"` //
AgentlessPosture *bool `json:"agentlessPosture,omitempty"` //
ServiceTemplate *bool `json:"serviceTemplate,omitempty"` //
EasywiredSessionCandidate *bool `json:"easywiredSessionCandidate,omitempty"` //
DaclName string `json:"daclName,omitempty"` //
VoiceDomainPermission *bool `json:"voiceDomainPermission,omitempty"` //
Neat *bool `json:"neat,omitempty"` //
WebAuth *bool `json:"webAuth,omitempty"` //
AutoSmartPort string `json:"autoSmartPort,omitempty"` //
InterfaceTemplate string `json:"interfaceTemplate,omitempty"` //
IPv6ACLFilter string `json:"ipv6ACLFilter,omitempty"` //
AvcProfile string `json:"avcProfile,omitempty"` //
MacSecPolicy string `json:"macSecPolicy,omitempty"` // Allowed Values: - MUST_SECURE, - MUST_NOT_SECURE, - SHOULD_SECURE
AsaVpn string `json:"asaVpn,omitempty"` //
ProfileName string `json:"profileName,omitempty"` //
IPv6DaclName string `json:"ipv6DaclName,omitempty"` //
}
type RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileAdvancedAttributes struct {
LeftHandSideDictionaryAttribue *RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileAdvancedAttributesLeftHandSideDictionaryAttribue `json:"leftHandSideDictionaryAttribue,omitempty"` //
RightHandSideAttribueValue *RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileAdvancedAttributesRightHandSideAttribueValue `json:"rightHandSideAttribueValue,omitempty"` // Attribute value can be of type AttributeValue or AdvancedDictionaryAttribute. For AttributeValue the value is String, For AdvancedDictionaryAttribute the value is dictionaryName and attributeName properties
}
type RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileAdvancedAttributesLeftHandSideDictionaryAttribue struct {
AdvancedAttributeValueType string `json:"AdvancedAttributeValueType,omitempty"` //
DictionaryName string `json:"dictionaryName,omitempty"` //
AttributeName string `json:"attributeName,omitempty"` //
Value string `json:"value,omitempty"` //
}
type RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileAdvancedAttributesRightHandSideAttribueValue struct {
AdvancedAttributeValueType string `json:"AdvancedAttributeValueType,omitempty"` //
DictionaryName string `json:"dictionaryName,omitempty"` //
AttributeName string `json:"attributeName,omitempty"` //
Value string `json:"value,omitempty"` //
}
type RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileVLAN struct {
NameID string `json:"nameID,omitempty"` //
TagID *int `json:"tagID,omitempty"` // Valid range is 0-31
}
type RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileReauth struct {
Timer *int `json:"timer,omitempty"` // Valid range is 1-65535
Connectivity string `json:"connectivity,omitempty"` // Allowed Values: - DEFAULT, - RADIUS_REQUEST
}
type RequestAuthorizationProfileCreateAuthorizationProfileAuthorizationProfileWebRedirection struct {
WebRedirectionType string `json:"WebRedirectionType,omitempty"` // Value MUST be one of the following:CentralizedWebAuth, HotSpot, NativeSupplicanProvisioning, ClientProvisioning. The WebRedirectionType must fit the portalName
ACL string `json:"acl,omitempty"` //
PortalName string `json:"portalName,omitempty"` // A portal that exist in the DB and fits the WebRedirectionType
StaticIPHostNameFQDN string `json:"staticIPHostNameFQDN,omitempty"` //
DisplayCertificatesRenewalMessages *bool `json:"displayCertificatesRenewalMessages,omitempty"` // The displayCertificatesRenewalMessages is mandatory when 'WebRedirectionType' value is 'CentralizedWebAuth'. For all other 'WebRedirectionType' values the field must be ignored
}
//GetAuthorizationProfileByName Get authorization profile by name
/* This API allows the client to get an authorization profile by name.
@param name name path parameter.
*/
func (s *AuthorizationProfileService) GetAuthorizationProfileByName(name string) (*ResponseAuthorizationProfileGetAuthorizationProfileByName, *resty.Response, error) {
setHost(s.client, "_ers")
path := "/ers/config/authorizationprofile/name/{name}"
path = strings.Replace(path, "{name}", fmt.Sprintf("%v", name), -1)
setCSRFToken(s.client)
response, err := s.client.R().
SetHeader("Content-Type", "application/json").
SetHeader("Accept", "application/json").
SetResult(&ResponseAuthorizationProfileGetAuthorizationProfileByName{}).
SetError(&Error).
Get(path)
if err != nil {
return nil, nil, err
}
if response.IsError() {
return nil, response, fmt.Errorf("error with operation GetAuthorizationProfileByName")
}
getCSFRToken(response.Header())
result := response.Result().(*ResponseAuthorizationProfileGetAuthorizationProfileByName)
return result, response, err
}
//GetAuthorizationProfileByID Get authorization profile by ID
/* This API allows the client to get an authorization profile by ID.
@param id id path parameter.
*/
func (s *AuthorizationProfileService) GetAuthorizationProfileByID(id string) (*ResponseAuthorizationProfileGetAuthorizationProfileByID, *resty.Response, error) {
setHost(s.client, "_ers")
path := "/ers/config/authorizationprofile/{id}"
path = strings.Replace(path, "{id}", fmt.Sprintf("%v", id), -1)
setCSRFToken(s.client)
response, err := s.client.R().
SetHeader("Content-Type", "application/json").
SetHeader("Accept", "application/json").
SetResult(&ResponseAuthorizationProfileGetAuthorizationProfileByID{}).
SetError(&Error).
Get(path)
if err != nil {
return nil, nil, err
}
if response.IsError() {
return nil, response, fmt.Errorf("error with operation GetAuthorizationProfileById")
}
getCSFRToken(response.Header())
result := response.Result().(*ResponseAuthorizationProfileGetAuthorizationProfileByID)
return result, response, err
}
//GetAuthorizationProfiles Get all authorization profiles
/* This API allows the client to get all authorization profiles.
@param getAuthorizationProfilesQueryParams Filtering parameter
*/
func (s *AuthorizationProfileService) GetAuthorizationProfiles(getAuthorizationProfilesQueryParams *GetAuthorizationProfilesQueryParams) (*ResponseAuthorizationProfileGetAuthorizationProfiles, *resty.Response, error) {
setHost(s.client, "_ers")
path := "/ers/config/authorizationprofile"
queryString, _ := query.Values(getAuthorizationProfilesQueryParams)
setCSRFToken(s.client)
response, err := s.client.R().
SetHeader("Content-Type", "application/json").
SetHeader("Accept", "application/json").
SetQueryString(queryString.Encode()).SetResult(&ResponseAuthorizationProfileGetAuthorizationProfiles{}).
SetError(&Error).
Get(path)
if err != nil {
return nil, nil, err
}
if response.IsError() {
return nil, response, fmt.Errorf("error with operation GetAuthorizationProfiles")
}
getCSFRToken(response.Header())
result := response.Result().(*ResponseAuthorizationProfileGetAuthorizationProfiles)
return result, response, err
}
//GetVersion Get authorization profile version information
/* This API helps to retrieve the version information related to the authorization profile.
*/
func (s *AuthorizationProfileService) GetVersion() (*ResponseAuthorizationProfileGetVersion, *resty.Response, error) {
setHost(s.client, "_ers")
path := "/ers/config/authorizationprofile/versioninfo"
setCSRFToken(s.client)
response, err := s.client.R().
SetHeader("Content-Type", "application/json").
SetHeader("Accept", "application/json").
SetResult(&ResponseAuthorizationProfileGetVersion{}).
SetError(&Error).
Get(path)
if err != nil {
return nil, nil, err
}
if response.IsError() {
return nil, response, fmt.Errorf("error with operation GetVersion")
}
getCSFRToken(response.Header())
result := response.Result().(*ResponseAuthorizationProfileGetVersion)
return result, response, err
}
//CreateAuthorizationProfile Create authorization profiles
/* This API creates an authorization profile.
*/
func (s *AuthorizationProfileService) CreateAuthorizationProfile(requestAuthorizationProfileCreateAuthorizationProfile *RequestAuthorizationProfileCreateAuthorizationProfile) (*resty.Response, error) {
setHost(s.client, "_ers")
path := "/ers/config/authorizationprofile"
setCSRFToken(s.client)
response, err := s.client.R().
SetHeader("Content-Type", "application/json").
SetHeader("Accept", "application/json").
SetBody(requestAuthorizationProfileCreateAuthorizationProfile).
SetError(&Error).
Post(path)
if err != nil {
return nil, err
}
getCSFRToken(response.Header())
if response.IsError() {
return response, fmt.Errorf("error with operation CreateAuthorizationProfile")
}
return response, err
}
//UpdateAuthorizationProfileByID Update authorization profile
/* This API allows the client to update an authorization profile.
@param id id path parameter.
*/
func (s *AuthorizationProfileService) UpdateAuthorizationProfileByID(id string, requestAuthorizationProfileUpdateAuthorizationProfileById *RequestAuthorizationProfileUpdateAuthorizationProfileByID) (*ResponseAuthorizationProfileUpdateAuthorizationProfileByID, *resty.Response, error) {
setHost(s.client, "_ers")
path := "/ers/config/authorizationprofile/{id}"
path = strings.Replace(path, "{id}", fmt.Sprintf("%v", id), -1)
setCSRFToken(s.client)
response, err := s.client.R().
SetHeader("Content-Type", "application/json").
SetHeader("Accept", "application/json").
SetBody(requestAuthorizationProfileUpdateAuthorizationProfileById).
SetResult(&ResponseAuthorizationProfileUpdateAuthorizationProfileByID{}).
SetError(&Error).
Put(path)
if err != nil {
if err.Error() == emptyStringToJSONError {
return &ResponseAuthorizationProfileUpdateAuthorizationProfileByID{}, response, nil
}
return nil, nil, err
}
if response.IsError() {
return nil, response, fmt.Errorf("error with operation UpdateAuthorizationProfileById")
}
getCSFRToken(response.Header())
result := response.Result().(*ResponseAuthorizationProfileUpdateAuthorizationProfileByID)
return result, response, err
}
//DeleteAuthorizationProfileByID Delete authorization profile
/* This API deletes an authorization profile.
@param id id path parameter.
*/
func (s *AuthorizationProfileService) DeleteAuthorizationProfileByID(id string) (*resty.Response, error) {
setHost(s.client, "_ers")
path := "/ers/config/authorizationprofile/{id}"
path = strings.Replace(path, "{id}", fmt.Sprintf("%v", id), -1)
setCSRFToken(s.client)
response, err := s.client.R().
SetHeader("Content-Type", "application/json").
SetHeader("Accept", "application/json").
SetError(&Error).
Delete(path)
if err != nil {
return nil, err
}
if response.IsError() {
return response, fmt.Errorf("error with operation DeleteAuthorizationProfileById")
}
getCSFRToken(response.Header())
return response, err
}