3.2.4.6.3 ModifyMachineGroup (Opnum 9)

The ModifyMachineGroup method modifies an existing machine group. The method replaces or merges the machine group information according to the value specified in the enumMGMergeOptions member.

 [id(3), helpstring("method ModifyMachineGroup")] HRESULT ModifyMachineGroup(
   [in] BSTR bstrMachineGroupId,
   [in] BSTR bstrMachineGroupInfo,
   [in] MACHINE_GROUP_MERGE_OPTIONS enumMGMergeOptions
 );

bstrMachineGroupId: A string that specifies the identifier of the machine group to be modified.

If this parameter is NULL, E_INVALIDARG MUST be returned.

bstrMachineGroupInfo: A string that specifies the new information for the machine group, in the format specified in MachineGroup element (section 2.2.5.18).

If this parameter is NULL, E_INVALIDARG MUST be returned.

enumMGMergeOptions: Options for machine group modification, from the MACHINE_GROUP_MERGE_OPTIONS enumeration (section 2.2.3.4).<89>

Return Values: This method returns 0x00000000 for success or a negative HRESULT value (in the following table or in [MS-ERREF] section 2.1.1) if an error occurs.

Return value/code

Description

0x00000000

S_OK

Operation successful.

0x80070057

E_INVALIDARG

One or more arguments are invalid.<90>

0xC1FF0070

WRM_ERR_TAGS_NOT_IN_ORDER

The XML data that is maintained by the management service is invalid or cannot be processed.<91>

0xC1FF0385

WRM_ERR_MACHINE_GROUP_LIMIT_EXCEEDED

The total number of machine groups as specified in bstrMachineGroupInfo, has exceeded an implementation-defined limit.<92>

0xC1FF0387

WRM_ERR_MACHINES_LIMIT_IN_MACHINEGROUP_EXCEEDED

The machine group information could not be modified because the total number of machines directly under a machine group has exceeded an implementation-defined limit.<93>

0xC1FF0388

WRM_ERR_MACHINEGROUP_ALREADY_EXISTS

A machine group with the specified name in bstrMachineGroupInfo XML already exists in the entire WSRM configuration. For example, if ModifyMachineGroup is used to modify a machine group ID that is identical to the existing group ID, this error will be generated.<94>

0xC1FF0389

WRM_ERR_MACHINEGROUPID_INVALID

The specified machine group ID is invalid.

Additional IWRMMachineGroup interface methods are specified in section 3.2.4.6.