Home > Cloud Cruiser 4 > REST API reference > Rate plans > Delete a rate plan by name

Delete a rate plan by name

Deletes a rate plan specified by its name.

This method is available in Cloud Cruiser version 4.1 and later.

Resource URL

DELETE http://<ccServerURL>/rest/v2/ratePlans?planName=<name>

Request

Parameters
  Name Type Description
URL query parameters planName string (requiredThe name of the rate plan to delete
withCustomers boolean (optionalWhether to delete the specified rate plan if it has associated customers. The default is false.
Body

None

Response

Content-Type

text/plain

Body

A statement of whether the deletion is successful.​

Examples

URL invocation (basic)

DELETE http://localhost:8080/rest/v2/ratePlans?planName=test-plan-1

URL invocation (delete with customers)

DELETE http://localhost:8080/rest/v2/ratePlans?planName=test-plan-1?withCustomers=true

Java invocation
Response body (success)

Successfully deleted rate plan with id name test-plan-1

Response body (nonexistent rate plan)

<message>Failed to delete the rate plan Cause: com.cloudcruiser.common.exceptions.NoSuchRecordException: Unable to locate specified Rate Plan</message>

Response body (plan has customers)

<message>Failed to delete the rate plan Cause: com.cloudcruiser.common.exceptions.InvalidOperationException: Unable to delete the rate plan test-plan-14. It has associated customers.</message>

Last modified

Tags

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP