3.1.4.2.166 ApiChangeResourceGroupEx (Opnum 184)

The ApiChangeResourceGroupEx method<154> moves the designated resource  and all the resources in its dependency tree out of its current group and into the designated group. The nonvolatile cluster state is updated to reflect this change.

The server MUST handle this method in the same manner as ApiChangeResourceGroup (section 3.1.4.2.26) except as follows:

  • If the CLUSAPI_CHANGE_RESOURCE_GROUP_FORCE_MOVE_TO_CSV flag is set in the flags parameter, the server MUST move the resource designated by the hResource parameter to cluster shared volume group designated by the hGroup parameter.

The server MUST accept an ApiChangeResourceGroupEx request for processing only if it is in the read/write state, 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 hGroup context handle is "All" (section 3.1.4).

 error_status_t ApiChangeResourceGroupEx(
   [in] HRES_RPC hResource,
   [in] HGROUP_RPC hGroup,
   [in] ULONGLONG flags,
   [out] error_status_t *rpc_status
 );

hResource: An HRES_RPC (section 2.2.1.4) context handle that was obtained in a previous ApiOpenResource (section 3.1.4.2.9), ApiOpenResourceEx (section 3.1.4.2.119), or ApiCreateResource (section 3.1.4.2.10) method call.

hGroup: An HGROUP_RPC (section 2.2.1.3) context handle that was obtained in a previous ApiOpenGroup (section 3.1.4.2.42), ApiOpenGroupEx (section 3.1.4.2.118), or ApiCreateGroup (section 3.1.4.2.43) method call.

flags: Either CLUSAPI_CHANGE_RESOURCE_GROUP_FORCE_MOVE_TO_CSV (0x0000000000000001), if the client needs the server to move the resource designated by the hResource parameter to cluster shared volume group designated by the hGroup parameter, or zero.

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: This method MUST return the same error codes as specified for ApiChangeResourceGroup (section 3.1.4.2.26), in addition to the following return values.

Return value/code

Description

0x00000057

ERROR_INVALID_PARAMETER

The flags parameter is not one of the specified values.

0x000013B8

ERROR_CLUSTER_INVALID_REQUEST

The resource group represented by HGROUP_RPC is not a cluster shared volume resource group.