IAerospikeClientCreateRole(AdminPolicy, String, IListPrivilege, IListString, Int32, Int32) Method

Create user defined role with optional privileges, whitelist and read/write quotas. Quotas require server security configuration "enable-quotas" to be set to true.

Definition

Namespace: Aerospike.Client
Assembly: AerospikeClient (in AerospikeClient.dll) Version: 7.0.1
C#
void CreateRole(
	AdminPolicy policy,
	string roleName,
	IList<Privilege> privileges,
	IList<string> whitelist,
	int readQuota,
	int writeQuota
)

Parameters

policy  AdminPolicy
admin configuration parameters, pass in null for defaults
roleName  String
role name
privileges  IListPrivilege
optional list of privileges assigned to role.
whitelist  IListString
optional list of allowable IP addresses assigned to role. IP addresses can contain wildcards (ie. 10.1.2.0/24).
readQuota  Int32
optional maximum reads per second limit, pass in zero for no limit.
writeQuota  Int32
optional maximum writes per second limit, pass in zero for no limit.

Exceptions

AerospikeExceptionif command fails

See Also