Service Directory V1 API - Class Google::Cloud::ServiceDirectory::V1::RegistrationService::Rest::Client (v0.6.0)

Reference documentation and code samples for the Service Directory V1 API class Google::Cloud::ServiceDirectory::V1::RegistrationService::Rest::Client.

REST client for the RegistrationService service.

Service Directory API for registering services. It defines the following resource model:

  • The API has a collection of Namespace resources, named projects//locations//namespaces/.

  • Each Namespace has a collection of Service resources, named projects//locations//namespaces//services/.

  • Each Service has a collection of Endpoint resources, named projects//locations//namespaces//services//endpoints/.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the RegistrationService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all RegistrationService clients
::Google::Cloud::ServiceDirectory::V1::RegistrationService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the RegistrationService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_endpoint

def create_endpoint(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
def create_endpoint(parent: nil, endpoint_id: nil, endpoint: nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint

Creates a endpoint, and returns the new Endpoint.

Overloads
def create_endpoint(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
Pass arguments to create_endpoint via a request object, either of type CreateEndpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::CreateEndpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_endpoint(parent: nil, endpoint_id: nil, endpoint: nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
Pass arguments to create_endpoint via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the service that this endpoint provides.
  • 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 (::Google::Cloud::ServiceDirectory::V1::Endpoint, ::Hash) — Required. A endpoint with initial fields set.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#create_namespace

def create_namespace(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
def create_namespace(parent: nil, namespace_id: nil, namespace: nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace

Creates a namespace, and returns the new Namespace.

Overloads
def create_namespace(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
Pass arguments to create_namespace via a request object, either of type CreateNamespaceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::CreateNamespaceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_namespace(parent: nil, namespace_id: nil, namespace: nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
Pass arguments to create_namespace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the project and location the namespace will be created in.
  • 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 (::Google::Cloud::ServiceDirectory::V1::Namespace, ::Hash) — Required. A namespace with initial fields set.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#create_service

def create_service(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
def create_service(parent: nil, service_id: nil, service: nil) -> ::Google::Cloud::ServiceDirectory::V1::Service

Creates a service, and returns the new Service.

Overloads
def create_service(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
Pass arguments to create_service via a request object, either of type CreateServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::CreateServiceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_service(parent: nil, service_id: nil, service: nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
Pass arguments to create_service via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the namespace this service will belong to.
  • 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 (::Google::Cloud::ServiceDirectory::V1::Service, ::Hash) — Required. A service with initial fields set.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_endpoint

def delete_endpoint(request, options = nil) -> ::Google::Protobuf::Empty
def delete_endpoint(name: nil) -> ::Google::Protobuf::Empty

Deletes a endpoint.

Overloads
def delete_endpoint(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_endpoint via a request object, either of type DeleteEndpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::DeleteEndpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_endpoint(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_endpoint via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the endpoint to delete.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_namespace

def delete_namespace(request, options = nil) -> ::Google::Protobuf::Empty
def delete_namespace(name: nil) -> ::Google::Protobuf::Empty

Deletes a namespace. This also deletes all services and endpoints in the namespace.

Overloads
def delete_namespace(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_namespace via a request object, either of type DeleteNamespaceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::DeleteNamespaceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_namespace(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_namespace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the namespace to delete.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_service

def delete_service(request, options = nil) -> ::Google::Protobuf::Empty
def delete_service(name: nil) -> ::Google::Protobuf::Empty

Deletes a service. This also deletes all endpoints associated with the service.

Overloads
def delete_service(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_service via a request object, either of type DeleteServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::DeleteServiceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_service(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_service via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the service to delete.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_endpoint

def get_endpoint(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
def get_endpoint(name: nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint

Gets a endpoint.

Overloads
def get_endpoint(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
Pass arguments to get_endpoint via a request object, either of type GetEndpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::GetEndpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_endpoint(name: nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
Pass arguments to get_endpoint via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the endpoint to get.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_iam_policy

def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
def get_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policy

Gets the IAM Policy for a resource (namespace or service only).

Overloads
def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
Pass arguments to get_iam_policy via a request object, either of type Iam::V1::GetIamPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Iam::V1::GetIamPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policy
Pass arguments to get_iam_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • resource (::String) — REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
  • options (::Google::Iam::V1::GetPolicyOptions, ::Hash) — OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_namespace

def get_namespace(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
def get_namespace(name: nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace

Gets a namespace.

Overloads
def get_namespace(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
Pass arguments to get_namespace via a request object, either of type GetNamespaceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::GetNamespaceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_namespace(name: nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
Pass arguments to get_namespace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the namespace to retrieve.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_service

def get_service(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
def get_service(name: nil) -> ::Google::Cloud::ServiceDirectory::V1::Service

Gets a service.

Overloads
def get_service(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
Pass arguments to get_service via a request object, either of type GetServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::GetServiceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_service(name: nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
Pass arguments to get_service via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the service to get.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

def initialize() { |config| ... } -> Client

Create a new RegistrationService REST client object.

Yields
  • (config) — Configure the RegistrationService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_endpoints

def list_endpoints(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Endpoint>
def list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Endpoint>

Lists all endpoints.

Overloads
def list_endpoints(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Endpoint>
Pass arguments to list_endpoints via a request object, either of type ListEndpointsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::ListEndpointsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Endpoint>
Pass arguments to list_endpoints via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the service whose endpoints we'd like to list.
  • page_size (::Integer) — 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 result by.

    General filter string syntax:

    Examples of valid filters:

    • "metadata.owner" returns Endpoints that have a label 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-east/namespaces/my-namespace/services/my-service/endpoints/endpoint-c" returns Endpoints that have name that is alphabetically later than the string, so "endpoint-e" will be returned but "endpoint-a" will not be.
    • "metadata.owner!=sd AND metadata.foo=bar" returns Endpoints 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 Endpoint doesn't have a field called "doesnotexist". Since the filter does not match any Endpoints, it returns no results.
  • order_by (::String) — Optional. The order to list result by.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_namespaces

def list_namespaces(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Namespace>
def list_namespaces(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Namespace>

Lists all namespaces.

Overloads
def list_namespaces(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Namespace>
Pass arguments to list_namespaces via a request object, either of type ListNamespacesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::ListNamespacesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_namespaces(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Namespace>
Pass arguments to list_namespaces via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the project and location whose namespaces we'd like to list.
  • page_size (::Integer) — 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 result by.

    General filter string syntax:

    Examples of valid filters:

    • "labels.owner" returns Namespaces that have a label with the key "owner" this is the same as "labels:owner".
    • "labels.protocol=gRPC" returns Namespaces that have key/value "protocol=gRPC".
    • "name>projects/my-project/locations/us-east/namespaces/namespace-c" returns Namespaces that have name that is alphabetically later than the string, so "namespace-e" will be returned but "namespace-a" will not be.
    • "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.
  • order_by (::String) — Optional. The order to list result by.

    General order by string syntax:

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_services

def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Service>
def list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Service>

Lists all services belonging to a namespace.

Overloads
def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Service>
Pass arguments to list_services via a request object, either of type ListServicesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::ListServicesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Service>
Pass arguments to list_services via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the namespace whose services we'd like to list.
  • page_size (::Integer) — 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 result by.

    General filter string syntax:

    Examples of valid filters:

    • "metadata.owner" returns Services that have a label 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-east/namespaces/my-namespace/services/service-c" returns Services that have name that is alphabetically later than the string, so "service-e" will be returned but "service-a" will not be.
    • "metadata.owner!=sd AND metadata.foo=bar" returns Services 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 Service doesn't have a field called "doesnotexist". Since the filter does not match any Services, it returns no results.
  • order_by (::String) — Optional. The order to list result by.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#set_iam_policy

def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
def set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy

Sets the IAM Policy for a resource (namespace or service only).

Overloads
def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
Pass arguments to set_iam_policy via a request object, either of type Iam::V1::SetIamPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Iam::V1::SetIamPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy
Pass arguments to set_iam_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • resource (::String) — REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
  • policy (::Google::Iam::V1::Policy, ::Hash) — REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:

    paths: "bindings, etag"

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#test_iam_permissions

def test_iam_permissions(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
def test_iam_permissions(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponse

Tests IAM permissions for a resource (namespace or service only).

Overloads
def test_iam_permissions(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
Pass arguments to test_iam_permissions via a request object, either of type Iam::V1::TestIamPermissionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Iam::V1::TestIamPermissionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def test_iam_permissions(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
Pass arguments to test_iam_permissions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • resource (::String) — REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
  • permissions (::Array<::String>) — The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_endpoint

def update_endpoint(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
def update_endpoint(endpoint: nil, update_mask: nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint

Updates a endpoint.

Overloads
def update_endpoint(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
Pass arguments to update_endpoint via a request object, either of type UpdateEndpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::UpdateEndpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_endpoint(endpoint: nil, update_mask: nil) -> ::Google::Cloud::ServiceDirectory::V1::Endpoint
Pass arguments to update_endpoint via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_namespace

def update_namespace(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
def update_namespace(namespace: nil, update_mask: nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace

Updates a namespace.

Overloads
def update_namespace(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
Pass arguments to update_namespace via a request object, either of type UpdateNamespaceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::UpdateNamespaceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_namespace(namespace: nil, update_mask: nil) -> ::Google::Cloud::ServiceDirectory::V1::Namespace
Pass arguments to update_namespace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_service

def update_service(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
def update_service(service: nil, update_mask: nil) -> ::Google::Cloud::ServiceDirectory::V1::Service

Updates a service.

Overloads
def update_service(request, options = nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
Pass arguments to update_service via a request object, either of type UpdateServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ServiceDirectory::V1::UpdateServiceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_service(service: nil, update_mask: nil) -> ::Google::Cloud::ServiceDirectory::V1::Service
Pass arguments to update_service via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.