As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Servicedirectory v1beta1 API

class google.cloud.servicedirectory_v1beta1.types.CreateEndpointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.CreateEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateEndpoint].

parent

Required. The resource name of the service that this endpoint provides.

Type

str

endpoint_id

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.

Type

str

endpoint

Required. A endpoint with initial fields set.

Type

google.cloud.servicedirectory_v1beta1.types.Endpoint

class google.cloud.servicedirectory_v1beta1.types.CreateNamespaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.CreateNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateNamespace].

parent

Required. The resource name of the project and location the namespace will be created in.

Type

str

namespace_id

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.

Type

str

namespace

Required. A namespace with initial fields set.

Type

google.cloud.servicedirectory_v1beta1.types.Namespace

class google.cloud.servicedirectory_v1beta1.types.CreateServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.CreateService][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateService].

parent

Required. The resource name of the namespace this service will belong to.

Type

str

service_id

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.

Type

str

service

Required. A service with initial fields set.

Type

google.cloud.servicedirectory_v1beta1.types.Service

class google.cloud.servicedirectory_v1beta1.types.DeleteEndpointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.DeleteEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteEndpoint].

name

Required. The name of the endpoint to delete.

Type

str

class google.cloud.servicedirectory_v1beta1.types.DeleteNamespaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.DeleteNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteNamespace].

name

Required. The name of the namespace to delete.

Type

str

class google.cloud.servicedirectory_v1beta1.types.DeleteServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.DeleteService][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteService].

name

Required. The name of the service to delete.

Type

str

class google.cloud.servicedirectory_v1beta1.types.Endpoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An individual endpoint that provides a [service][google.cloud.servicedirectory.v1beta1.Service]. The service must already exist to create an endpoint.

name

