Share via


EnrollmentGroupsClient.CreateQuery(String, Int32, CancellationToken) Method

Definition

Create an enrollment group query.

public Microsoft.Azure.Devices.Provisioning.Service.Query CreateQuery (string query, int pageSize = 0, System.Threading.CancellationToken cancellationToken = default);
member this.CreateQuery : string * int * System.Threading.CancellationToken -> Microsoft.Azure.Devices.Provisioning.Service.Query
Public Function CreateQuery (query As String, Optional pageSize As Integer = 0, Optional cancellationToken As CancellationToken = Nothing) As Query

Parameters

query
String

The QuerySpecification with the SQL query. It cannot be null.

pageSize
Int32

The int with the maximum number of items per iteration. It can be 0 for default, but not negative.

cancellationToken
CancellationToken

The cancellation token.

Returns

The iterable set of query results.

Exceptions

If the provided query is null.

If the provided query is empty or white space.

If the provided pageSize value is less than zero.

If the provided cancellationToken has requested cancellation.

Remarks

The service expects a SQL-like query such as

"SELECT * FROM enrollments".

For each iteration, the query will return a page of results. The maximum number of items per page can be specified by the pageSize parameter.

Applies to