AWS IoT Device SDK C: Fleet Provisioning
AWS IoT Fleet Provisioning
Return to main page ↑
aws_iot_provisioning.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy of
5  * this software and associated documentation files (the "Software"), to deal in
6  * the Software without restriction, including without limitation the rights to
7  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8  * the Software, and to permit persons to whom the Software is furnished to do so,
9  * subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in all
12  * copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20  */
21 
27 #ifndef AWS_IOT_PROVISIONING_H_
28 #define AWS_IOT_PROVISIONING_H_
29 
30 /* The config header is always included first. */
31 #include "iot_config.h"
32 
33 /* Provisioning types include. */
35 
36 /* MQTT Types */
37 #include "types/iot_mqtt_types.h"
38 
39 /*------------------------- AWS Provisioning library functions --------------------------*/
40 
79 /* @[declare_provisioning_init] */
81 /* @[declare_provisioning_init] */
82 
138 /* @[declare_provisioning_createkeysandcertificate] */
140  uint32_t flags,
141  uint32_t timeoutMs,
143 /* @[declare_provisioning_createkeysandcertificate] */
144 
211 /* @[declare_provisioning_createcertificatefromcsr] */
213  IotMqttQos_t operationQos,
214  const char * pCertificateSigningRequest,
215  size_t csrLength,
216  uint32_t timeoutMs,
217  const AwsIotProvisioningCreateCertFromCsrCallbackInfo_t * pResponseCallback );
218 /* @[declare_provisioning_createcertificatefromcsr] */
219 
272 /* @[declare_provisioning_registerthing] */
273 
275  const AwsIotProvisioningRegisterThingRequestInfo_t * pProvisioningDataInfo,
276  uint32_t timeoutMs,
277  const AwsIotProvisioningRegisterThingCallbackInfo_t * pResponseCallback );
278 /* @[declare_provisioning_registerthing] */
279 
280 
293 /* @[declare_provisioning_cleanup] */
294 void AwsIotProvisioning_Cleanup( void );
295 /* @[declare_provisioning_cleanup] */
296 
297 /*------------------------- Provisioning helper functions -------------------------*/
298 
315 /* @[declare_provisioning_strerror] */
317 /* @[declare_provisioning_strerror] */
318 
319 #endif /* ifndef AWS_IOT_PROVISIONING_H_ */
const char * AwsIotProvisioning_strerror(AwsIotProvisioningError_t status)
Returns a string that describes an AwsIotProvisioningError_t.
Definition: aws_iot_provisioning_api.c:1060
AwsIotProvisioningError_t
Return codes of Provisioning functions.
Definition: aws_iot_provisioning_types.h:54
User-specific callback information for handling server response for the Provisioning CreateKeysAndCer...
Definition: aws_iot_provisioning_types.h:424
User-specific callback information for handling server response for the Provisioning RegisterThing se...
Definition: aws_iot_provisioning_types.h:498
AwsIotProvisioningError_t AwsIotProvisioning_RegisterThing(IotMqttConnection_t connection, const AwsIotProvisioningRegisterThingRequestInfo_t *pProvisioningDataInfo, uint32_t timeoutMs, const AwsIotProvisioningRegisterThingCallbackInfo_t *pResponseCallback)
Requests the AWS IoT Core service to register the device, and invokes the user-defined callback with ...
Definition: aws_iot_provisioning_api.c:865
IotMqttQos_t
struct _mqttConnection * IotMqttConnection_t
AwsIotProvisioningError_t AwsIotProvisioning_Init(uint32_t mqttTimeout)
One-time initialization function for the Provisioning library.
Definition: aws_iot_provisioning_api.c:483
void AwsIotProvisioning_Cleanup(void)
One-time deinitialization function for the Provisioning library.
Definition: aws_iot_provisioning_api.c:1035
AwsIotProvisioningError_t AwsIotProvisioning_CreateKeysAndCertificate(IotMqttConnection_t connection, uint32_t flags, uint32_t timeoutMs, const AwsIotProvisioningCreateKeysAndCertificateCallbackInfo_t *pResponseCallback)
Requests a new public-private key pair and certificate for the device from AWS IoT Core and invokes t...
Definition: aws_iot_provisioning_api.c:531
Types of the Provisioning library.
AwsIotProvisioningError_t AwsIotProvisioning_CreateCertificateFromCsr(IotMqttConnection_t connection, IotMqttQos_t operationQos, const char *pCertificateSigningRequest, size_t csrLength, uint32_t timeoutMs, const AwsIotProvisioningCreateCertFromCsrCallbackInfo_t *pResponseCallback)
Requests the AWS IoT Core service for a certificate by sending a Certificate-Signing Request...
Definition: aws_iot_provisioning_api.c:670
Aggregates information required for sending a request to the AWS IoT Core service for provisioning a ...
Definition: aws_iot_provisioning_types.h:238
User-specific callback information for handling server response of the Provisioning CreateCertificate...
Definition: aws_iot_provisioning_types.h:348