Chronicle V1 API - Class Google::Cloud::Chronicle::V1::RuleService::Client (v0.1.0)

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

Client for the RuleService service.

RuleService provides interface for user-created rules.

Inherits

  • Object

Methods

.configure

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

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

#configure

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

Configure the RuleService 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_retrohunt

def create_retrohunt(request, options = nil) -> ::Gapic::Operation
def create_retrohunt(parent: nil, retrohunt: nil) -> ::Gapic::Operation

Create a Retrohunt.

Overloads
def create_retrohunt(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_retrohunt via a request object, either of type CreateRetrohuntRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) -> ::Gapic::Operation
Pass arguments to create_retrohunt 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 of retrohunt, which is a rule. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}
  • retrohunt (::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash) — Required. The retrohunt to create.
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/chronicle/v1"

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

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

# Call the create_retrohunt method.
result = client.create_retrohunt 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

#create_rule

def create_rule(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Rule
def create_rule(parent: nil, rule: nil) -> ::Google::Cloud::Chronicle::V1::Rule

Creates a new Rule.

Overloads
def create_rule(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Rule
Pass arguments to create_rule via a request object, either of type CreateRuleRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) -> ::Google::Cloud::Chronicle::V1::Rule
Pass arguments to create_rule 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 resource where this rule will be created. Format: projects/{project}/locations/{location}/instances/{instance}
  • rule (::Google::Cloud::Chronicle::V1::Rule, ::Hash) — Required. The rule to create.
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Cloud::Chronicle::V1::Rule.
p result

#delete_rule

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

Deletes a Rule.

Overloads
def delete_rule(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_rule via a request object, either of type DeleteRuleRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_rule 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 rule to delete. A rule revision timestamp cannot be specified as part of the name, as deleting specific revisions is not supported. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}
  • force (::Boolean) — Optional. If set to true, any retrohunts and any detections associated with the rule will also be deleted. If set to false, the call will only succeed if the rule has no associated retrohunts, including completed retrohunts, and no associated detections. Regardless of this field's value, the rule deployment associated with this rule will also be deleted.
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

#get_retrohunt

def get_retrohunt(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Retrohunt
def get_retrohunt(name: nil) -> ::Google::Cloud::Chronicle::V1::Retrohunt

Get a Retrohunt.

Overloads
def get_retrohunt(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Retrohunt
Pass arguments to get_retrohunt via a request object, either of type GetRetrohuntRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) -> ::Google::Cloud::Chronicle::V1::Retrohunt
Pass arguments to get_retrohunt 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 retrohunt to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt.
p result

#get_rule

def get_rule(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Rule
def get_rule(name: nil, view: nil) -> ::Google::Cloud::Chronicle::V1::Rule

Gets a Rule.

Overloads
def get_rule(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Rule
Pass arguments to get_rule via a request object, either of type GetRuleRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) -> ::Google::Cloud::Chronicle::V1::Rule
Pass arguments to get_rule 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 rule to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}
  • view (::Google::Cloud::Chronicle::V1::RuleView) — The view field indicates the scope of fields to populate for the Rule being returned. If unspecified, defaults to FULL.
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Cloud::Chronicle::V1::Rule.
p result

#get_rule_deployment

def get_rule_deployment(request, options = nil) -> ::Google::Cloud::Chronicle::V1::RuleDeployment
def get_rule_deployment(name: nil) -> ::Google::Cloud::Chronicle::V1::RuleDeployment

Gets a RuleDeployment.

Overloads
def get_rule_deployment(request, options = nil) -> ::Google::Cloud::Chronicle::V1::RuleDeployment
Pass arguments to get_rule_deployment via a request object, either of type GetRuleDeploymentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) -> ::Google::Cloud::Chronicle::V1::RuleDeployment
Pass arguments to get_rule_deployment 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 rule deployment to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment.
p result

#initialize

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

Create a new RuleService client object.

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

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

#list_retrohunts

def list_retrohunts(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>
def list_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>

List Retrohunts.

Overloads
def list_retrohunts(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>
Pass arguments to list_retrohunts via a request object, either of type ListRetrohuntsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>
Pass arguments to list_retrohunts 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 rule that the retrohunts belong to. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}
  • page_size (::Integer) — The maximum number of retrohunt to return. The service may return fewer than this value. If unspecified, at most 100 retrohunts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — A page token, received from a previous ListRetrohunts call. Provide this to retrieve the subsequent page.

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

  • filter (::String) — A filter that can be used to retrieve specific rule deployments. The following fields are filterable: state
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/chronicle/v1"

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

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

# Call the list_retrohunts method.
result = client.list_retrohunts 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::Retrohunt.
  p item
end

#list_rule_deployments

def list_rule_deployments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>
def list_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>

Lists RuleDeployments across all Rules.

Overloads
def list_rule_deployments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>
Pass arguments to list_rule_deployments via a request object, either of type ListRuleDeploymentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>
Pass arguments to list_rule_deployments 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 collection of all parents which own all rule deployments. The "-" wildcard token must be used as the rule identifier in the resource path. Format: projects/{project}/locations/{location}/instances/{instance}/rules/-
  • page_size (::Integer) — The maximum number of rule deployments to return. The service may return fewer than this value. If unspecified, at most 100 rule deployments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — A page token, received from a previous ListRuleDeployments call. Provide this to retrieve the subsequent page.

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

  • filter (::String) — A filter that can be used to retrieve specific rule deployments. The following fields are filterable: archived, name
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/chronicle/v1"

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

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

# Call the list_rule_deployments method.
result = client.list_rule_deployments 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::RuleDeployment.
  p item
end

#list_rule_revisions

def list_rule_revisions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>
def list_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>

Lists all revisions of the rule.

Overloads
def list_rule_revisions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>
Pass arguments to list_rule_revisions via a request object, either of type ListRuleRevisionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>
Pass arguments to list_rule_revisions 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 rule to list revisions for. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}
  • page_size (::Integer) — The maximum number of revisions to return per page. The service may return fewer than this value. If unspecified, at most 100 revisions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — The page token, received from a previous ListRuleRevisions call. Provide this to retrieve the subsequent page.

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

  • view (::Google::Cloud::Chronicle::V1::RuleView) — The view field indicates the scope of fields to populate for the revision being returned. If unspecified, defaults to BASIC.
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/chronicle/v1"

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

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

# Call the list_rule_revisions method.
result = client.list_rule_revisions 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::Rule.
  p item
end

#list_rules

def list_rules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>
def list_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>

Lists Rules.

Overloads
def list_rules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>
Pass arguments to list_rules via a request object, either of type ListRulesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>
Pass arguments to list_rules 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 rules. Format: projects/{project}/locations/{location}/instances/{instance}
  • page_size (::Integer) — The maximum number of rules to return. The service may return fewer than this value. If unspecified, at most 100 rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — A page token, received from a previous ListRules call. Provide this to retrieve the subsequent page.

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

  • view (::Google::Cloud::Chronicle::V1::RuleView) — view indicates the scope of fields to populate for the Rule being returned. If unspecified, defaults to BASIC.
  • filter (::String) — Only the following filters are allowed: "reference_lists:{reference_list_name}" "data_tables:{data_table_name}" "display_name:{display_name}"
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/chronicle/v1"

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

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

# Call the list_rules method.
result = client.list_rules 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::Rule.
  p item
end

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::Chronicle::V1::RuleService::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_rule

def update_rule(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Rule
def update_rule(rule: nil, update_mask: nil) -> ::Google::Cloud::Chronicle::V1::Rule

Updates a Rule.

Overloads
def update_rule(request, options = nil) -> ::Google::Cloud::Chronicle::V1::Rule
Pass arguments to update_rule via a request object, either of type UpdateRuleRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) -> ::Google::Cloud::Chronicle::V1::Rule
Pass arguments to update_rule 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
  • rule (::Google::Cloud::Chronicle::V1::Rule, ::Hash) — Required. The rule to update.

    The rule's name field is used to identify the rule to update. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to update. If not included, all fields with a non-empty value will be overwritten.
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Cloud::Chronicle::V1::Rule.
p result

#update_rule_deployment

def update_rule_deployment(request, options = nil) -> ::Google::Cloud::Chronicle::V1::RuleDeployment
def update_rule_deployment(rule_deployment: nil, update_mask: nil) -> ::Google::Cloud::Chronicle::V1::RuleDeployment

Updates a RuleDeployment. Failures are not necessarily atomic. If there is a request to update multiple fields, and any update to a single field fails, an error will be returned, but other fields may remain successfully updated.

Overloads
def update_rule_deployment(request, options = nil) -> ::Google::Cloud::Chronicle::V1::RuleDeployment
Pass arguments to update_rule_deployment via a request object, either of type UpdateRuleDeploymentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) -> ::Google::Cloud::Chronicle::V1::RuleDeployment
Pass arguments to update_rule_deployment 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
  • rule_deployment (::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash) — Required. The rule deployment to update.

    The rule deployment's name field is used to identify the rule deployment to update. Format: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The list of fields to update.
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment.
p result