Cloud IDS V1 API - Class Google::Cloud::IDS::V1::IDS::Client (v1.1.0)

Reference documentation and code samples for the Cloud IDS V1 API class Google::Cloud::IDS::V1::IDS::Client.

Client for the IDS service.

The IDS Service

Inherits

  • Object

Methods

.configure

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

Configure the IDS 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 IDS clients
::Google::Cloud::IDS::V1::IDS::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the IDS 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) -> ::Gapic::Operation
def create_endpoint(parent: nil, endpoint_id: nil, endpoint: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Endpoint in a given project and location.

Overloads
def create_endpoint(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_endpoint via a request object, either of type CreateEndpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::IDS::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, request_id: nil) -> ::Gapic::Operation
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 endpoint's parent.
  • endpoint_id (::String) — Required. The endpoint identifier. This will be part of the endpoint's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error.
  • endpoint (::Google::Cloud::IDS::V1::Endpoint, ::Hash) — Required. The endpoint to create.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ids/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::IDS::V1::IDS::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::IDS::V1::CreateEndpointRequest.new

# Call the create_endpoint method.
result = client.create_endpoint request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#delete_endpoint

def delete_endpoint(request, options = nil) -> ::Gapic::Operation
def delete_endpoint(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Endpoint.

Overloads
def delete_endpoint(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_endpoint via a request object, either of type DeleteEndpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::IDS::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, request_id: nil) -> ::Gapic::Operation
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).
Parameters
  • name (::String) — Required. The name of the endpoint to delete.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

    For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ids/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::IDS::V1::IDS::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::IDS::V1::DeleteEndpointRequest.new

# Call the delete_endpoint method.
result = client.delete_endpoint request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#get_endpoint

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

Gets details of a single Endpoint.

Overloads
def get_endpoint(request, options = nil) -> ::Google::Cloud::IDS::V1::Endpoint
Pass arguments to get_endpoint via a request object, either of type GetEndpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::IDS::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::IDS::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 retrieve. Format: projects/{project}/locations/{location}/endpoints/{endpoint}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ids/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::IDS::V1::IDS::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::IDS::V1::GetEndpointRequest.new

# Call the get_endpoint method.
result = client.get_endpoint request

# The returned object is of type Google::Cloud::IDS::V1::Endpoint.
p result

#initialize

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

Create a new IDS client object.

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

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

#list_endpoints

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

Lists Endpoints in a given project and location.

Overloads
def list_endpoints(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::IDS::V1::Endpoint>
Pass arguments to list_endpoints via a request object, either of type ListEndpointsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::IDS::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::PagedEnumerable<::Google::Cloud::IDS::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 parent, which owns this collection of endpoints.
  • page_size (::Integer) — Optional. The maximum number of endpoints to return. The service may return fewer than this value.
  • page_token (::String) — Optional. A page token, received from a previous ListEndpoints call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListEndpoints must match the call that provided the page token.

  • filter (::String) — Optional. The filter expression, following the syntax outlined in https://google.aip.dev/160.
  • order_by (::String) — Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ids/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::IDS::V1::IDS::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::IDS::V1::ListEndpointsRequest.new

# Call the list_endpoints method.
result = client.list_endpoints request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::IDS::V1::Endpoint.
  p item
end

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::IDS::V1::IDS::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)