Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk无法获取全局可用区 #19

Open
bugking-cyw opened this issue Oct 31, 2020 · 1 comment
Open

sdk无法获取全局可用区 #19

bugking-cyw opened this issue Oct 31, 2020 · 1 comment

Comments

@bugking-cyw
Copy link

IAM api中没有获取全局可用区的api
ECS API中NovaListAvailabilityZones已经限定了region和projectId 获取到的只是当前区域项目的可用区

@DaulGitHub
Copy link

DaulGitHub commented Feb 7, 2021

This code work for me

  val config = HttpConfig.getDefaultHttpConfig()
              .withTimeout(8000)
              .withIgnoreSSLVerification(true)
  
  val credentials = GlobalCredentials()
      .withAk(ak)
      .withSk(sk)
      .withDomainId(domainId)
  
  iamClient = IamClient.newBuilder()
      .withHttpConfig(config)
      .withCredential(credentials)
      .withEndpoint(endpoint)
      .build()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants