3.1.4.1.21 ApiRemoveResourceDependency (Opnum 20)

(Protocol Version 2) 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 by returning ERROR_INVALID_STATE if either the resource that is identified by hResource or the resource that is identified by hDependsOn is not in one of the following states: ClusterResourceFailed, ClusterResourceOffline, or ClusterResourceInitializing.

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

 error_status_t ApiRemoveResourceDependency(
   [in] HRES_RPC hResource,
   [in] HRES_RPC hDependsOn
 );

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

hDependsOn: An HRES_RPC context handle that is obtained in a previous ApiOpenResource method call.

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.