云服务器内容精选

  • 在线生成SDK代码 API Explorer的代码示例能根据需要填写参数后动态生成SDK代码,降低您使用SDK的难度,推荐使用。 GES在API Explorer仅对接常用Region供用户调试,若动态生成代码的客户端初始化使用的Region不满足使用场景,可参考如下代码: // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); String projectId = "project_id"; ICredential auth = new BasicCredentials() .withProjectId(projectId) .withAk(ak) .withSk(sk) .withIamEndpoint("{{iamEndpoint}}"); GesClient gesClient = GesClient.newBuilder() .withCredential(auth) .withEndpoints(Arrays.asList("{{gesEndpoint}}")) .build(); 父主题: 使用管理面SDK
  • SDK列表 表1为您提供了GES服务支持的SDK列表,您可以在GitHub仓库查看SDK更新历史,获取安装包以及查看指导文档进行配置。 表1 SDK列表 编程语言 Github地址 参考文档 Java huaweicloud-sdk-java-v3 Java SDK使用指导 Python huaweicloud-sdk-python-v3 Python SDK使用指导 Go huaweicloud-sdk-go-v3 Go SDK使用指导 父主题: 使用管理面SDK