Delete Capacity Group

The Delete Capacity Group operation deletes the specified capacity group.

HTTP method and URI

DELETE /api/cpcs/{cpc-id}/capacity-groups/{capacity-group-id}

URI variables:

Name Description
{cpc-id} Object ID of the CPC.
{capacity-group-id} Element ID of the capacity group.

Description

This operation deletes the capacity group with the specified {capacity-group-id}. It is required that the specified capacity group does not contain any partition, at the time of deletion. An Inventory Change notification is emitted asynchronously to this operation.

The URI path must designate an existing Capacity Group, and the API user must have object-access permission to the CPC object specified by the {cpc-id}. If these conditions are not met, HTTP status code 404 (Not Found) is returned. In addition, the API user must have action/task permission to the Manage Processor Sharing task; otherwise, HTTP status code 403 (Forbidden) is returned.

A 409 (Conflict) status code is returned if the capacity group contains any partitions. The Remove Partition from Capacity Group operation should be used to delete all the partitions from this capacity group before attempting this operation.

Authorization requirements

This operation has the following authorization requirements:
  • Object-access permission to the specified CPC.
  • Action/task permission to the Manage Processor Sharing task.

HTTP status and reason codes

On success, HTTP status code 204 (No Content) is returned and no response body is provided.

The following HTTP status codes are returned for the indicated errors, and the response body is a standard error response body providing the reason code and associated error message.

Table 1. Delete Capacity Group: HTTP status and reason codes
HTTP error status code Reason code Description
400 (Bad Request) Various Errors were detected during common request validation. See Common request validation reason codes for a list of the possible reason codes.
403 (Forbidden) 1 The API user does not have action/task permission to the Manage Processor Sharing task
404 (Not Found) 1 The CPC identified by {cpc-id} does not exist or the user does not have object-access permission to the CPC.
150 The capacity group identified by {capacity-group-id} does not exist.
409 (Conflict) 110 The capacity group contains one or more partitions, and thus could not be deleted.
329 The operation cannot be performed because the CPC designated by the request URI is an unmanaged CPC, which is not supported by this operation.
503 (Service Unavailable) 1 The request could not be processed because the HMC is not currently communicating with the SE needed to perform the requested operation.

Additional standard status and reason codes can be returned, as described in Invoking API operations.

Example HTTP interaction

Figure 1. Delete Capacity Group: Request
DELETE /api/cpcs/3baea1ec-76e8-3e42-a111-815a7aee19e0/capacity-groups/a4d8826c-d9fa-
   11e5-8b15-42f2e9ef1641 HTTP/1.1
x-api-session: 2saqzhzg358oqoke89osqrgt09k27rqwy4d0mtdp6j2z05ok6q
Figure 2. Delete Capacity Group: Response
204 No Content
server: zSeries management console API web server / 2.0
cache-control: no-cache
date: Tue, 23 Feb 2016 07:02:43 GMT
<No response body>