pydo.ssh_keys.update()

Generated on 12 Jun 2025 from pydo version v0.11.0

Description

To update the name of an SSH key, send a PUT request to either /v2/account/keys/$SSH_KEY_ID or /v2/account/keys/$SSH_KEY_FINGERPRINT. Set the name attribute to the new name you want to use.

Parameters

Name Type Required Description Default Value
ssh_key_identifier JSON True Either the ID or the fingerprint of an existing SSH key.
body JSON or IO[bytes] True Set the name attribute to the new name you want to use.

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "name": "My SSH Public Key"
}

resp = client.ssh_keys.update(ssh_key_identifier=512190, body=req)

More Information

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.