获取证书列表_证书API列表_API参考_开发指南_CodePipeline

阿里云产品文档 xtyly 4年前 (2016-11-09) 5次浏览 已收录 0个评论

描述说明:获取Codepipeline中的用户证书列表。请求信息请求行 RequestLine

  1. GET /credential HTTP/1.1

请求行参数 URI Param无返回信息返回行 ResponseLine

  1. HTTP/1.1 200 OK

返回码 HTTP Status Code

Status Code 描述 204 No Content 401 Authentication failed 403 The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account of some sort. 500 Internal Error

返回体 ResponseBody

  1. {
  2. "Credentials": [
  3. {
  4. "CredentialId": "string",
  5. "CredentialType": "string"
  6. }
  7. ],
  8. "RequestId": "string"
  9. }

返回体解释

名称 类型 描述 CredentialId String 证书Id CredentialType Long 证书类型

Java示例代码:

  1. GetCredentialsRequest getCredentialsRequest = new GetCredentialsRequest();
  2. try {
  3. getCredentialsRequest.setAcceptFormat(FormatType.JSON);
  4. GetCredentialsResponse getCredentialsResponse = client.getAcsResponse(getCredentialsRequest);
  5. List<GetCredentialsResponse.Credential> ss = getCredentialsResponse.getCredentials();
  6. for (GetCredentialsResponse.Credential s : ss) {
  7. System.out.println(s.getCredentialId() + " " + s.getCredentialType());
  8. }
  9. System.out.println(getCredentialsResponse.getRequestId());
  10. } catch (Exception e) {
  11. e.printStackTrace();
  12. }

输出:

  1. demo-id UsernamePasswordCredentials
  2. demo-ssh-id SSHCredentials
  3. demo-registry-id DockerRegistryCredentials
  4. demo-docker-id DockerServerCredentials
  5. 05B62FAA-DB7F-4A08-A8D4-20FE5BC531CB

获取证书列表_证书API列表_API参考_开发指南_CodePipeline


阿里云百科网 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:获取证书列表_证书API列表_API参考_开发指南_CodePipeline
喜欢 (0)
[sp91@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址