ProvisioningServiceClient class

Constructors

ProvisioningServiceClient(TransportConfig, RestApiClient)

Methods

createEnrollmentGroupDeviceRegistrationStateQuery(QuerySpecification, string, number)

Creates a query that can be used to return, for a specific EnrollmentGroup, pages of existing device registration status.

createEnrollmentGroupQuery(QuerySpecification, number)

Creates a query that can be used to return pages of existing enrollment groups.

createIndividualEnrollmentQuery(QuerySpecification, number)

Creates a query that can be used to return pages of existing enrollments.

createOrUpdateEnrollmentGroup(EnrollmentGroup)
createOrUpdateEnrollmentGroup(EnrollmentGroup, HttpResponseCallback<EnrollmentGroup>)

Create or update a device enrollment group.

createOrUpdateIndividualEnrollment(IndividualEnrollment)
createOrUpdateIndividualEnrollment(IndividualEnrollment, HttpResponseCallback<IndividualEnrollment>)

Create or update a device enrollment record.

deleteDeviceRegistrationState(string | DeviceRegistrationState)
deleteDeviceRegistrationState(string | DeviceRegistrationState, ErrorCallback)
deleteDeviceRegistrationState(string | DeviceRegistrationState, string)
deleteDeviceRegistrationState(string | DeviceRegistrationState, string, ErrorCallback)

Delete a device registration status.

deleteEnrollmentGroup(string | EnrollmentGroup)
deleteEnrollmentGroup(string | EnrollmentGroup, ErrorCallback)
deleteEnrollmentGroup(string | EnrollmentGroup, string)
deleteEnrollmentGroup(string | EnrollmentGroup, string, ErrorCallback)

Delete a device enrollment group.

deleteIndividualEnrollment(string | IndividualEnrollment)
deleteIndividualEnrollment(string | IndividualEnrollment, ErrorCallback)
deleteIndividualEnrollment(string | IndividualEnrollment, string)
deleteIndividualEnrollment(string | IndividualEnrollment, string, ErrorCallback)

Delete a device enrollment record.

fromConnectionString(string)

Constructs a ProvisioningServiceClient object from the given connection string using the default transport (Http).

fromTokenCredential(string, TokenCredential)

Constructs a ProvisioningServiceClient object from the given Azure TokenCredential using the default transport (Http).

getDeviceRegistrationState(string)
getDeviceRegistrationState(string, HttpResponseCallback<DeviceRegistrationState>)

Gets the device registration status.

getEnrollmentGroup(string)
getEnrollmentGroup(string, HttpResponseCallback<EnrollmentGroup>)

Get a device enrollment group.

getEnrollmentGroupAttestationMechanism(string)
getEnrollmentGroupAttestationMechanism(string, HttpResponseCallback<AttestationMechanism>)

Gets the attestation mechanism for an EnrollmentGroup record.

getIndividualEnrollment(string)
getIndividualEnrollment(string, HttpResponseCallback<IndividualEnrollment>)

Get a device enrollment record.

getIndividualEnrollmentAttestationMechanism(string)
getIndividualEnrollmentAttestationMechanism(string, HttpResponseCallback<AttestationMechanism>)

Gets the attestation mechanism for an IndividualEnrollment record.

runBulkEnrollmentOperation(BulkEnrollmentOperation)
runBulkEnrollmentOperation(BulkEnrollmentOperation, HttpResponseCallback<BulkEnrollmentOperationResult>)

Runs a number CRUD operations on an array of enrollment records.

Constructor Details

ProvisioningServiceClient(TransportConfig, RestApiClient)

new ProvisioningServiceClient(config: TransportConfig, restApiClient?: RestApiClient)

Parameters

config

TransportConfig

restApiClient

RestApiClient

Method Details

createEnrollmentGroupDeviceRegistrationStateQuery(QuerySpecification, string, number)

Creates a query that can be used to return, for a specific EnrollmentGroup, pages of existing device registration status.

function createEnrollmentGroupDeviceRegistrationStateQuery(querySpecification: QuerySpecification, enrollmentGroupId: string, pageSize?: number)

Parameters

querySpecification
QuerySpecification

The query specification.

enrollmentGroupId

string

The EnrollmentGroup id that provides the scope for the query.

pageSize

number

The maximum number of elements to return per page.

Returns

createEnrollmentGroupQuery(QuerySpecification, number)

Creates a query that can be used to return pages of existing enrollment groups.

function createEnrollmentGroupQuery(querySpecification: QuerySpecification, pageSize?: number)

Parameters

querySpecification
QuerySpecification

The query specification.

pageSize

number

The maximum number of elements to return per page.

Returns

createIndividualEnrollmentQuery(QuerySpecification, number)

Creates a query that can be used to return pages of existing enrollments.

function createIndividualEnrollmentQuery(querySpecification: QuerySpecification, pageSize?: number)

Parameters

querySpecification
QuerySpecification

The query specification.

pageSize

number

The maximum number of elements to return per page.

Returns

createOrUpdateEnrollmentGroup(EnrollmentGroup)

function createOrUpdateEnrollmentGroup(enrollmentGroup: EnrollmentGroup)

Parameters

enrollmentGroup
EnrollmentGroup

Returns

Promise<ResultWithHttpResponse<EnrollmentGroup>>

createOrUpdateEnrollmentGroup(EnrollmentGroup, HttpResponseCallback<EnrollmentGroup>)

Create or update a device enrollment group.

function createOrUpdateEnrollmentGroup(enrollmentGroup: EnrollmentGroup, callback: HttpResponseCallback<EnrollmentGroup>)

Parameters

enrollmentGroup
EnrollmentGroup

The device enrollment group.

callback

HttpResponseCallback<EnrollmentGroup>

createOrUpdateIndividualEnrollment(IndividualEnrollment)

function createOrUpdateIndividualEnrollment(enrollment: IndividualEnrollment)

Parameters

Returns

Promise<ResultWithHttpResponse<IndividualEnrollment>>

createOrUpdateIndividualEnrollment(IndividualEnrollment, HttpResponseCallback<IndividualEnrollment>)

Create or update a device enrollment record.

function createOrUpdateIndividualEnrollment(enrollment: IndividualEnrollment, callback: HttpResponseCallback<IndividualEnrollment>)

Parameters

enrollment
IndividualEnrollment

The device enrollment record.

callback

HttpResponseCallback<IndividualEnrollment>

deleteDeviceRegistrationState(string | DeviceRegistrationState)

function deleteDeviceRegistrationState(idOrRegistrationState: string | DeviceRegistrationState)

Parameters

idOrRegistrationState

string | DeviceRegistrationState

Returns

Promise<void>

deleteDeviceRegistrationState(string | DeviceRegistrationState, ErrorCallback)

function deleteDeviceRegistrationState(idOrRegistrationState: string | DeviceRegistrationState, deleteCallback: ErrorCallback)

Parameters

idOrRegistrationState

string | DeviceRegistrationState

deleteCallback

ErrorCallback

deleteDeviceRegistrationState(string | DeviceRegistrationState, string)

function deleteDeviceRegistrationState(idOrRegistrationState: string | DeviceRegistrationState, etag: string)

Parameters

idOrRegistrationState

string | DeviceRegistrationState

etag

string

Returns

Promise<void>

deleteDeviceRegistrationState(string | DeviceRegistrationState, string, ErrorCallback)

Delete a device registration status.

function deleteDeviceRegistrationState(idOrRegistrationState: string | DeviceRegistrationState, etag: string, deleteCallback: ErrorCallback)

Parameters

idOrRegistrationState

string | DeviceRegistrationState

A string containing the registration id OR an actual DeviceRegistrationState.

etag

string

deleteCallback

ErrorCallback

deleteEnrollmentGroup(string | EnrollmentGroup)

function deleteEnrollmentGroup(enrollmentGroupOrId: string | EnrollmentGroup)

Parameters

enrollmentGroupOrId

string | EnrollmentGroup

Returns

Promise<void>

deleteEnrollmentGroup(string | EnrollmentGroup, ErrorCallback)

function deleteEnrollmentGroup(enrollmentGroupOrId: string | EnrollmentGroup, deleteCallback: ErrorCallback)

Parameters

enrollmentGroupOrId

string | EnrollmentGroup

deleteCallback

ErrorCallback

deleteEnrollmentGroup(string | EnrollmentGroup, string)

function deleteEnrollmentGroup(enrollmentGroupOrId: string | EnrollmentGroup, etag: string)

Parameters

enrollmentGroupOrId

string | EnrollmentGroup

etag

string

Returns

Promise<void>

deleteEnrollmentGroup(string | EnrollmentGroup, string, ErrorCallback)

Delete a device enrollment group.

function deleteEnrollmentGroup(enrollmentGroupOrId: string | EnrollmentGroup, etag: string, deleteCallback: ErrorCallback)

Parameters

enrollmentGroupOrId

string | EnrollmentGroup

EnrollmentGroup object or a string containing the enrollment Group Id.

etag

string

deleteCallback

ErrorCallback

deleteIndividualEnrollment(string | IndividualEnrollment)

function deleteIndividualEnrollment(enrollmentOrId: string | IndividualEnrollment)

Parameters

enrollmentOrId

string | IndividualEnrollment

Returns

Promise<void>

deleteIndividualEnrollment(string | IndividualEnrollment, ErrorCallback)

function deleteIndividualEnrollment(enrollmentOrId: string | IndividualEnrollment, deleteCallback: ErrorCallback)

Parameters

enrollmentOrId

string | IndividualEnrollment

deleteCallback

ErrorCallback

deleteIndividualEnrollment(string | IndividualEnrollment, string)

function deleteIndividualEnrollment(enrollmentOrId: string | IndividualEnrollment, etag: string)

Parameters

enrollmentOrId

string | IndividualEnrollment

etag

string

Returns

Promise<void>

deleteIndividualEnrollment(string | IndividualEnrollment, string, ErrorCallback)

