ClusterSetAccountAccess function (clusapi.h)

Updates an account access list (ACL) for a cluster.

Syntax

DWORD ClusterSetAccountAccess(
  [in] HCLUSTER hCluster,
  [in] LPCWSTR  szAccountSID,
  [in] DWORD    dwAccess,
  [in] DWORD    dwControlType
);

Parameters

[in] hCluster

A handle to the cluster.

[in] szAccountSID

The security identifier (SID) or the account name for the new account access entry (ACE).

[in] dwAccess

The access rights controlled by the ACE.

The possible values are:

CLUSAPI_READ_ACCESS (0x00000001L)

Read access.

CLUSAPI_CHANGE_ACCESS (0x00000002L)

The account can be used to make changes to the cluster.

CLUSAPI_NO_ACCESS (0x00000004L)

No access.

CLUSAPI_ALL_ACCESS ((CLUSAPI_READ_ACCESS | CLUSAPI_CHANGE_ACCESS))

The account can be used to read and change the cluster.

[in] dwControlType

The ACE type to use.

The possible values are:

CLUSTER_SET_ACCESS_TYPE_ALLOWED (0)

Adds an allowed ACE.

CLUSTER_SET_ACCESS_TYPE_DENIED (1)

Adds a denied ACE.

CLUSTER_DELETE_ACCESS_CONTROL_ENTRY (2)

Deletes all the ACEs for the SID.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2016
Target Platform Windows
Header clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

See also

Cluster Registry Access Functions