Reference documentation and code samples for the Chronicle V1 API class Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.
Client for the FeaturedContentRuleService service.
This service provides functionality for managing FeaturedContentRule.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the FeaturedContentRuleService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all FeaturedContentRuleService clients ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the FeaturedContentRuleService 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)
#initialize
def initialize() { |config| ... } -> ClientCreate a new FeaturedContentRuleService client object.
- (config) — Configure the FeaturedContentRuleService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.new do |config| config.timeout = 10.0 end
#list_featured_content_rules
def list_featured_content_rules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>
def list_featured_content_rules(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>Lists FeaturedContentRules
def list_featured_content_rules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>list_featured_content_rules via a request object, either of type
ListFeaturedContentRulesRequest or an equivalent Hash.
- request (::Google::Cloud::Chronicle::V1::ListFeaturedContentRulesRequest, ::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_featured_content_rules(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>list_featured_content_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).
- parent (::String) — Required. The parent which owns this collection of FeaturedContentRules. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub
- page_size (::Integer) — Optional. The maximum number of featured contents to return. The service may return fewer than this value. If unspecified, at most 100 featured contents will be returned. The maximum value is 1000; values above 1000 will be coerced to 100.
-
page_token (::String) — Optional. A page token, received from a previous
ListFeaturedContentRulescall. Provide this to retrieve the subsequent page. -
filter (::String) — Optional. Only the following filters are allowed:
Under HAS operator: Filtering through category names:
- Singular:
category_name:"<category_name>" - Multiple:
category_name:"<category_name1>" OR category_name:"<category_name2>"-- You can only use OR operator between multiple category_name filters.
Filtering through policy names:
- Singular:
policy_name:"<policy_name>" - Multiple:
policy_name:"<policy_name1>" OR policy_name:"<policy_name2>"-- You can only use OR operator between multiple policy_name filters.
Filtering through rule IDs:
- Singular:
rule_id:"ur_<id>" - Multiple:
rule_id:"ur_<rule_id1>" OR rule_id:"ur_<rule_id2>"-- You can only use OR operator between multiple rule_id filters.
Filtering through rule precision:
rule_precision:"<rule_precision>"-- Rule precision values can be "Precise" or "Broad". If something else is passed, the rule precision will default to "Unknown". You can only filter by one rule precision value.Under MATCHES_REGEXP operator: Search through rule name or description (behaves like a string contains): This search is case-insensitive and filters through the rule metadata, specifically the rule_name and description keys.
search_rule_name_or_description=~"<rule_name> or <rule_description>". You can only filter by one rule name or description value.Multiple filters can also be used together: Ex 1:
category_name:"<category_name>" AND policy_name:"<policy_name>"Ex 2: Since category_name and policy_name are repeated fields, we can also use multiple values for each:(category_name:"<category_name1>" OR category_name:"<category_name2>") AND policy_name:"<policy_name>"-- Note that the AND operator has higher precedence than the OR operator. Additionally, parentheses must be used to create a valid filter.Requests using filter comparators other than HAS(:) or MATCHES_REGEXP(=~) will result in an InvalidArgument error.
- Singular:
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>)
- (::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::FeaturedContentRuleService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Chronicle::V1::ListFeaturedContentRulesRequest.new # Call the list_featured_content_rules method. result = client.list_featured_content_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::FeaturedContentRule. p item end
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)