Immutable. The resource name for the endpoint in the format projects/*/locations/*/namespaces/*/services/*/endpoints/*.

Type

str

address

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.

Type

str

port

Optional. Service Directory rejects values outside of [0, 65535].

Type

int

metadata

Optional. Metadata for the endpoint. This data can be consumed by service clients.

Restrictions:

  • The entire metadata dictionary may contain up to 512 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected

  • Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected

  • The (*.)google.com/ and (*.)googleapis.com/ prefixes are reserved for system metadata managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system

Note: This field is equivalent to the annotations field in the v1 API. They have the same syntax and read/write to the same location in Service Directory.

Type

Sequence[google.cloud.servicedirectory_v1beta1.types.Endpoint.MetadataEntry]

network

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).

Type

str

create_time

Output only. The timestamp when the endpoint was created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. The timestamp when the endpoint was last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.servicedirectory_v1beta1.types.GetEndpointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.GetEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.GetEndpoint]. This should not be used to lookup endpoints at runtime. Instead, use the resolve method.

name

Required. The name of the endpoint to get.

Type

str

class google.cloud.servicedirectory_v1beta1.types.GetNamespaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.GetNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.GetNamespace].

name

Required. The name of the namespace to retrieve.

Type

str

class google.cloud.servicedirectory_v1beta1.types.GetServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.GetService][google.cloud.servicedirectory.v1beta1.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

Required. The name of the service to get.

Type

str

class google.cloud.servicedirectory_v1beta1.types.ListEndpointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints].

parent

Required. The resource name of the service whose endpoints you’d like to list.

Type

str

page_size

Optional. The maximum number of items to return.

Type

int

page_token

Optional. The next_page_token value returned from a previous List request, if any.

Type

str

filter

Optional. The filter to list results by.

General filter string syntax: <field> <operator> <value> (<logical connector>)

  • <field> can be name, address, port, or metadata.<key> for map field

  • <operator> can be <, >, <=, >=, !=, =, :. Of which : means HAS, and is roughly the same as =

  • <value> must be the same data type as field

  • <logical connector> can be AND, OR, NOT

Examples of valid filters:

  • metadata.owner returns endpoints that have a metadata with the key owner, this is the same as metadata:owner

  • metadata.protocol=gRPC returns endpoints that have key/value protocol=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 have owner in metadata key but value is not sd AND have key/value foo=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.

Type

str

order_by

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.

Type

str

class google.cloud.servicedirectory_v1beta1.types.ListEndpointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response message for [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints].

endpoints

The list of endpoints.

Type

Sequence[google.cloud.servicedirectory_v1beta1.types.Endpoint]

next_page_token

Token to retrieve the next page of results, or empty if there are no more results in the list.

Type

str

property raw_page
class google.cloud.servicedirectory_v1beta1.types.ListNamespacesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.ListNamespaces][google.cloud.servicedirectory.v1beta1.RegistrationService.ListNamespaces].

parent

Required. The resource name of the project and location whose namespaces you’d like to list.

Type

str

page_size

Optional. The maximum number of items to return.

Type

int

page_token

Optional. The next_page_token value returned from a previous List request, if any.

Type

str

filter

Optional. The filter to list results by.

General filter string syntax: <field> <operator> <value> (<logical connector>)

  • <field> can be name or labels.<key> for map field

  • <operator> can be <, >, <=, >=, !=, =, :. Of which : means HAS, and is roughly the same as =

  • <value> must be the same data type as field

  • <logical connector> can be AND, OR, NOT

Examples of valid filters:

  • labels.owner returns namespaces that have a label with the key owner, this is the same as labels:owner

  • labels.owner=sd returns namespaces that have key/value owner=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 have owner in label key but value is not sd AND have key/value foo=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.

Type

str

order_by

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.

Type

str

class google.cloud.servicedirectory_v1beta1.types.ListNamespacesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response message for [RegistrationService.ListNamespaces][google.cloud.servicedirectory.v1beta1.RegistrationService.ListNamespaces].

namespaces

The list of namespaces.

Type

Sequence[google.cloud.servicedirectory_v1beta1.types.Namespace]

next_page_token

Token to retrieve the next page of results, or empty if there are no more results in the list.

Type

str

property raw_page
class google.cloud.servicedirectory_v1beta1.types.ListServicesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.ListServices][google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices].

parent

Required. The resource name of the namespace whose services you’d like to list.

Type

str

page_size

Optional. The maximum number of items to return.

Type

int

page_token

Optional. The next_page_token value returned from a previous List request, if any.

Type

str

filter

Optional. The filter to list results by.

General filter string syntax: <field> <operator> <value> (<logical connector>)

  • <field> can be name or metadata.<key> for map field

  • <operator> can be <, >, <=, >=, !=, =, :. Of which : means HAS, and is roughly the same as =

  • <value> must be the same data type as field

  • <logical connector> can be AND, OR, NOT

Examples of valid filters:

  • metadata.owner returns services that have a metadata with the key owner, this is the same as metadata:owner

  • metadata.protocol=gRPC returns services that have key/value protocol=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 have owner in metadata key but value is not sd AND have key/value foo=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.

Type

str

order_by

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.

Type

str

class google.cloud.servicedirectory_v1beta1.types.ListServicesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response message for [RegistrationService.ListServices][google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices].

services

The list of services.

Type

Sequence[google.cloud.servicedirectory_v1beta1.types.Service]

next_page_token

Token to retrieve the next page of results, or empty if there are no more results in the list.

Type

str

property raw_page
class google.cloud.servicedirectory_v1beta1.types.Namespace(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A container for [services][google.cloud.servicedirectory.v1beta1.Service]. Namespaces allow administrators to group services together and define permissions for a collection of services.

name

Immutable. The resource name for the namespace in the format projects/*/locations/*/namespaces/*.

Type

str

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.

Type

Sequence[google.cloud.servicedirectory_v1beta1.types.Namespace.LabelsEntry]

create_time

Output only. The timestamp when the namespace was created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. The timestamp when the namespace was last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.servicedirectory_v1beta1.types.ResolveServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [LookupService.ResolveService][google.cloud.servicedirectory.v1beta1.LookupService.ResolveService]. Looks up a service by its name, returns the service and its endpoints.

name

Required. The name of the service to resolve.

Type

str

max_endpoints

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.

Type

int

endpoint_filter

Optional. The filter applied to the endpoints of the resolved service.

General filter string syntax: <field> <operator> <value> (<logical connector>)

  • <field> can be name, address, port, or metadata.<key> for map field

  • <operator> can be <, >, <=, >=, !=, =, :. Of which : means HAS, and is roughly the same as =

  • <value> must be the same data type as field

  • <logical connector> can be AND, OR, NOT

Examples of valid filters:

  • metadata.owner returns endpoints that have a annotation with the key owner, this is the same as metadata:owner

  • metadata.protocol=gRPC returns endpoints that have key/value protocol=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 have owner in annotation key but value is not sd AND have key/value foo=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.

Type

str

class google.cloud.servicedirectory_v1beta1.types.ResolveServiceResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response message for [LookupService.ResolveService][google.cloud.servicedirectory.v1beta1.LookupService.ResolveService].

service
Type

google.cloud.servicedirectory_v1beta1.types.Service

class google.cloud.servicedirectory_v1beta1.types.Service(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An individual service. A service contains a name and optional metadata. A service must exist before [endpoints][google.cloud.servicedirectory.v1beta1.Endpoint] can be added to it.

name

Immutable. The resource name for the service in the format projects/*/locations/*/namespaces/*/services/*.

Type

str

metadata

Optional. Metadata for the service. This data can be consumed by service clients.

Restrictions:

  • The entire metadata dictionary may contain up to 2000 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected

  • Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected

  • The (*.)google.com/ and (*.)googleapis.com/ prefixes are reserved for system metadata managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system

Note: This field is equivalent to the annotations field in the v1 API. They have the same syntax and read/write to the same location in Service Directory.

Type

Sequence[google.cloud.servicedirectory_v1beta1.types.Service.MetadataEntry]

endpoints

Output only. Endpoints associated with this service. Returned on [LookupService.ResolveService][google.cloud.servicedirectory.v1beta1.LookupService.ResolveService]. Control plane clients should use [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints].

Type

Sequence[google.cloud.servicedirectory_v1beta1.types.Endpoint]

create_time

Output only. The timestamp when the service was created.

Type

google.protobuf.timestamp_pb2.Timestamp

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.

Type

google.protobuf.timestamp_pb2.Timestamp

class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.servicedirectory_v1beta1.types.UpdateEndpointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.UpdateEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateEndpoint].

endpoint

Required. The updated endpoint.

Type

google.cloud.servicedirectory_v1beta1.types.Endpoint

update_mask

Required. List of fields to be updated in this request.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.cloud.servicedirectory_v1beta1.types.UpdateNamespaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.UpdateNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateNamespace].

namespace

Required. The updated namespace.

Type

google.cloud.servicedirectory_v1beta1.types.Namespace

update_mask

Required. List of fields to be updated in this request.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.cloud.servicedirectory_v1beta1.types.UpdateServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request message for [RegistrationService.UpdateService][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateService].

service

Required. The updated service.

Type

google.cloud.servicedirectory_v1beta1.types.Service

update_mask

Required. List of fields to be updated in this request.

Type

google.protobuf.field_mask_pb2.FieldMask