Index
-
LookupService
(interface) -
RegistrationService
(interface) -
CreateEndpointRequest
(message) -
CreateNamespaceRequest
(message) -
CreateServiceRequest
(message) -
DeleteEndpointRequest
(message) -
DeleteNamespaceRequest
(message) -
DeleteServiceRequest
(message) -
Endpoint
(message) -
GetEndpointRequest
(message) -
GetNamespaceRequest
(message) -
GetServiceRequest
(message) -
ListEndpointsRequest
(message) -
ListEndpointsResponse
(message) -
ListNamespacesRequest
(message) -
ListNamespacesResponse
(message) -
ListServicesRequest
(message) -
ListServicesResponse
(message) -
Namespace
(message) -
ResolveServiceRequest
(message) -
ResolveServiceResponse
(message) -
Service
(message) -
UpdateEndpointRequest
(message) -
UpdateNamespaceRequest
(message) -
UpdateServiceRequest
(message)
LookupService
Service Directory API for looking up service data at runtime.
rpc ResolveService(
ResolveServiceRequest
) returns ( ResolveServiceResponse
)
Returns a service
and its associated endpoints. Resolving a service is not considered an active developer method.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
RegistrationService
Service Directory API for registering services. It defines the following resource model:
-
The API has a collection of
Namespace
resources, namedprojects/*/locations/*/namespaces/*
. -
Each Namespace has a collection of
Service
resources, namedprojects/*/locations/*/namespaces/*/services/*
. -
Each Service has a collection of
Endpoint
resources, namedprojects/*/locations/*/namespaces/*/services/*/endpoints/*
.
rpc CreateEndpoint(
CreateEndpointRequest
) returns ( Endpoint
)
Creates an endpoint, and returns the new endpoint.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc CreateNamespace(
CreateNamespaceRequest
) returns ( Namespace
)
Creates a namespace, and returns the new namespace.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc CreateService(
CreateServiceRequest
) returns ( Service
)
Creates a service, and returns the new service.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc DeleteEndpoint(
DeleteEndpointRequest
) returns ( Empty
)
Deletes an endpoint.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc DeleteNamespace(
DeleteNamespaceRequest
) returns ( Empty
)
Deletes a namespace. This also deletes all services and endpoints in the namespace.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc DeleteService(
DeleteServiceRequest
) returns ( Empty
)
Deletes a service. This also deletes all endpoints associated with the service.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc GetEndpoint(
GetEndpointRequest
) returns ( Endpoint
)
Gets an endpoint.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc GetIamPolicy(
GetIamPolicyRequest
) returns ( Policy
)
Gets the IAM Policy for a resource (namespace or service only).
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc GetNamespace(
GetNamespaceRequest
) returns ( Namespace
)
Gets a namespace.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc GetService(
GetServiceRequest
) returns ( Service
)
Gets a service.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc ListEndpoints(
ListEndpointsRequest
) returns ( ListEndpointsResponse
)
Lists all endpoints.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc ListNamespaces(
ListNamespacesRequest
) returns ( ListNamespacesResponse
)
Lists all namespaces.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc ListServices(
ListServicesRequest
) returns ( ListServicesResponse
)
Lists all services belonging to a namespace.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc SetIamPolicy(
SetIamPolicyRequest
) returns ( Policy
)
Sets the IAM Policy for a resource (namespace or service only).
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc TestIamPermissions(
TestIamPermissionsRequest
) returns ( TestIamPermissionsResponse
)
Tests IAM permissions for a resource (namespace or service only).
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc UpdateEndpoint(
UpdateEndpointRequest
) returns ( Endpoint
)
Updates an endpoint.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc UpdateNamespace(
UpdateNamespaceRequest
) returns ( Namespace
)
Updates a namespace.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc UpdateService(
UpdateServiceRequest
) returns ( Service
)
Updates a service.
- Authorization Scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
CreateEndpointRequest
The request message for RegistrationService.CreateEndpoint
.
parent
string
Required. The resource name of the service that this endpoint provides.
Authorization requires the following IAM
permission on the specified resource parent
:
-
servicedirectory.endpoints.create
endpoint_id
string
Required. The Resource ID must be 1-63 characters long, and comply with RFC1035
. Specifically, the name must be 1-63 characters long and match the regular expression [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
endpoint
Required. A endpoint with initial fields set.
CreateNamespaceRequest
The request message for RegistrationService.CreateNamespace
.
parent
string
Required. The resource name of the project and location the namespace will be created in.
Authorization requires the following IAM
permission on the specified resource parent
:
-
servicedirectory.namespaces.create
namespace_id
string
Required. The Resource ID must be 1-63 characters long, and comply with RFC1035
. Specifically, the name must be 1-63 characters long and match the regular expression [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
namespace
Required. A namespace with initial fields set.
CreateServiceRequest
The request message for RegistrationService.CreateService
.
parent
string
Required. The resource name of the namespace this service will belong to.
Authorization requires the following IAM
permission on the specified resource parent
:
-
servicedirectory.services.create
service_id
string
Required. The Resource ID must be 1-63 characters long, and comply with RFC1035
. Specifically, the name must be 1-63 characters long and match the regular expression [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
service
Required. A service with initial fields set.
DeleteEndpointRequest
The request message for RegistrationService.DeleteEndpoint
.
name
string
Required. The name of the endpoint to delete.
Authorization requires the following IAM
permission on the specified resource name
:
-
servicedirectory.endpoints.delete
DeleteNamespaceRequest
The request message for RegistrationService.DeleteNamespace
.
name
string
Required. The name of the namespace to delete.
Authorization requires the following IAM
permission on the specified resource name
:
-
servicedirectory.namespaces.delete
DeleteServiceRequest
The request message for RegistrationService.DeleteService
.
name
string
Required. The name of the service to delete.
Authorization requires the following IAM
permission on the specified resource name
:
-
servicedirectory.services.delete
Endpoint
An individual endpoint that provides a service
. The service must already exist to create an endpoint.
name
string
Immutable. The resource name for the endpoint in the format projects/*/locations/*/namespaces/*/services/*/endpoints/*
.
address
string
Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses like:
-
8.8.8
-
8.8.8.8:53
-
test:bad:address
-
[::1]
-
[::1]:8080
Limited to 45 characters.
port
int32
Optional. Service Directory rejects values outside of [0, 65535]
.
network
string
Immutable. The Google Compute Engine network (VPC) of the endpoint in the format projects/<project number>/locations/global/networks/*
.
The project must be specified by project number (project id is rejected). Incorrectly formatted networks are rejected, but no other validation is performed on this field (ex. network or project existence, reachability, or permissions).
create_time
Output only. The timestamp when the endpoint was created.
update_time
Output only. The timestamp when the endpoint was last updated.
GetEndpointRequest
The request message for RegistrationService.GetEndpoint
. This should not be used to lookup endpoints at runtime. Instead, use the resolve
method.
name
string
Required. The name of the endpoint to get.
Authorization requires the following IAM
permission on the specified resource name
:
-
servicedirectory.endpoints.get
GetNamespaceRequest
The request message for RegistrationService.GetNamespace
.
name
string
Required. The name of the namespace to retrieve.
Authorization requires the following IAM
permission on the specified resource name
:
-
servicedirectory.namespaces.get
GetServiceRequest
The request message for RegistrationService.GetService
. This should not be used for looking up a service. Insead, use the resolve
method as it contains all endpoints and associated metadata.
name
string
Required. The name of the service to get.
Authorization requires the following IAM
permission on the specified resource name
:
-
servicedirectory.services.get
ListEndpointsRequest
The request message for RegistrationService.ListEndpoints
.
parent
string
Required. The resource name of the service whose endpoints you'd like to list.
Authorization requires the following IAM
permission on the specified resource parent
:
-
servicedirectory.endpoints.list
page_size
int32
Optional. The maximum number of items to return.
page_token
string
Optional. The next_page_token value returned from a previous List request, if any.
filter
string
Optional. The filter to list results by.
General filter
string syntax: <field> <operator> <value> (<logical connector>)
-
<field>
can bename
,address
,port
, ormetadata.<key>
for map field -
<operator>
can be<
,>
,<=
,>=
,!=
,=
,:
. Of which:
meansHAS
, and is roughly the same as=
-
<value>
must be the same data type as field -
<logical connector>
can beAND
,OR
,NOT
Examples of valid filters:
-
metadata.owner
returns endpoints that have a metadata with the keyowner
, this is the same asmetadata:owner
-
metadata.protocol=gRPC
returns endpoints that have key/valueprotocol=gRPC
-
address=192.108.1.105
returns endpoints that have this address -
port>8080
returns endpoints that have port number larger than 8080 *name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c
returns endpoints that have name that is alphabetically later than the string, so "endpoint-e" is returned but "endpoint-a" is not -
metadata.owner!=sd AND metadata.foo=bar
returns endpoints that haveowner
in metadata key but value is notsd
AND have key/valuefoo=bar
-
doesnotexist.foo=bar
returns an empty list. Note that endpoint doesn't have a field called "doesnotexist". Since the filter does not match any endpoints, it returns no results
For more information about filtering, see API Filtering .
order_by
string
Optional. The order to list results by.
General order_by
string syntax: <field> (<asc|desc>) (,)
-
<field>
allows values:name
,address
,port
-
<asc|desc>
ascending or descending order by<field>
. If this is left blank,asc
is used
Note that an empty order_by
string results in default order, which is order by name
in ascending order.
ListEndpointsResponse
The response message for RegistrationService.ListEndpoints
.
Fields | |
---|---|
endpoints[]
|
The list of endpoints. |
next_page_token
|
Token to retrieve the next page of results, or empty if there are no more results in the list. |
ListNamespacesRequest
The request message for RegistrationService.ListNamespaces
.
parent
string
Required. The resource name of the project and location whose namespaces you'd like to list.
Authorization requires the following IAM
permission on the specified resource parent
:
-
servicedirectory.namespaces.list
page_size
int32
Optional. The maximum number of items to return.
page_token
string
Optional. The next_page_token value returned from a previous List request, if any.
filter
string
Optional. The filter to list results by.
General filter
string syntax: <field> <operator> <value> (<logical connector>)
-
<field>
can bename
orlabels.<key>
for map field -
<operator>
can be<
,>
,<=
,>=
,!=
,=
,:
. Of which:
meansHAS
, and is roughly the same as=
-
<value>
must be the same data type as field -
<logical connector>
can beAND
,OR
,NOT
Examples of valid filters:
-
labels.owner
returns namespaces that have a label with the keyowner
, this is the same aslabels:owner
-
labels.owner=sd
returns namespaces that have key/valueowner=sd
-
name>projects/my-project/locations/us-east1/namespaces/namespace-c
returns namespaces that have name that is alphabetically later than the string, so "namespace-e" is returned but "namespace-a" is not -
labels.owner!=sd AND labels.foo=bar
returns namespaces that haveowner
in label key but value is notsd
AND have key/valuefoo=bar
-
doesnotexist.foo=bar
returns an empty list. Note that namespace doesn't have a field called "doesnotexist". Since the filter does not match any namespaces, it returns no results
For more information about filtering, see API Filtering .
order_by
string
Optional. The order to list results by.
General order_by
string syntax: <field> (<asc|desc>) (,)
-
<field>
allows value:name
-
<asc|desc>
ascending or descending order by<field>
. If this is left blank,asc
is used
Note that an empty order_by
string results in default order, which is order by name
in ascending order.
ListNamespacesResponse
The response message for RegistrationService.ListNamespaces
.
Fields | |
---|---|
namespaces[]
|
The list of namespaces. |
next_page_token
|
Token to retrieve the next page of results, or empty if there are no more results in the list. |
ListServicesRequest
The request message for RegistrationService.ListServices
.
parent
string
Required. The resource name of the namespace whose services you'd like to list.
Authorization requires the following IAM
permission on the specified resource parent
:
-
servicedirectory.services.list
page_size
int32
Optional. The maximum number of items to return.
page_token
string
Optional. The next_page_token value returned from a previous List request, if any.
filter
string
Optional. The filter to list results by.
General filter
string syntax: <field> <operator> <value> (<logical connector>)
-
<field>
can bename
ormetadata.<key>
for map field -
<operator>
can be<
,>
,<=
,>=
,!=
,=
,:
. Of which:
meansHAS
, and is roughly the same as=
-
<value>
must be the same data type as field -
<logical connector>
can beAND
,OR
,NOT
Examples of valid filters:
-
metadata.owner
returns services that have a metadata with the keyowner
, this is the same asmetadata:owner
-
metadata.protocol=gRPC
returns services that have key/valueprotocol=gRPC
*name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c
returns services that have name that is alphabetically later than the string, so "service-e" is returned but "service-a" is not -
metadata.owner!=sd AND metadata.foo=bar
returns services that haveowner
in metadata key but value is notsd
AND have key/valuefoo=bar
-
doesnotexist.foo=bar
returns an empty list. Note that service doesn't have a field called "doesnotexist". Since the filter does not match any services, it returns no results
For more information about filtering, see API Filtering .
order_by
string
Optional. The order to list results by.
General order_by
string syntax: <field> (<asc|desc>) (,)
-
<field>
allows value:name
-
<asc|desc>
ascending or descending order by<field>
. If this is left blank,asc
is used
Note that an empty order_by
string results in default order, which is order by name
in ascending order.
ListServicesResponse
The response message for RegistrationService.ListServices
.
Fields | |
---|---|
services[]
|
The list of services. |
next_page_token
|
Token to retrieve the next page of results, or empty if there are no more results in the list. |
Namespace
A container for services
. Namespaces allow administrators to group services together and define permissions for a collection of services.
Fields | |
---|---|
name
|
Immutable. The resource name for the namespace in the format |
labels
|
Optional. Resource labels associated with this namespace. No more than 64 user labels can be associated with a given resource. Label keys and values can be no longer than 63 characters. |
create_time
|
Output only. The timestamp when the namespace was created. |
update_time
|
Output only. The timestamp when the namespace was last updated. |
ResolveServiceRequest
The request message for LookupService.ResolveService
. Looks up a service by its name, returns the service and its endpoints.
name
string
Required. The name of the service to resolve.
Authorization requires the following IAM
permission on the specified resource name
:
-
servicedirectory.services.resolve
max_endpoints
int32
Optional. The maximum number of endpoints to return. Defaults to 25. Maximum is 100. If a value less than one is specified, the Default is used. If a value greater than the Maximum is specified, the Maximum is used.
endpoint_filter
string
Optional. The filter applied to the endpoints of the resolved service.
General filter
string syntax: <field> <operator> <value> (<logical connector>)
-
<field>
can bename
,address
,port
, ormetadata.<key>
for map field -
<operator>
can be<
,>
,<=
,>=
,!=
,=
,:
. Of which:
meansHAS
, and is roughly the same as=
-
<value>
must be the same data type as field -
<logical connector>
can beAND
,OR
,NOT
Examples of valid filters:
-
metadata.owner
returns endpoints that have a annotation with the keyowner
, this is the same asmetadata:owner
-
metadata.protocol=gRPC
returns endpoints that have key/valueprotocol=gRPC
-
address=192.108.1.105
returns endpoints that have this address -
port>8080
returns endpoints that have port number larger than 8080 *name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c
returns endpoints that have name that is alphabetically later than the string, so "endpoint-e" is returned but "endpoint-a" is not -
metadata.owner!=sd AND metadata.foo=bar
returns endpoints that haveowner
in annotation key but value is notsd
AND have key/valuefoo=bar
-
doesnotexist.foo=bar
returns an empty list. Note that endpoint doesn't have a field called "doesnotexist". Since the filter does not match any endpoint, it returns no results
For more information about filtering, see API Filtering .
ResolveServiceResponse
The response message for LookupService.ResolveService
.
Fields | |
---|---|
service
|
Service
An individual service. A service contains a name and optional metadata. A service must exist before endpoints
can be added to it.
name
string
Immutable. The resource name for the service in the format projects/*/locations/*/namespaces/*/services/*
.
endpoints[]
Output only. Endpoints associated with this service. Returned on LookupService.ResolveService
. Control plane clients should use RegistrationService.ListEndpoints
.
create_time
Output only. The timestamp when the service was created.
update_time
Output only. The timestamp when the service was last updated. Note: endpoints being created/deleted/updated within the service are not considered service updates for the purpose of this timestamp.
UpdateEndpointRequest
The request message for RegistrationService.UpdateEndpoint
.
UpdateNamespaceRequest
The request message for RegistrationService.UpdateNamespace
.
UpdateServiceRequest
The request message for RegistrationService.UpdateService
.