Skip to content

Adds object and endpoints for GET and PUT /managed/linode_settings #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions src/data/endpoints/managed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,50 @@ endpoints:
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://$api_root/$version/managed/credentials/$credential_id/revoke
/managed/linode_settings:
group: Linode Settings
type: resource
authenticated: true
description: >
Manage your Linodes' SSH settings.
methods:
GET:
response: ManagedLinodeSetting
description: >
Returns your Linodes' SSH settings.
examples:
curl: |
curl -H "Authorization: Bearer $TOKEN" \
https://$api_root/$version/managed/linode_settings
/managed/linode_settings/$id:
group: Linode Settings
type: resource
authenticated: true
description: >
Manage your Linodes' SSH settings.
methods:
GET:
response: ManagedLinodeSetting
description: >
Returns this Linode's SSH settings.
examples:
curl: |
curl -H "Authorization: Bearer $TOKEN" \
https://$api_root/$version/managed/linode_settings/$linode_settings_id
PUT:
response: ManagedLinodeSetting
description: >
Update this Linode's SSH settings.
examples:
curl: |
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"ssh": {
"user": "root",
"port": 8080,
"ip": "any",
"access": true
}
}' \
https://$api_root/$version/managed/linode_settings/$linode_settings_id
51 changes: 51 additions & 0 deletions src/data/objects/managedlinodesetting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# vim: set et ts=2 sw=2 tw=80 :
name: ManagedLinodeSetting
prefix: managed/linode_settings
description: >
Managed Linode Setting objects describe SSH information for your managed Linodes.
schema:
id:
type: Integer
value: 123
description: The ID of the Linode's settings.
label:
type: String
editable: false
value: LinodeSettingsLabel
description: >
Unique label of your Linode.
group:
type: String
editable: false
value: ManagedLinodeGroup
description: >
This Linode's display group.
ssh:
type: Object
description: >
The SSH settings for your Linode.
user:
type: String
editable: true
value: root
description: >
The SSH username used to log into your Linode.
ip:
type: String
editable: true
value: 204.23.61.122
description: >
Either "any" or an IP address associated with this Linode. Both IPv4 and IPv6 are supported.
access:
type: Boolean
editable: true
value: true
description: >
Whether or not SSH is enabled on the Linode.
port:
type: Integer
editable: true
value: 22
description: >
The SSH port used to access the Linode.