Skip to content

Commit 7f696ca

Browse files
committed
new: Adds PUT linode/instances/{linodeId}
1 parent 20ebb06 commit 7f696ca

File tree

1 file changed

+128
-12
lines changed

1 file changed

+128
-12
lines changed

swagger.yaml

Lines changed: 128 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ servers:
1212
paths:
1313
/regions:
1414
get:
15+
tags:
16+
- regions
1517
description: |
1618
List the regions available for Linode services. Not all services are
1719
guaranteed to be available in all regions.
@@ -38,6 +40,8 @@ paths:
3840
schema:
3941
type: string
4042
get:
43+
tags:
44+
- regions
4145
description: |
4246
Get information about a single Region.
4347
operationId: getRegion
@@ -50,6 +54,8 @@ paths:
5054
$ref: '#/components/schemas/Region'
5155
/linode/instances:
5256
get:
57+
tags:
58+
- linode/instances
5359
description: |
5460
Manage Linodes on your account.
5561
operationId: getLinodeInstaces
@@ -79,6 +85,8 @@ paths:
7985
schema:
8086
type: integer
8187
get:
88+
tags:
89+
- 'linode/instances/{linodeId}'
8290
description: Get a Linode
8391
operationId: getLinodeInstance
8492
security:
@@ -92,6 +100,31 @@ paths:
92100
application/json:
93101
schema:
94102
$ref: '#/components/schemas/Linode'
103+
put:
104+
tags:
105+
- 'linode/instances/{linodeId}'
106+
description: Update information about a Linode
107+
operationId: putLinodeInstance
108+
security:
109+
- personalAccessToken: []
110+
- oauth:
111+
- 'linodes:modify'
112+
requestBody:
113+
description: The fields to modify
114+
required: true
115+
content:
116+
application/json:
117+
schema:
118+
allOf:
119+
- $ref: '#/components/schemas/LinodeEditable'
120+
responses:
121+
'200':
122+
description: The updated Linode
123+
content:
124+
application/json:
125+
schema:
126+
allOf:
127+
- $ref: '#/components/schemas/Linode'
95128
components:
96129
securitySchemes:
97130
personalAccessToken:
@@ -106,6 +139,7 @@ components:
106139
tokenUrl: 'https://login.linode.com/oauth/token'
107140
scopes:
108141
'linodes:view': GET endpoints for Linodes
142+
'linodes:modify': PUT and action endpoints for Linodes
109143
schemas:
110144
PaginationEnvelope:
111145
required:
@@ -123,30 +157,53 @@ components:
123157
results:
124158
type: integer
125159
Region:
126-
required:
127-
- id
128-
- country
129160
properties:
130161
id:
131162
type: string
132163
country:
133164
type: string
134-
Linode:
135-
required:
136-
- id
137-
- label
138-
- group
165+
LinodeEditable:
139166
properties:
140-
id:
141-
type: integer
142-
description: This Linode's ID.
143167
label:
144168
type: string
145169
description: This Linode's unique label.
146170
group:
147171
type: string
148172
description: |
149-
The group thie Linode is in. This is for display purposes only.
173+
The group this Linode is in. This is for display purposes only.
174+
alerts:
175+
type: object
176+
properties:
177+
cpu:
178+
type: integer
179+
description: >
180+
The thershold of cpu usage at which we will alert you. If set
181+
to 0, this check
182+
183+
is disabled.
184+
network_in:
185+
type: integer
186+
description: |
187+
TODO
188+
network_out:
189+
type: integer
190+
description: |
191+
TODO
192+
transfer_quota:
193+
type: integer
194+
description: |
195+
TODO
196+
io:
197+
type: integer
198+
description: |
199+
TODO
200+
Linode:
201+
allOf:
202+
- $ref: '#/components/schemas/LinodeEditable'
203+
properties:
204+
id:
205+
type: integer
206+
description: This Linode's ID.
150207
status:
151208
type: string
152209
description: |
@@ -160,3 +217,62 @@ components:
160217
enum:
161218
- kvm
162219
- xen
220+
created:
221+
type: string
222+
format: date-time
223+
description: When this Linode was created.
224+
updated:
225+
type: string
226+
format: date-time
227+
description: When this Linode was last updated.
228+
type:
229+
type: string
230+
description: The type of Linode this is.
231+
ipv4:
232+
type: array
233+
format: string
234+
description: This Lindoe's IPv4 Addresses.
235+
ipv6:
236+
type: array
237+
format: string
238+
description: This Linode's IPv6 Addresses.
239+
image:
240+
type: string
241+
description: 'The Image that was deployed to this Linode, or null.'
242+
region:
243+
type: string
244+
description: The region this Linode is in.
245+
specs:
246+
type: object
247+
properties:
248+
disk:
249+
type: integer
250+
description: 'The amount of storage space this Linode has access to, in GB.'
251+
memory:
252+
type: integer
253+
description: 'The amount of RAM this Linode has access to, in MB.'
254+
vcpus:
255+
type: integer
256+
description: The number of vcpus this Linode has access to.
257+
transfer:
258+
type: integer
259+
description: The amount of transfer this Linode is allotted.
260+
backups:
261+
type: object
262+
properties:
263+
enabled:
264+
type: boolean
265+
description: >
266+
If this Linode has our backup service enabled. To enable
267+
backups, see
268+
269+
/linode/instances/{linodeId}/backups/enable
270+
schedule:
271+
type: object
272+
properties:
273+
day:
274+
type: string
275+
description: TODO
276+
window:
277+
type: string
278+
description: TODO

0 commit comments

Comments
 (0)