Delete a device enrollment record.

function deleteIndividualEnrollment(enrollmentOrId: string | IndividualEnrollment, etag: string, deleteCallback: ErrorCallback)

Parameters

enrollmentOrId

string | IndividualEnrollment

An IndividualEnrollment object or a string containing the registration id.

etag

string

deleteCallback

ErrorCallback

fromConnectionString(string)

Constructs a ProvisioningServiceClient object from the given connection string using the default transport (Http).

static function fromConnectionString(value: string)

Parameters

value

string

A connection string which encapsulates the appropriate (read and/or write) ProvisioningServiceClient permissions.

Returns

fromTokenCredential(string, TokenCredential)

Constructs a ProvisioningServiceClient object from the given Azure TokenCredential using the default transport (Http).

static function fromTokenCredential(hostName: string, tokenCredential: TokenCredential)

Parameters

hostName

string

Host name of the Azure service.

tokenCredential

TokenCredential

An Azure TokenCredential used to authenticate with the Azure service

Returns

getDeviceRegistrationState(string)

function getDeviceRegistrationState(id: string)

Parameters

id

string

Returns

Promise<ResultWithHttpResponse<DeviceRegistrationState>>

getDeviceRegistrationState(string, HttpResponseCallback<DeviceRegistrationState>)

Gets the device registration status.

function getDeviceRegistrationState(id: string, callback: HttpResponseCallback<DeviceRegistrationState>)

Parameters

id

string

Registration ID.

callback

HttpResponseCallback<DeviceRegistrationState>

getEnrollmentGroup(string)

function getEnrollmentGroup(id: string)

Parameters

id

string

Returns

Promise<ResultWithHttpResponse<EnrollmentGroup>>

getEnrollmentGroup(string, HttpResponseCallback<EnrollmentGroup>)

Get a device enrollment group.

function getEnrollmentGroup(id: string, getCallback: HttpResponseCallback<EnrollmentGroup>)

Parameters

id

string

IndividualEnrollment group ID.

getCallback

HttpResponseCallback<EnrollmentGroup>

getEnrollmentGroupAttestationMechanism(string)

function getEnrollmentGroupAttestationMechanism(enrollmentGroupId: string)

Parameters

enrollmentGroupId

string

Returns

Promise<ResultWithHttpResponse<AttestationMechanism>>

getEnrollmentGroupAttestationMechanism(string, HttpResponseCallback<AttestationMechanism>)

Gets the attestation mechanism for an EnrollmentGroup record.

function getEnrollmentGroupAttestationMechanism(enrollmentGroupId: string, callback: HttpResponseCallback<AttestationMechanism>)

Parameters

enrollmentGroupId

string

callback

HttpResponseCallback<AttestationMechanism>

Function called when the request is completed, either with an error or with an AttestationMechanism object.

getIndividualEnrollment(string)

function getIndividualEnrollment(id: string)

Parameters

id

string

Returns

Promise<ResultWithHttpResponse<IndividualEnrollment>>

getIndividualEnrollment(string, HttpResponseCallback<IndividualEnrollment>)

Get a device enrollment record.

function getIndividualEnrollment(id: string, getCallback: HttpResponseCallback<IndividualEnrollment>)

Parameters

id

string

Registration ID.

getCallback

HttpResponseCallback<IndividualEnrollment>

getIndividualEnrollmentAttestationMechanism(string)

function getIndividualEnrollmentAttestationMechanism(enrollementId: string)

Parameters

enrollementId

string

Returns

Promise<ResultWithHttpResponse<AttestationMechanism>>

getIndividualEnrollmentAttestationMechanism(string, HttpResponseCallback<AttestationMechanism>)

Gets the attestation mechanism for an IndividualEnrollment record.

function getIndividualEnrollmentAttestationMechanism(enrollementId: string, callback: HttpResponseCallback<AttestationMechanism>)

Parameters

enrollementId

string

Unique identifier of the enrollment.

callback

HttpResponseCallback<AttestationMechanism>

Function called when the request is completed, either with an error or with an AttestationMechanism object.

runBulkEnrollmentOperation(BulkEnrollmentOperation)

function runBulkEnrollmentOperation(bulkEnrollmentOperation: BulkEnrollmentOperation)

Parameters

bulkEnrollmentOperation
BulkEnrollmentOperation

Returns

Promise<ResultWithHttpResponse<BulkEnrollmentOperationResult>>

runBulkEnrollmentOperation(BulkEnrollmentOperation, HttpResponseCallback<BulkEnrollmentOperationResult>)

Runs a number CRUD operations on an array of enrollment records.

function runBulkEnrollmentOperation(bulkEnrollmentOperation: BulkEnrollmentOperation, callback: HttpResponseCallback<BulkEnrollmentOperationResult>)

Parameters

bulkEnrollmentOperation
BulkEnrollmentOperation

An object that specifies the single kind of CRUD operations on the array of IndividualEnrollment objects that are also part of the object.

callback

HttpResponseCallback<BulkEnrollmentOperationResult>

Invoked upon completion of the operation.