Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize ApiDeleteResource (Opnum 10)

(Protocol Version 2) 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.

 error_status_t ApiDeleteResource(
   [in] HRES_RPC hResource

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

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

© 2015 Microsoft