Method: LinodeOpenapiClient::DatabasesApi#delete_databases_mysql_instance_with_http_info
- Defined in:
- lib/linode_openapi_client/api/databases_api.rb
#delete_databases_mysql_instance_with_http_info(api_version, instance_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a managed MySQL database __This operation is currently only available for customers who already have an active Managed Database.__ Remove a Managed MySQL Database from your Account. Requires `read_write` access to the Database. The Database must have an `active`, `failed`, or `degraded` status to perform this operation. Only unrestricted Users can access this operation, and have access regardless of the acting token's OAuth scopes. <<LB>> — - __CLI__. ``` linode-cli databases mysql-delete 123 ``` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. ``` databases:read_write ``` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/linode_openapi_client/api/databases_api.rb', line 199 def delete_databases_mysql_instance_with_http_info(api_version, instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DatabasesApi.delete_databases_mysql_instance ...' end # verify the required parameter 'api_version' is set if @api_client.config.client_side_validation && api_version.nil? fail ArgumentError, "Missing the required parameter 'api_version' when calling DatabasesApi.delete_databases_mysql_instance" end # verify enum value allowable_values = ["v4", "v4beta"] if @api_client.config.client_side_validation && !allowable_values.include?(api_version) fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}" end # verify the required parameter 'instance_id' is set if @api_client.config.client_side_validation && instance_id.nil? fail ArgumentError, "Missing the required parameter 'instance_id' when calling DatabasesApi.delete_databases_mysql_instance" end # resource path local_var_path = '/{apiVersion}/databases/mysql/instances/{instanceId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'instanceId' + '}', CGI.escape(instance_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth'] = opts.merge( :operation => :"DatabasesApi.delete_databases_mysql_instance", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DatabasesApi#delete_databases_mysql_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |