Partager via


CreatePolicy method of the MSFT_StorageQoSPolicyStore class

Creates a storage QoS policy.

Syntax

sint32 CreatePolicy(
  [in, out] MSFT_StorageQoSPolicy Policy
);

Parameters

Policy [in, out]

a MSFT_StorageQoSPolicy containing the new policy.

Return value

Policy ID cannot be zero.

1

Default policy cannot be modified.

2

Default policy cannot be removed.

3

Policy name cannot be empty.

4

Parent policy not found.

5

Limit cannot be higher than 1 billion IOPS.

6

Reservation cannot be higher than 1 billion IOPS.

7

Reservation cannot be higher than the limit.

8

Policy type not recognized.

9

Policy type cannot be changed

10

Policy type cannot be changed.

Multi-instance policies cannot have child policies

11

Multi-instance policies cannot have child policies.

12

1024

Reserved.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\Microsoft\Windows\storage
MOF
StorageQOS.mof
DLL
StorageQOS.dll

See also

MSFT_StorageQoSPolicyStore