Method: Gitlab::Client::Projects#edit_deploy_key

Defined in:
lib/gitlab/client/projects.rb

#edit_deploy_key(project, id, title, options = {}) ⇒ Gitlab::ObjectifiedHash

Updates an existing deploy key.

Examples:

Gitlab.edit_deploy_key(42, 66, 'New key name', can_push: false)

Parameters:

  • project (Integer, String)

    The ID or path of a project.

  • id (Integer)

    The ID of a deploy key.

  • title (String)

    The title of a deploy key.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

[View source]

412
413
414
# File 'lib/gitlab/client/projects.rb', line 412

def edit_deploy_key(project, id, title, options = {})
  put("/projects/#{url_encode project}/deploy_keys/#{id}", body: { title: title }.merge(options))
end