Class: OCI::Database::DatabaseClient
- Inherits:
-
Object
- Object
- OCI::Database::DatabaseClient
- Defined in:
- lib/oci/database/database_client.rb
Overview
The API for the 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
-
#create_backup(create_backup_details, opts = {}) ⇒ Response
Creates a new backup in the specified database based on the request parameters you provide.
-
#create_data_guard_association(database_id, create_data_guard_association_details, opts = {}) ⇒ Response
Creates a new Data Guard association.
-
#create_db_home(create_db_home_with_db_system_id_details, opts = {}) ⇒ Response
Creates a new DB Home in the specified DB System based on the request parameters you provide.
-
#db_node_action(db_node_id, action, opts = {}) ⇒ Response
Performs an action, such as one of the power actions (start, stop, softreset, or reset), on the specified DB Node.
-
#delete_backup(backup_id, opts = {}) ⇒ Response
Deletes a full backup.
-
#delete_db_home(db_home_id, opts = {}) ⇒ Response
Deletes a DB Home.
-
#failover_data_guard_association(database_id, data_guard_association_id, failover_data_guard_association_details, opts = {}) ⇒ Response
Performs a failover to transition the standby database identified by the
databaseIdparameter into the specified Data Guard association’s primary role after the existing primary database fails or becomes unreachable. -
#get_backup(backup_id, opts = {}) ⇒ Response
Gets information about the specified backup.
-
#get_data_guard_association(database_id, data_guard_association_id, opts = {}) ⇒ Response
Gets the specified Data Guard association’s configuration information.
-
#get_database(database_id, opts = {}) ⇒ Response
Gets information about a specific database.
-
#get_db_home(db_home_id, opts = {}) ⇒ Response
Gets information about the specified database home.
-
#get_db_home_patch(db_home_id, patch_id, opts = {}) ⇒ Response
Gets information about a specified patch package.
-
#get_db_home_patch_history_entry(db_home_id, patch_history_entry_id, opts = {}) ⇒ Response
Gets the patch history details for the specified patchHistoryEntryId.
-
#get_db_node(db_node_id, opts = {}) ⇒ Response
Gets information about the specified database node.
-
#get_db_system(db_system_id, opts = {}) ⇒ Response
Gets information about the specified DB System.
-
#get_db_system_patch(db_system_id, patch_id, opts = {}) ⇒ Response
Gets information about a specified patch package.
-
#get_db_system_patch_history_entry(db_system_id, patch_history_entry_id, opts = {}) ⇒ Response
Gets the patch history details for the specified patchHistoryEntryId.
-
#initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ DatabaseClient
constructor
Creates a new DatabaseClient.
-
#launch_db_system(launch_db_system_details, opts = {}) ⇒ Response
Launches a new DB System in the specified compartment and Availability Domain.
-
#list_backups(opts = {}) ⇒ Response
Gets a list of backups based on the databaseId or compartmentId specified.
-
#list_data_guard_associations(database_id, opts = {}) ⇒ Response
Lists all Data Guard associations for the specified database.
-
#list_databases(compartment_id, db_home_id, opts = {}) ⇒ Response
Gets a list of the databases in the specified database home.
-
#list_db_home_patch_history_entries(db_home_id, opts = {}) ⇒ Response
Gets history of the actions taken for patches for the specified database home.
-
#list_db_home_patches(db_home_id, opts = {}) ⇒ Response
Lists patches applicable to the requested database home.
-
#list_db_homes(compartment_id, db_system_id, opts = {}) ⇒ Response
Gets a list of database homes in the specified DB System and compartment.
-
#list_db_nodes(compartment_id, db_system_id, opts = {}) ⇒ Response
Gets a list of database nodes in the specified DB System and compartment.
-
#list_db_system_patch_history_entries(db_system_id, opts = {}) ⇒ Response
Gets the history of the patch actions performed on the specified DB System.
-
#list_db_system_patches(db_system_id, opts = {}) ⇒ Response
Lists the patches applicable to the requested DB System.
-
#list_db_system_shapes(availability_domain, compartment_id, opts = {}) ⇒ Response
Gets a list of the shapes that can be used to launch a new DB System.
-
#list_db_systems(compartment_id, opts = {}) ⇒ Response
Gets a list of the DB Systems in the specified compartment.
-
#list_db_versions(compartment_id, opts = {}) ⇒ Response
Gets a list of supported Oracle database versions.
-
#logger ⇒ Logger
The logger for this client.
-
#reinstate_data_guard_association(database_id, data_guard_association_id, reinstate_data_guard_association_details, opts = {}) ⇒ Response
Reinstates the database identified by the
databaseIdparameter into the standby role in a Data Guard association. -
#restore_database(database_id, restore_database_details, opts = {}) ⇒ Response
Restore a Database based on the request parameters you provide.
-
#switchover_data_guard_association(database_id, data_guard_association_id, switchover_data_guard_association_details, opts = {}) ⇒ Response
Performs a switchover to transition the primary database of a Data Guard association into a standby role.
-
#terminate_db_system(db_system_id, opts = {}) ⇒ Response
Terminates a DB System and permanently deletes it and any databases running on it, and any storage volumes attached to it.
-
#update_database(database_id, update_database_details, opts = {}) ⇒ Response
Update a Database based on the request parameters you provide.
-
#update_db_home(db_home_id, update_db_home_details, opts = {}) ⇒ Response
Patches the specified dbHome.
-
#update_db_system(db_system_id, update_db_system_details, opts = {}) ⇒ Response
Updates the properties of a DB System, such as the CPU core count.
Constructor Details
#initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ DatabaseClient
Creates a new DatabaseClient. If a config is not specified, then the global OCI.config will be used.
A region must be specified in either the config or the region parameter. If specified in both, then the region parameter will be used.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/database/database_client.rb', line 48 def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals) # 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 unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) if signer.nil? signer = OCI::Signer.new( config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content ) end @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
12 13 14 |
# File 'lib/oci/database/database_client.rb', line 12 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
16 17 18 |
# File 'lib/oci/database/database_client.rb', line 16 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
26 27 28 |
# File 'lib/oci/database/database_client.rb', line 26 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
22 23 24 |
# File 'lib/oci/database/database_client.rb', line 22 def retry_config @retry_config end |
Instance Method Details
#create_backup(create_backup_details, opts = {}) ⇒ Response
Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/oci/database/database_client.rb', line 115 def create_backup(create_backup_details, opts = {}) logger.debug 'Calling operation DatabaseClient#create_backup.' if logger raise "Missing the required parameter 'create_backup_details' when calling create_backup." if create_backup_details.nil? path = '/backups' operation_signing_strategy = :standard # 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-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_backup_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#create_backup') 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::Database::Models::Backup' ) end # rubocop:enable Metrics/BlockLength end |
#create_data_guard_association(database_id, create_data_guard_association_details, opts = {}) ⇒ Response
Creates a new Data Guard association. A Data Guard association represents the replication relationship between the specified database and a peer database. For more information, see [Using Oracle Data Guard](docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/usingdataguard.htm).
All Oracle Cloud Infrastructure resources, including Data Guard associations, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource’s OCID by using a List API operation on that resource type, or by viewing the resource in the Console. For more information, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/oci/database/database_client.rb', line 180 def create_data_guard_association(database_id, create_data_guard_association_details, opts = {}) logger.debug 'Calling operation DatabaseClient#create_data_guard_association.' if logger raise "Missing the required parameter 'database_id' when calling create_data_guard_association." if database_id.nil? raise "Missing the required parameter 'create_data_guard_association_details' when calling create_data_guard_association." if create_data_guard_association_details.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) path = '/databases/{databaseId}/dataGuardAssociations'.sub('{databaseId}', database_id.to_s) operation_signing_strategy = :standard # 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-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_data_guard_association_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#create_data_guard_association') 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::Database::Models::DataGuardAssociation' ) end # rubocop:enable Metrics/BlockLength end |
#create_db_home(create_db_home_with_db_system_id_details, opts = {}) ⇒ Response
Creates a new DB Home in the specified DB System based on the request parameters you provide.
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oci/database/database_client.rb', line 239 def create_db_home(create_db_home_with_db_system_id_details, opts = {}) logger.debug 'Calling operation DatabaseClient#create_db_home.' if logger raise "Missing the required parameter 'create_db_home_with_db_system_id_details' when calling create_db_home." if create_db_home_with_db_system_id_details.nil? path = '/dbHomes' operation_signing_strategy = :standard # 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-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_db_home_with_db_system_id_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#create_db_home') 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::Database::Models::DbHome' ) end # rubocop:enable Metrics/BlockLength end |
#db_node_action(db_node_id, action, opts = {}) ⇒ Response
Performs an action, such as one of the power actions (start, stop, softreset, or reset), on the specified DB Node.
start - power on
stop - power off
softreset - ACPI shutdown and power on
reset - power off and power on
Note that the stop state has no effect on the resources you consume. Billing continues for DB Nodes that you stop, and related resources continue to apply against any relevant quotas. You must terminate the DB System (terminate_db_system) to remove its resources from billing and quotas.
316 317 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 355 356 357 |
# File 'lib/oci/database/database_client.rb', line 316 def db_node_action(db_node_id, action, opts = {}) logger.debug 'Calling operation DatabaseClient#db_node_action.' if logger raise "Missing the required parameter 'db_node_id' when calling db_node_action." if db_node_id.nil? raise "Missing the required parameter 'action' when calling db_node_action." if action.nil? unless %w[STOP START SOFTRESET RESET].include?(action) raise "Invalid value for 'action', must be one of STOP, START, SOFTRESET, RESET." end raise "Parameter value for 'db_node_id' must not be blank" if OCI::Internal::Util.blank_string?(db_node_id) path = '/dbNodes/{dbNodeId}'.sub('{dbNodeId}', db_node_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} query_params[:action] = action # 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-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#db_node_action') 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::Database::Models::DbNode' ) end # rubocop:enable Metrics/BlockLength end |
#delete_backup(backup_id, opts = {}) ⇒ Response
Deletes a full backup. You cannot delete automatic backups using this API.
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 409 410 |
# File 'lib/oci/database/database_client.rb', line 377 def delete_backup(backup_id, opts = {}) logger.debug 'Calling operation DatabaseClient#delete_backup.' if logger raise "Missing the required parameter 'backup_id' when calling delete_backup." if backup_id.nil? raise "Parameter value for 'backup_id' must not be blank" if OCI::Internal::Util.blank_string?(backup_id) path = '/backups/{backupId}'.sub('{backupId}', backup_id.to_s) operation_signing_strategy = :standard # 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] post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#delete_backup') 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_db_home(db_home_id, opts = {}) ⇒ Response
Deletes a DB Home. The DB Home and its database data are local to the DB System and will be lost when it is deleted. Oracle recommends that you back up any data in the DB System prior to deleting it.
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 463 464 465 466 |
# File 'lib/oci/database/database_client.rb', line 432 def delete_db_home(db_home_id, opts = {}) logger.debug 'Calling operation DatabaseClient#delete_db_home.' if logger raise "Missing the required parameter 'db_home_id' when calling delete_db_home." if db_home_id.nil? raise "Parameter value for 'db_home_id' must not be blank" if OCI::Internal::Util.blank_string?(db_home_id) path = '/dbHomes/{dbHomeId}'.sub('{dbHomeId}', db_home_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} query_params[:performFinalBackup] = opts[:perform_final_backup] if opts[:perform_final_backup] # 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] post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#delete_db_home') 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 |
#failover_data_guard_association(database_id, data_guard_association_id, failover_data_guard_association_details, opts = {}) ⇒ Response
Performs a failover to transition the standby database identified by the databaseId parameter into the specified Data Guard association’s primary role after the existing primary database fails or becomes unreachable.
A failover might result in data loss depending on the protection mode in effect at the time of the primary database failure.
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/oci/database/database_client.rb', line 493 def failover_data_guard_association(database_id, data_guard_association_id, failover_data_guard_association_details, opts = {}) logger.debug 'Calling operation DatabaseClient#failover_data_guard_association.' if logger raise "Missing the required parameter 'database_id' when calling failover_data_guard_association." if database_id.nil? raise "Missing the required parameter 'data_guard_association_id' when calling failover_data_guard_association." if data_guard_association_id.nil? raise "Missing the required parameter 'failover_data_guard_association_details' when calling failover_data_guard_association." if failover_data_guard_association_details.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) raise "Parameter value for 'data_guard_association_id' must not be blank" if OCI::Internal::Util.blank_string?(data_guard_association_id) path = '/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/failover'.sub('{databaseId}', database_id.to_s).sub('{dataGuardAssociationId}', data_guard_association_id.to_s) operation_signing_strategy = :standard # 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] post_body = @api_client.object_to_http_body(failover_data_guard_association_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#failover_data_guard_association') 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::Database::Models::DataGuardAssociation' ) end # rubocop:enable Metrics/BlockLength end |
#get_backup(backup_id, opts = {}) ⇒ Response
Gets information about the specified backup.
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 |
# File 'lib/oci/database/database_client.rb', line 547 def get_backup(backup_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_backup.' if logger raise "Missing the required parameter 'backup_id' when calling get_backup." if backup_id.nil? raise "Parameter value for 'backup_id' must not be blank" if OCI::Internal::Util.blank_string?(backup_id) path = '/backups/{backupId}'.sub('{backupId}', backup_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_backup') 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::Database::Models::Backup' ) end # rubocop:enable Metrics/BlockLength end |
#get_data_guard_association(database_id, data_guard_association_id, opts = {}) ⇒ Response
Gets the specified Data Guard association’s configuration information.
600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/oci/database/database_client.rb', line 600 def get_data_guard_association(database_id, data_guard_association_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_data_guard_association.' if logger raise "Missing the required parameter 'database_id' when calling get_data_guard_association." if database_id.nil? raise "Missing the required parameter 'data_guard_association_id' when calling get_data_guard_association." if data_guard_association_id.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) raise "Parameter value for 'data_guard_association_id' must not be blank" if OCI::Internal::Util.blank_string?(data_guard_association_id) path = '/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}'.sub('{databaseId}', database_id.to_s).sub('{dataGuardAssociationId}', data_guard_association_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_data_guard_association') 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::Database::Models::DataGuardAssociation' ) end # rubocop:enable Metrics/BlockLength end |
#get_database(database_id, opts = {}) ⇒ Response
Gets information about a specific database.
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'lib/oci/database/database_client.rb', line 653 def get_database(database_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_database.' if logger raise "Missing the required parameter 'database_id' when calling get_database." if database_id.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) path = '/databases/{databaseId}'.sub('{databaseId}', database_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_database') 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::Database::Models::Database' ) end # rubocop:enable Metrics/BlockLength end |
#get_db_home(db_home_id, opts = {}) ⇒ Response
Gets information about the specified database home.
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/database/database_client.rb', line 704 def get_db_home(db_home_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_db_home.' if logger raise "Missing the required parameter 'db_home_id' when calling get_db_home." if db_home_id.nil? raise "Parameter value for 'db_home_id' must not be blank" if OCI::Internal::Util.blank_string?(db_home_id) path = '/dbHomes/{dbHomeId}'.sub('{dbHomeId}', db_home_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_db_home') 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::Database::Models::DbHome' ) end # rubocop:enable Metrics/BlockLength end |
#get_db_home_patch(db_home_id, patch_id, opts = {}) ⇒ Response
Gets information about a specified patch package.
757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 |
# File 'lib/oci/database/database_client.rb', line 757 def get_db_home_patch(db_home_id, patch_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_db_home_patch.' if logger raise "Missing the required parameter 'db_home_id' when calling get_db_home_patch." if db_home_id.nil? raise "Missing the required parameter 'patch_id' when calling get_db_home_patch." if patch_id.nil? raise "Parameter value for 'db_home_id' must not be blank" if OCI::Internal::Util.blank_string?(db_home_id) raise "Parameter value for 'patch_id' must not be blank" if OCI::Internal::Util.blank_string?(patch_id) path = '/dbHomes/{dbHomeId}/patches/{patchId}'.sub('{dbHomeId}', db_home_id.to_s).sub('{patchId}', patch_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_db_home_patch') 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::Database::Models::Patch' ) end # rubocop:enable Metrics/BlockLength end |
#get_db_home_patch_history_entry(db_home_id, patch_history_entry_id, opts = {}) ⇒ Response
Gets the patch history details for the specified patchHistoryEntryId
812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
# File 'lib/oci/database/database_client.rb', line 812 def get_db_home_patch_history_entry(db_home_id, patch_history_entry_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_db_home_patch_history_entry.' if logger raise "Missing the required parameter 'db_home_id' when calling get_db_home_patch_history_entry." if db_home_id.nil? raise "Missing the required parameter 'patch_history_entry_id' when calling get_db_home_patch_history_entry." if patch_history_entry_id.nil? raise "Parameter value for 'db_home_id' must not be blank" if OCI::Internal::Util.blank_string?(db_home_id) raise "Parameter value for 'patch_history_entry_id' must not be blank" if OCI::Internal::Util.blank_string?(patch_history_entry_id) path = '/dbHomes/{dbHomeId}/patchHistoryEntries/{patchHistoryEntryId}'.sub('{dbHomeId}', db_home_id.to_s).sub('{patchHistoryEntryId}', patch_history_entry_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_db_home_patch_history_entry') 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::Database::Models::PatchHistoryEntry' ) end # rubocop:enable Metrics/BlockLength end |
#get_db_node(db_node_id, opts = {}) ⇒ Response
Gets information about the specified database node.
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 |
# File 'lib/oci/database/database_client.rb', line 865 def get_db_node(db_node_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_db_node.' if logger raise "Missing the required parameter 'db_node_id' when calling get_db_node." if db_node_id.nil? raise "Parameter value for 'db_node_id' must not be blank" if OCI::Internal::Util.blank_string?(db_node_id) path = '/dbNodes/{dbNodeId}'.sub('{dbNodeId}', db_node_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_db_node') 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::Database::Models::DbNode' ) end # rubocop:enable Metrics/BlockLength end |
#get_db_system(db_system_id, opts = {}) ⇒ Response
Gets information about the specified DB System.
916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 |
# File 'lib/oci/database/database_client.rb', line 916 def get_db_system(db_system_id, opts = {}) logger.debug 'Calling operation DatabaseClient#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 # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#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::Database::Models::DbSystem' ) end # rubocop:enable Metrics/BlockLength end |
#get_db_system_patch(db_system_id, patch_id, opts = {}) ⇒ Response
Gets information about a specified patch package.
969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/oci/database/database_client.rb', line 969 def get_db_system_patch(db_system_id, patch_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_db_system_patch.' if logger raise "Missing the required parameter 'db_system_id' when calling get_db_system_patch." if db_system_id.nil? raise "Missing the required parameter 'patch_id' when calling get_db_system_patch." if patch_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) raise "Parameter value for 'patch_id' must not be blank" if OCI::Internal::Util.blank_string?(patch_id) path = '/dbSystems/{dbSystemId}/patches/{patchId}'.sub('{dbSystemId}', db_system_id.to_s).sub('{patchId}', patch_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_db_system_patch') 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::Database::Models::Patch' ) end # rubocop:enable Metrics/BlockLength end |
#get_db_system_patch_history_entry(db_system_id, patch_history_entry_id, opts = {}) ⇒ Response
Gets the patch history details for the specified patchHistoryEntryId.
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
# File 'lib/oci/database/database_client.rb', line 1024 def get_db_system_patch_history_entry(db_system_id, patch_history_entry_id, opts = {}) logger.debug 'Calling operation DatabaseClient#get_db_system_patch_history_entry.' if logger raise "Missing the required parameter 'db_system_id' when calling get_db_system_patch_history_entry." if db_system_id.nil? raise "Missing the required parameter 'patch_history_entry_id' when calling get_db_system_patch_history_entry." if patch_history_entry_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) raise "Parameter value for 'patch_history_entry_id' must not be blank" if OCI::Internal::Util.blank_string?(patch_history_entry_id) path = '/dbSystems/{dbSystemId}/patchHistoryEntries/{patchHistoryEntryId}'.sub('{dbSystemId}', db_system_id.to_s).sub('{patchHistoryEntryId}', patch_history_entry_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#get_db_system_patch_history_entry') 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::Database::Models::PatchHistoryEntry' ) end # rubocop:enable Metrics/BlockLength end |
#launch_db_system(launch_db_system_details, opts = {}) ⇒ Response
Launches a new DB System in the specified compartment and Availability Domain. You’ll specify a single Oracle Database Edition that applies to all the databases on that DB System. The selected edition cannot be changed.
An initial database is created on the DB System based on the request parameters you provide and some default options. For more information, see [Default Options for the Initial Database](docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/launchingDB.htm#Default_Options_for_the_Initial_Database).
The DB System will include a command line interface (CLI) that you can use to create additional databases and manage existing databases. For more information, see the [Oracle Database CLI Reference](docs.us-phoenix-1.oraclecloud.com/Content/Database/References/odacli.htm#Oracle_Database_CLI_Reference).
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 |
# File 'lib/oci/database/database_client.rb', line 1092 def launch_db_system(launch_db_system_details, opts = {}) logger.debug 'Calling operation DatabaseClient#launch_db_system.' if logger raise "Missing the required parameter 'launch_db_system_details' when calling launch_db_system." if launch_db_system_details.nil? path = '/dbSystems' operation_signing_strategy = :standard # 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-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(launch_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#launch_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::Database::Models::DbSystem' ) end # rubocop:enable Metrics/BlockLength end |
#list_backups(opts = {}) ⇒ Response
Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided.
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 1177 1178 1179 1180 1181 |
# File 'lib/oci/database/database_client.rb', line 1146 def list_backups(opts = {}) logger.debug 'Calling operation DatabaseClient#list_backups.' if logger path = '/backups' operation_signing_strategy = :standard # Query Params query_params = {} query_params[:databaseId] = opts[:database_id] if opts[:database_id] query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_backups') 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::Database::Models::BackupSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_data_guard_associations(database_id, opts = {}) ⇒ Response
Lists all Data Guard associations for the specified database.
1200 1201 1202 1203 1204 1205 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 |
# File 'lib/oci/database/database_client.rb', line 1200 def list_data_guard_associations(database_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_data_guard_associations.' if logger raise "Missing the required parameter 'database_id' when calling list_data_guard_associations." if database_id.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) path = '/databases/{databaseId}/dataGuardAssociations'.sub('{databaseId}', database_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_data_guard_associations') 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::Database::Models::DataGuardAssociationSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_databases(compartment_id, db_home_id, opts = {}) ⇒ Response
Gets a list of the databases in the specified database home.
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 |
# File 'lib/oci/database/database_client.rb', line 1255 def list_databases(compartment_id, db_home_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_databases.' if logger raise "Missing the required parameter 'compartment_id' when calling list_databases." if compartment_id.nil? raise "Missing the required parameter 'db_home_id' when calling list_databases." if db_home_id.nil? path = '/databases' operation_signing_strategy = :standard # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:dbHomeId] = db_home_id 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_databases') 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::Database::Models::DatabaseSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_home_patch_history_entries(db_home_id, opts = {}) ⇒ Response
Gets history of the actions taken for patches for the specified database home.
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 |
# File 'lib/oci/database/database_client.rb', line 1311 def list_db_home_patch_history_entries(db_home_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_home_patch_history_entries.' if logger raise "Missing the required parameter 'db_home_id' when calling list_db_home_patch_history_entries." if db_home_id.nil? raise "Parameter value for 'db_home_id' must not be blank" if OCI::Internal::Util.blank_string?(db_home_id) path = '/dbHomes/{dbHomeId}/patchHistoryEntries'.sub('{dbHomeId}', db_home_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_db_home_patch_history_entries') 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::Database::Models::PatchHistoryEntrySummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_home_patches(db_home_id, opts = {}) ⇒ Response
Lists patches applicable to the requested database home.
1365 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 |
# File 'lib/oci/database/database_client.rb', line 1365 def list_db_home_patches(db_home_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_home_patches.' if logger raise "Missing the required parameter 'db_home_id' when calling list_db_home_patches." if db_home_id.nil? raise "Parameter value for 'db_home_id' must not be blank" if OCI::Internal::Util.blank_string?(db_home_id) path = '/dbHomes/{dbHomeId}/patches'.sub('{dbHomeId}', db_home_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_db_home_patches') 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::Database::Models::PatchSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_homes(compartment_id, db_system_id, opts = {}) ⇒ Response
Gets a list of database homes in the specified DB System and compartment. A database home is a directory where Oracle database software is installed.
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 |
# File 'lib/oci/database/database_client.rb', line 1420 def list_db_homes(compartment_id, db_system_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_homes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_db_homes." if compartment_id.nil? raise "Missing the required parameter 'db_system_id' when calling list_db_homes." if db_system_id.nil? path = '/dbHomes' operation_signing_strategy = :standard # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:dbSystemId] = db_system_id 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_db_homes') 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::Database::Models::DbHomeSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_nodes(compartment_id, db_system_id, opts = {}) ⇒ Response
Gets a list of database nodes in the specified DB System and compartment. A database node is a server running database software.
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 |
# File 'lib/oci/database/database_client.rb', line 1477 def list_db_nodes(compartment_id, db_system_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_nodes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_db_nodes." if compartment_id.nil? raise "Missing the required parameter 'db_system_id' when calling list_db_nodes." if db_system_id.nil? path = '/dbNodes' operation_signing_strategy = :standard # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:dbSystemId] = db_system_id 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_db_nodes') 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::Database::Models::DbNodeSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_system_patch_history_entries(db_system_id, opts = {}) ⇒ Response
Gets the history of the patch actions performed on the specified DB System.
1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 |
# File 'lib/oci/database/database_client.rb', line 1533 def list_db_system_patch_history_entries(db_system_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_system_patch_history_entries.' if logger raise "Missing the required parameter 'db_system_id' when calling list_db_system_patch_history_entries." 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}/patchHistoryEntries'.sub('{dbSystemId}', db_system_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_db_system_patch_history_entries') 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::Database::Models::PatchHistoryEntrySummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_system_patches(db_system_id, opts = {}) ⇒ Response
Lists the patches applicable to the requested DB System.
1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 |
# File 'lib/oci/database/database_client.rb', line 1587 def list_db_system_patches(db_system_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_system_patches.' if logger raise "Missing the required parameter 'db_system_id' when calling list_db_system_patches." 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}/patches'.sub('{dbSystemId}', db_system_id.to_s) operation_signing_strategy = :standard # Query Params query_params = {} 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_db_system_patches') 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::Database::Models::PatchSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_system_shapes(availability_domain, compartment_id, opts = {}) ⇒ Response
Gets a list of the shapes that can be used to launch a new DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes.
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 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 |
# File 'lib/oci/database/database_client.rb', line 1641 def list_db_system_shapes(availability_domain, compartment_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_system_shapes.' if logger raise "Missing the required parameter 'availability_domain' when calling list_db_system_shapes." if availability_domain.nil? raise "Missing the required parameter 'compartment_id' when calling list_db_system_shapes." if compartment_id.nil? path = '/dbSystemShapes' operation_signing_strategy = :standard # Query Params query_params = {} query_params[:availabilityDomain] = availability_domain query_params[:compartmentId] = compartment_id 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' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_db_system_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: 'Array<OCI::Database::Models::DbSystemShapeSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_systems(compartment_id, opts = {}) ⇒ Response
Gets a list of the DB Systems in the specified compartment. You can specify a backupId to list only the DB Systems that support creating a database using this backup in this compartment.
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 1730 1731 1732 1733 1734 1735 |
# File 'lib/oci/database/database_client.rb', line 1699 def list_db_systems(compartment_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_systems.' if logger raise "Missing the required parameter 'compartment_id' when calling list_db_systems." if compartment_id.nil? path = '/dbSystems' operation_signing_strategy = :standard # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:backupId] = opts[:backup_id] if opts[:backup_id] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#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::Database::Models::DbSystemSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_versions(compartment_id, opts = {}) ⇒ Response
Gets a list of supported Oracle database versions.
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 |
# File 'lib/oci/database/database_client.rb', line 1755 def list_db_versions(compartment_id, opts = {}) logger.debug 'Calling operation DatabaseClient#list_db_versions.' if logger raise "Missing the required parameter 'compartment_id' when calling list_db_versions." if compartment_id.nil? path = '/dbVersions' operation_signing_strategy = :standard # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:dbSystemShape] = opts[:db_system_shape] if opts[:db_system_shape] query_params[:dbSystemId] = opts[:db_system_id] if opts[:db_system_id] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#list_db_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: 'Array<OCI::Database::Models::DbVersionSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
93 94 95 |
# File 'lib/oci/database/database_client.rb', line 93 def logger @api_client.config.logger end |
#reinstate_data_guard_association(database_id, data_guard_association_id, reinstate_data_guard_association_details, opts = {}) ⇒ Response
Reinstates the database identified by the databaseId parameter into the standby role in a Data Guard association.
1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 |
# File 'lib/oci/database/database_client.rb', line 1815 def reinstate_data_guard_association(database_id, data_guard_association_id, reinstate_data_guard_association_details, opts = {}) logger.debug 'Calling operation DatabaseClient#reinstate_data_guard_association.' if logger raise "Missing the required parameter 'database_id' when calling reinstate_data_guard_association." if database_id.nil? raise "Missing the required parameter 'data_guard_association_id' when calling reinstate_data_guard_association." if data_guard_association_id.nil? raise "Missing the required parameter 'reinstate_data_guard_association_details' when calling reinstate_data_guard_association." if reinstate_data_guard_association_details.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) raise "Parameter value for 'data_guard_association_id' must not be blank" if OCI::Internal::Util.blank_string?(data_guard_association_id) path = '/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/reinstate'.sub('{databaseId}', database_id.to_s).sub('{dataGuardAssociationId}', data_guard_association_id.to_s) operation_signing_strategy = :standard # 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] post_body = @api_client.object_to_http_body(reinstate_data_guard_association_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#reinstate_data_guard_association') 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::Database::Models::DataGuardAssociation' ) end # rubocop:enable Metrics/BlockLength end |
#restore_database(database_id, restore_database_details, opts = {}) ⇒ Response
Restore a Database based on the request parameters you provide.
1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 |
# File 'lib/oci/database/database_client.rb', line 1874 def restore_database(database_id, restore_database_details, opts = {}) logger.debug 'Calling operation DatabaseClient#restore_database.' if logger raise "Missing the required parameter 'database_id' when calling restore_database." if database_id.nil? raise "Missing the required parameter 'restore_database_details' when calling restore_database." if restore_database_details.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) path = '/databases/{databaseId}/actions/restore'.sub('{databaseId}', database_id.to_s) operation_signing_strategy = :standard # 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] post_body = @api_client.object_to_http_body(restore_database_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#restore_database') 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::Database::Models::Database' ) end # rubocop:enable Metrics/BlockLength end |
#switchover_data_guard_association(database_id, data_guard_association_id, switchover_data_guard_association_details, opts = {}) ⇒ Response
Performs a switchover to transition the primary database of a Data Guard association into a standby role. The standby database associated with the dataGuardAssociationId assumes the primary database role.
A switchover guarantees no data loss.
1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 |
# File 'lib/oci/database/database_client.rb', line 1935 def switchover_data_guard_association(database_id, data_guard_association_id, switchover_data_guard_association_details, opts = {}) logger.debug 'Calling operation DatabaseClient#switchover_data_guard_association.' if logger raise "Missing the required parameter 'database_id' when calling switchover_data_guard_association." if database_id.nil? raise "Missing the required parameter 'data_guard_association_id' when calling switchover_data_guard_association." if data_guard_association_id.nil? raise "Missing the required parameter 'switchover_data_guard_association_details' when calling switchover_data_guard_association." if switchover_data_guard_association_details.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) raise "Parameter value for 'data_guard_association_id' must not be blank" if OCI::Internal::Util.blank_string?(data_guard_association_id) path = '/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/switchover'.sub('{databaseId}', database_id.to_s).sub('{dataGuardAssociationId}', data_guard_association_id.to_s) operation_signing_strategy = :standard # 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] post_body = @api_client.object_to_http_body(switchover_data_guard_association_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#switchover_data_guard_association') 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::Database::Models::DataGuardAssociation' ) end # rubocop:enable Metrics/BlockLength end |
#terminate_db_system(db_system_id, opts = {}) ⇒ Response
Terminates a DB System and permanently deletes it and any databases running on it, and any storage volumes attached to it. The database data is local to the DB System and will be lost when the system is terminated. Oracle recommends that you back up any data in the DB System prior to terminating it.
1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
# File 'lib/oci/database/database_client.rb', line 1992 def terminate_db_system(db_system_id, opts = {}) logger.debug 'Calling operation DatabaseClient#terminate_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling terminate_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 # 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] post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#terminate_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 |
#update_database(database_id, update_database_details, opts = {}) ⇒ Response
Update a Database based on the request parameters you provide.
2047 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 |
# File 'lib/oci/database/database_client.rb', line 2047 def update_database(database_id, update_database_details, opts = {}) logger.debug 'Calling operation DatabaseClient#update_database.' if logger raise "Missing the required parameter 'database_id' when calling update_database." if database_id.nil? raise "Missing the required parameter 'update_database_details' when calling update_database." if update_database_details.nil? raise "Parameter value for 'database_id' must not be blank" if OCI::Internal::Util.blank_string?(database_id) path = '/databases/{databaseId}'.sub('{databaseId}', database_id.to_s) operation_signing_strategy = :standard # 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] post_body = @api_client.object_to_http_body(update_database_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#update_database') 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::Database::Models::Database' ) end # rubocop:enable Metrics/BlockLength end |
#update_db_home(db_home_id, update_db_home_details, opts = {}) ⇒ Response
Patches the specified dbHome.
2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 |
# File 'lib/oci/database/database_client.rb', line 2103 def update_db_home(db_home_id, update_db_home_details, opts = {}) logger.debug 'Calling operation DatabaseClient#update_db_home.' if logger raise "Missing the required parameter 'db_home_id' when calling update_db_home." if db_home_id.nil? raise "Missing the required parameter 'update_db_home_details' when calling update_db_home." if update_db_home_details.nil? raise "Parameter value for 'db_home_id' must not be blank" if OCI::Internal::Util.blank_string?(db_home_id) path = '/dbHomes/{dbHomeId}'.sub('{dbHomeId}', db_home_id.to_s) operation_signing_strategy = :standard # 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] post_body = @api_client.object_to_http_body(update_db_home_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#update_db_home') 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::Database::Models::DbHome' ) end # rubocop:enable Metrics/BlockLength end |
#update_db_system(db_system_id, update_db_system_details, opts = {}) ⇒ Response
Updates the properties of a DB System, such as the CPU core count.
2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 |
# File 'lib/oci/database/database_client.rb', line 2159 def update_db_system(db_system_id, update_db_system_details, opts = {}) logger.debug 'Calling operation DatabaseClient#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 # 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] post_body = @api_client.object_to_http_body(update_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'DatabaseClient#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, return_type: 'OCI::Database::Models::DbSystem' ) end # rubocop:enable Metrics/BlockLength end |