com.microsoft.azure.sdk.iot.provisioning.service.configs

Classes

Attestation

This is the abstract class that unifies all possible types of attestation that Device Provisioning Service supports.

For now, the provisioning service supports TpmAttestation or X509Attestation.

AttestationMechanism

Representation of a single Device Provisioning Service Attestation mechanism in the IndividualEnrollment and EnrollmentGroup.

It is an internal class that converts one of the attestations into JSON format. To configure the attestation mechanism, see the external API Attestation.

BulkEnrollmentOperation

Representation of a single Device Provisioning Service bulk operation with a JSON serializer.

It is an internal class that creates a JSON for the bulk operations over the IndividualEnrollment. To use bulk operations, please use the external API ProvisioningServiceClient#runBulkEnrollmentOperation(BulkOperationMode, Collection).

The following JSON is an example of the result of this serializer.

**{
     "mode":"update",

     "enrollments":

     [

         {

             "registrationId":"validRegistrationId-1",

             "deviceId":"ContosoDevice-1",

             "attestation":{

                 "type":"tpm",

                 "tpm":{

                     "endorsementKey":"validEndorsementKey"

                 }

             },

             "iotHubHostName":"ContosoIoTHub.azure-devices.net",

             "provisioningStatus":"enabled"

         },

         {

             "registrationId":"validRegistrationId-2",

             "deviceId":"ContosoDevice-2",

             "attestation":{

                 "type":"tpm",

                "tpm":{

                     "endorsementKey":"validEndorsementKey"

                 }

             },

             "iotHubHostName":"ContosoIoTHub.azure-devices.net",

             "provisioningStatus":"enabled"

         }

     ]

*}

</code></pre></p>

BulkEnrollmentOperationError

Representation of a single Device Provisioning Service device registration operation error.

This error is returned as a result of the ProvisioningServiceClient#runBulkEnrollmentOperation(BulkOperationMode, Collection), in the BulkEnrollmentOperationResult.

The following JSON is an example of a single error operation from a Bulk operation

{
     "registrationId":"validRegistrationId1",

     "errorCode":200,

     "errorStatus":"Succeeded"

}

</code></pre></p>

BulkEnrollmentOperationResult

Representation of a single Device Provisioning Service bulk operation result with a JSON deserializer.

This result is returned as a result of the ProvisioningServiceClient#runBulkEnrollmentOperation(BulkOperationMode, Collection).

The provisioning service provides general bulk result in the isSuccessful, and a individual error result for each enrolment in the bulk.

The following JSON is an example of the result from a bulk operation.

{
    "isSuccessful":true,

    "errors": [

        {

            "registrationId":"validRegistrationId1",

            "errorCode":200,

            "errorStatus":"Succeeded"

        },

        {

            "registrationId":"validRegistrationId2",

            "errorCode":200,

            "errorStatus":"Succeeded"

        }

    ]

}

</code></pre></p>

CustomAllocationDefinition
DeviceCapabilities
DeviceRegistrationState

Representation of a single Device Provisioning Service device registration state with a JSON deserializer.

Example of JSON format:

{
    "registrationId":"validRegistrationId",

    "createdDateTimeUtc": "2017-09-28T16:29:42.3447817Z",

    "assignedHub":"ContosoIoTHub.azure-devices.net",

    "deviceId":"ContosoDevice-123",

    "status":"assigned"

    "lastUpdatedDateTimeUtc": "2017-09-28T16:29:42.3447817Z",

    "errorCode":200

    "errorMessage":"Succeeded"

    "etag": "\"00000000-0000-0000-0000-00000000000\""

}

</code></pre></p>

EnrollmentGroup

Representation of a single Device Provisioning Service enrollment group with a JSON serializer and deserializer.

This object is used to send EnrollmentGroup information to the provisioning service, or receive EnrollmentGroup information from the provisioning service.

To create or update an EnrollmentGroup on the provisioning service you should fill this object and call the public API createOrUpdateEnrollmentGroup(EnrollmentGroup enrollmentGroup). The minimum information required by the provisioning service is the enrollmentGroupId and the attestation.

To provision a device using EnrollmentGroup, it must contain a X509 chip with a signingCertificate for the X509Attestation mechanism, or use SymmetricKeyAttestation mechanism.

The content of this class will be serialized in a JSON format and sent as a body of the rest API to the provisioning service.

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

{
    "enrollmentGroupId":"validEnrollmentGroupId",

    "attestation":{

        "type":"x509",

        "signingCertificates":{

            "primary":{

                "certificate":"[valid certificate]"

            }

        }

    },

    "iotHubHostName":"ContosoIoTHub.azure-devices.net",

    "provisioningStatus":"enabled"

}

