Service Directory
Register services and their endpoints in namespaces, and resolve them by name.
22Supported2Not testedof 24 methods
Control plane only: endpoints aren't health-checked, registered automatically or sent traffic.
Connect
Section titled “Connect”Requests go to $VERA_ENDPOINT/_gcp/servicedirectory/v1/. Namespaces live in a region, such as us-central1, not in global. For gcloud, add this override to the shared setup:
export CLOUDSDK_API_ENDPOINT_OVERRIDES_SERVICEDIRECTORY="$VERA_ENDPOINT/_gcp/servicedirectory/"Example
Section titled “Example”Register a service with one endpoint, then resolve it.
gcloud service-directory namespaces create example-ns --location=us-central1gcloud service-directory services create example-svc \ --namespace=example-ns --location=us-central1gcloud service-directory endpoints create example-ep \ --service=example-svc --namespace=example-ns --location=us-central1 \ --address=10.0.0.5 --port=8080gcloud service-directory services resolve example-svc \ --namespace=example-ns --location=us-central1 --format=jsonThe last command prints the service and its endpoints. The uid values differ on every run.
{ "service": { "endpoints": [ { "address": "10.0.0.5", "name": "projects/example-project/locations/us-central1/namespaces/example-ns/services/example-svc/endpoints/example-ep", "port": 8080, "uid": "95fb9a6575444c6e9f82268df6afbaec" } ], "name": "projects/example-project/locations/us-central1/namespaces/example-ns/services/example-svc", "uid": "946c83e16e8f416f85664c9510d042d8" }}Deleting the namespace also deletes its service and endpoint:
gcloud service-directory namespaces delete example-ns --location=us-central1 --quietBASE="$VERA_ENDPOINT/_gcp/servicedirectory/v1/projects/example-project/locations/us-central1"
curl -X POST "$BASE/namespaces?namespaceId=example-ns" \ -H "Content-Type: application/json" -d '{}'
curl -X POST "$BASE/namespaces/example-ns/services?serviceId=example-svc" \ -H "Content-Type: application/json" -d '{}'
curl -X POST "$BASE/namespaces/example-ns/services/example-svc/endpoints?endpointId=example-ep" \ -H "Content-Type: application/json" -d '{"address":"10.0.0.5","port":8080}'
curl -X POST "$BASE/namespaces/example-ns/services/example-svc:resolve" \ -H "Content-Type: application/json" -d '{}'The last request returns the service and its endpoints. The uid values differ on every run.
{ "service": { "endpoints": [ { "address": "10.0.0.5", "name": "projects/example-project/locations/us-central1/namespaces/example-ns/services/example-svc/endpoints/example-ep", "port": 8080, "uid": "3a9b137265374e8b87d58f879e5e1707" } ], "name": "projects/example-project/locations/us-central1/namespaces/example-ns/services/example-svc", "uid": "f3f709cd7ba94538a3d6b42f72d795b2" }}Supported features
Section titled “Supported features”- Namespaces, services and endpoints, with labels, annotations, addresses, ports and update masks validated.
- Endpoint networks in the documented
projects/PROJECT_NUMBER/locations/global/networks/NAMEform. As in Google Cloud, the network doesn’t have to exist. - Resolving a service to its endpoints, with
endpointFilterandmaxEndpoints. - Filters, ordering and page tokens on every list, following the documented grammar.
- IAM policies on namespaces and services.
- Cloud DNS zones bound to namespaces.
v1beta1requests, which Terraform’sgoogle-betaprovider andgcloud beta service-directoryuse.
Limitations
Section titled “Limitations”- No traffic or health checks. Endpoints are stored and resolved through the API only, and no DNS records are created from them.
asia-southeast3. Namespaces can be created there, butlocations.getanswers404for it andlocations.listleaves it out.- Beta-only features. On
v1beta1, workloads and beta-only fields, such as a service’sdisplayName,hostnameorownersor an endpoint’sfqdn, answer501 Not Implemented. - IAM isn’t enforced, and attaching a network needs no permission.
- Deleting a network leaves endpoints alone: they keep the reference.
API coverage
Section titled “API coverage”Measured 2 November 2026 against recorded Google Cloud responses. What the statuses mean
namespaces
8 methods · 1 not tested
| Method | Status | Notes |
|---|---|---|
| create | Supported | Use a region, not global. |
| get | Supported | |
| list | Supported | |
| patch | Supported | Requires updateMask. |
| delete | Supported | Also deletes its services and endpoints. |
| getIamPolicy | Supported | |
| setIamPolicy | Supported | |
| testIamPermissions | Not tested |
services
9 methods · 1 not tested
| Method | Status | Notes |
|---|---|---|
| create | Supported | |
| get | Supported | |
| list | Supported | |
| patch | Supported | Requires updateMask. |
| delete | Supported | |
| resolve | Supported | Honors endpointFilter and maxEndpoints. |
| getIamPolicy | Supported | |
| setIamPolicy | Supported | |
| testIamPermissions | Not tested |
endpoints
5 methods
| Method | Status | Notes |
|---|---|---|
| create | Supported | The network doesn't have to exist, as in Google Cloud. |
| get | Supported | |
| list | Supported | |
| patch | Supported | Requires updateMask. |
| delete | Supported |
locations
2 methods
| Method | Status | Notes |
|---|---|---|
| get | Supported | Answers 404 for asia-southeast3. |
| list | Supported | 42 regions. |