SSH Keys
- class cherryservers_sdk_python.sshkeys.SSHKey(client: C, model: T)[source]
Cherry Servers SSH key resource.
This class represents an existing Cherry Servers resource and should only be initialized by
SSHKeyClient.- get_model() T
Get resource model.
This model is frozen, since it represents actual resource state.
- update(update_schema: UpdateRequest) None[source]
Update Cherry Servers SSH key resource.
- class cherryservers_sdk_python.sshkeys.SSHKeyModel(*, id: int, label: str | None = None, key: str | None = None, fingerprint: str | None = None, user: UserModel | None = None, updated: str | None = None, created: str | None = None, href: str | None = None)[source]
Cherry Servers SSH key model.
This model is frozen by default, since it represents an actual Cherry Servers SSH key resource state.
- id
SSH key ID.
- Type:
int
- label
SSH key label.
- Type:
str | None
- key
Public SSH key.
- Type:
str | None
- fingerprint
SSH key fingerprint.
- Type:
str | None
- user
SSH key user.
- Type:
- updated
Timestamp of the last SSH key update.
- Type:
str | None
- created
Timestamp of the SSH key creation.
- Type:
str | None
- href
SSH key href.
- Type:
str | None
- class cherryservers_sdk_python.sshkeys.SSHKeyClient(api_client: _client.CherryApiClient, request_timeout: int = 120)[source]
Cherry Servers SSH key client.
Manage Cherry Servers SSH key resources. This class should typically be initialized by
cherryservers_sdk_python.facade.CherryApiFacade.Example
# Create SSH key. facade = cherryservers_sdk_python.facade.CherryApiFacade(token="my-token") req = cherryservers_sdk_python.sshkeys.CreationRequest( label = "test", key = "my-public-api-key" ) sshkey = facade.sshkeys.create(req) # Update SSH key. upd_req = cherryservers_sdk_python.sshkeys.UpdateRequest( label = "test-updated" ) sshkey.update(upd_req) # Remove SSH key. sshkey.delete()
- create(creation_schema: CreationRequest) SSHKey[source]
Create a new SSH key.
- update(sshkey_id: int, update_schema: UpdateRequest) SSHKey[source]
Update SSH key by ID.