Class: OCI::Mysql::DbSystemClient
- Inherits:
-
Object
- Object
- OCI::Mysql::DbSystemClient
- Defined in:
- lib/oci/mysql/db_system_client.rb
Overview
The API for the MySQL Database Service
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
-
#add_heat_wave_cluster(db_system_id, add_heat_wave_cluster_details, opts = {}) ⇒ Response
Adds a HeatWave cluster to the DB System.
-
#create_db_system(create_db_system_details, opts = {}) ⇒ Response
Creates and launches a DB System.
-
#delete_db_system(db_system_id, opts = {}) ⇒ Response
Delete a DB System, including terminating, detaching, removing, finalizing and otherwise deleting all related resources.
-
#delete_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Deletes the HeatWave cluster including terminating, detaching, removing, finalizing and otherwise deleting all related resources.
-
#generate_heat_wave_cluster_memory_estimate(db_system_id, opts = {}) ⇒ Response
Sends a request to estimate the memory footprints of user tables when loaded to HeatWave cluster memory.
-
#get_db_system(db_system_id, opts = {}) ⇒ Response
Get information about the specified DB System.
-
#get_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Gets information about the HeatWave cluster.
-
#get_heat_wave_cluster_memory_estimate(db_system_id, opts = {}) ⇒ Response
Gets the most recent HeatWave cluster memory estimate that can be used to determine a suitable HeatWave cluster size.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ DbSystemClient
constructor
Creates a new DbSystemClient.
-
#list_db_systems(compartment_id, opts = {}) ⇒ Response
Get a list of DB Systems in the specified compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#restart_db_system(db_system_id, restart_db_system_details, opts = {}) ⇒ Response
Restarts the specified DB System.
-
#restart_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Restarts the HeatWave cluster.
-
#start_db_system(db_system_id, opts = {}) ⇒ Response
Start the specified DB System.
-
#start_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Starts the HeatWave cluster.
-
#stop_db_system(db_system_id, stop_db_system_details, opts = {}) ⇒ Response
Stops the specified DB System.
-
#stop_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Stops the HeatWave cluster.
-
#update_db_system(db_system_id, update_db_system_details, opts = {}) ⇒ Response
Update the configuration of a DB System.
-
#update_heat_wave_cluster(db_system_id, update_heat_wave_cluster_details, opts = {}) ⇒ Response
Updates the HeatWave cluster.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ DbSystemClient
Creates a new DbSystemClient. 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/mysql/db_system_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 + '/20190415' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "DbSystemClient 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/mysql/db_system_client.rb', line 15 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
19 20 21 |
# File 'lib/oci/mysql/db_system_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/mysql/db_system_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/mysql/db_system_client.rb', line 25 def retry_config @retry_config end |
Instance Method Details
#add_heat_wave_cluster(db_system_id, add_heat_wave_cluster_details, opts = {}) ⇒ Response
Click here to see an example of how to use add_heat_wave_cluster API.
Adds a HeatWave cluster to the DB System.
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 164 165 166 167 168 169 |
# File 'lib/oci/mysql/db_system_client.rb', line 129 def add_heat_wave_cluster(db_system_id, add_heat_wave_cluster_details, opts = {}) logger.debug 'Calling operation DbSystemClient#add_heat_wave_cluster.' if logger raise "Missing the required parameter 'db_system_id' when calling add_heat_wave_cluster." if db_system_id.nil? raise "Missing the required parameter 'add_heat_wave_cluster_details' when calling add_heat_wave_cluster." if add_heat_wave_cluster_details.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveCluster/actions/add'.sub('{dbSystemId}', db_system_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] 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(add_heat_wave_cluster_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#add_heat_wave_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, return_type: 'OCI::Mysql::Models::HeatWaveCluster' ) end # rubocop:enable Metrics/BlockLength end |
#create_db_system(create_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_db_system API.
Creates and launches a DB System.
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 234 235 |
# File 'lib/oci/mysql/db_system_client.rb', line 198 def create_db_system(create_db_system_details, opts = {}) logger.debug 'Calling operation DbSystemClient#create_db_system.' if logger raise "Missing the required parameter 'create_db_system_details' when calling create_db_system." if create_db_system_details.nil? path = '/dbSystems' 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_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#create_db_system') 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::Mysql::Models::DbSystem' ) end # rubocop:enable Metrics/BlockLength end |
#delete_db_system(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_db_system API.
Delete a DB System, including terminating, detaching, removing, finalizing and otherwise deleting all related resources.
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/oci/mysql/db_system_client.rb', line 264 def delete_db_system(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#delete_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling delete_db_system." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}'.sub('{dbSystemId}', db_system_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: 'DbSystemClient#delete_db_system') 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_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_heat_wave_cluster API.
Deletes the HeatWave cluster including terminating, detaching, removing, finalizing and otherwise deleting all related resources.
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 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/oci/mysql/db_system_client.rb', line 329 def delete_heat_wave_cluster(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#delete_heat_wave_cluster.' if logger raise "Missing the required parameter 'db_system_id' when calling delete_heat_wave_cluster." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveCluster'.sub('{dbSystemId}', db_system_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: 'DbSystemClient#delete_heat_wave_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 |
#generate_heat_wave_cluster_memory_estimate(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use generate_heat_wave_cluster_memory_estimate API.
Sends a request to estimate the memory footprints of user tables when loaded to HeatWave cluster memory.
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/oci/mysql/db_system_client.rb', line 394 def generate_heat_wave_cluster_memory_estimate(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#generate_heat_wave_cluster_memory_estimate.' if logger raise "Missing the required parameter 'db_system_id' when calling generate_heat_wave_cluster_memory_estimate." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveClusterMemoryEstimate/actions/generate'.sub('{dbSystemId}', db_system_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[:'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 = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#generate_heat_wave_cluster_memory_estimate') 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::Mysql::Models::HeatWaveClusterMemoryEstimate' ) end # rubocop:enable Metrics/BlockLength end |
#get_db_system(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_db_system API.
Get information about the specified DB System.
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
# File 'lib/oci/mysql/db_system_client.rb', line 459 def get_db_system(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#get_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling get_db_system." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}'.sub('{dbSystemId}', db_system_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-none-match'] = opts[:if_none_match] if opts[:if_none_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#get_db_system') 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::Mysql::Models::DbSystem' ) end # rubocop:enable Metrics/BlockLength end |
#get_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_heat_wave_cluster API.
Gets information about the HeatWave cluster.
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
# File 'lib/oci/mysql/db_system_client.rb', line 523 def get_heat_wave_cluster(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#get_heat_wave_cluster.' if logger raise "Missing the required parameter 'db_system_id' when calling get_heat_wave_cluster." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveCluster'.sub('{dbSystemId}', db_system_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-none-match'] = opts[:if_none_match] if opts[:if_none_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#get_heat_wave_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::Mysql::Models::HeatWaveCluster' ) end # rubocop:enable Metrics/BlockLength end |
#get_heat_wave_cluster_memory_estimate(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_heat_wave_cluster_memory_estimate API.
Gets the most recent HeatWave cluster memory estimate that can be used to determine a suitable HeatWave cluster size.
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'lib/oci/mysql/db_system_client.rb', line 583 def get_heat_wave_cluster_memory_estimate(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#get_heat_wave_cluster_memory_estimate.' if logger raise "Missing the required parameter 'db_system_id' when calling get_heat_wave_cluster_memory_estimate." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveClusterMemoryEstimate'.sub('{dbSystemId}', db_system_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: 'DbSystemClient#get_heat_wave_cluster_memory_estimate') 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::Mysql::Models::HeatWaveClusterMemoryEstimate' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_systems(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_db_systems API.
Get a list of DB Systems in the specified compartment. The default sort order is by timeUpdated, descending.
Allowed values are: displayName, timeCreated
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 |
# File 'lib/oci/mysql/db_system_client.rb', line 668 def list_db_systems(compartment_id, opts = {}) logger.debug 'Calling operation DbSystemClient#list_db_systems.' if logger raise "Missing the required parameter 'compartment_id' when calling list_db_systems." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::Mysql::Models::DbSystem::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Mysql::Models::DbSystem::LIFECYCLE_STATE_ENUM.' end database_management_allowable_values = %w[ENABLED DISABLED] if opts[:database_management] && !opts[:database_management].empty? opts[:database_management].each do |val_to_check| unless database_management_allowable_values.include?(val_to_check) raise 'Invalid value for "database_management", must be one of ENABLED, DISABLED.' end end end if opts[:sort_by] && !%w[displayName timeCreated].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of displayName, timeCreated.' 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 = '/dbSystems' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:isHeatWaveClusterAttached] = opts[:is_heat_wave_cluster_attached] if !opts[:is_heat_wave_cluster_attached].nil? query_params[:dbSystemId] = opts[:db_system_id] if opts[:db_system_id] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:configurationId] = opts[:configuration_id] if opts[:configuration_id] query_params[:isUpToDate] = opts[:is_up_to_date] if !opts[:is_up_to_date].nil? query_params[:databaseManagement] = OCI::ApiClient.build_collection_params(opts[:database_management], :multi) if opts[:database_management] && !opts[:database_management].empty? query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # 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: 'DbSystemClient#list_db_systems') 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::Mysql::Models::DbSystemSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
94 95 96 |
# File 'lib/oci/mysql/db_system_client.rb', line 94 def logger @api_client.config.logger end |
#restart_db_system(db_system_id, restart_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use restart_db_system API.
Restarts the specified DB System.
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 |
# File 'lib/oci/mysql/db_system_client.rb', line 772 def restart_db_system(db_system_id, restart_db_system_details, opts = {}) logger.debug 'Calling operation DbSystemClient#restart_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling restart_db_system." if db_system_id.nil? raise "Missing the required parameter 'restart_db_system_details' when calling restart_db_system." if restart_db_system_details.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/actions/restart'.sub('{dbSystemId}', db_system_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] 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(restart_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#restart_db_system') 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 |
#restart_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use restart_heat_wave_cluster API.
Restarts the HeatWave cluster.
845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 |
# File 'lib/oci/mysql/db_system_client.rb', line 845 def restart_heat_wave_cluster(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#restart_heat_wave_cluster.' if logger raise "Missing the required parameter 'db_system_id' when calling restart_heat_wave_cluster." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveCluster/actions/restart'.sub('{dbSystemId}', db_system_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] 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 = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#restart_heat_wave_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 |
#start_db_system(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use start_db_system API.
Start the specified DB System.
917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 |
# File 'lib/oci/mysql/db_system_client.rb', line 917 def start_db_system(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#start_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling start_db_system." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/actions/start'.sub('{dbSystemId}', db_system_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] 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 = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#start_db_system') 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 |
#start_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use start_heat_wave_cluster API.
Starts the HeatWave cluster.
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 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'lib/oci/mysql/db_system_client.rb', line 989 def start_heat_wave_cluster(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#start_heat_wave_cluster.' if logger raise "Missing the required parameter 'db_system_id' when calling start_heat_wave_cluster." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveCluster/actions/start'.sub('{dbSystemId}', db_system_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] 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 = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#start_heat_wave_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 |
#stop_db_system(db_system_id, stop_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use stop_db_system API.
Stops the specified DB System.
A stopped DB System is not billed.
1065 1066 1067 1068 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 |
# File 'lib/oci/mysql/db_system_client.rb', line 1065 def stop_db_system(db_system_id, stop_db_system_details, opts = {}) logger.debug 'Calling operation DbSystemClient#stop_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling stop_db_system." if db_system_id.nil? raise "Missing the required parameter 'stop_db_system_details' when calling stop_db_system." if stop_db_system_details.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/actions/stop'.sub('{dbSystemId}', db_system_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] 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(stop_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#stop_db_system') 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 |
#stop_heat_wave_cluster(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use stop_heat_wave_cluster API.
Stops the HeatWave cluster.
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/mysql/db_system_client.rb', line 1138 def stop_heat_wave_cluster(db_system_id, opts = {}) logger.debug 'Calling operation DbSystemClient#stop_heat_wave_cluster.' if logger raise "Missing the required parameter 'db_system_id' when calling stop_heat_wave_cluster." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveCluster/actions/stop'.sub('{dbSystemId}', db_system_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] 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 = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#stop_heat_wave_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 |
#update_db_system(db_system_id, update_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_db_system API.
Update the configuration of a DB System.
Updating different fields in the DB System will have different results on the uptime of the DB System. For example, changing the displayName of a DB System will take effect immediately, but changing the shape of a DB System is an asynchronous operation that involves provisioning new Compute resources, pausing the DB System and migrating storage before making the DB System available again.
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'lib/oci/mysql/db_system_client.rb', line 1212 def update_db_system(db_system_id, update_db_system_details, opts = {}) logger.debug 'Calling operation DbSystemClient#update_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling update_db_system." if db_system_id.nil? raise "Missing the required parameter 'update_db_system_details' when calling update_db_system." if update_db_system_details.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}'.sub('{dbSystemId}', db_system_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_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#update_db_system') 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_heat_wave_cluster(db_system_id, update_heat_wave_cluster_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_heat_wave_cluster API.
Updates the HeatWave cluster.
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 |
# File 'lib/oci/mysql/db_system_client.rb', line 1278 def update_heat_wave_cluster(db_system_id, update_heat_wave_cluster_details, opts = {}) logger.debug 'Calling operation DbSystemClient#update_heat_wave_cluster.' if logger raise "Missing the required parameter 'db_system_id' when calling update_heat_wave_cluster." if db_system_id.nil? raise "Missing the required parameter 'update_heat_wave_cluster_details' when calling update_heat_wave_cluster." if update_heat_wave_cluster_details.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/heatWaveCluster'.sub('{dbSystemId}', db_system_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_heat_wave_cluster_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DbSystemClient#update_heat_wave_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 |