operationId: sshKeys_update
summary: Update an SSH Key's Name
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.
tags:
- SSH Keys
parameters:
- $ref: 'parameters/ssh_key_identifier.yml'
requestBody:
description: Set the `name` attribute to the new name you want to use.
required: true
content:
application/json:
schema:
type: object
properties:
name:
$ref: 'attributes/ssh_key_name.yml'
responses:
'200':
$ref: 'responses/sshKeys_existing.yml'
'401':
$ref: '../../shared/responses/unauthorized.yml'
'404':
$ref: '../../shared/responses/not_found.yml'
'429':
$ref: '../../shared/responses/too_many_requests.yml'
'500':
$ref: '../../shared/responses/server_error.yml'
default:
$ref: '../../shared/responses/unexpected_error.yml'
x-codeSamples:
- $ref: 'examples/curl/sshKeys_patch.yml'
- $ref: 'examples/go/sshKeys_patch.yml'
- $ref: 'examples/ruby/sshKeys_patch.yml'
- $ref: 'examples/python/sshKeys_patch.yml'
security:
- bearer_auth:
- 'ssh_key:update'