Sha256: b1cf43495b82b5886590374f1a067333183b287433eb40f15771e163e44182ac
Contents?: true
Size: 1.58 KB
Versions: 14
Compression:
Stored size: 1.58 KB
Contents
module Fog module Google class SQL ## # Deletes all client certificates and generates a new server SSL certificate for the instance. # The changes will not take effect until the instance is restarted. Existing instances without # a server certificate will need to call this once to set a server certificate # # @see https://developers.google.com/cloud-sql/docs/admin-api/v1beta3/instances/resetSslConfig class Real def reset_instance_ssl_config(instance_id) api_method = @sql.instances.reset_ssl_config parameters = { "project" => @project, "instance" => instance_id } request(api_method, parameters) end end class Mock def reset_instance_ssl_config(instance_id) operation = random_operation data[:operations][instance_id] ||= {} data[:operations][instance_id][operation] = { "kind" => 'sql#instanceOperation', "instance" => instance_id, "operation" => operation, "operationType" => "UPDATE", "state" => Fog::Google::SQL::Operation::DONE_STATE, "userEmailAddress" => "google_client_email@developer.gserviceaccount.com", "enqueuedTime" => Time.now.iso8601, "startTime" => Time.now.iso8601, "endTime" => Time.now.iso8601 } body = { "kind" => 'sql#instancesResetSslConfig', "operation" => operation } build_excon_response(body) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems