Detach Tape Link from Partition

The Detach Tape Link from Partition operation detaches a tape link from a partition specified by the {partition-id} portion of the request URI.

HTTP method and URI

POST /api/partitions/{partition-id}/operations/detach-tape-link

In this request, the URI variable {partition-id} is the object ID of the partition.

Request body contents

Name Type Rqd/Opt Description
tape-link-uri String/ URI Required The canonical URI of the Tape Link object to be detached from the partition.

Description

The Detach Tape Link from Partition operation detaches a tape link from the partition specified by the {partition-id} portion of the request URI. The virtual tape resources that were created for this partition will be deleted as part of this operation.

On successful execution, the tape link is detached from the partition and the virtual tape resources created in this tape link specifically for this partition are removed. The operating system in the partition will no longer be able to access the tape library targeted by this tape link. If this operation changes the value of any property for which property-change notifications are due, those notifications are emitted asynchronously to this operation.

The URI path must designate an existing Partition object and the API user must have object-access permission to it. In addition, tape-link-uri field in the request body must designate an existing Tape Link object. If either of these conditions are not met, status code 404 (Not Found) is returned.

In addition, the API user must have action/task permissions to the Partition Details task; otherwise, status code 403 (Forbidden) is returned.

If the partition is in any of the transitional states ("starting" or "stopping") or if the CPC is not in a valid state, 409 (Conflict) status code is returned. If the partition does not have the "dpm-fcp-tape-management" feature enabled, a 409 (Conflict) status code is returned.

Authorization requirements

This operation has the following authorization requirements:
  • Object-access permission to the Partition object designated by {partition-id}.
  • Action/task permission to the Partition Details 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 indicated and associated error message.

Table 1. Detach Tape Link from Partition: 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 the required permission for this operation.
404 (Not Found) 1 The object ID in the URI {partition-id} does not designate an existing partition object, or the API user does not have object-access permission to the partition.
2 The object ID in the tape link URI in the request body field tape-link-uri does not designate and existing tape link object.
409 (Conflict) 1 Partition status is not valid to perform the operation.
2 Partition object with ID {partition-id} was busy performing some other operation.
6 The state of the CPC hosting the partition is not valid to perform the operation (must be in one of the following states: "active", "service-required", "degraded", or "exceptions".)
13 The operation is not supported when the "dpm-fcp-tape-management" feature is not enabled on the partition.
117 The tape-link-uri does not designate a tape link that is attached to the partition.
124 The tape link object designated by the {tape-link-uri} was busy performing some other operation.
503 (Service Unavailable) 1 The request could not be processed because the HMC is not currently communicating with an 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. Detach Tape Link from Partition: Request
POST /api/partitions/f1ff01b6-4f65-11eb-b6ac-fa163ed4d903/operations/detach-tape-link HTTP/1.1
x-api-session: 2y8ezz2la6yh90kcf6c2g576tge9la0q4nzes9tqc6om8fm8jl
content-type: application/json
content-length: 73
{
   "tape-link-uri":"/api/tape-links/43750b00-4f64-11eb-b10a-fa163ed4d903"
}
Figure 2. Detach Tape Link from Partition: Response
204 No Content
server: Hardware management console API web server / 2.0
cache-control: no-cache
date: Tue, 05 Jan 2021 15:02:12 GMT

<No response body>