This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathswagger.yaml
85 lines (85 loc) · 2.3 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
openapi: "3.0.0"
info:
title: AWS Credentials API
version: "1.0.0"
description: Provide temporary AWS access credentials for a given OAuth identity
x-audience: component-internal
x-api-id: cc1e478c-710b-4ff0-911b-88f7d53b566f
security:
- oauth2: [uid]
paths:
/aws-account-roles/{user_id}:
get:
summary: Get my AWS accounts and roles
operationId: app.get_account_roles
parameters:
- name: user_id
in: path
required: true
schema:
type: string
pattern: "^[a-zA-Z0-9-]+$"
responses:
"200":
description: List of account roles
content:
application/json:
schema:
type: object
properties:
account_roles:
type: object
properties:
account_id:
type: string
account_name:
type: string
role_name:
type: string
/aws-accounts/{account_id}/roles/{role_name}/credentials:
get:
summary: Get temporary AWS credentials for given account and role.
operationId: app.get_credentials
parameters:
- name: account_id
in: path
required: true
schema:
type: string
pattern: "^[0-9]{12}$"
- name: role_name
in: path
required: true
schema:
type: string
pattern: "^[a-zA-Z0-9-]+$"
responses:
"200":
description: Return temporary AWS credentials
content:
application/json:
schema:
type: object
properties:
access_key_id:
type: string
secret_access_key:
type: string
session_token:
type: string
expiration:
type: string
format: date-time
"401":
description: Unauthenticated
"403":
description: Access to given AWS account and role was forbidden.
components:
securitySchemes:
oauth2:
type: oauth2
flows:
implicit:
authorizationUrl: https://example.org/notused
scopes:
uid: Unique identifier of the user accessing the service