Aracılığıyla paylaş


EnrollmentGroup(String, Attestation) Constructor

Definition

Creates a new instance of EnrollmentGroup.

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

Parameters

enrollmentGroupId
String

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

attestation
Attestation

The Attestation object with the attestation mechanism.

Exceptions

If the provided enrollmentGroupId is null.

If the provided enrollmentGroupId is empty or white space.

Examples

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

{
    "enrollmentGroupId":"validEnrollmentGroupId",
    "attestation":{
        "type":"x509",
        "signingCertificates":{
            "primary":{
                "certificate":"[valid certificate]"
            }
        }
    }
}

Remarks

This constructor creates an instance of the EnrollmentGroup object with the minimum set of information required by the provisioning service. A valid EnrollmentGroup must contain the enrollmentGroupId, which uniquely identify this enrollmentGroup, and the attestation mechanism, which must X509.

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

Applies to