</code></pre></p>

The content of this class can be filled by a JSON, received from the provisioning service, as result of a EnrollmentGroup operation like create, update, or query EnrollmentGroup.

The following JSON is a sample of the EnrollmentGroup response, received from the provisioning service.

{
    "enrollmentGroupId":"validEnrollmentGroupId",

    "attestation":{

        "type":"x509",

        "signingCertificates":{

            "primary":{

                "certificate":"[valid certificate]",

                "info": {

                    "subjectName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

                    "sha1Thumbprint": "0000000000000000000000000000000000",

                    "sha256Thumbprint": "validEnrollmentGroupId",

                    "issuerName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

                    "notBeforeUtc": "2017-11-14T12:34:18Z",

                    "notAfterUtc": "2017-11-20T12:34:18Z",

                    "serialNumber": "000000000000000000",

                    "version": 3

                }

            }

        }

    },

    "iotHubHostName":"ContosoIoTHub.azure-devices.net",

    "provisioningStatus":"enabled",

    "createdDateTimeUtc": "2017-09-28T16:29:42.3447817Z",

    "lastUpdatedDateTimeUtc": "2017-09-28T16:29:42.3447817Z",

    "etag": "\"00000000-0000-0000-0000-00000000000\""

}

</code></pre></p>

IndividualEnrollment

Representation of a single Device Provisioning Service enrollment with a JSON serializer and deserializer.

This object is used to send IndividualEnrollment information to the provisioning service, or receive IndividualEnrollment information from the provisioning service.

To create or update an IndividualEnrollment on the provisioning service you should fill this object and call the public API createOrUpdateIndividualEnrollment(IndividualEnrollment individualEnrollment). The minimum information required by the provisioning service is theregistrationId 

</code> and the <code>attestation 

</code> .</p>

A new device can be provisioned by three attestation mechanisms, Trust Platform Module (see TpmAttestation), X509 (see X509Attestation) or SymmetricKeyAttestation mechanism. The definition of each one you should use depending on the physical authentication hardware that the device contains.

The content of this class will be serialized in a JSON format and sent as a body of the rest API to the provisioning service.

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

    {

       "registrationId":"validRegistrationId",

       "deviceId":"ContosoDevice-123",

       "attestation":{

           "type":"tpm",

           "tpm":{

               "endorsementKey":"validEndorsementKey"

           }

       },

       "iotHubHostName":"ContosoIoTHub.azure-devices.net",

       "provisioningStatus":"enabled"

    }

    

  

The content of this class can be filled by a JSON, received from the provisioning service, as result of a IndividualEnrollment operation like create, update, or query enrollment.

The following JSON is a sample or the IndividualEnrollment response, received from the provisioning service.

    {

       "registrationId":"validRegistrationId",

       "deviceId":"ContosoDevice-123",

       "attestation":{

           "type":"tpm",

           "tpm":{

               "endorsementKey":"validEndorsementKey"

           }

       },

       "iotHubHostName":"ContosoIoTHub.azure-devices.net",

       "provisioningStatus":"enabled"

       "createdDateTimeUtc": "2017-09-28T16:29:42.3447817Z",

       "lastUpdatedDateTimeUtc": "2017-09-28T16:29:42.3447817Z",

       "etag": "\"00000000-0000-0000-0000-00000000000\""

    }

    

  

ParserUtility

Set of static functions to help the serializer.

QueryResult

Representation of a single Device Provisioning Service query response with a JSON deserializer.

It is the result of any query for the provisioning service. This class will parse the result and return it in a best format possible. For the known formats in QueryResultType, you can just cast the items. In case of unknown type, the items will contain a list ofStrings 

</code> and you shall parse it by your own.</p>

The system properties are:

And the body is a JSON list of the specific type. For instance, if the system property type is IndividualEnrollment, the body will look like:

[
    {

        "registrationId":"validRegistrationId-1",

        "deviceId":"ContosoDevice-1",

        "attestation":{

            "type":"tpm",

            "tpm":{

                "endorsementKey":"validEndorsementKey"

            }

        },

        "iotHubHostName":"ContosoIoTHub.azure-devices.net",

        "provisioningStatus":"enabled"

    },

    {

        "registrationId":"validRegistrationId-2",

        "deviceId":"ContosoDevice-2",

        "attestation":{

            "type":"tpm",

           "tpm":{

                "endorsementKey":"validEndorsementKey"

            }

        },

        "iotHubHostName":"ContosoIoTHub.azure-devices.net",

        "provisioningStatus":"enabled"

    }

]

