Generated on 25 November 2024
from pydo version v0.6.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
importosfrompydoimportClientclient=Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))req={"name":"My SSH Public Key"}resp=client.ssh_keys.update(ssh_key_identifier=512190,body=req)