Google Cloud KMS错误 - 您所在地区无法使用此API。 (HTTP状态 - 403)

时间:2017-05-10 11:49:09

标签: google-cloud-kms

我创建了一个Google云项目并启用了 Google Cloud Key Management Service(KMS)API 。我创建了两个密钥环。 keyring1位于us-east1keyring2位于global。我创建了以下java程序来列出该区域中的密钥环:

GoogleCredential credential = GoogleCredential.getApplicationDefault();
credential = credential.createScoped(CloudKMSScopes.all());

String keyRingPath = "projects/<<projectId>>/locations/global";

CloudKMS kms = new CloudKMS.Builder(httpTransport, jsonFactory, credential).setApplicationName("CloudKMS snippets").build();

ListKeyRingsResponse response = kms.projects().locations().keyRings().list(keyRingPath).execute();

System.out.println(response.getKeyRings());

我正在关注禁止错误:

Exception in thread "main" com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "global",
    "message" : "This API is not acessible from your region.",
    "reason" : "forbidden"
  } ],
  "message" : "This API is not acessible from your region.",
  "status" : "PERMISSION_DENIED"
}

2 个答案:

答案 0 :(得分:4)

我是一名从事Cloud KMS的工程师。

遗憾的是,在各个国家/地区提供此服务存在许多复杂问题,而且我们没有具体时间表来确定何时或是否会推出任何特定国家/地区。

任何对特定国家/地区的可用性感兴趣的人都应与我们联系,以了解是否有任何可用信息并帮助我们确定优先顺序。

答案 1 :(得分:2)

我正在尝试从印度调用Cloud KMS API。看起来Cloud KMS尚未在所有位置提供。 Cloud KMS服务尚未在印度推出。点击here以了解Cloud KMS可用的国家/地区列表。这就是我收到This API is not acessible from your region.错误

的原因
相关问题