</code></pre></p>

QuerySpecification

Representation of a single Device Provisioning Service query specification with a JSON serializer.

QuerySpecificationBuilder

This is a helper to create a new instance of the QuerySpecification.

This helper will create a query forcing the correct sql format. It expects the SELECT and FROM, but optionally accepts WHERE and GROUP BY. As a result, it will return a QuerySpecification object, accepted by the provisioning service.

Sample:

The follow line will create a QuerySpecification.

QuerySpecification querySpecification = new QuerySpecificationBuilder("*", QuerySpecificationBuilder.FromType.ENROLLMENTS)
        .where("iotHubHostName=`ContosoIoTHub.azure-devices.net`").createSqlQuery();

</code></pre></p>

Will generate the sql query:

{
    "query":"select * from enrollments where iotHubHostName=`ContosoIoTHub.azure-devices.net`"

}

</code></pre></p>

ReprovisionPolicy

Settings for IoT Hub Device Reprovisioning

Serializable

Abstract class with the parser for the provisioning configurations.

SymmetricKeyAttestation

Representation of a single Device Provisioning Service Symmetric Key Attestation.

The provisioning service supports Symmetric Key attestation as the device attestation mechanism. User can auto-generate the Primary and Secondary keys, or provide the values in Base64 format.

TpmAttestation

Representation of a single Device Provisioning Service TPM Attestation.

The provisioning service supports Trusted Platform Module, or TPM, as the device attestation mechanism. User must provide the Endorsement Key, and can, optionally, provide the Storage Root Key.

TwinCollection

Representation of a single Twin collection for Provisioning.

The TwinCollection is an extension of aHashMap  ofString  and Object  that contain individual and general versioning mechanism.

By the Twin definition, theObject  can contain types ofBoolean  , Number  ,String  ,Object  , or a sub-TwinCollection, but it cannot be types defined by the user or arrays.

A TwinCollection can contain up to 5 levels of sub TwinCollections. Once the TwinCollection is a extension of theHashMap  , both TwinCollection as well as its sub-TwinCollections can be casted to Map of String and Object.

