Obtaining SDK Sample Code
Huawei Cloud allows you to obtain the SDK sample code of an API in the following ways to simplify SDK usage and improve development efficiency.
API Explorer can dynamically generate SDK sample code as needed and supports multiple programming languages. You are advised to use API Explorer to obtain the SDK sample code.
Obtaining SDK Sample Code Through API Explorer
- On the DMS for Kafka page in API Explorer, select the API for which you want to generate the SDK sample code.
- In the parameter configuration interface in the middle, enter the parameters required to call the API. For details about parameter settings, click the Documentation tab on the right.
- On the right of the page, click the Sample Code tab to view and obtain the SDK sample code in the corresponding programming language, as shown in Figure 1.
Obtaining SDK Sample Code from the API Reference
- In the API Reference of Kafka, locate the API page from which you want to obtain the SDK sample code.
- In the navigation tree on the right, click SDK Sample Code to view the SDK sample code, as shown in Figure 2.
The current document provides only the SDK sample code in Java, Python, and Go. The sample code is generated based on the example request values. If you need sample code in other programming languages or want to set custom parameters in the sample code, see Obtaining SDK Sample Code Through API Explorer.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot

