Update Tape Library Properties
The Update Tape Library Properties operation updates one or more of the writable properties of a tape library.
HTTP method and URI
POST /api/tape-libraries/{tape-library-id}
In this request, the URI variable {tape-library-id} is the object ID of the Tape Library object.
Request body contents
The request body is expected to contain a JSON object that provides the new value of any writable property that is to be updated by this operation. Field names and data types in this JSON object are expected to match the corresponding property names and data types defined in the Data model. The JSON object can and should omit fields for properties whose values are not to be changed by this operation.
Description
This operation updates a tape library's properties with the values specified.
If the API user does not have action/task permission to the Configure Storage – System Programmer task, a 403 (Forbidden) status code is returned. A 404 (Not Found) status code is returned if the object ID {tape-library-id} does not identify a tape library object on the Console.
If the request body fails to validate, a 400 (Bad Request) status code is returned. This could be because another tape library with the specified name exists within the same associated CPC.
If the request body contents are valid, the tape library’s properties are updated to their corresponding request body content's field's values. All fields are optional and may be excluded from the request body; if a field is not found in the request body, its property's value will not be modified.
If the update changes the value of any property for which property-change notifications are due, those notifications are emitted asynchronously to this operation.
Authorization requirements
- Object-access permission to the tape library whose object-id is {tape-library-id}.
- Action/task permission to the Configure Storage – System Programmer task.
HTTP status and reason codes
On success, HTTP status code 204 (No Content) is returned and no response body is provided.
Otherwise, the following HTTP status codes are returned for the indicated errors. The response body is a standard error response body providing the reason code indicated and associated error message.
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. |
8 | A tape library with the name specified in the request body is already associated to the CPC identified by its cpc-uri property. | |
403 (Forbidden) | 1 | The API user does not have action/task permission to the Configure Storage – System Programmer task. |
404 (Not Found) | 1 | The tape library with the object-id {tape-library-id} does not exist on the Console or the API user does not have object-access permission for it. |
409 (Conflict) | 2 | The Tape Library object with the object-id {tape-library-id} was busy and the request timed out. |
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.