Reference documentation and code samples for the Chronicle V1 API class Google::Cloud::Chronicle::V1::EntityService::Client.
Client for the EntityService service.
EntityService contains apis for finding entities.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the EntityService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all EntityService clients ::Google::Cloud::Chronicle::V1::EntityService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the EntityService 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_watchlist
def create_watchlist(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
def create_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
def create_watchlist(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
create_watchlist
via a request object, either of type
CreateWatchlistRequest or an equivalent Hash.
- request (::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
create_watchlist
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 resource where this watchlist will be created.
Format:
projects/{project}/locations/{location}/instances/{instance}
-
watchlist_id (::String) — Optional. The ID to use for the watchlist,
which will become the final component of the watchlist's resource name.
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
- watchlist (::Google::Cloud::Chronicle::V1::Watchlist, ::Hash) — Required. The watchlist to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Chronicle::V1::Watchlist)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/chronicle/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Chronicle::V1::EntityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new # Call the create_watchlist method. result = client.create_watchlist request # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. p result
#delete_watchlist
def delete_watchlist(request, options = nil) -> ::Google::Protobuf::Empty
def delete_watchlist(name: nil, force: nil) -> ::Google::Protobuf::Empty
Deletes the watchlist for the given instance.
def delete_watchlist(request, options = nil) -> ::Google::Protobuf::Empty
delete_watchlist
via a request object, either of type
DeleteWatchlistRequest or an equivalent Hash.
- request (::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) -> ::Google::Protobuf::Empty
delete_watchlist
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 watchlist to delete.
Format:
projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}
- force (::Boolean) — Optional. If set to true, any entities under this watchlist will also be deleted. (Otherwise, the request will only work if the watchlist has no entities.)
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/chronicle/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Chronicle::V1::EntityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new # Call the delete_watchlist method. result = client.delete_watchlist request # The returned object is of type Google::Protobuf::Empty. p result
#get_watchlist
def get_watchlist(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
def get_watchlist(name: nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
Gets watchlist details for the given watchlist ID.
def get_watchlist(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
get_watchlist
via a request object, either of type
GetWatchlistRequest or an equivalent Hash.
- request (::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
get_watchlist
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 parent, which owns this collection of watchlists.
The name of the watchlist to retrieve.
Format:
projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Chronicle::V1::Watchlist)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/chronicle/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Chronicle::V1::EntityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new # Call the get_watchlist method. result = client.get_watchlist request # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new EntityService client object.
- (config) — Configure the EntityService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| config.timeout = 10.0 end
#list_watchlists
def list_watchlists(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>
def list_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>
Lists all watchlists for the given instance.
def list_watchlists(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>
list_watchlists
via a request object, either of type
ListWatchlistsRequest or an equivalent Hash.
- request (::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>
list_watchlists
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 watchlists.
Format:
projects/{project}/locations/{location}/instances/{instance}
- page_size (::Integer) — Optional. The maximum number of watchlists to return. The service may return fewer than this value. If unspecified, at most 200 watchlists will be returned. The maximum value is 200; values above 200 will be coerced to 200.
-
page_token (::String) — Optional. A page token, received from a previous
ListWatchlists
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListWatchlists
must match the call that provided the page token. -
filter (::String) —
Optional. Which watchlist to return in aip.dev/160 form. Currently, only the following filters are supported:
watchlist_user_preferences.pinned=true
has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])
has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/chronicle/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Chronicle::V1::EntityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new # Call the list_watchlists method. result = client.list_watchlists 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::Chronicle::V1::Watchlist. p item end
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_watchlist
def update_watchlist(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
def update_watchlist(watchlist: nil, update_mask: nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
Updates the watchlist for the given instance.
def update_watchlist(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
update_watchlist
via a request object, either of type
UpdateWatchlistRequest or an equivalent Hash.
- request (::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) -> ::Google::Cloud::Chronicle::V1::Watchlist
update_watchlist
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).
-
watchlist (::Google::Cloud::Chronicle::V1::Watchlist, ::Hash) — Required. The watchlist to update.
The watchlist's
name
field is used to identify the watchlist to update. Format:projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The list of fields to update.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Chronicle::V1::Watchlist)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/chronicle/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Chronicle::V1::EntityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new # Call the update_watchlist method. result = client.update_watchlist request # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. p result