Class: OCI::Logging::LoggingManagementClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/logging/logging_management_client.rb

Overview

Use the Logging Management API to create, read, list, update, and delete log groups, log objects, and agent configurations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ LoggingManagementClient

Creates a new LoggingManagementClient. Notes:

If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified.  If an endpoint is specified, it will be used instead of the
  region. A region may be specified in the config or via or the region parameter. If specified in both, then the
  region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/oci/logging/logging_management_client.rb', line 53

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20200531'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "LoggingManagementClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



13
14
15
# File 'lib/oci/logging/logging_management_client.rb', line 13

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


17
18
19
# File 'lib/oci/logging/logging_management_client.rb', line 17

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


27
28
29
# File 'lib/oci/logging/logging_management_client.rb', line 27

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



23
24
25
# File 'lib/oci/logging/logging_management_client.rb', line 23

def retry_config
  @retry_config
end

Instance Method Details

#change_log_group_compartment(log_group_id, change_log_group_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/change_log_group_compartment.rb.html) to see an example of how to use change_log_group_compartment API.

Moves a log group into a different compartment within the same tenancy. When provided, the If-Match is checked against the resource ETag values. For information about moving resources between compartments, see [Moving Resources Between Compartments](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • change_log_group_compartment_details (OCI::Logging::Models::ChangeLogGroupCompartmentDetails)

    Request to change the compartment of a given resource.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/oci/logging/logging_management_client.rb', line 120

def change_log_group_compartment(log_group_id, change_log_group_compartment_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#change_log_group_compartment.' if logger

  raise "Missing the required parameter 'log_group_id' when calling change_log_group_compartment." if log_group_id.nil?
  raise "Missing the required parameter 'change_log_group_compartment_details' when calling change_log_group_compartment." if change_log_group_compartment_details.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)

  path = '/logGroups/{logGroupId}/actions/changeCompartment'.sub('{logGroupId}', log_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(change_log_group_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#change_log_group_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_log_log_group(log_group_id, log_id, change_log_log_group_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/change_log_log_group.rb.html) to see an example of how to use change_log_log_group API.

Moves a log into a different log group within the same tenancy. When provided, the If-Match is checked against the ETag values of the resource.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • log_id (String)

    OCID of a log to work with.

  • change_log_log_group_details (OCI::Logging::Models::ChangeLogLogGroupDetails)

    Request to change the log group of a given log.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/oci/logging/logging_management_client.rb', line 186

def change_log_log_group(log_group_id, log_id, change_log_log_group_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#change_log_log_group.' if logger

  raise "Missing the required parameter 'log_group_id' when calling change_log_log_group." if log_group_id.nil?
  raise "Missing the required parameter 'log_id' when calling change_log_log_group." if log_id.nil?
  raise "Missing the required parameter 'change_log_log_group_details' when calling change_log_log_group." if change_log_log_group_details.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)
  raise "Parameter value for 'log_id' must not be blank" if OCI::Internal::Util.blank_string?(log_id)

  path = '/logGroups/{logGroupId}/logs/{logId}/actions/changeLogGroup'.sub('{logGroupId}', log_group_id.to_s).sub('{logId}', log_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(change_log_log_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#change_log_log_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_log_saved_search_compartment(log_saved_search_id, change_log_saved_search_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/change_log_saved_search_compartment.rb.html) to see an example of how to use change_log_saved_search_compartment API.

Moves a saved search into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

  • log_saved_search_id (String)

    OCID of the logSavedSearch

  • change_log_saved_search_compartment_details (OCI::Logging::Models::ChangeLogSavedSearchCompartmentDetails)

    Contains details indicating which compartment the resource should move to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/oci/logging/logging_management_client.rb', line 262

def change_log_saved_search_compartment(log_saved_search_id, change_log_saved_search_compartment_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#change_log_saved_search_compartment.' if logger

  raise "Missing the required parameter 'log_saved_search_id' when calling change_log_saved_search_compartment." if log_saved_search_id.nil?
  raise "Missing the required parameter 'change_log_saved_search_compartment_details' when calling change_log_saved_search_compartment." if change_log_saved_search_compartment_details.nil?
  raise "Parameter value for 'log_saved_search_id' must not be blank" if OCI::Internal::Util.blank_string?(log_saved_search_id)

  path = '/logSavedSearches/{logSavedSearchId}/actions/changeCompartment'.sub('{logSavedSearchId}', log_saved_search_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_log_saved_search_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#change_log_saved_search_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_unified_agent_configuration_compartment(unified_agent_configuration_id, change_unified_agent_configuration_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/change_unified_agent_configuration_compartment.rb.html) to see an example of how to use change_unified_agent_configuration_compartment API.

Moves the unified agent configuration into a different compartment within the same tenancy. When provided, the If-Match is checked against the ETag values of the resource. For information about moving resources between compartments, see [Moving Resources Between Compartments](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/oci/logging/logging_management_client.rb', line 337

def change_unified_agent_configuration_compartment(unified_agent_configuration_id, change_unified_agent_configuration_compartment_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#change_unified_agent_configuration_compartment.' if logger

  raise "Missing the required parameter 'unified_agent_configuration_id' when calling change_unified_agent_configuration_compartment." if unified_agent_configuration_id.nil?
  raise "Missing the required parameter 'change_unified_agent_configuration_compartment_details' when calling change_unified_agent_configuration_compartment." if change_unified_agent_configuration_compartment_details.nil?
  raise "Parameter value for 'unified_agent_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(unified_agent_configuration_id)

  path = '/unifiedAgentConfigurations/{unifiedAgentConfigurationId}/actions/changeCompartment'.sub('{unifiedAgentConfigurationId}', unified_agent_configuration_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_unified_agent_configuration_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#change_unified_agent_configuration_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_log(log_group_id, create_log_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/create_log.rb.html) to see an example of how to use create_log API.

Creates a log within the specified log group. This call fails if a log group has already been created with the same displayName or (service, resource, category) triplet.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • create_log_details (OCI::Logging::Models::CreateLogDetails)

    Log object configuration details.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/oci/logging/logging_management_client.rb', line 406

def create_log(log_group_id, create_log_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#create_log.' if logger

  raise "Missing the required parameter 'log_group_id' when calling create_log." if log_group_id.nil?
  raise "Missing the required parameter 'create_log_details' when calling create_log." if create_log_details.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)

  path = '/logGroups/{logGroupId}/logs'.sub('{logGroupId}', log_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_log_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#create_log') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_log_group(create_log_group_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/create_log_group.rb.html) to see an example of how to use create_log_group API.

Create a new log group with a unique display name. This call fails if the log group is already created with the same displayName in the compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/oci/logging/logging_management_client.rb', line 473

def create_log_group(create_log_group_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#create_log_group.' if logger

  raise "Missing the required parameter 'create_log_group_details' when calling create_log_group." if create_log_group_details.nil?

  path = '/logGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_log_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#create_log_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_log_saved_search(create_log_saved_search_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/create_log_saved_search.rb.html) to see an example of how to use create_log_saved_search API.

Creates a new LogSavedSearch.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
# File 'lib/oci/logging/logging_management_client.rb', line 537

def create_log_saved_search(create_log_saved_search_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#create_log_saved_search.' if logger

  raise "Missing the required parameter 'create_log_saved_search_details' when calling create_log_saved_search." if create_log_saved_search_details.nil?

  path = '/logSavedSearches'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_log_saved_search_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#create_log_saved_search') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::LogSavedSearch'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_unified_agent_configuration(create_unified_agent_configuration_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/create_unified_agent_configuration.rb.html) to see an example of how to use create_unified_agent_configuration API.

Create unified agent configuration registration.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
# File 'lib/oci/logging/logging_management_client.rb', line 601

def create_unified_agent_configuration(create_unified_agent_configuration_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#create_unified_agent_configuration.' if logger

  raise "Missing the required parameter 'create_unified_agent_configuration_details' when calling create_unified_agent_configuration." if create_unified_agent_configuration_details.nil?

  path = '/unifiedAgentConfigurations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_unified_agent_configuration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#create_unified_agent_configuration') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_log(log_group_id, log_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/delete_log.rb.html) to see an example of how to use delete_log API.

Deletes the log object in a log group.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • log_id (String)

    OCID of a log to work with.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
# File 'lib/oci/logging/logging_management_client.rb', line 664

def delete_log(log_group_id, log_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#delete_log.' if logger

  raise "Missing the required parameter 'log_group_id' when calling delete_log." if log_group_id.nil?
  raise "Missing the required parameter 'log_id' when calling delete_log." if log_id.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)
  raise "Parameter value for 'log_id' must not be blank" if OCI::Internal::Util.blank_string?(log_id)

  path = '/logGroups/{logGroupId}/logs/{logId}'.sub('{logGroupId}', log_group_id.to_s).sub('{logId}', log_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#delete_log') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_log_group(log_group_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/delete_log_group.rb.html) to see an example of how to use delete_log_group API.

Deletes the specified log group.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
# File 'lib/oci/logging/logging_management_client.rb', line 728

def delete_log_group(log_group_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#delete_log_group.' if logger

  raise "Missing the required parameter 'log_group_id' when calling delete_log_group." if log_group_id.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)

  path = '/logGroups/{logGroupId}'.sub('{logGroupId}', log_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#delete_log_group') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_log_saved_search(log_saved_search_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/delete_log_saved_search.rb.html) to see an example of how to use delete_log_saved_search API.

Deletes the specified log saved search.

Parameters:

  • log_saved_search_id (String)

    OCID of the logSavedSearch

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
# File 'lib/oci/logging/logging_management_client.rb', line 791

def delete_log_saved_search(log_saved_search_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#delete_log_saved_search.' if logger

  raise "Missing the required parameter 'log_saved_search_id' when calling delete_log_saved_search." if log_saved_search_id.nil?
  raise "Parameter value for 'log_saved_search_id' must not be blank" if OCI::Internal::Util.blank_string?(log_saved_search_id)

  path = '/logSavedSearches/{logSavedSearchId}'.sub('{logSavedSearchId}', log_saved_search_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#delete_log_saved_search') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_unified_agent_configuration(unified_agent_configuration_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/delete_unified_agent_configuration.rb.html) to see an example of how to use delete_unified_agent_configuration API.

Delete unified agent configuration.

Parameters:

  • unified_agent_configuration_id (String)

    The OCID of the Unified Agent configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
# File 'lib/oci/logging/logging_management_client.rb', line 853

def delete_unified_agent_configuration(unified_agent_configuration_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#delete_unified_agent_configuration.' if logger

  raise "Missing the required parameter 'unified_agent_configuration_id' when calling delete_unified_agent_configuration." if unified_agent_configuration_id.nil?
  raise "Parameter value for 'unified_agent_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(unified_agent_configuration_id)

  path = '/unifiedAgentConfigurations/{unifiedAgentConfigurationId}'.sub('{unifiedAgentConfigurationId}', unified_agent_configuration_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#delete_unified_agent_configuration') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/delete_work_request.rb.html) to see an example of how to use delete_work_request API.

Cancel a work request that has not started yet.

Parameters:

  • work_request_id (String)

    The asynchronous request ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
# File 'lib/oci/logging/logging_management_client.rb', line 916

def delete_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#delete_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling delete_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#delete_work_request') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_log(log_group_id, log_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/get_log.rb.html) to see an example of how to use get_log API.

Gets the log object configuration for the log object OCID.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • log_id (String)

    OCID of a log to work with.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type Log



974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
# File 'lib/oci/logging/logging_management_client.rb', line 974

def get_log(log_group_id, log_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#get_log.' if logger

  raise "Missing the required parameter 'log_group_id' when calling get_log." if log_group_id.nil?
  raise "Missing the required parameter 'log_id' when calling get_log." if log_id.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)
  raise "Parameter value for 'log_id' must not be blank" if OCI::Internal::Util.blank_string?(log_id)

  path = '/logGroups/{logGroupId}/logs/{logId}'.sub('{logGroupId}', log_group_id.to_s).sub('{logId}', log_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#get_log') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::Log'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_log_group(log_group_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/get_log_group.rb.html) to see an example of how to use get_log_group API.

Get the specified log group’s information.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
# File 'lib/oci/logging/logging_management_client.rb', line 1032

def get_log_group(log_group_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#get_log_group.' if logger

  raise "Missing the required parameter 'log_group_id' when calling get_log_group." if log_group_id.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)

  path = '/logGroups/{logGroupId}'.sub('{logGroupId}', log_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#get_log_group') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::LogGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_log_included_search(compartment_id, log_included_search_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/get_log_included_search.rb.html) to see an example of how to use get_log_included_search API.

Retrieves a LogIncludedSearch.

Parameters:

  • compartment_id (String)

    Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.

  • log_included_search_id (String)

    OCID of the included search

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
# File 'lib/oci/logging/logging_management_client.rb', line 1092

def get_log_included_search(compartment_id, log_included_search_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#get_log_included_search.' if logger

  raise "Missing the required parameter 'compartment_id' when calling get_log_included_search." if compartment_id.nil?
  raise "Missing the required parameter 'log_included_search_id' when calling get_log_included_search." if log_included_search_id.nil?
  raise "Parameter value for 'log_included_search_id' must not be blank" if OCI::Internal::Util.blank_string?(log_included_search_id)

  path = '/logIncludedSearch/{logIncludedSearchId}'.sub('{logIncludedSearchId}', log_included_search_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#get_log_included_search') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::LogIncludedSearch'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_log_saved_search(log_saved_search_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/get_log_saved_search.rb.html) to see an example of how to use get_log_saved_search API.

Retrieves a log saved search.

Parameters:

  • log_saved_search_id (String)

    OCID of the logSavedSearch

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
# File 'lib/oci/logging/logging_management_client.rb', line 1151

def get_log_saved_search(log_saved_search_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#get_log_saved_search.' if logger

  raise "Missing the required parameter 'log_saved_search_id' when calling get_log_saved_search." if log_saved_search_id.nil?
  raise "Parameter value for 'log_saved_search_id' must not be blank" if OCI::Internal::Util.blank_string?(log_saved_search_id)

  path = '/logSavedSearches/{logSavedSearchId}'.sub('{logSavedSearchId}', log_saved_search_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#get_log_saved_search') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::LogSavedSearch'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_unified_agent_configuration(unified_agent_configuration_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/get_unified_agent_configuration.rb.html) to see an example of how to use get_unified_agent_configuration API.

Get the unified agent configuration for an ID.

Parameters:

  • unified_agent_configuration_id (String)

    The OCID of the Unified Agent configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
# File 'lib/oci/logging/logging_management_client.rb', line 1207

def get_unified_agent_configuration(unified_agent_configuration_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#get_unified_agent_configuration.' if logger

  raise "Missing the required parameter 'unified_agent_configuration_id' when calling get_unified_agent_configuration." if unified_agent_configuration_id.nil?
  raise "Parameter value for 'unified_agent_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(unified_agent_configuration_id)

  path = '/unifiedAgentConfigurations/{unifiedAgentConfigurationId}'.sub('{unifiedAgentConfigurationId}', unified_agent_configuration_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#get_unified_agent_configuration') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::UnifiedAgentConfiguration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/get_work_request.rb.html) to see an example of how to use get_work_request API.

Gets the details of the work request with the given ID.

Parameters:

  • work_request_id (String)

    The asynchronous request ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
# File 'lib/oci/logging/logging_management_client.rb', line 1263

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#get_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_log_groups(compartment_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_log_groups.rb.html) to see an example of how to use list_log_groups API.

Lists all log groups for the specified compartment or tenancy.

Parameters:

  • compartment_id (String)

    Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :is_compartment_id_in_subtree (BOOLEAN)

    Specifies whether or not nested compartments should be traversed. Defaults to false. (default to false)

  • :display_name (String)

    Resource name

  • :page (String)

    For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call. (default to 100)

  • :sort_by (String)

    The field to sort by (one column only). Default sort order is ascending exception of timeCreated and timeLastModified columns (descending).

    Allowed values are: timeCreated, displayName

  • :sort_order (String)

    The sort order to use, whether ‘asc’ or ‘desc’.

    Allowed values are: ASC, DESC

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
# File 'lib/oci/logging/logging_management_client.rb', line 1335

def list_log_groups(compartment_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_log_groups.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_log_groups." if compartment_id.nil?

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/logGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:isCompartmentIdInSubtree] = opts[:is_compartment_id_in_subtree] if !opts[:is_compartment_id_in_subtree].nil?
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_log_groups') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Logging::Models::LogGroupSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_log_included_searches(compartment_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_log_included_searches.rb.html) to see an example of how to use list_log_included_searches API.

Lists Logging Included Searches for this compartment.

Parameters:

  • compartment_id (String)

    Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :log_included_search_id (String)

    OCID of the LogIncludedSearch

  • :display_name (String)

    Resource name

  • :page (String)

    For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call. (default to 100)

  • :sort_by (String)

    The field to sort by (one column only). Default sort order is ascending exception of timeCreated and timeLastModified columns (descending).

    Allowed values are: timeCreated, displayName

  • :sort_order (String)

    The sort order to use, whether ‘asc’ or ‘desc’.

    Allowed values are: ASC, DESC

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
# File 'lib/oci/logging/logging_management_client.rb', line 1423

def list_log_included_searches(compartment_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_log_included_searches.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_log_included_searches." if compartment_id.nil?

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/logIncludedSearches'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:logIncludedSearchId] = opts[:log_included_search_id] if opts[:log_included_search_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_log_included_searches') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::LogIncludedSearchSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_log_saved_searches(compartment_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_log_saved_searches.rb.html) to see an example of how to use list_log_saved_searches API.

Lists Logging Saved Searches for this compartment.

Parameters:

  • compartment_id (String)

    Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :log_saved_search_id (String)

    OCID of the LogSavedSearch

  • :name (String)

    Resource name

  • :page (String)

    For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call. (default to 100)

  • :sort_by (String)

    The field to sort by (one column only). Default sort order is ascending exception of timeCreated and timeLastModified columns (descending).

    Allowed values are: timeCreated, displayName

  • :sort_order (String)

    The sort order to use, whether ‘asc’ or ‘desc’.

    Allowed values are: ASC, DESC

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
# File 'lib/oci/logging/logging_management_client.rb', line 1511

def list_log_saved_searches(compartment_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_log_saved_searches.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_log_saved_searches." if compartment_id.nil?

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/logSavedSearches'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:logSavedSearchId] = opts[:log_saved_search_id] if opts[:log_saved_search_id]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_log_saved_searches') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::LogSavedSearchSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_logs(log_group_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_logs.rb.html) to see an example of how to use list_logs API.

Lists the specified log group’s log objects.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :log_type (String)

    The logType that the log object is for, whether custom or service. Allowed values are: CUSTOM, SERVICE

  • :source_service (String)

    Service that created the log object.

  • :source_resource (String)

    Log object resource.

  • :display_name (String)

    Resource name

  • :lifecycle_state (String)

    Lifecycle state of the log object

  • :page (String)

    For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call. (default to 100)

  • :sort_by (String)

    The field to sort by (one column only). Default sort order is ascending exception of timeCreated and timeLastModified columns (descending).

    Allowed values are: timeCreated, displayName

  • :sort_order (String)

    The sort order to use, whether ‘asc’ or ‘desc’.

    Allowed values are: ASC, DESC

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
# File 'lib/oci/logging/logging_management_client.rb', line 1599

def list_logs(log_group_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_logs.' if logger

  raise "Missing the required parameter 'log_group_id' when calling list_logs." if log_group_id.nil?

  if opts[:log_type] && !%w[CUSTOM SERVICE].include?(opts[:log_type])
    raise 'Invalid value for "log_type", must be one of CUSTOM, SERVICE.'
  end

  if opts[:lifecycle_state] && !OCI::Logging::Models::LOG_LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Logging::Models::LOG_LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)

  path = '/logGroups/{logGroupId}/logs'.sub('{logGroupId}', log_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:logType] = opts[:log_type] if opts[:log_type]
  query_params[:sourceService] = opts[:source_service] if opts[:source_service]
  query_params[:sourceResource] = opts[:source_resource] if opts[:source_resource]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Logging::Models::LogSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_services(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_services.rb.html) to see an example of how to use list_services API.

Lists all services that support logging.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
# File 'lib/oci/logging/logging_management_client.rb', line 1679

def list_services(opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_services.' if logger


  path = '/v2/registry/services'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_services') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Logging::Models::ServiceSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_unified_agent_configurations(compartment_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_unified_agent_configurations.rb.html) to see an example of how to use list_unified_agent_configurations API.

Lists all unified agent configurations in the specified compartment.

Parameters:

  • compartment_id (String)

    Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :log_id (String)

    Custom log OCID to list resources with the log as destination.

  • :is_compartment_id_in_subtree (BOOLEAN)

    Specifies whether or not nested compartments should be traversed. Defaults to false. (default to false)

  • :group_id (String)

    The OCID of a group or a dynamic group.

  • :display_name (String)

    Resource name

  • :lifecycle_state (String)

    Lifecycle state of the log object

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :sort_by (String)

    The field to sort by (one column only). Default sort order is ascending exception of timeCreated and timeLastModified columns (descending).

    Allowed values are: timeCreated, displayName

  • :sort_order (String)

    The sort order to use, whether ‘asc’ or ‘desc’.

    Allowed values are: ASC, DESC

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
# File 'lib/oci/logging/logging_management_client.rb', line 1753

def list_unified_agent_configurations(compartment_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_unified_agent_configurations.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_unified_agent_configurations." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::Logging::Models::LOG_LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Logging::Models::LOG_LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/unifiedAgentConfigurations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:logId] = opts[:log_id] if opts[:log_id]
  query_params[:isCompartmentIdInSubtree] = opts[:is_compartment_id_in_subtree] if !opts[:is_compartment_id_in_subtree].nil?
  query_params[:groupId] = opts[:group_id] if opts[:group_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_unified_agent_configurations') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::UnifiedAgentConfigurationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_errors(work_request_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.

Return a list of errors for a given work request.

Parameters:

  • work_request_id (String)

    The asynchronous request ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :page (String)

    For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call. (default to 100)

Returns:



1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
# File 'lib/oci/logging/logging_management_client.rb', line 1836

def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Logging::Models::WorkRequestError>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_logs(work_request_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.

Return a list of logs for a given work request.

Parameters:

  • work_request_id (String)

    The asynchronous request ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :page (String)

    For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call. (default to 100)

Returns:



1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
# File 'lib/oci/logging/logging_management_client.rb', line 1900

def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Logging::Models::WorkRequestLog>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_requests(compartment_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_work_requests.rb.html) to see an example of how to use list_work_requests API.

Lists the work requests in a compartment.

Parameters:

  • compartment_id (String)

    Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :status (String)

    Filter results by work request status.

  • :id (String)

    Filter results by [OCID](docs.cloud.oracle.com/iaas/Content/API/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :page (String)

    For list pagination. The value of the opc-next-page or opc-previous-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call. (default to 100)

  • :sort_order (String)

    The sort order to use, whether ‘asc’ or ‘desc’.

    Allowed values are: ASC, DESC

  • :sort_by (String)

    Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order.

    Allowed values are: operationType, status, timeAccepted

Returns:



1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
# File 'lib/oci/logging/logging_management_client.rb', line 1975

def list_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#list_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?

  if opts[:status] && !OCI::Logging::Models::OPERATION_STATUS_ENUM.include?(opts[:status])
    raise 'Invalid value for "status", must be one of the values in OCI::Logging::Models::OPERATION_STATUS_ENUM.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[operationType status timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of operationType, status, timeAccepted.'
  end

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Logging::Models::WorkRequestSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



92
93
94
# File 'lib/oci/logging/logging_management_client.rb', line 92

def logger
  @api_client.config.logger
end

#update_log(log_group_id, log_id, update_log_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/update_log.rb.html) to see an example of how to use update_log API.

Updates the existing log object with the associated configuration. This call

fails if the log object does not exist.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • log_id (String)

    OCID of a log to work with.

  • update_log_details (OCI::Logging::Models::UpdateLogDetails)

    Log config parameters to update.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
# File 'lib/oci/logging/logging_management_client.rb', line 2059

def update_log(log_group_id, log_id, update_log_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#update_log.' if logger

  raise "Missing the required parameter 'log_group_id' when calling update_log." if log_group_id.nil?
  raise "Missing the required parameter 'log_id' when calling update_log." if log_id.nil?
  raise "Missing the required parameter 'update_log_details' when calling update_log." if update_log_details.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)
  raise "Parameter value for 'log_id' must not be blank" if OCI::Internal::Util.blank_string?(log_id)

  path = '/logGroups/{logGroupId}/logs/{logId}'.sub('{logGroupId}', log_group_id.to_s).sub('{logId}', log_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_log_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#update_log') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_log_group(log_group_id, update_log_group_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/update_log_group.rb.html) to see an example of how to use update_log_group API.

Updates the existing log group with the associated configuration. This call

fails if the log group does not exist.

Parameters:

  • log_group_id (String)

    OCID of a log group to work with.

  • update_log_group_details (OCI::Logging::Models::UpdateLogGroupDetails)

    LogGroup config parameters to update.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
# File 'lib/oci/logging/logging_management_client.rb', line 2127

def update_log_group(log_group_id, update_log_group_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#update_log_group.' if logger

  raise "Missing the required parameter 'log_group_id' when calling update_log_group." if log_group_id.nil?
  raise "Missing the required parameter 'update_log_group_details' when calling update_log_group." if update_log_group_details.nil?
  raise "Parameter value for 'log_group_id' must not be blank" if OCI::Internal::Util.blank_string?(log_group_id)

  path = '/logGroups/{logGroupId}'.sub('{logGroupId}', log_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_log_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#update_log_group') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_log_saved_search(log_saved_search_id, update_log_saved_search_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/update_log_saved_search.rb.html) to see an example of how to use update_log_saved_search API.

Updates an existing log saved search.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
# File 'lib/oci/logging/logging_management_client.rb', line 2193

def update_log_saved_search(log_saved_search_id, update_log_saved_search_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#update_log_saved_search.' if logger

  raise "Missing the required parameter 'log_saved_search_id' when calling update_log_saved_search." if log_saved_search_id.nil?
  raise "Missing the required parameter 'update_log_saved_search_details' when calling update_log_saved_search." if update_log_saved_search_details.nil?
  raise "Parameter value for 'log_saved_search_id' must not be blank" if OCI::Internal::Util.blank_string?(log_saved_search_id)

  path = '/logSavedSearches/{logSavedSearchId}'.sub('{logSavedSearchId}', log_saved_search_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_log_saved_search_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#update_log_saved_search') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Logging::Models::LogSavedSearch'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_unified_agent_configuration(unified_agent_configuration_id, update_unified_agent_configuration_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/update_unified_agent_configuration.rb.html) to see an example of how to use update_unified_agent_configuration API.

Update an existing unified agent configuration. This call

fails if the log group does not exist.

Parameters:

  • unified_agent_configuration_id (String)

    The OCID of the Unified Agent configuration.

  • update_unified_agent_configuration_details (OCI::Logging::Models::UpdateUnifiedAgentConfigurationDetails)

    Unified agent configuration to update. Empty group associations list doesn’t modify the list, null value for group association clears all the previous associations.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
# File 'lib/oci/logging/logging_management_client.rb', line 2261

def update_unified_agent_configuration(unified_agent_configuration_id, update_unified_agent_configuration_details, opts = {})
  logger.debug 'Calling operation LoggingManagementClient#update_unified_agent_configuration.' if logger

  raise "Missing the required parameter 'unified_agent_configuration_id' when calling update_unified_agent_configuration." if unified_agent_configuration_id.nil?
  raise "Missing the required parameter 'update_unified_agent_configuration_details' when calling update_unified_agent_configuration." if update_unified_agent_configuration_details.nil?
  raise "Parameter value for 'unified_agent_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(unified_agent_configuration_id)

  path = '/unifiedAgentConfigurations/{unifiedAgentConfigurationId}'.sub('{unifiedAgentConfigurationId}', unified_agent_configuration_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_unified_agent_configuration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoggingManagementClient#update_unified_agent_configuration') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end