3.1.4.2.21 ApiRemoveResourceDependency (Opnum 20)
(Protocol Version 3) The ApiRemoveResourceDependency method instructs the server to remove the dependency relation (section 3.1.1.1.2) that exists from the resource that is identified by hResource to the resource that is identified by hDependsOn. For successful completion of the method, the server MUST remove the dependency from the nonvolatile cluster state.
The server MUST fail this method with ERROR_DEPENDENCY_NOT_FOUND (0x0000138a) if no dependency exists between the resource that is identified by hResource and the resource that is identified by hDependsOn.
The server MUST fail this method with ERROR_RESOURCE_ONLINE if the resource that is designated by hResource is in either the ClusterResourceOnline, ClusterResourceOnlinePending, or ClusterResourceOfflinePending state; AND the resource that is designated by hDependsOn is in the ClusterResourceOnline state; AND the resource that is designated by hDependsOn is a member of a complex dependency set that contains more than one resource.
The server MUST accept an ApiRemoveResourceDependency 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" and that the access level associated with the hDependsOn context handle is "All" (section 3.1.4).
-
error_status_t ApiRemoveResourceDependency( [in] HRES_RPC hResource, [in] HRES_RPC hDependsOn, [out] error_status_t *rpc_status );
hResource: An HRES_RPC context handle that is obtained in a previous ApiOpenResource, ApiOpenResourceEx, or ApiCreateResource method call.
hDependsOn: An HRES_RPC context handle that is obtained in a previous ApiOpenResource, or ApiOpenResourceEx 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 the runtime 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
Description
0x00000000
ERROR_SUCCESS
Success.
0x00000006
ERROR_INVALID_HANDLE
The data that is pointed to by either the hResource parameter or the hDependsOn parameter does not represent a valid HRES_RPC context handle.
0x0000138a
ERROR_DEPENDENCY_NOT_FOUND
No dependency exists between the resource that is identified by hResource and the resource that is identified by hDependsOn.
0x0000138E
ERROR_RESOURCE_NOT_AVAILABLE
The cluster resource is not available.
0x0000139B
ERROR_RESOURCE_ONLINE
See the preceding text for details of when this error can occur.
0x0000139F
ERROR_INVALID_STATE
See the preceding text for details of when this error can occur.
For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table. The client SHOULD treat errors specified in 3.2.4.6 as recoverable errors and initiate the reconnect procedure as specified in section 3.2.4.6.