Class: OCI::Opensearch::OpensearchClusterClient
- Inherits:
-
Object
- Object
- OCI::Opensearch::OpensearchClusterClient
- Defined in:
- lib/oci/opensearch/opensearch_cluster_client.rb
Overview
The OpenSearch service API provides access to OCI Search Service with OpenSearch.
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
-
#backup_opensearch_cluster(opensearch_cluster_id, backup_opensearch_cluster_details, opts = {}) ⇒ Response
Backup the opensearch cluster details.
-
#configure_outbound_cluster(opensearch_cluster_id, configure_outbound_cluster_details, opts = {}) ⇒ Response
Configure Outbound cluster for cross-cluster operations.
-
#create_opensearch_cluster(create_opensearch_cluster_details, opts = {}) ⇒ Response
Creates a new OpensearchCluster.
-
#delete_opensearch_cluster(opensearch_cluster_id, opts = {}) ⇒ Response
Deletes a OpensearchCluster resource by identifier.
-
#get_opensearch_cluster(opensearch_cluster_id, opts = {}) ⇒ Response
Gets a OpensearchCluster by identifier.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the status of the work request with the given ID.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ OpensearchClusterClient
constructor
Creates a new OpensearchClusterClient.
-
#list_opensearch_cluster_shapes(opts = {}) ⇒ Response
Retrieves available OpenSearch Cluster node shapes.
-
#list_opensearch_clusters(compartment_id, opts = {}) ⇒ Response
Returns a list of OpensearchClusters.
-
#list_opensearch_versions(compartment_id, opts = {}) ⇒ Response
Lists the supported Opensearch versions.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Return a (paginated) list of errors for a given work request.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Return a (paginated) 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.
-
#opensearch_cluster_restore(opensearch_cluster_id, restore_opensearch_cluster_details, opts = {}) ⇒ Response
Restore the opensearch cluster details.
-
#resize_opensearch_cluster_horizontal(opensearch_cluster_id, resize_opensearch_cluster_horizontal_details, opts = {}) ⇒ Response
Resize the opensearch cluster horizontal details.
-
#resize_opensearch_cluster_vertical(opensearch_cluster_id, resize_opensearch_cluster_vertical_details, opts = {}) ⇒ Response
Resize the opensearch cluster vertical details.
-
#update_opensearch_cluster(opensearch_cluster_id, update_opensearch_cluster_details, opts = {}) ⇒ Response
Updates the OpensearchCluster.
-
#upgrade_open_search_cluster(opensearch_cluster_id, upgrade_open_search_cluster_details, opts = {}) ⇒ Response
Upgrade or clone the opensearch cluster.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ OpensearchClusterClient
Creates a new OpensearchClusterClient. 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.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 55 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 + '/20180828' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "OpensearchClusterClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
15 16 17 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 15 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
19 20 21 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 19 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
29 30 31 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 29 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
25 26 27 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 25 def retry_config @retry_config end |
Instance Method Details
#backup_opensearch_cluster(opensearch_cluster_id, backup_opensearch_cluster_details, opts = {}) ⇒ Response
Click here to see an example of how to use backup_opensearch_cluster API.
Backup the opensearch cluster details.
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 158 159 160 161 162 163 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 124 def backup_opensearch_cluster(opensearch_cluster_id, backup_opensearch_cluster_details, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#backup_opensearch_cluster.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling backup_opensearch_cluster." if opensearch_cluster_id.nil? raise "Missing the required parameter 'backup_opensearch_cluster_details' when calling backup_opensearch_cluster." if backup_opensearch_cluster_details.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}/actions/backup'.sub('{opensearchClusterId}', opensearch_cluster_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-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(backup_opensearch_cluster_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#backup_opensearch_cluster') 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 |
#configure_outbound_cluster(opensearch_cluster_id, configure_outbound_cluster_details, opts = {}) ⇒ Response
Click here to see an example of how to use configure_outbound_cluster API.
Configure Outbound cluster for cross-cluster operations
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 231 232 233 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 194 def configure_outbound_cluster(opensearch_cluster_id, configure_outbound_cluster_details, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#configure_outbound_cluster.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling configure_outbound_cluster." if opensearch_cluster_id.nil? raise "Missing the required parameter 'configure_outbound_cluster_details' when calling configure_outbound_cluster." if configure_outbound_cluster_details.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}/actions/configureOutboundCluster'.sub('{opensearchClusterId}', opensearch_cluster_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-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(configure_outbound_cluster_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#configure_outbound_cluster') 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_opensearch_cluster(create_opensearch_cluster_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_opensearch_cluster API.
Creates a new OpensearchCluster.
258 259 260 261 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 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 258 def create_opensearch_cluster(create_opensearch_cluster_details, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#create_opensearch_cluster.' if logger raise "Missing the required parameter 'create_opensearch_cluster_details' when calling create_opensearch_cluster." if create_opensearch_cluster_details.nil? path = '/opensearchClusters' 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_opensearch_cluster_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#create_opensearch_cluster') 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_opensearch_cluster(opensearch_cluster_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_opensearch_cluster API.
Deletes a OpensearchCluster resource by identifier
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 318 def delete_opensearch_cluster(opensearch_cluster_id, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#delete_opensearch_cluster.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling delete_opensearch_cluster." if opensearch_cluster_id.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}'.sub('{opensearchClusterId}', opensearch_cluster_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: 'OpensearchClusterClient#delete_opensearch_cluster') 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_opensearch_cluster(opensearch_cluster_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_opensearch_cluster API.
Gets a OpensearchCluster by identifier
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 372 def get_opensearch_cluster(opensearch_cluster_id, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#get_opensearch_cluster.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling get_opensearch_cluster." if opensearch_cluster_id.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}'.sub('{opensearchClusterId}', opensearch_cluster_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: 'OpensearchClusterClient#get_opensearch_cluster') 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::Opensearch::Models::OpensearchCluster' ) 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 status of the work request with the given ID.
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 426 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#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: 'OpensearchClusterClient#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::Opensearch::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#list_opensearch_cluster_shapes(opts = {}) ⇒ Response
Click here to see an example of how to use list_opensearch_cluster_shapes API.
Retrieves available OpenSearch Cluster node shapes.
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 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 479 def list_opensearch_cluster_shapes(opts = {}) logger.debug 'Calling operation OpensearchClusterClient#list_opensearch_cluster_shapes.' if logger path = '/shapes' 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#list_opensearch_cluster_shapes') 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::Opensearch::Models::ShapesDetails' ) end # rubocop:enable Metrics/BlockLength end |
#list_opensearch_clusters(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_opensearch_clusters API.
Returns a list of OpensearchClusters.
Allowed values are: timeCreated, displayName
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 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 541 def list_opensearch_clusters(compartment_id, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#list_opensearch_clusters.' if logger raise "Missing the required parameter 'compartment_id' when calling list_opensearch_clusters." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::Opensearch::Models::OpensearchCluster::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Opensearch::Models::OpensearchCluster::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::Opensearch::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Opensearch::Models::SORT_ORDER_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 path = '/opensearchClusters' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:id] = opts[:id] if opts[:id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] 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: 'OpensearchClusterClient#list_opensearch_clusters') 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::Opensearch::Models::OpensearchClusterCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_opensearch_versions(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_opensearch_versions API.
Lists the supported Opensearch versions
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 643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 616 def list_opensearch_versions(compartment_id, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#list_opensearch_versions.' if logger raise "Missing the required parameter 'compartment_id' when calling list_opensearch_versions." if compartment_id.nil? path = '/opensearch/versions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id 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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#list_opensearch_versions') 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::Opensearch::Models::OpensearchVersionsCollection' ) 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 (paginated) list of errors for a given work request.
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 708 709 710 711 712 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 674 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#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: 'OpensearchClusterClient#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: 'OCI::Opensearch::Models::WorkRequestErrorCollection' ) 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 (paginated) list of logs for a given work request.
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 770 771 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 733 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#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: 'OpensearchClusterClient#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: 'OCI::Opensearch::Models::WorkRequestLogEntryCollection' ) 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.
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 828 829 830 831 832 833 834 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 794 def list_work_requests(compartment_id, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#list_work_requests.' if logger raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil? path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id] query_params[:sourceResourceId] = opts[:source_resource_id] if opts[:source_resource_id] 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: 'OpensearchClusterClient#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: 'OCI::Opensearch::Models::WorkRequestCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
94 95 96 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 94 def logger @api_client.config.logger end |
#opensearch_cluster_restore(opensearch_cluster_id, restore_opensearch_cluster_details, opts = {}) ⇒ Response
Click here to see an example of how to use opensearch_cluster_restore API.
Restore the opensearch cluster details.
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 895 896 897 898 899 900 901 902 903 904 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 865 def opensearch_cluster_restore(opensearch_cluster_id, restore_opensearch_cluster_details, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#opensearch_cluster_restore.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling opensearch_cluster_restore." if opensearch_cluster_id.nil? raise "Missing the required parameter 'restore_opensearch_cluster_details' when calling opensearch_cluster_restore." if restore_opensearch_cluster_details.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}/actions/restore'.sub('{opensearchClusterId}', opensearch_cluster_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-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(restore_opensearch_cluster_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#opensearch_cluster_restore') 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 |
#resize_opensearch_cluster_horizontal(opensearch_cluster_id, resize_opensearch_cluster_horizontal_details, opts = {}) ⇒ Response
Click here to see an example of how to use resize_opensearch_cluster_horizontal API.
Resize the opensearch cluster horizontal details.
935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 935 def resize_opensearch_cluster_horizontal(opensearch_cluster_id, resize_opensearch_cluster_horizontal_details, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#resize_opensearch_cluster_horizontal.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling resize_opensearch_cluster_horizontal." if opensearch_cluster_id.nil? raise "Missing the required parameter 'resize_opensearch_cluster_horizontal_details' when calling resize_opensearch_cluster_horizontal." if resize_opensearch_cluster_horizontal_details.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}/actions/resizeHorizontal'.sub('{opensearchClusterId}', opensearch_cluster_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-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(resize_opensearch_cluster_horizontal_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#resize_opensearch_cluster_horizontal') 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 |
#resize_opensearch_cluster_vertical(opensearch_cluster_id, resize_opensearch_cluster_vertical_details, opts = {}) ⇒ Response
Click here to see an example of how to use resize_opensearch_cluster_vertical API.
Resize the opensearch cluster vertical details.
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 1005 def resize_opensearch_cluster_vertical(opensearch_cluster_id, resize_opensearch_cluster_vertical_details, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#resize_opensearch_cluster_vertical.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling resize_opensearch_cluster_vertical." if opensearch_cluster_id.nil? raise "Missing the required parameter 'resize_opensearch_cluster_vertical_details' when calling resize_opensearch_cluster_vertical." if resize_opensearch_cluster_vertical_details.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}/actions/resizeVertical'.sub('{opensearchClusterId}', opensearch_cluster_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-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(resize_opensearch_cluster_vertical_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#resize_opensearch_cluster_vertical') 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 |
#update_opensearch_cluster(opensearch_cluster_id, update_opensearch_cluster_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_opensearch_cluster API.
Updates the OpensearchCluster
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 1069 def update_opensearch_cluster(opensearch_cluster_id, update_opensearch_cluster_details, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#update_opensearch_cluster.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling update_opensearch_cluster." if opensearch_cluster_id.nil? raise "Missing the required parameter 'update_opensearch_cluster_details' when calling update_opensearch_cluster." if update_opensearch_cluster_details.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}'.sub('{opensearchClusterId}', opensearch_cluster_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_opensearch_cluster_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#update_opensearch_cluster') 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 |
#upgrade_open_search_cluster(opensearch_cluster_id, upgrade_open_search_cluster_details, opts = {}) ⇒ Response
Click here to see an example of how to use upgrade_open_search_cluster API.
Upgrade or clone the opensearch cluster.
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 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 |
# File 'lib/oci/opensearch/opensearch_cluster_client.rb', line 1137 def upgrade_open_search_cluster(opensearch_cluster_id, upgrade_open_search_cluster_details, opts = {}) logger.debug 'Calling operation OpensearchClusterClient#upgrade_open_search_cluster.' if logger raise "Missing the required parameter 'opensearch_cluster_id' when calling upgrade_open_search_cluster." if opensearch_cluster_id.nil? raise "Missing the required parameter 'upgrade_open_search_cluster_details' when calling upgrade_open_search_cluster." if upgrade_open_search_cluster_details.nil? raise "Parameter value for 'opensearch_cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(opensearch_cluster_id) path = '/opensearchClusters/{opensearchClusterId}/actions/upgrade'.sub('{opensearchClusterId}', opensearch_cluster_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-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(upgrade_open_search_cluster_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'OpensearchClusterClient#upgrade_open_search_cluster') 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 |