A category of Azure services for internet of things devices.
Hello @Madanala, Jayashree ,
Welcome to this forum! Thanks for posting this query on using Azure IoTHub with Java stack! I hope the below info helps with your initial query!
What Java SDK and Rest API we need to use to deploy our own container and what is sdk or apis we need to use to configure create options for IoT Edge modules.
Below Are the Prerequisites:
- A free or standard-tier IoT Hub in Azure.
- A device running Azure IoT Edge with Linux containers. You can use the quickstarts to set up a Linux device or Windows device.
- A container registry, like Azure Container Registry.
- Visual Studio Code configured with the Azure IoT Tools.
- Docker CE configured to run Linux containers.
**To develop an IoT Edge module in Java, install the following additional prerequisites on your development machine:
Java Extension Pack for Visual Studio Code.
Java SE Development Kit 11, and set the JAVA_HOME environment variable to point to your JDK installation.

Any sample code can you please share
Please share the rest apis to use or sdk apis to use, any examples will help us.
We have great samples on Java stack: Please do explore over here: Samples
- Device SDK Samples (When communicating from Device Side i.e D2C)
- Service SDK Samples (When communicating from the backend application via IoTHub i.e C2D)
- Provisioning SDK Samples (Manging the Device lifecycle such as provisioning)
- Azure IoT SDK Logging
I dont want to add new module through azure portal. I want to add modules from the java code with environment variables and create options everything from our code.
Please follow this Github page: Microsoft Azure IoT SDKs for Java
Also how can i create secrets(username and password) for the modules in azure iot edge.
Correct me if you are referring to the Device Authentication methods: Please follow the below link for the documentation to choose your authentication method.
Register device with IoT Hub

You may post different questions\threads during your journey so that the community can help you quickly!
Please comment in the below section for further help in this matter, happy to help.
Please accept the helpful response as 'Answer', which will be helpful to others as well with similar questions