Class: OCI::Logging::LoggingManagementClient
- Inherits:
-
Object
- Object
- OCI::Logging::LoggingManagementClient
- Defined in:
- lib/oci/logging/logging_management_client.rb
Overview
Use the Logging Management API to create, read, list, update, move and delete log groups, log objects, log saved searches, and agent configurations.
For more information, see Logging Overview.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#change_log_group_compartment(log_group_id, change_log_group_compartment_details, opts = {}) ⇒ Response
Moves a log group into a different compartment within the same tenancy.
-
#change_log_log_group(log_group_id, log_id, change_log_log_group_details, opts = {}) ⇒ Response
Moves a log into a different log group within the same tenancy.
-
#change_log_saved_search_compartment(log_saved_search_id, change_log_saved_search_compartment_details, opts = {}) ⇒ Response
Moves a saved search into a different compartment within the same tenancy.
-
#change_unified_agent_configuration_compartment(unified_agent_configuration_id, change_unified_agent_configuration_compartment_details, opts = {}) ⇒ Response
Moves the unified agent configuration into a different compartment within the same tenancy.
-
#create_log(log_group_id, create_log_details, opts = {}) ⇒ Response
Creates a log within the specified log group.
-
#create_log_group(create_log_group_details, opts = {}) ⇒ Response
Create a new log group with a unique display name.
-
#create_log_saved_search(create_log_saved_search_details, opts = {}) ⇒ Response
Creates a new LogSavedSearch.
-
#create_unified_agent_configuration(create_unified_agent_configuration_details, opts = {}) ⇒ Response
Create unified agent configuration registration.
-
#delete_log(log_group_id, log_id, opts = {}) ⇒ Response
Deletes the log object in a log group.
-
#delete_log_group(log_group_id, opts = {}) ⇒ Response
Deletes the specified log group.
-
#delete_log_saved_search(log_saved_search_id, opts = {}) ⇒ Response
Deletes the specified LogSavedSearch.
-
#delete_unified_agent_configuration(unified_agent_configuration_id, opts = {}) ⇒ Response
Delete unified agent configuration.
-
#delete_work_request(work_request_id, opts = {}) ⇒ Response
Cancel a work request that has not started yet.
-
#get_log(log_group_id, log_id, opts = {}) ⇒ Response
Gets the log object configuration for the log object OCID.
-
#get_log_group(log_group_id, opts = {}) ⇒ Response
Get the specified log group's information.
-
#get_log_saved_search(log_saved_search_id, opts = {}) ⇒ Response
Retrieves a LogSavedSearch.
-
#get_unified_agent_configuration(unified_agent_configuration_id, opts = {}) ⇒ Response
Get the unified agent configuration for an ID.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the details of the work request with the given ID.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ LoggingManagementClient
constructor
Creates a new LoggingManagementClient.
-
#list_log_groups(compartment_id, opts = {}) ⇒ Response
Lists all log groups for the specified compartment or tenancy.
-
#list_log_saved_searches(compartment_id, opts = {}) ⇒ Response
Lists LogSavedSearches for this compartment.
-
#list_logs(log_group_id, opts = {}) ⇒ Response
Lists the specified log group's log objects.
-
#list_services(opts = {}) ⇒ Response
Lists all services that support logging.
-
#list_unified_agent_configurations(compartment_id, opts = {}) ⇒ Response
Lists all unified agent configurations in the specified compartment.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Return a list of errors for a given work request.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Return a list of logs for a given work request.
-
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Lists the work requests in a compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#update_log(log_group_id, log_id, update_log_details, opts = {}) ⇒ Response
Updates the existing log object with the associated configuration.
-
#update_log_group(log_group_id, update_log_group_details, opts = {}) ⇒ Response
Updates the existing log group with the associated configuration.
-
#update_log_saved_search(log_saved_search_id, update_log_saved_search_details, opts = {}) ⇒ Response
Updates an existing LogSavedSearch.
-
#update_unified_agent_configuration(unified_agent_configuration_id, update_unified_agent_configuration_details, opts = {}) ⇒ Response
Update an existing unified agent configuration.
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.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/logging/logging_management_client.rb', line 58 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_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
18 19 20 |
# File 'lib/oci/logging/logging_management_client.rb', line 18 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
22 23 24 |
# File 'lib/oci/logging/logging_management_client.rb', line 22 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
32 33 34 |
# File 'lib/oci/logging/logging_management_client.rb', line 32 def region @region end |
#retry_config ⇒ OCI::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
28 29 30 |
# File 'lib/oci/logging/logging_management_client.rb', line 28 def retry_config @retry_config end |
Instance Method Details
#change_log_group_compartment(log_group_id, change_log_group_compartment_details, opts = {}) ⇒ Response
Click here 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.
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 158 159 160 161 162 |
# File 'lib/oci/logging/logging_management_client.rb', line 125 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.(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
Click here 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.
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 226 227 228 229 230 |
# File 'lib/oci/logging/logging_management_client.rb', line 191 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.(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
Click here 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.
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 302 303 304 305 306 |
# File 'lib/oci/logging/logging_management_client.rb', line 267 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.(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
Click here 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.
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 377 378 379 380 381 |
# File 'lib/oci/logging/logging_management_client.rb', line 342 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.(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
Click here 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.
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 445 446 447 448 449 |
# File 'lib/oci/logging/logging_management_client.rb', line 411 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.(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
Click here 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.
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 510 511 512 513 514 |
# File 'lib/oci/logging/logging_management_client.rb', line 478 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.(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
Click here to see an example of how to use create_log_saved_search API.
Creates a new LogSavedSearch.
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 575 576 577 578 579 |
# File 'lib/oci/logging/logging_management_client.rb', line 542 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.(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
Click here to see an example of how to use create_unified_agent_configuration API.
Create unified agent configuration registration.
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 638 639 640 641 642 |
# File 'lib/oci/logging/logging_management_client.rb', line 606 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.(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
Click here to see an example of how to use delete_log API.
Deletes the log object in a log group.
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 703 704 705 706 707 |
# File 'lib/oci/logging/logging_management_client.rb', line 669 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.(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
Click here to see an example of how to use delete_log_group API.
Deletes the specified log group.
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 765 766 767 768 769 |
# File 'lib/oci/logging/logging_management_client.rb', line 733 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.(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
Click here to see an example of how to use delete_log_saved_search API.
Deletes the specified LogSavedSearch.
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 828 829 830 831 832 |
# File 'lib/oci/logging/logging_management_client.rb', line 796 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.(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
Click here to see an example of how to use delete_unified_agent_configuration API.
Delete unified agent configuration.
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 890 891 892 893 894 |
# File 'lib/oci/logging/logging_management_client.rb', line 858 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.(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
Click here to see an example of how to use delete_work_request API.
Cancel a work request that has not started yet.
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 953 954 955 956 957 |
# File 'lib/oci/logging/logging_management_client.rb', line 921 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.(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
Click here to see an example of how to use get_log API.
Gets the log object configuration for the log object OCID.
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 1013 1014 1015 1016 1017 |
# File 'lib/oci/logging/logging_management_client.rb', line 979 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.(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
Click here to see an example of how to use get_log_group API.
Get the specified log group's information.
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 1069 1070 1071 1072 1073 |
# File 'lib/oci/logging/logging_management_client.rb', line 1037 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.(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_saved_search(log_saved_search_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_log_saved_search API.
Retrieves a LogSavedSearch.
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 1094 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.(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
Click here to see an example of how to use get_unified_agent_configuration API.
Get the unified agent configuration for an ID.
1150 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 |
# File 'lib/oci/logging/logging_management_client.rb', line 1150 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.(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
Click here to see an example of how to use get_work_request API.
Gets the details of the work request with the given ID.
1206 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 |
# File 'lib/oci/logging/logging_management_client.rb', line 1206 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.(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
Click here to see an example of how to use list_log_groups API.
Lists all log groups for the specified compartment or tenancy.
1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 |
# File 'lib/oci/logging/logging_management_client.rb', line 1278 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.(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_saved_searches(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_log_saved_searches API.
Lists LogSavedSearches for this compartment.
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 |
# File 'lib/oci/logging/logging_management_client.rb', line 1366 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.(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
Click here to see an example of how to use list_logs API.
Lists the specified log group's log objects.
1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'lib/oci/logging/logging_management_client.rb', line 1454 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.(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
Click here to see an example of how to use list_services API.
Lists all services that support logging.
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 1562 1563 1564 1565 1566 1567 1568 |
# File 'lib/oci/logging/logging_management_client.rb', line 1534 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.(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
Click here to see an example of how to use list_unified_agent_configurations API.
Lists all unified agent configurations in the specified compartment.
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 1661 1662 1663 1664 1665 |
# File 'lib/oci/logging/logging_management_client.rb', line 1608 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.(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
Click here to see an example of how to use list_work_request_errors API.
Return a list of errors for a given work request.
1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 |
# File 'lib/oci/logging/logging_management_client.rb', line 1691 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.(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
Click here to see an example of how to use list_work_request_logs API.
Return a list of logs for a given work request.
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 |
# File 'lib/oci/logging/logging_management_client.rb', line 1755 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.(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
Click here to see an example of how to use list_work_requests API.
Lists the work requests in a compartment.
1830 1831 1832 1833 1834 1835 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 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 |
# File 'lib/oci/logging/logging_management_client.rb', line 1830 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.(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 |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
97 98 99 |
# File 'lib/oci/logging/logging_management_client.rb', line 97 def logger @api_client.config.logger end |
#update_log(log_group_id, log_id, update_log_details, opts = {}) ⇒ Response
Click here 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.
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 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 |
# File 'lib/oci/logging/logging_management_client.rb', line 1914 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.(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
Click here 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.
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 |
# File 'lib/oci/logging/logging_management_client.rb', line 1982 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.(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
Click here to see an example of how to use update_log_saved_search API.
Updates an existing LogSavedSearch.
2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 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 |
# File 'lib/oci/logging/logging_management_client.rb', line 2048 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.(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
Click here 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.
2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 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 |
# File 'lib/oci/logging/logging_management_client.rb', line 2116 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.(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 |