3.1.4.2.54 ApiCreateGroupResourceEnum (Opnum 53)

(Protocol Version 3) The ApiCreateGroupResourceEnum method returns a collection of names of objects from the cluster state that are of the specified enumeration type and have a direct relationship to the group that is specified by hGroup. If multiple enumeration types are indicated, the resulting PENUM_LIST contains zero or more entries of each type, and the type of each entry in the list is indicated by the ENUM_ENTRY data structure, as specified in section 2.2.3.4.

The server SHOULD accept an ApiCreateGroupResourceEnum request if its protocol server state is read-only and MUST accept the request for processing if it is in the read/write state, as specified in section 3.1.1.

The server SHOULD accept an ApiCreateGroupResourceEnum request if the client's access level is at least "Read" (section 3.1.4).

 error_status_t ApiCreateGroupResourceEnum(
   [in] HGROUP_RPC hGroup,
   [in] DWORD dwType,
   [out] PENUM_LIST *ReturnEnum,
   [out] error_status_t *rpc_status
 );

hGroup: An HGROUP_RPC context handle that was obtained in a previous ApiOpenGroup, ApiOpenGroupEx, or ApiCreateGroup method call.

dwType: The type of enumeration to be returned by the server. The client MUST set dwType to the bitwise OR operator of one or more of the following values.

Value

Meaning

CLUSTER_GROUP_ENUM_CONTAINS

0x00000001

Returns an enumeration of zero or more resource names that represent the resources that are contained in the specified group.

CLUSTER_GROUP_ENUM_NODES

0x00000002

Returns an enumeration of one or more node names that represent the prioritized list of nodes that are given preference when the server is making a decision for which node will host the specified group.

ReturnEnum: A pointer to a PENUM_LIST, as specified in section 2.2.3.5, that contains the data that matches the enumeration type that is indicated by the dwType parameter. The server MUST allocate as much memory as is required to return the enumeration data. If the method fails, this parameter MUST be ignored.

If the client sets dwType to a value other than as specified earlier in this section, the server SHOULD ignore all bits in dwType except those that match the bit(s) in allowable dwType values and complete the method successfully, provided no other failure conditions are met.

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

Description

0x00000000

ERROR_SUCCESS

Success.

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.