EnrollmentGroup Class

Enrollment group record.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Inheritance
EnrollmentGroup

Constructor

EnrollmentGroup(*, enrollment_group_id: str, attestation, iot_hub_host_name: str = None, initial_twin=None, etag: str = None, provisioning_status='enabled', reprovision_policy=None, allocation_policy=None, iot_hubs=None, custom_allocation_definition=None, **kwargs) -> None

Parameters

enrollment_group_id
str
Required

Required. Enrollment Group ID.

attestation
<xref:protocol.models.AttestationMechanism>
Required

Required. Attestation method used by the device.

iot_hub_host_name
str
Required

The Iot Hub host name.

initial_twin
<xref:protocol.models.InitialTwin>
Required

Initial device twin.

etag
str
Required

The entity tag associated with the resource.

provisioning_status
str or <xref:protocol.models.enum>
Required

The provisioning status. Possible values include: 'enabled', 'disabled'. Default value: "enabled" .

reprovision_policy
<xref:protocol.models.ReprovisionPolicy>
Required

The behavior when a device is re-provisioned to an IoT hub.

allocation_policy
str or <xref:protocol.models.enum>
Required

The allocation policy of this resource. This policy overrides the tenant level allocation policy for this individual enrollment or enrollment group. Possible values include 'hashed': Linked IoT hubs are equally likely to have devices provisioned to them, 'geoLatency': Devices are provisioned to an IoT hub with the lowest latency to the device.If multiple linked IoT hubs would provide the same lowest latency, the provisioning service hashes devices across those hubs, 'static' : Specification of the desired IoT hub in the enrollment list takes priority over the service-level allocation policy, 'custom': Devices are provisioned to an IoT hub based on your own custom logic. The provisioning service passes information about the device to the logic, and the logic returns the desired IoT hub as well as the desired initial configuration. We recommend using Azure Functions to host your logic. Possible values include: 'hashed', 'geoLatency', 'static', 'custom'

iot_hubs
list[str]
Required

The list of names of IoT hubs the device(s) in this resource can be allocated to. Must be a subset of tenant level list of IoT hubs.

custom_allocation_definition
<xref:protocol.models.CustomAllocationDefinition>
Required

Custom allocation definition.

Variables

created_date_time_utc
datetime

The DateTime this resource was created.

last_updated_date_time_utc
datetime

The DateTime this resource was last updated.

Methods

create

Create a new Enrollment Group instance

create

Create a new Enrollment Group instance

create(enrollment_group_id, attestation, iot_hub_host_name=None, initial_twin=None, provisioning_status='enabled', reprovision_policy=None, allocation_policy=None, iot_hubs=None, custom_allocation_definition=None)

Parameters

enrollment_group_id
str
Required

Enrollment Group ID

attestation
<xref:provisioningserviceclient.models.AttestationMechanism>
Required

Attestation Mechanism used by the device

iot_hub_host_name
str
Required

The IoT Hub host name (optional)

initial_twin
InitialTwin
default value: None

Initial device twin (optional)

provisioning_status
str
default value: None

The provisioning status. Possible values are 'enabled', 'disabled' (optional - default enabled)

reprovision_policy
<xref:ReprovisionPolicy<provisioningserviceclient.models.ReprovisionPolicy>>
default value: enabled

The behavior when a device is re-provisioned to an IoT hub.

allocation_policy
str
default value: None

The allocation policy of this resource.

iot_hubs
list[str]
default value: None

The list of names of IoT hubs the device(s) in this resource can be allocated to. Must be a subset of tenant level list of IoT hubs.

custom_allocation_definition
<xref:provisioningserviceclient.models.CustomAllocationDefinition>
default value: None

Custom allocation definition.

custom_allocation_definition
default value: None

Returns

New instance of <xref:provisioningserviceclient.models.EnrollmentGroup>

Return type

<xref:provisioningserviceclient.models.EnrollmentGroup>