forked from Netflix/consoleme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
2007 lines (2003 loc) · 56.4 KB
/
swagger.yaml
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
# After modifying this file, run the following command to regenerate the Pydantic models file stored at
# consoleme/models.py:
# `datamodel-codegen --input swagger.yaml --output consoleme/models.py \
# --base-class consoleme.lib.pydantic.BaseModel ; black consoleme/models.py`
openapi: 3.0.0
info:
description: ConsoleMe API definition
version: "2.0.0"
title: ConsoleMe v2 API
contact:
email: consoleme-owners@netflix.com
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.txt
servers:
- url: "{server}/api/v2"
variables:
server:
default: https://consoleme.example.com
tags:
- name: roles
description: IAM Role endpoints
- name: requests
description: Policy Request endpoints
- name: privileged
description: Endpoints requiring elevated permissions
- name: policies
description: Policies endpoints
- name: apps
description: Endpoints used by apps (such as weep)
paths:
/request:
post:
summary: submit a new request
tags:
- requests
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RequestCreationModel"
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedRequestModel"
/requests:
get:
summary: get a list of requests
tags:
- requests
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/RequestModel"
/requests/{request_id}:
get:
summary: get details about a request
tags:
- requests
parameters:
- $ref: "#/components/parameters/RequestId"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedRequestModel"
put:
summary: update a request
tags:
- requests
parameters:
- $ref: "#/components/parameters/RequestId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedRequestModel"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedRequestModel"
/generate_changes:
post:
summary: get templated changes
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
anyOf:
- $ref: "#/components/schemas/ChangeGeneratorModelArray"
discriminator:
propertyName: generator_type
responses:
"200":
description: OK
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/InlinePolicyChangeModel"
- $ref: "#/components/schemas/ManagedPolicyChangeModel"
- $ref: "#/components/schemas/ResourcePolicyChangeModel"
discriminator:
propertyName: change_type
default:
$ref: "#/components/responses/DefaultErrorResponse"
/resources:
get:
summary: get resources
parameters:
- $ref: "#/components/parameters/AccountIdQueryString"
- $ref: "#/components/parameters/ResourceTypeQueryString"
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
type: string
/typeahead/resources:
get:
summary: typeahead for all known resource ARNs
parameters:
- $ref: "#/components/parameters/TypeAheadQueryString"
- $ref: "#/components/parameters/AccountIdQueryString"
- $ref: "#/components/parameters/ResourceTypeQueryString"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ArnArray"
/clone/role:
post:
summary: clone a role
tags:
- privileged
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CloneRoleRequestModel"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/CreateCloneRequestResponse"
default:
$ref: "#/components/responses/DefaultErrorResponse"
/managed_policies_on_role/{account_id}/{role_name}:
get:
summary: get details about managed policies attached to a role
tags:
- managed_policies
parameters:
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/RoleName"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/WebResponse"
/service_control_policies/{account_or_ou_id}:
get:
summary: get details about service control policies targeting an account or organizational unit
tags:
- service_control_policies
parameters:
- $ref: "#/components/parameters/AccountOrOuId"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/WebResponse"
/roles:
get:
summary: get a list of roles
tags:
- roles
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/AwsPrincipalModel"
post:
summary: create a role
tags:
- roles
- privileged
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RoleCreationRequestModel"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/CreateCloneRequestResponse"
default:
$ref: "#/components/responses/DefaultErrorResponse"
/roles/{account_id}:
get:
summary: get a list of roles in an account
tags:
- roles
parameters:
- $ref: "#/components/parameters/AccountId"
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/AwsPrincipalModel"
post:
summary: create a role
tags:
- roles
- privileged
parameters:
- $ref: "#/components/parameters/AccountId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedAwsPrincipalModel"
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedAwsPrincipalModel"
/roles/{account_id}/{role_name}:
get:
summary: get details about a role
tags:
- roles
parameters:
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/RoleName"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedAwsPrincipalModel"
put:
summary: update a role
tags:
- roles
- privileged
parameters:
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/RoleName"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedAwsPrincipalModel"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedAwsPrincipalModel"
delete:
summary: delete a role
tags:
- roles
- privileged
parameters:
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/RoleName"
responses:
"200":
description: OK
default:
$ref: "#/components/responses/DefaultErrorResponse"
/user:
get:
summary: get details about current user
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/UserModel"
/mtls/roles/{account_id}/{role_name}:
delete:
summary: delete a role (mtls apps only)
tags:
- roles
- privileged
parameters:
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/RoleName"
responses:
"200":
description: OK
default:
$ref: "#/components/responses/DefaultErrorResponse"
get:
summary: get details about a role (mtls apps/users only)
tags:
- roles
parameters:
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/RoleName"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ExtendedAwsPrincipalModel"
default:
$ref: "#/components/responses/DefaultErrorResponse"
/policies/check:
post:
summary: check a policy document
tags:
- policies
requestBody:
required: true
content:
application/json:
schema:
type: object
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/PolicyCheckModel"
/get_resource_url:
get:
summary: get a resource URL from an ARN
tags:
- apps
parameters:
- in: query
name: arn
schema:
type: string
description: The AWS ARN to get the resource URL for
responses:
"200":
description: OK - the URL was successfully generated
content:
application/json:
schema:
$ref: "#/components/schemas/WebResponse"
"404":
description: Missing or Malformed data, please check errors for details
content:
application/json:
schema:
$ref: "#/components/schemas/WebResponse"
/audit/roles:
get:
summary: retrieve a list of IAM roles
tags:
- audit
parameters:
- $ref: "#/components/parameters/PageQueryString"
- $ref: "#/components/parameters/CountQueryString"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/WebResponse"
/audit/roles/{account_id}/{role_name}/access:
get:
summary: retrieve a list of groups with access to the specified role
tags:
- audit
parameters:
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/RoleName"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/WebResponse"
"404":
description: Missing or Malformed data, please check errors for details
content:
application/json:
schema:
$ref: "#/components/schemas/WebResponse"
components:
responses:
DefaultErrorResponse:
description: An error occured, please refer to the message for details
content:
application/json:
schema:
$ref: "#/components/schemas/ApiErrorModel"
parameters:
AccountId:
name: account_id
in: path
required: true
example: 012345678901
schema:
type: string
pattern: '^\d{12}$'
AccountOrOuId:
name: account_or_ou_id
in: path
required: true
example: 012345678901
schema:
type: string
pattern: '^(\d{12}|ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$'
RoleName:
name: role_name
in: path
required: true
example: fake_account_admin
schema:
type: string
RequestId:
name: request_id
in: path
required: true
example: 16fd2706-8baf-433b-82eb-8c7fada847da
schema:
type: string
AccountIdQueryString:
name: account_id
in: query
example: 012345678901
schema:
type: string
pattern: '^\d{12}$'
TypeAheadQueryString:
name: typeahead
in: query
example: con
schema:
type: string
ResourceTypeQueryString:
name: resource_type
in: query
example: sqs
schema:
type: string
LimitQueryString:
name: limit
in: query
example: 20
schema:
type: integer
PageQueryString:
name: page
in: query
example: 0
schema:
type: integer
CountQueryString:
name: count
in: query
example: 1000
schema:
type: integer
schemas:
ActionResult:
type: object
properties:
status:
type: string
message:
type: string
Action:
type: string
enum:
- attach
- detach
default: attach
ResourceModel:
type: object
required:
- arn
- name
- resource_type
properties:
arn:
description: resource ARN
type: string
readOnly: true
name:
description: Resource Name
type: string
account_id:
description: AWS account ID
type: string
readOnly: true
region:
description: Region
type: string
readOnly: true
account_name:
description: human-friendly AWS account name
type: string
readOnly: true
policy_sha256:
description: hash of the most recent resource policy seen by ConsoleMe
type: string
readOnly: true
policy:
type: string
# "actions" is used in the self-service request flow to store the IAM actions requested on a particular resource
actions:
type: array
items:
type: string
owner:
description: email address of team or individual who owns this resource
type: string
approvers:
type: array
items:
type: string
resource_type:
type: string
last_updated:
description: last time resource was updated from source-of-truth
type: string
format: date-time
RequestModel:
type: object
required:
- principal
- timestamp
- requester_email
- approvers
- request_status
properties:
id:
type: string
readOnly: true
request_url:
type: string
principal:
anyOf:
- $ref: "#/components/schemas/AwsResourcePrincipalModel"
- $ref: "#/components/schemas/HoneybeeAwsResourceTemplatePrincipalModel"
timestamp:
type: string
format: date-time
justification:
type: string
requester_email:
type: string
approvers:
description: list of approvers, derived from approvers of `resource`s in `changes`
type: array
items:
type: string
readOnly: true
request_status:
type: string
enum:
- pending
- cancelled
- approved
- rejected
cross_account:
description: if true, the request touches cross-account resources
type: boolean
arn_url:
type: string
description: the principal arn's URL
readOnly: true
admin_auto_approve:
type: boolean
default: False
ExtendedRequestModel:
allOf:
- $ref: "#/components/schemas/RequestModel"
- type: object
required:
- changes
- requester_info
properties:
changes:
$ref: "#/components/schemas/ChangeModelArray"
requester_info:
$ref: "#/components/schemas/UserModel"
reviewer:
type: string
comments:
type: array
items:
$ref: "#/components/schemas/CommentModel"
ChangeGeneratorModelArray:
type: object
required:
- changes
properties:
changes:
type: array
items:
anyOf:
- $ref: "#/components/schemas/S3ChangeGeneratorModel"
- $ref: "#/components/schemas/SQSChangeGeneratorModel"
- $ref: "#/components/schemas/SNSChangeGeneratorModel"
- $ref: "#/components/schemas/SESChangeGeneratorModel"
- $ref: "#/components/schemas/CrudChangeGeneratorModel"
- $ref: "#/components/schemas/GenericChangeGeneratorModel"
- $ref: "#/components/schemas/CustomIamChangeGeneratorModel"
ChangeGeneratorModel:
type: object
required:
- generator_type
- arn
properties:
principal:
anyOf:
- $ref: "#/components/schemas/AwsResourcePrincipalModel"
- $ref: "#/components/schemas/HoneybeeAwsResourceTemplatePrincipalModel"
generator_type:
type: string
enum:
- advanced
- crud_lookup
- ec2
- generic
- rds
- route53
- s3
- ses
- sns
- sqs
- sts
- custom_iam
discriminator:
propertyName: generator_type
mapping:
advanced: "#/components/schemas/AdvancedChangeGeneratorModel"
crud_lookup: "#/components/schemas/CrudChangeGeneratorModel"
ec2: "#/components/schemas/GenericChangeGeneratorModel"
generic: "#/components/schemas/GenericChangeGeneratorModel"
rds: "#/components/schemas/GenericChangeGeneratorModel"
route53: "#/components/schemas/GenericChangeGeneratorModel"
s3: "#/components/schemas/S3ChangeGeneratorModel"
ses: "#/components/schemas/SESChangeGeneratorModel"
sns: "#/components/schemas/SNSChangeGeneratorModel"
sqs: "#/components/schemas/SQSChangeGeneratorModel"
custom_iam: "#/components/schemas/CustomIamChangeGeneratorModel"
resource_arn:
description: |-
The ARN(s) of the resource being accessed. This is often SQS/SNS/S3/etc. ARNs. It is possible that the
resource policies will need to be modified if the change is approved and successful.
example:
- arn:aws:sqs:us-east-1:123456789012:sqs_queue,
- arn:aws:sqs:us-west-2:123456789012:sqs_queue2,
oneOf:
- type: string
- type: array
items:
type: string
version:
description: Version
type: string
default: 2.0
user:
description: Email address of user creating the change
type: string
action_groups:
type: array
description: Action groups
items:
type: string
policy_name:
type: string
description: Optional policy name for the change, if applicable.
pattern: '^[a-zA-Z0-9+=,.@\\-_]+$'
effect:
type: string
description: The effect. By default, this is allow
default: Allow
pattern: "^(Allow|Deny)$"
condition:
type: object
description: Optional condition for the change
example: |-
{
"StringEquals": {"iam:PassedToService": "ec2.amazonaws.com"},
"StringLike": {
"iam:AssociatedResourceARN": [
"arn:aws:ec2:us-east-1:111122223333:instance/*",
"arn:aws:ec2:us-west-1:111122223333:instance/*"
]
}
}
service:
type: string
bucket_prefix:
type: string
policy:
type: object
description: |-
Optional full policy statement provided by frontend
example: |-
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:GetObject",
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::abc",
"arn:aws:s3:::abc/*"
],
}
]
}
include_accounts:
type: array
example: [account_a, account_b, ...]
description: |-
An array of accounts to include this policy on. This is only relevant for templated
IAM roles. By default, the change will apply to all of the accounts the template is deployed to.
items:
type: string
exclude_accounts:
type: array
example: [account_a, account_b, ...]
description: |-
An array of accounts to explicitly exclude this policy on. This is only relevant for templated
IAM roles. By default, exclude_accounts is null and the change will apply to all of the accounts
items:
type: string
extra_actions:
type: array
example: ["*", "s3:getobject", "s3:list*"]
description: |-
An array with a list of extra actions the user wants appended to the policy
items:
type: string
expiration_date:
type: integer
example: 20210905
description: Date to expire requested policy, in the format of YYYYmmdd
AdvancedChangeGeneratorModel:
allOf:
- $ref: "#/components/schemas/ChangeGeneratorModel"
- type: object
required:
- action_groups
- generator_type
- resource_arn
properties:
generator_type:
type: string
pattern: "advanced"
iam_action:
type: string
example: kinesis:AddTagsToStream
resource:
type: string
example: "*"
GenericChangeGeneratorModel:
allOf:
- $ref: "#/components/schemas/ChangeGeneratorModel"
- type: object
required:
- action_groups
- resource_arn
properties:
action_groups:
type: array
items:
type: string
resource_arn:
description: |-
The ARN(s) of the resource being accessed. This is often SQS/SNS/S3/etc. ARNs. It is possible that the
resource policies will need to be modified if the change is approved and successful.
example:
- arn:aws:sqs:us-east-1:123456789012:sqs_queue
oneOf:
- type: string
- type: array
items:
type: string
CrudChangeGeneratorModel:
description: uses Policy Sentry to generate a policy based on access levels
allOf:
- $ref: "#/components/schemas/ChangeGeneratorModel"
- type: object
required:
- action_groups
- service_name
- generator_type
- resource_arn
properties:
generator_type:
type: string
pattern: "crud_lookup"
action_groups:
type: array
items:
type: string
# enum:
# - read
# - write
# - list
# - tagging
# - permissions-management
service_name:
type: string
S3ChangeGeneratorModel: # These schemas could be defined in different files.
allOf:
- $ref: "#/components/schemas/ChangeGeneratorModel"
- type: object
required:
- resource_arn
- action_groups
- bucket_prefix
- generator_type
properties:
generator_type:
type: string
pattern: "s3"
resource_arn:
description: |-
The ARN(s) of the S3 resource(s) being accessed.
example:
- arn:aws:s3:::example_bucket
oneOf:
- type: string
- type: array
items:
type: string
bucket_prefix:
type: string
example: /awesome/prefix/*
action_groups:
type: array
items:
type: string
CustomIamChangeGeneratorModel:
allOf:
- $ref: "#/components/schemas/ChangeGeneratorModel"
- type: object
required:
- policy
- generator_type
properties:
generator_type:
type: string
pattern: "custom_iam"
policy:
type: object
SQSChangeGeneratorModel:
allOf:
- $ref: "#/components/schemas/ChangeGeneratorModel"
- type: object
required:
- action_groups
- generator_type
- resource_arn
properties:
generator_type:
type: string
pattern: "sqs"
action_groups:
type: array
items:
type: string
# enum:
# - get_queue_attributes
# - set_queue_attributes
# - receive_messages
# - send_messages
# - delete_messages
SNSChangeGeneratorModel:
allOf:
- $ref: "#/components/schemas/ChangeGeneratorModel"
- type: object
required:
- action_groups
- generator_type
- resource_arn
properties:
generator_type:
type: string
pattern: "sns"
action_groups:
type: array
items:
type: string
# enum:
# - get_topic_attributes
# - set_topic_attributes
# - publish
# - subscribe
# - unsubscribe
SESChangeGeneratorModel:
allOf:
- $ref: "#/components/schemas/ChangeGeneratorModel"
- type: object
required:
- from_address
- generator_type
- resource_arn
properties:
generator_type:
type: string
pattern: "ses"
from_address:
type: string
default: from_address@example.com
action_groups:
type: array
items:
type: string
# enum:
# - send_email
PrincipalModel:
type: object
required:
- principal_type
properties:
principal_type:
type: string
enum:
- AwsResource
- HoneybeeAwsResourceTemplate
discriminator:
propertyName: principal_type
mapping:
AwsResource: "#/components/schemas/AwsResourcePrincipalModel"
HoneybeeAwsResourceTemplate: "#/components/schemas/HoneybeeAwsResourceTemplatePrincipalModel"
AwsResourcePrincipalModel:
allOf:
- $ref: "#/components/schemas/PrincipalModel"
- type: object
required:
- principal_arn
- principal_type
properties:
principal_type:
type: string
pattern: "AwsResource"