The collection will be represented in the rest API as a JSON in the body. It can or cannot contain the metadata (identified by the $ character at the beginning of the key.

Because of the Twin metadata, the character $ is not allowed in the entry key.

For instance, the following JSON is a valid TwinCollection with its metadata.

{
        "Color":"White",
        "MaxSpeed":{
            "Value":500,
            "NewValue":300
        },
        "$metadata":{
            "$lastUpdated":"2017-09-21T02:07:44.238Z",
            "$lastUpdatedVersion":4,
            "Color":{
                "$lastUpdated":"2017-09-21T02:07:44.238Z",
                "$lastUpdatedVersion":4,
            },
            "MaxSpeed":{
                "$lastUpdated":"2017-09-21T02:07:44.238Z",
                "$lastUpdatedVersion":4,
                "Value":{
                    "$lastUpdated":"2017-09-21T02:07:44.238Z",
                    "$lastUpdatedVersion":4
                },
                "NewValue":{
                    "$lastUpdated":"2017-09-21T02:07:44.238Z",
                    "$lastUpdatedVersion":4
                }
            }
        },
        "$version":4
    }
    

This class exposes the Twin collection with or without metadata as a Map here user can gat both the value and the metadata. For instance, in the above TwinCollection, get(Object) for Color will return White and getTwinMetadata(String) for Color will return the Object TwinMetadata and TwinMetadata.getLastUpdated() that will returns theDate  2017-09-21T02:07:44.238Z and TwinMetadata.getLastUpdatedVersion() that will returns theInteger  4.

For the nested TwinCollection, you can do the same, for instance, the following code will return the value and metadata of the NewValue nested in MaxSpeed:

// Get the value of the MaxSpeed, which is a inner TwinCollection.
    TwinCollection innerMaxSpeed = (TwinCollection) twinCollection.get("MaxSpeed");
    
    // From the inner TwinCollection, get the value of the NewValue.
    Long maxSpeedNewValue = innerMaxSpeed.get("NewValue");
    
    // As in the root TwinCollection, the inner TwinCollection contain its own metadata.
    // So, get the metadata information for the inner NewValue.
    TwinMetadata maxSpeedNewValueMetadata = innerMaxSpeed.getTwinMetadata("NewValue");
    Date newValueLastUpdated = maxSpeedNewValueMetadata.getLastUpdated(); //Shall contain `2017-09-21T02:07:44.238Z`
    Integer newValueLastUpdatedVersion = maxSpeedNewValueMetadata.getLastUpdatedVersion(); //Shall contain `4`
    

TwinProperties

Representation of a single Twin Properties for the Device Provisioning Service.

The Properties on the TwinState shall contains one TwinCollection of desired property.

The desired property is a collection that can contain a associated TwinMetadata.

These metadata are provided by the Service and contains information about the last updated date time, and version.

For instance, the following is a valid desired property, represented as properties.desired 

</code> in the rest API. <pre><code>{

    "desired": {

        "MaxSpeed":{

            "Value":500,

            "NewValue":300

        },

        "$metadata":{

            "$lastUpdated":"2017-09-21T02:07:44.238Z",

            "$lastUpdatedVersion":4,

            "MaxSpeed":{

                "$lastUpdated":"2017-09-21T02:07:44.238Z",

                "$lastUpdatedVersion":4,

                "Value":{

                    "$lastUpdated":"2017-09-21T02:07:44.238Z",

                    "$lastUpdatedVersion":4

                },

                "NewValue":{

                    "$lastUpdated":"2017-09-21T02:07:44.238Z",

                    "$lastUpdatedVersion":4

                }

            }

        },

        "$version":4

    }

}

</code></pre></p>

TwinState

Representation of a single Twin initial state for the Device Provisioning Service.

The TwinState can contain one TwinCollection of Tags, and one TwinCollection of properties.desired.

Each entity in the collections can contain a associated TwinMetadata.

These metadata are provided by the Service and contains information about the last updated date time, and version.

For instance, the following is a valid TwinState, represented as initialTwin 

</code> in the rest API. <pre><code>{

    "initialTwin": {

        "tags":{

            "SpeedUnity":"MPH",

            "$metadata":{

                "$lastUpdated":"2017-09-21T02:07:44.238Z",

                "$lastUpdatedVersion":4,

                "SpeedUnity":{

                    "$lastUpdated":"2017-09-21T02:07:44.238Z",

                    "$lastUpdatedVersion":4

                }

            },

            "$version":4

        }

        "properties":{

            "desired": {

                "MaxSpeed":{

                    "Value":500,

                    "NewValue":300

                },

                "$metadata":{

                    "$lastUpdated":"2017-09-21T02:07:44.238Z",

                    "$lastUpdatedVersion":4,

                    "MaxSpeed":{

                        "$lastUpdated":"2017-09-21T02:07:44.238Z",

                        "$lastUpdatedVersion":4,

                        "Value":{

                            "$lastUpdated":"2017-09-21T02:07:44.238Z",

                            "$lastUpdatedVersion":4

                        },

                        "NewValue":{

                            "$lastUpdated":"2017-09-21T02:07:44.238Z",

                            "$lastUpdatedVersion":4

                        }

                    }

                },

                "$version":4

            }

        }

    }

}

</code></pre></p>

X509Attestation

Representation of a single Device Provisioning Service X509 Attestation.

The provisioning service supports Device Identifier Composition Engine, or DICE, as the device attestation mechanism. To use DICE, user must provide the X509 certificate. This class provide the means to create a new attestation for a X509 certificate and return it as an abstract interface Attestation.

An X509 attestation can contains one of the 3 types of certificate:

<varlistentry>

  <b>Client or Alias certificate:</b>

</varlistentry>

<li>

  <p>Called on this class as clientCertificates, this certificate can authenticate a single device. </p>

</li>

<varlistentry>

  <b>Signing or Root certificate:</b>

</varlistentry>

<li>

  <p>Called on this class as rootCertificates, this certificate can create multiple Client certificates to authenticate multiple devices. </p>

</li>

<varlistentry>

  <b>CA Reference:</b>

</varlistentry>

<li>

  <p>Called on this class as X509CAReferences, this is a CA reference for a rootCertificate that can create multiple Client certificates to authenticate multiple devices. </p>

</li>

The provisioning service allows user to create IndividualEnrollment and EnrollmentGroup. For all operations over IndividualEnrollment with DICE, user must provide a clientCertificates, and for operations over EnrollmentGroup, user must provide a rootCertificates or a X509CAReferences.

For each of this types of certificates, user can provide 2 Certificates, a primary and a secondary. Only the primary is mandatory, the secondary is optional.

The provisioning service will process the provided certificates, but will never return it back. Instead of it, getPrimaryX509CertificateInfo() and getSecondaryX509CertificateInfo() will return the certificate information for the certificates.

X509CAReferences

Representation of a single Device Provisioning Service X509 Primary and Secondary CA reference.

this class creates a representation of an X509 CA references. It can receive primary and secondary CA references.

Users must provide the CA reference as aString 

</code> . This class will encapsulate both in a single <xref uid="com.microsoft.azure.sdk.iot.provisioning.service.configs.X509Attestation" data-throw-if-not-resolved="false" data-raw-source="X509Attestation"></xref>.</p>

The following JSON is an example of the result of this class.

{
    "primary": "ValidCAReference-1",

    "secondary": "validCAReference-2"

}

</code></pre></p>

X509CertificateInfo

Representation of a single X509 Certificate Info for the Device Provisioning Service.

User receive this info from the provisioning service as result of X509 operations.

This info contains a set of parameters, The following JSON is an example of the X509 certificate info.

{
    "subjectName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

    "sha1Thumbprint": "0000000000000000000000000000000000",

    "sha256Thumbprint": "validEnrollmentGroupId",

    "issuerName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

    "notBeforeUtc": "2017-11-14T12:34:182Z",

    "notAfterUtc": "2017-11-20T12:34:183Z",

    "serialNumber": "000000000000000000",

    "version": 3

}

</code></pre></p>

X509Certificates

Representation of a single Device Provisioning Service X509 Primary and Secondary Certificate.

this class creates a representation of an X509 certificate. It can receive primary and secondary certificate, but only the primary is mandatory.

Users must provide the certificate as aString 

</code> , from a <b>.pem</b> files. This class will encapsulate both in a single <xref uid="com.microsoft.azure.sdk.iot.provisioning.service.configs.X509Attestation" data-throw-if-not-resolved="false" data-raw-source="X509Attestation"></xref>. The following JSON is an example of the result of this class. <pre><code>{

    "primary": {

        "certificate": "-----BEGIN CERTIFICATE-----\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "-----END CERTIFICATE-----\n"

    },

    "secondary": {

        "certificate": "-----BEGIN CERTIFICATE-----\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                       "-----END CERTIFICATE-----\n"

    }

}

</code></pre></p>

After send an X509 certificate with success, the provisioning service will return the X509CertificateInfo for both primary and secondary certificate. User can get these info from this class, and once again, only the primary info is mandatory. The following JSON is an example what info the provisioning service will return for X509.

{
    "primary": {

        "info": {

             "subjectName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

             "sha1Thumbprint": "0000000000000000000000000000000000",

             "sha256Thumbprint": "validEnrollmentGroupId",

             "issuerName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

             "notBeforeUtc": "2017-11-14T12:34:18Z",

             "notAfterUtc": "2017-11-20T12:34:18Z",

             "serialNumber": "000000000000000000",

             "version": 3

         }

    },

    "secondary": {

        "info": {

             "subjectName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

             "sha1Thumbprint": "0000000000000000000000000000000000",

             "sha256Thumbprint": "validEnrollmentGroupId",

             "issuerName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

             "notBeforeUtc": "2017-11-14T12:34:18Z",

             "notAfterUtc": "2017-11-20T12:34:18Z",

             "serialNumber": "000000000000000000",

             "version": 3

         }

    }

}

</code></pre></p>

X509CertificateWithInfo

Representation of a single Device Provisioning Service X509 Certificate with its info.

this class creates a representation of an X509 certificate that can contains the certificate, the info of the certificate or both.

To create this class, users must provide the certificate as aString 

</code> , from a <b>.pem</b> or <b>.cert</b> files.</p>

The following JSON is an example of the result of this class.

{
    "certificate": "-----BEGIN CERTIFICATE-----\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +

                   "-----END CERTIFICATE-----\n";

}

</code></pre></p>

After send an X509 certificate to the provisioning service, it will return the X509CertificateInfo. User can get this info from this class,

The following JSON is an example what info the provisioning service will return for X509.

{
    "info": {

         "subjectName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

         "sha1Thumbprint": "0000000000000000000000000000000000",

         "sha256Thumbprint": "validEnrollmentGroupId",

         "issuerName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",

         "notBeforeUtc": "2017-11-14T12:34:18Z",

         "notAfterUtc": "2017-11-20T12:34:18Z",

         "serialNumber": "000000000000000000",

         "version": 3

    }

}

</code></pre></p>

Enums

AllocationPolicy

The Device Provisioning Service enrollment level allocation policies.

AttestationMechanismType

Type of Device Provisioning Service attestation mechanism.

BulkOperationMode

The Device Provisioning Service bulk operation modes.

EnrollmentStatus

The Device Provisioning Service enrollment status.

ProvisioningStatus

The Device Provisioning Service provisioning status.

QueryResultType

The Device Provisioning Service query result type

QuerySpecificationBuilder.FromType

From clause for Query