IndividualEnrollment(String, Attestation) Constructor

Definition

Creates a new instance of IndividualEnrollment.

public IndividualEnrollment (string registrationId, Microsoft.Azure.Devices.Provisioning.Service.Attestation attestation);
new Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment : string * Microsoft.Azure.Devices.Provisioning.Service.Attestation -> Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment
Public Sub New (registrationId As String, attestation As Attestation)

Parameters

registrationId
String

The string that uniquely identify this enrollment in the provisioning service. It cannot be null or empty.

attestation
Attestation

The Attestation object with the attestation mechanism.

Exceptions

If the provided registrationId is null.

If the provided registrationId is empty or white space.

Examples

When serialized, an IndividualEnrollment will look like the following example:

{
   "registrationId":"validRegistrationId",
   "attestation":{
       "type":"tpm",
       "tpm":{
           "endorsementKey":"validEndorsementKey"
       }
   }
}

Remarks

This constructor creates an instance of the IndividualEnrollment object with the minimum set of information required by the provisioning service. A valid individualEnrollment must contain the registrationId, which uniquely identify this enrollment, and the attestation mechanism, which can be X509, or Symmetric key.

Other parameters can be added by calling the setters on this object.

Applies to