How to use the Fleet Provisioning Hook to assign a thing to a thing group?

0

I'd like my PreProvisioning Hook lambda to set the thing group that the newly created thing should be assigned to. But I can't find an example of what to return in the parameterOverrides map to accomplish that.

질문됨 일 년 전335회 조회
2개 답변
0

The PreProvisioning Hook lambda is only used to authorize the device registration via Fleet Provisioning. You can define the Thing Group in the fleet provisioning template associated to the Fleet Provisioning birth certificate. You can also associate the Thing Group dynamically using Dynamic Thing Groups.

Finally, you could also associate the thing to a thing group by triggering a lambda function via an IoT Rule listening on registry events

AWS
전문가
답변함 일 년 전
0

For us, the right answer was for the PreProvisioning hook to set a variable (deviceType in the below) that the template can use to set the Thing Type. We wanted to use Thing Type in our MQTT Allow directives

    Map<String, String> parameters = new HashMap<>();
    // the provisioningTemplateBody.json uses this parameter to assign the new thing to a Thing Type
    parameters.put("DeviceType", thingType);

    return Map.of("allowProvisioning", allowProvisioning,
    			  "parameterOverrides", parameters);
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