Skip to content

Commit 1402a3b

Browse files
author
Josh Sager
committed
Added more CLI examples
1 parent 8b1ee1c commit 1402a3b

File tree

1 file changed

+72
-6
lines changed

1 file changed

+72
-6
lines changed

openapi.yaml

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,9 @@ paths:
752752
source: >
753753
curl -H "Authorization: Bearer $TOKEN" \
754754
https://api.linode.com/v4/account/notifications
755+
- lang: CLI
756+
source: >
757+
linode-cli account notifications-list
755758
/account/oauth-clients:
756759
x-linode-cli-command: account
757760
get:
@@ -1309,6 +1312,9 @@ paths:
13091312
"payer_id": "ABCDEFGHIJKLM"
13101313
}' \
13111314
https://api.linode.com/v4/account/payments/paypal
1315+
- lang: CLI
1316+
source: >
1317+
linode-cli account paypal-execute
13121318
/account/settings:
13131319
x-linode-cli-command: account
13141320
get:
@@ -1607,10 +1613,13 @@ paths:
16071613
curl -H "Content-Type: application/json" \
16081614
-H "Authorization: Bearer $TOKEN" \
16091615
-X PUT -d '{
1610-
"email": "[email protected]",
1616+
"username": example_user
16111617
"restricted": true
16121618
}' \
16131619
https://api.linode.com/v4/account/users/example_user
1620+
- lang: CLI
1621+
source: >
1622+
linode-cli users update example_user --username example_user --restricted true
16141623
delete:
16151624
x-linode-grant: unrestricted only
16161625
tags:
@@ -2858,6 +2867,9 @@ paths:
28582867
source: >
28592868
curl -H "Authorization: Bearer $TOKEN" \
28602869
https://api.linode.com/v4/linode/instances/123/backups
2870+
- lang: CLI
2871+
source: >
2872+
linode-cli linodes backups-list 123
28612873
post:
28622874
x-linode-grant: read_write
28632875
summary: Create Snapshot
@@ -3547,6 +3559,9 @@ paths:
35473559
curl -H "Authorization: Bearer $TOKEN" \
35483560
-X DELETE \
35493561
https://api.linode.com/v4/linode/instances/123/configs/23456
3562+
- lang: CLI
3563+
source: >
3564+
linode-cli linodes config-delete 123 23456
35503565
/linode/instances/{linodeId}/disks:
35513566
parameters:
35523567
- name: linodeId
@@ -3912,6 +3927,9 @@ paths:
39123927
"size": 2048
39133928
}' \
39143929
https://api.linode.com/v4/linode/instances/123/disks/25674/resize
3930+
- lang: CLI
3931+
source: >
3932+
linode-cli linodes disk-resize 123 25674 --size 2048
39153933
/linode/instances/{linodeId}/ips:
39163934
parameters:
39173935
- name: linodeId
@@ -4838,6 +4856,9 @@ paths:
48384856
"script": "#!/bin/bash"
48394857
}' \
48404858
https://api.linode.com/v4/linode/stackscripts
4859+
- lang: CLI
4860+
source: >
4861+
linode-cli stackscripts create --label a-stackscript --description "This StackScript install and configures MySQL" --images "linode/debian9" --images "linode/debian8" --is_public true --rev_note "Set up MySQL" --script '#!/bin/bash'
48414862
/linode/stackscripts/{stackscriptId}:
48424863
parameters:
48434864
- name: stackscriptId
@@ -4924,6 +4945,9 @@ paths:
49244945
"script": "#!/bin/bash"
49254946
}' \
49264947
https://api.linode.com/v4/linode/stackscripts/1337
4948+
- lang: CLI
4949+
source: >
4950+
linode-cli stackscripts update 1337 --label a-stackscript --description "This StackScript install and configures MySQL" --images "linode/debian9" --images "linode/debian8" --is_public true --rev_note "Set up MySQL" --script '#!/bin/bash'
49274951
delete:
49284952
x-linode-grant: read_write
49294953
tags:
@@ -5963,7 +5987,7 @@ paths:
59635987
"ssh": {
59645988
"access": true,
59655989
"user": "linode",
5966-
"ip": "12.34.56.789",
5990+
"ip": "12.34.56.78",
59675991
"port": 22
59685992
}
59695993
}' \
@@ -6063,6 +6087,9 @@ paths:
60636087
]
60646088
}' \
60656089
https://api.linode.com/v4/managed/services
6090+
- lang: CLI
6091+
source: >
6092+
linode-cli managed service-create --service_type url --label prod-1 --address "https://example.org" --timeout 30 --body "it worked" --consultation_group on-call --notes "The service name is my-cool-application" --credentials 9991
60666093
/managed/services/{serviceId}:
60676094
parameters:
60686095
- name: serviceId
@@ -6149,6 +6176,9 @@ paths:
61496176
]
61506177
}' \
61516178
https://api.linode.com/v4/managed/services/9994
6179+
- lang: CLI
6180+
source: >
6181+
linode-cli managed service-update 9994 --service_type url --label prod-1 --address "https://example.org" --timeout 30 --body "it worked" --consultation_group on-call --notes "The service name is my-cool-application" --credentials 9991
61526182
delete:
61536183
x-linode-grant: unrestricted only
61546184
tags:
@@ -6306,6 +6336,9 @@ paths:
63066336
source: >
63076337
curl -H "Authorization: Bearer $TOKEN" \
63086338
https://api.linode.com/v4/networking/ips
6339+
- lang: CLI
6340+
source: >
6341+
linode-cli networking ips-list
63096342
post:
63106343
x-linode-grant: read_write
63116344
tags:
@@ -6372,6 +6405,9 @@ paths:
63726405
"linode_id": 123
63736406
}' \
63746407
https://api.linode.com/v4/networking/ips
6408+
- lang: CLI
6409+
source: >
6410+
linode-cli networking ip-add --type ipv4 --public true --linode_id 123
63756411
/networking/ips/{address}:
63766412
parameters:
63776413
- name: address
@@ -6409,6 +6445,9 @@ paths:
64096445
source: >
64106446
curl -H "Authorization: Bearer $TOKEN" \
64116447
https://api.linode.com/v4/networking/ips/97.107.143.141
6448+
- lang: CLI
6449+
source: >
6450+
linode-cli networking ip-view 97.107.143.141
64126451
put:
64136452
x-linode-grant: read_write
64146453
tags:
@@ -6450,6 +6489,9 @@ paths:
64506489
"rdns": "test.example.org"
64516490
}' \
64526491
https://api.linode.com/v4/networking/ips/97.107.143.141
6492+
- lang: CLI
6493+
source: >
6494+
linode-cli networking ip-update 97.107.143.141 --rdns "test.example.org"
64536495
/networking/ipv4/assign:
64546496
description: >
64556497
Allows redistribution of v4 IP Addresses within a region. Any number
@@ -6507,7 +6549,7 @@ paths:
65076549
Ths IP Address for this assignment. Must be a v4
65086550
address you can access in the region specified. May
65096551
be a public or private address.
6510-
example: 12.34.56.789
6552+
example: 12.34.56.78
65116553
linode_id:
65126554
type: integer
65136555
description: >
@@ -6586,7 +6628,7 @@ paths:
65866628
items:
65876629
type: string
65886630
format: ip
6589-
example: 12.34.56.789
6631+
example: 12.34.56.78
65906632
description: >
65916633
A list of IPs that will be shared with this Linode. When
65926634
this is finished, the given Linode will be able to bring up
@@ -6611,10 +6653,13 @@ paths:
66116653
-X POST -d '{
66126654
"linode_id": 123,
66136655
"ips": [
6614-
"12.34.56.789"
6656+
"12.34.56.78"
66156657
]
66166658
}' \
66176659
https://api.linode.com/v4/networking/ipv4/share
6660+
- lang: CLI
6661+
source: >
6662+
linode-cli networking ip-share --linode_id 123 --ips 12.34.56.78
66186663
/networking/ipv6/pools:
66196664
x-linode-cli-command: networking
66206665
get:
@@ -6657,6 +6702,9 @@ paths:
66576702
source: >
66586703
curl -H "Authorization: Bearer $TOKEN" \
66596704
https://api.linode.com/v4/networking/ipv6/pools
6705+
- lang: CLI
6706+
source: >
6707+
linode-cli networking v6-pools
66606708
/networking/ipv6/ranges:
66616709
x-linode-cli-command: networking
66626710
get:
@@ -6699,6 +6747,9 @@ paths:
66996747
source: >
67006748
curl -H "Authorization: Bearer $TOKEN" \
67016749
https://api.linode.com/v4/networking/ipv6/ranges
6750+
- lang: CLI
6751+
source: >
6752+
linode-cli networking v6-ranges
67026753
/nodebalancers:
67036754
x-linode-cli-command: nodebalancers
67046755
get:
@@ -7782,6 +7833,9 @@ paths:
77827833
"tfa_code": "213456"
77837834
}' \
77847835
https://api.linode.com/v4/profile/tfa-enable-confirm
7836+
- lang: CLI
7837+
source: >
7838+
linode-cli profile tfa-confirm --tfa_code 213456
77857839
/profile/tokens:
77867840
x-linode-cli-command: profile
77877841
description: >
@@ -8173,6 +8227,9 @@ paths:
81738227
"summary": "Having trouble resetting root password on my Linode"
81748228
}' \
81758229
https://api.linode.com/v4/support/tickets
8230+
- lang: CLI
8231+
source: >
8232+
linode-cli tickets create --description "I'm having trouble setting the root password on my Linode. I tried following the instructions but something is not working and I'm not sure what I'm doing wrong. Can you please help me figure out how I can reset it?" --linode_id 123 --summary "Having trouble resetting root password on my Linode"
81768233
/support/tickets/{ticketId}:
81778234
parameters:
81788235
- name: ticketId
@@ -8482,6 +8539,9 @@ paths:
84828539
"linode_id": 12346
84838540
}' \
84848541
https://api.linode.com/v4/volumes
8542+
- lang: CLI
8543+
source: >
8544+
linode-cli volumes create --label my-volume --size 20 --region us-east --linode_id 12346
84858545
/volumes/{volumeId}:
84868546
parameters:
84878547
- name: volumeId
@@ -8623,6 +8683,9 @@ paths:
86238683
-H "Authorization: Bearer $TOKEN" \
86248684
-X DELETE \
86258685
https://api.linode.com/v4/volumes/12345
8686+
- lang: CLI
8687+
source: >
8688+
linode-cli volumes delete 12345
86268689
/volumes/{volumeId}/attach:
86278690
parameters:
86288691
- name: volumeId
@@ -8683,6 +8746,9 @@ paths:
86838746
"linode_id": 12346
86848747
}' \
86858748
https://api.linode.com/v4/volumes/12345/attach
8749+
- lang: CLI
8750+
source: >
8751+
linode-cli volumes attach 12345 --linode_id 12346
86868752
/volumes/{volumeId}/clone:
86878753
parameters:
86888754
- name: volumeId
@@ -11654,7 +11720,7 @@ components:
1165411720
description: >
1165511721
The IP Linode special forces should use to access this Linode
1165611722
when responding to an issue.
11657-
example: 12.34.56.789
11723+
example: 12.34.56.78
1165811724
port:
1165911725
type: integer
1166011726
minimum: 1

0 commit comments

Comments
 (0)