[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[],[],null,["# Service APIs Overview\n\nCloud Key Management Service has both traditional REST/HTTP and\n[gRPC](http://grpc.io) interfaces. If you don't want to use our\n[client libraries](/kms/docs/reference/libraries) to access the\nCloud Key Management Service API, you have the option of writing your own client libraries that\nuse its REST/HTTP or gRPC API surface. We recommend this approach only if your\nprogramming language or other needs are not met by the provided client\nlibraries.\n\ngRPC API\n--------\n\nYou can generate your own gRPC client libraries in any gRPC-supported language\nfor the Cloud Key Management Service API from its .proto service definition using these resources:\n\n- [Using gRPC with Cloud KMS](/kms/docs/grpc)\n- [Cloud KMS service definition](https://github.com/googleapis/googleapis/blob/master/google/cloud/kms/v1/service.proto)\n- [gRPC documentation](http://www.grpc.io/docs/): Everything you need to generate and use your own gRPC client code.\n- [RPC API Reference](/kms/docs/reference/rpc): Language-independent overview of the RPC surface.\n\nREST/HTTP API\n-------------\n\nThere are a number of options for interacting with a service's REST interface.\nTo create your own clients, use the following resources:\n\n- [REST API Reference](/kms/docs/reference/rest)\n- [Guidelines for working with Google HTTP APIs](https://cloud.google.com/apis/docs/http)\n- [API Discovery Service](https://developers.google.com/discovery/v1/getting_started): Exposes machine readable metadata about the REST/HTTP API surface, useful for creating client libraries, tools, and plugins.\n- [Directory of client samples](https://developers.google.com/discovery/libraries) built with REST/HTTP APIs and the Google API Discovery Service.\n\nService Endpoints\n-----------------\n\nCloud KMS has global and regional service endpoints. The global\nREST/HTTP endpoint is `https://cloudkms.googleapis.com` and the\nglobal gRPC endpoint is `cloudkms.googleapis.com`. The global\nendpoint routes requests to a regional service in the\n[location](/kms/docs/locations) specified by the resource name.\n\nThe regional REST/HTTP endpoints are\n`https://`**\u003cregion\u003e**`-cloudkms.googleapis.com` and the\nregional gRPC endpoints are\n**\u003cregion\u003e**`-cloudkms.googleapis.com`, substituting\n**\u003cregion\u003e** for any of the supported regional,\ndual-regional, or multi-regional\n[Cloud KMS locations](/kms/docs/locations). These endpoints are isolated by\nlocation, meaning each endpoint routes requests to a regional service in the\nlocation specified by the endpoint name. If the location specified by the\nresource name doesn't match the location specified by the endpoint, the request\nwill fail."]]