Skip to content

Commit d383ba0

Browse files
committed
Edits
1 parent ede8014 commit d383ba0

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

includes/iot-hub-howto-auth-device-cert-python.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ ms.date: 12/06/2024
1414
To connect a device to IoT Hub using an X.509 certificate:
1515

1616
1. Use [create_from_x509_certificate](/python/api/azure-iot-device/azure.iot.device.iothubdeviceclient?#azure-iot-device-iothubdeviceclient-create-from-x509-certificate) to add the X.509 certificate parameters
17-
1817
1. Call [connect](/python/api/azure-iot-device/azure.iot.device.iothubdeviceclient?#azure-iot-device-iothubdeviceclient-connect) to connect the device client
1918

2019
This example shows certificate input parameter values as local variables for clarity. In a production system, store sensitive input parameters in environment variables or another more secure storage location. For example, use `os.getenv("HOSTNAME")` to read the host name environment variable.

includes/iot-hub-howto-file-upload-dotnet.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,7 @@ while (true)
181181
await notificationReceiver.CompleteAsync(fileUploadNotification);
182182
}
183183
```
184+
185+
### SDK file upload receiver sample
186+
187+
The SDK includes this [file upload receiver sample](https://github.com/Azure/azure-iot-sdk-csharp/blob/86065001a92fedb42877722c6a57ae37e45eed30/iothub/service/samples/getting%20started/FileUploadNotificationReceiverSample/FileUploadNotificationReceiverSample.cs).

includes/iot-hub-howto-file-upload-java.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,11 @@ This section describes how to upload a file from a device to an IoT hub using th
2424

2525
Follow this procedure to upload a file from a device to IoT hub:
2626

27-
1. Connect to the device
27+
1. Connect the device to IoT Hub
2828
1. Get a SAS URI from IoT hub
2929
1. Upload the file to Azure Storage
3030
1. Send file upload status notification to IoT hub
3131

32-
### Connection protocol
33-
34-
File upload operations always use HTTPS, but [DeviceClient](/java/api/com.microsoft.azure.sdk.iot.device.deviceclient) can define the [IotHubClientProtocol](/java/api/com.microsoft.azure.sdk.iot.device.iothubclientprotocol) for other services like telemetry, device method, and device twin.
35-
36-
```java
37-
IotHubClientProtocol protocol = IotHubClientProtocol.MQTT;
38-
```
39-
4032
### Connect a device to IoT Hub
4133

4234
A device app can authenticate with IoT Hub using the following methods:
@@ -50,6 +42,12 @@ A device app can authenticate with IoT Hub using the following methods:
5042

5143
#### Authenticate using a shared access key
5244

45+
File upload operations always use HTTPS, but [DeviceClient](/java/api/com.microsoft.azure.sdk.iot.device.deviceclient) can define the [IotHubClientProtocol](/java/api/com.microsoft.azure.sdk.iot.device.iothubclientprotocol) for other services like telemetry, device method, and device twin.
46+
47+
```java
48+
IotHubClientProtocol protocol = IotHubClientProtocol.MQTT;
49+
```
50+
5351
Instantiate the `DeviceClient` to connect to the device using the device primary connection string.
5452

5553
```java
@@ -165,7 +163,7 @@ private static final IotHubServiceClientProtocol protocol =
165163

166164
Create the [ServiceClient](/java/api/com.azure.core.annotation.serviceclient) object, supplying the Iot Hub connection string and protocol.
167165

168-
To invoke a direct method on a device through IoT Hub, your service needs the **service connect** permission. By default, every IoT Hub is created with a shared access policy named **service** that grants this permission.
166+
To upload a file on a device to IoT Hub, your service needs the **service connect** permission. By default, every IoT Hub is created with a shared access policy named **service** that grants this permission.
169167

170168
As a parameter to the `ServiceClient` constructor, supply the **service** shared access policy. For more information about shared access policies, see [Control access to IoT Hub with shared access signatures](/azure/iot-hub/authenticate-authorize-sas).
171169

includes/iot-hub-howto-file-upload-python.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ pip install azure.storage.blob
2929

3030
This section describes how to upload a file from a device to an IoT hub using the [IoTHubDeviceClient](/python/api/azure-iot-device/azure.iot.device.iothubdeviceclient) class from the Azure IoT SDK for Python.
3131

32-
Follow this procedure to upload a file from a device to IoT hub:
33-
34-
1. Connect to the device
35-
1. Get Blob Storage information
36-
1. Upload the file to Blob Storage
37-
1. Notify IoT hub of upload status
38-
3932
### Import libraries
4033

4134
```python
@@ -60,8 +53,7 @@ A device app can authenticate with IoT Hub using the following methods:
6053

6154
To connect a device to IoT Hub:
6255

63-
1. Call [create_from_connection_string](/python/api/azure-iot-device/azure.iot.device.iothubdeviceclient?#azure-iot-device-iothubdeviceclient-create-from-connection-string) to add the device primary connection string
64-
56+
1. Call [create_from_connection_string](/python/api/azure-iot-device/azure.iot.device.iothubdeviceclient?#azure-iot-device-iothubdeviceclient-create-from-connection-string) to add the device primary connection string.
6557
1. Call [connect](/python/api/azure-iot-device/azure.iot.device.iothubdeviceclient?#azure-iot-device-iothubdeviceclient-connect) to connect the device client
6658

6759
For example:

0 commit comments

Comments
 (0)