Class: OCI::Psql::PostgresqlClient
- Inherits:
-
Object
- Object
- OCI::Psql::PostgresqlClient
- Defined in:
- lib/oci/psql/postgresql_client.rb
Overview
Use the OCI Database with PostgreSQL API to manage resources such as database systems, database nodes, backups, and configurations. For information, see the user guide documentation for the 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
-
#change_backup_compartment(backup_id, change_backup_compartment_details, opts = {}) ⇒ Response
Moves a backup from one compartment to another.
-
#change_configuration_compartment(configuration_id, change_configuration_compartment_details, opts = {}) ⇒ Response
Moves a configuration from one compartment to another.
-
#change_db_system_compartment(db_system_id, change_db_system_compartment_details, opts = {}) ⇒ Response
Moves a database system from one compartment to another.
-
#create_backup(create_backup_details, opts = {}) ⇒ Response
Creates a new backup.
-
#create_configuration(create_configuration_details, opts = {}) ⇒ Response
Creates a new configuration.
-
#create_db_system(create_db_system_details, opts = {}) ⇒ Response
Creates a new database system.
-
#delete_backup(backup_id, opts = {}) ⇒ Response
Deletes a backup by identifier.
-
#delete_configuration(configuration_id, opts = {}) ⇒ Response
Deletes a configuration by identifier.
-
#delete_db_system(db_system_id, opts = {}) ⇒ Response
Deletes a database system by identifier.
-
#failover_db_system(db_system_id, failover_db_system_details, opts = {}) ⇒ Response
Runs a failover operation.
-
#get_backup(backup_id, opts = {}) ⇒ Response
Gets a backup by identifier.
-
#get_configuration(configuration_id, opts = {}) ⇒ Response
Gets a configuration by identifier.
-
#get_connection_details(db_system_id, opts = {}) ⇒ Response
Gets the database system connection details.
-
#get_db_system(db_system_id, opts = {}) ⇒ Response
Gets a database system by identifier.
-
#get_default_configuration(default_configuration_id, opts = {}) ⇒ Response
Gets a default configuration by identifier.
-
#get_primary_db_instance(db_system_id, opts = {}) ⇒ Response
Gets the primary database instance node details.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets details of the work request with the given ID.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ PostgresqlClient
constructor
Creates a new PostgresqlClient.
-
#list_backups(opts = {}) ⇒ Response
Returns a list of backups.
-
#list_configurations(opts = {}) ⇒ Response
Returns a list of configurations.
-
#list_db_systems(opts = {}) ⇒ Response
Returns a list of database systems.
-
#list_default_configurations(opts = {}) ⇒ Response
Returns a list of default configurations.
-
#list_shapes(opts = {}) ⇒ Response
Returns the list of shapes allowed in the region.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Returns a (paginated) list of errors for the work request with the given ID.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Returns a (paginated) list of logs for the work request with the given ID.
-
#list_work_requests(opts = {}) ⇒ Response
Lists the work requests in a compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#patch_db_system(db_system_id, patch_db_system_details, opts = {}) ⇒ Response
Modifies the database system by adding or removing database instance nodes.
-
#reset_master_user_password(db_system_id, reset_master_user_password_details, opts = {}) ⇒ Response
Resets the database system's master password.
-
#restart_db_instance_in_db_system(db_system_id, restart_db_instance_in_db_system_details, opts = {}) ⇒ Response
Restarts the running database instance node.
-
#restore_db_system(db_system_id, restore_db_system_details, opts = {}) ⇒ Response
Restore the database system.
-
#update_backup(backup_id, update_backup_details, opts = {}) ⇒ Response
Updates the backup.
-
#update_configuration(configuration_id, update_configuration_details, opts = {}) ⇒ Response
Updates a display name or description of the configuration.
-
#update_db_system(db_system_id, update_db_system_details, opts = {}) ⇒ Response
Updates the database system.
-
#update_db_system_db_instance(db_system_id, db_instance_id, update_db_system_db_instance_details, opts = {}) ⇒ Response
Updates the database instance node.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ PostgresqlClient
Creates a new PostgresqlClient. 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.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/psql/postgresql_client.rb', line 56 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 + '/20220915' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "PostgresqlClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
16 17 18 |
# File 'lib/oci/psql/postgresql_client.rb', line 16 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
20 21 22 |
# File 'lib/oci/psql/postgresql_client.rb', line 20 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
30 31 32 |
# File 'lib/oci/psql/postgresql_client.rb', line 30 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
26 27 28 |
# File 'lib/oci/psql/postgresql_client.rb', line 26 def retry_config @retry_config end |
Instance Method Details
#change_backup_compartment(backup_id, change_backup_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_backup_compartment API.
Moves a backup from one compartment to another. When provided, If-Match is checked against ETag values of the resource.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/oci/psql/postgresql_client.rb', line 121 def change_backup_compartment(backup_id, change_backup_compartment_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#change_backup_compartment.' if logger raise "Missing the required parameter 'backup_id' when calling change_backup_compartment." if backup_id.nil? raise "Missing the required parameter 'change_backup_compartment_details' when calling change_backup_compartment." if change_backup_compartment_details.nil? raise "Parameter value for 'backup_id' must not be blank" if OCI::Internal::Util.blank_string?(backup_id) path = '/backups/{backupId}/actions/changeCompartment'.sub('{backupId}', backup_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(change_backup_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#change_backup_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_configuration_compartment(configuration_id, change_configuration_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_configuration_compartment API.
Moves a configuration from one compartment to another. When provided, If-Match is checked against ETag values of the resource.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/psql/postgresql_client.rb', line 187 def change_configuration_compartment(configuration_id, change_configuration_compartment_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#change_configuration_compartment.' if logger raise "Missing the required parameter 'configuration_id' when calling change_configuration_compartment." if configuration_id.nil? raise "Missing the required parameter 'change_configuration_compartment_details' when calling change_configuration_compartment." if change_configuration_compartment_details.nil? raise "Parameter value for 'configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(configuration_id) path = '/configurations/{configurationId}/actions/changeCompartment'.sub('{configurationId}', configuration_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] 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(change_configuration_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#change_configuration_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_db_system_compartment(db_system_id, change_db_system_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_db_system_compartment API.
Moves a database system from one compartment to another. When provided, If-Match is checked against ETag values of the resource.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/psql/postgresql_client.rb', line 253 def change_db_system_compartment(db_system_id, change_db_system_compartment_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#change_db_system_compartment.' if logger raise "Missing the required parameter 'db_system_id' when calling change_db_system_compartment." if db_system_id.nil? raise "Missing the required parameter 'change_db_system_compartment_details' when calling change_db_system_compartment." if change_db_system_compartment_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/changeCompartment'.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(change_db_system_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#change_db_system_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#create_backup(create_backup_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_backup API.
Creates a new backup.
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 |
# File 'lib/oci/psql/postgresql_client.rb', line 316 def create_backup(create_backup_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#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 # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_backup_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#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 ) end # rubocop:enable Metrics/BlockLength end |
#create_configuration(create_configuration_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_configuration API.
Creates a new configuration.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/oci/psql/postgresql_client.rb', line 376 def create_configuration(create_configuration_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#create_configuration.' if logger raise "Missing the required parameter 'create_configuration_details' when calling create_configuration." if create_configuration_details.nil? path = '/configurations' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_configuration_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#create_configuration') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::Configuration' ) 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 a new database system.
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 467 468 469 470 471 472 473 474 |
# File 'lib/oci/psql/postgresql_client.rb', line 437 def create_db_system(create_db_system_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#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-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#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::Psql::Models::DbSystem' ) end # rubocop:enable Metrics/BlockLength end |
#delete_backup(backup_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_backup API.
Deletes a backup by identifier.
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 531 |
# File 'lib/oci/psql/postgresql_client.rb', line 495 def delete_backup(backup_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#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 # 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: 'PostgresqlClient#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_configuration(configuration_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_configuration API.
Deletes a configuration by identifier.
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
# File 'lib/oci/psql/postgresql_client.rb', line 552 def delete_configuration(configuration_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#delete_configuration.' if logger raise "Missing the required parameter 'configuration_id' when calling delete_configuration." if configuration_id.nil? raise "Parameter value for 'configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(configuration_id) path = '/configurations/{configurationId}'.sub('{configurationId}', configuration_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#delete_configuration') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_db_system(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_db_system API.
Deletes a database system by identifier.
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
# File 'lib/oci/psql/postgresql_client.rb', line 609 def delete_db_system(db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#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: 'PostgresqlClient#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 |
#failover_db_system(db_system_id, failover_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use failover_db_system API.
Runs a failover operation. Optionally, specify the desired AD for regions with three ADs.
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 |
# File 'lib/oci/psql/postgresql_client.rb', line 672 def failover_db_system(db_system_id, failover_db_system_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#failover_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling failover_db_system." if db_system_id.nil? raise "Missing the required parameter 'failover_db_system_details' when calling failover_db_system." if failover_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/failover'.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(failover_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#failover_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 |
#get_backup(backup_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_backup API.
Gets a backup by identifier.
729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 |
# File 'lib/oci/psql/postgresql_client.rb', line 729 def get_backup(backup_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#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 # 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: 'PostgresqlClient#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::Psql::Models::Backup' ) end # rubocop:enable Metrics/BlockLength end |
#get_configuration(configuration_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_configuration API.
Gets a configuration by identifier.
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 812 813 814 815 816 817 818 819 |
# File 'lib/oci/psql/postgresql_client.rb', line 783 def get_configuration(configuration_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#get_configuration.' if logger raise "Missing the required parameter 'configuration_id' when calling get_configuration." if configuration_id.nil? raise "Parameter value for 'configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(configuration_id) path = '/configurations/{configurationId}'.sub('{configurationId}', configuration_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#get_configuration') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::Configuration' ) end # rubocop:enable Metrics/BlockLength end |
#get_connection_details(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_connection_details API.
Gets the database system connection details.
837 838 839 840 841 842 843 844 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 837 def get_connection_details(db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#get_connection_details.' if logger raise "Missing the required parameter 'db_system_id' when calling get_connection_details." 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}/connectionDetails'.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: 'PostgresqlClient#get_connection_details') 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::Psql::Models::ConnectionDetails' ) 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.
Gets a database system by identifier.
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 893 def get_db_system(db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#get_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling get_db_system." if db_system_id.nil? excluded_fields_allowable_values = %w[dbConfigurationParams] if opts[:excluded_fields] && !opts[:excluded_fields].empty? opts[:excluded_fields].each do |val_to_check| unless excluded_fields_allowable_values.include?(val_to_check) raise 'Invalid value for "excluded_fields", must be one of dbConfigurationParams.' end end end 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 = {} query_params[:excludedFields] = OCI::ApiClient.build_collection_params(opts[:excluded_fields], :multi) if opts[:excluded_fields] && !opts[:excluded_fields].empty? # 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: 'PostgresqlClient#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::Psql::Models::DbSystem' ) end # rubocop:enable Metrics/BlockLength end |
#get_default_configuration(default_configuration_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_default_configuration API.
Gets a default configuration by identifier.
958 959 960 961 962 963 964 965 966 967 968 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 958 def get_default_configuration(default_configuration_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#get_default_configuration.' if logger raise "Missing the required parameter 'default_configuration_id' when calling get_default_configuration." if default_configuration_id.nil? raise "Parameter value for 'default_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(default_configuration_id) path = '/defaultConfigurations/{defaultConfigurationId}'.sub('{defaultConfigurationId}', default_configuration_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#get_default_configuration') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::DefaultConfiguration' ) end # rubocop:enable Metrics/BlockLength end |
#get_primary_db_instance(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_primary_db_instance API.
Gets the primary database instance node details.
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 |
# File 'lib/oci/psql/postgresql_client.rb', line 1012 def get_primary_db_instance(db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#get_primary_db_instance.' if logger raise "Missing the required parameter 'db_system_id' when calling get_primary_db_instance." 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}/primaryDbInstance'.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: 'PostgresqlClient#get_primary_db_instance') 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::Psql::Models::PrimaryDbInstanceDetails' ) end # rubocop:enable Metrics/BlockLength end |
#get_work_request(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_work_request API.
Gets details of the work request with the given ID.
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 |
# File 'lib/oci/psql/postgresql_client.rb', line 1066 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#get_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#get_work_request') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#list_backups(opts = {}) ⇒ Response
Click here to see an example of how to use list_backups API.
Returns a list of backups.
Allowed values are: timeCreated, displayName
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 |
# File 'lib/oci/psql/postgresql_client.rb', line 1133 def list_backups(opts = {}) logger.debug 'Calling operation PostgresqlClient#list_backups.' if logger if opts[:lifecycle_state] && !OCI::Psql::Models::Backup::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Psql::Models::Backup::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::Psql::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Psql::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/backups' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:timeStarted] = opts[:time_started] if opts[:time_started] query_params[:timeEnded] = opts[:time_ended] if opts[:time_ended] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:backupId] = opts[:backup_id] if opts[:backup_id] query_params[:id] = opts[:id] if opts[:id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#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: 'OCI::Psql::Models::BackupCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_configurations(opts = {}) ⇒ Response
Click here to see an example of how to use list_configurations API.
Returns a list of configurations.
Allowed values are: timeCreated, displayName
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 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 |
# File 'lib/oci/psql/postgresql_client.rb', line 1222 def list_configurations(opts = {}) logger.debug 'Calling operation PostgresqlClient#list_configurations.' if logger if opts[:lifecycle_state] && !OCI::Psql::Models::Configuration::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Psql::Models::Configuration::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::Psql::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Psql::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/configurations' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:dbVersion] = opts[:db_version] if opts[:db_version] query_params[:shape] = opts[:shape] if opts[:shape] query_params[:configurationId] = opts[:configuration_id] if opts[:configuration_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#list_configurations') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::ConfigurationCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_db_systems(opts = {}) ⇒ Response
Click here to see an example of how to use list_db_systems API.
Returns a list of database systems.
Allowed values are: timeCreated, displayName
1306 1307 1308 1309 1310 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 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 |
# File 'lib/oci/psql/postgresql_client.rb', line 1306 def list_db_systems(opts = {}) logger.debug 'Calling operation PostgresqlClient#list_db_systems.' if logger if opts[:lifecycle_state] && !OCI::Psql::Models::DbSystem::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Psql::Models::DbSystem::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::Psql::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Psql::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/dbSystems' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:id] = opts[:id] if opts[:id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#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: 'OCI::Psql::Models::DbSystemCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_default_configurations(opts = {}) ⇒ Response
Click here to see an example of how to use list_default_configurations API.
Returns a list of default configurations.
Allowed values are: timeCreated, displayName
1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 1391 def list_default_configurations(opts = {}) logger.debug 'Calling operation PostgresqlClient#list_default_configurations.' if logger if opts[:lifecycle_state] && !OCI::Psql::Models::Configuration::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Psql::Models::Configuration::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::Psql::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Psql::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/defaultConfigurations' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:dbVersion] = opts[:db_version] if opts[:db_version] query_params[:shape] = opts[:shape] if opts[:shape] query_params[:configurationId] = opts[:configuration_id] if opts[:configuration_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#list_default_configurations') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::DefaultConfigurationCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_shapes(opts = {}) ⇒ Response
Click here to see an example of how to use list_shapes API.
Returns the list of shapes allowed in the region. Allowed values are: timeCreated, displayName
1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 |
# File 'lib/oci/psql/postgresql_client.rb', line 1471 def list_shapes(opts = {}) logger.debug 'Calling operation PostgresqlClient#list_shapes.' if logger if opts[:sort_order] && !OCI::Psql::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Psql::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/shapes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:id] = opts[:id] if opts[:id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#list_shapes') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::ShapeCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_request_errors API.
Returns a (paginated) list of errors for the work request with the given ID.
Allowed values are: timestamp
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 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 |
# File 'lib/oci/psql/postgresql_client.rb', line 1544 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#list_work_request_errors.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil? if opts[:sort_by] && !%w[timestamp].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timestamp.' end if opts[:sort_order] && !OCI::Psql::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Psql::Models::SORT_ORDER_ENUM.' end raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#list_work_request_errors') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::WorkRequestErrorCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_request_logs API.
Returns a (paginated) list of logs for the work request with the given ID.
Allowed values are: timestamp
1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 |
# File 'lib/oci/psql/postgresql_client.rb', line 1617 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#list_work_request_logs.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil? if opts[:sort_by] && !%w[timestamp].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timestamp.' end if opts[:sort_order] && !OCI::Psql::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Psql::Models::SORT_ORDER_ENUM.' end raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#list_work_request_logs') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::WorkRequestLogEntryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_requests(opts = {}) ⇒ Response
Click here to see an example of how to use list_work_requests API.
Lists the work requests in a compartment.
Allowed values are: timeAccepted
1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 |
# File 'lib/oci/psql/postgresql_client.rb', line 1693 def list_work_requests(opts = {}) logger.debug 'Calling operation PostgresqlClient#list_work_requests.' if logger if opts[:status] && !OCI::Psql::Models::OPERATION_STATUS_ENUM.include?(opts[:status]) raise 'Invalid value for "status", must be one of the values in OCI::Psql::Models::OPERATION_STATUS_ENUM.' end if opts[:sort_order] && !OCI::Psql::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Psql::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeAccepted.' end path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id] query_params[:status] = opts[:status] if opts[:status] query_params[:resourceId] = opts[:resource_id] if opts[:resource_id] query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#list_work_requests') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::WorkRequestSummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
95 96 97 |
# File 'lib/oci/psql/postgresql_client.rb', line 95 def logger @api_client.config.logger end |
#patch_db_system(db_system_id, patch_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use patch_db_system API.
Modifies the database system by adding or removing database instance nodes.
1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 |
# File 'lib/oci/psql/postgresql_client.rb', line 1769 def patch_db_system(db_system_id, patch_db_system_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#patch_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling patch_db_system." if db_system_id.nil? raise "Missing the required parameter 'patch_db_system_details' when calling patch_db_system." if patch_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(patch_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#patch_db_system') do @api_client.call_api( :PATCH, 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 |
#reset_master_user_password(db_system_id, reset_master_user_password_details, opts = {}) ⇒ Response
Click here to see an example of how to use reset_master_user_password API.
Resets the database system's master password.
1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 |
# File 'lib/oci/psql/postgresql_client.rb', line 1833 def reset_master_user_password(db_system_id, reset_master_user_password_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#reset_master_user_password.' if logger raise "Missing the required parameter 'db_system_id' when calling reset_master_user_password." if db_system_id.nil? raise "Missing the required parameter 'reset_master_user_password_details' when calling reset_master_user_password." if reset_master_user_password_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/resetMasterUserPassword'.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(reset_master_user_password_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#reset_master_user_password') 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_db_instance_in_db_system(db_system_id, restart_db_instance_in_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use restart_db_instance_in_db_system API.
Restarts the running database instance node.
1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 |
# File 'lib/oci/psql/postgresql_client.rb', line 1899 def restart_db_instance_in_db_system(db_system_id, restart_db_instance_in_db_system_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#restart_db_instance_in_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling restart_db_instance_in_db_system." if db_system_id.nil? raise "Missing the required parameter 'restart_db_instance_in_db_system_details' when calling restart_db_instance_in_db_system." if restart_db_instance_in_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/restartDbInstance'.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_instance_in_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#restart_db_instance_in_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 |
#restore_db_system(db_system_id, restore_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use restore_db_system API.
Restore the database system.
1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 |
# File 'lib/oci/psql/postgresql_client.rb', line 1965 def restore_db_system(db_system_id, restore_db_system_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#restore_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling restore_db_system." if db_system_id.nil? raise "Missing the required parameter 'restore_db_system_details' when calling restore_db_system." if restore_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/restore'.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(restore_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#restore_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 |
#update_backup(backup_id, update_backup_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_backup API.
Updates the backup.
2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 |
# File 'lib/oci/psql/postgresql_client.rb', line 2026 def update_backup(backup_id, update_backup_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#update_backup.' if logger raise "Missing the required parameter 'backup_id' when calling update_backup." if backup_id.nil? raise "Missing the required parameter 'update_backup_details' when calling update_backup." if update_backup_details.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 # 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_backup_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#update_backup') 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::Psql::Models::Backup' ) end # rubocop:enable Metrics/BlockLength end |
#update_configuration(configuration_id, update_configuration_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_configuration API.
Updates a display name or description of the configuration.
2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 2092 def update_configuration(configuration_id, update_configuration_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#update_configuration.' if logger raise "Missing the required parameter 'configuration_id' when calling update_configuration." if configuration_id.nil? raise "Missing the required parameter 'update_configuration_details' when calling update_configuration." if update_configuration_details.nil? raise "Parameter value for 'configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(configuration_id) path = '/configurations/{configurationId}'.sub('{configurationId}', configuration_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(update_configuration_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#update_configuration') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Psql::Models::Configuration' ) 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.
Updates the database system.
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 2195 2196 2197 2198 |
# File 'lib/oci/psql/postgresql_client.rb', line 2159 def update_db_system(db_system_id, update_db_system_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#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] 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(update_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#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_db_system_db_instance(db_system_id, db_instance_id, update_db_system_db_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_db_system_db_instance API.
Updates the database instance node.
2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 |
# File 'lib/oci/psql/postgresql_client.rb', line 2226 def update_db_system_db_instance(db_system_id, db_instance_id, update_db_system_db_instance_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#update_db_system_db_instance.' if logger raise "Missing the required parameter 'db_system_id' when calling update_db_system_db_instance." if db_system_id.nil? raise "Missing the required parameter 'db_instance_id' when calling update_db_system_db_instance." if db_instance_id.nil? raise "Missing the required parameter 'update_db_system_db_instance_details' when calling update_db_system_db_instance." if update_db_system_db_instance_details.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 'db_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(db_instance_id) path = '/dbSystems/{dbSystemId}/dbinstances/{dbInstanceId}'.sub('{dbSystemId}', db_system_id.to_s).sub('{dbInstanceId}', db_instance_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(update_db_system_db_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#update_db_system_db_instance') 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 |