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
Includes
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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.
def create_endpoint(request, options = nil) -> ::Gapic::Operation
create_endpoint
via a request object, either of type
CreateEndpointRequest or an equivalent Hash.
- 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
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).
- 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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 this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" 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.
def delete_endpoint(request, options = nil) -> ::Gapic::Operation
delete_endpoint
via a request object, either of type
DeleteEndpointRequest or an equivalent Hash.
- 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
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).
- 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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 this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" 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.
def get_endpoint(request, options = nil) -> ::Google::Cloud::IDS::V1::Endpoint
get_endpoint
via a request object, either of type
GetEndpointRequest or an equivalent Hash.
- 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
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).
-
name (::String) — Required. The name of the endpoint to retrieve.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::IDS::V1::Endpoint)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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.
- (config) — Configure the IDS client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
def list_endpoints(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::IDS::V1::Endpoint>
list_endpoints
via a request object, either of type
ListEndpointsRequest or an equivalent Hash.
- 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>
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).
- 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::IDS::V1::Endpoint>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::IDS::V1::Endpoint>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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 all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::IDS::V1::Endpoint. p response end
#operations_client
def operations_client() -> ::Google::Cloud::IDS::V1::IDS::Operations
Get the associated client for long-running operations.