Method: Google::Cloud::Storage::HmacKey#delete!

Defined in:
lib/google/cloud/storage/hmac_key.rb

#delete!Google::Cloud::Storage::HmacKey Also known as: delete

Deletes the HMAC key, and loads the new state of the HMAC key, which will be DELETED.

The API call to delete the HMAC key may be retried under certain conditions. See Google::Cloud#storage to control this behavior.

Examples:

require "google/cloud/storage"

storage = Google::Cloud::Storage.new

hmac_key = storage.hmac_keys.first

hmac_key.inactive!.delete!

Returns:



244
245
246
247
248
249
250
251
252
# File 'lib/google/cloud/storage/hmac_key.rb', line 244

def delete!
  ensure_service!
  @service.delete_hmac_key access_id,
                           project_id: project_id,
                           user_project: @user_project
  @gapi = @service.get_hmac_key access_id, project_id: project_id,
                                           user_project: @user_project
  self
end