ApiDeleteResource (Opnum 10)

(Protocol Version 3) The ApiDeleteResource method removes the designated resource from the nonvolatile cluster state.

If the resource has the CLUS_CHAR_BROADCAST_DELETE characteristic and the server executes a delete action indicated by the type of the resource, then all nodes in the cluster MUST execute the same delete action. Actions indicated by a resource type are implementation-specific.

The server MUST fail this method for any of the following conditions:

  • The resource is not in either the ClusterResourceOffline or ClusterResourceFailed state, as specified in section

  • Another resource is directly dependent on the designated resource.

  • The resource has the CLUS_CHAR_DELETE_REQUIRES_ALL_NODES characteristic, as specified in section, and one or more nodes are not active within the cluster.

  • The resource is a core resource.

A client SHOULD immediately close the HRES_RPC handle to the resource using the ApiCloseResource method upon successful completion of this method.

The server MUST accept an ApiDeleteResource request only if its protocol server state is read/write, as specified in section 3.1.1.

The server MUST require that the access level associated with the hResource context handle is "All" (section 3.1.4).

 error_status_t ApiDeleteResource(
   [in] HRES_RPC hResource,
   [out] error_status_t *rpc_status

hResource: An HRES_RPC context handle that was obtained in a previous ApiOpenResource, ApiOpenResourceEx, or ApiCreateResource method call.

rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether it succeeded in executing this method on the server. The encoding of the value passed in this parameter MUST conform to encoding for comm_status and fault_status, as specified in Appendix E of [C706].

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code







The hResource parameter does not represent a valid HRES_RPC context handle.



The resource represented by the hResource parameter has other resources dependent on it.



The resource represented by the hResource parameter no longer exists in the nonvolatile cluster state.



The resource represented by the hResource parameter is not in the Offline or Failed state.



The group or resource is not in the correct state to perform the requested operation.



The resource represented by the hResource parameter is a core resource.



The resource represented by the hResource parameter requires all nodes in the cluster to be active in order to be deleted.

For any other condition, the server MUST set Status to a value that is not one of the values listed in the preceding table. The client MUST treat all values that are not listed in the preceding table the same, except as specified in section