Class: OCI::Psql::PostgresqlClient
- Inherits:
-
Object
- Object
- OCI::Psql::PostgresqlClient
- Defined in:
- lib/oci/psql/postgresql_client.rb
Overview
A description of the PGSQL Control Plane API
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 resource from one compartment identifier to another.
-
#change_configuration_compartment(configuration_id, change_configuration_compartment_details, opts = {}) ⇒ Response
Moves a Configuration resource from one compartment identifier to another.
-
#change_db_system_compartment(db_system_id, change_db_system_compartment_details, opts = {}) ⇒ Response
Moves a DbSystem resource from one compartment identifier to another.
-
#create_backup(create_backup_details, opts = {}) ⇒ Response
Creates a new Backup.
-
#create_configuration(create_configuration_details, opts = {}) ⇒ Response
Creates a new Configuration Set.
-
#create_db_system(create_db_system_details, opts = {}) ⇒ Response
Creates a new DbSystem.
-
#delete_backup(backup_id, opts = {}) ⇒ Response
Deletes a Backup resource by identifier.
-
#delete_configuration(configuration_id, opts = {}) ⇒ Response
Deletes a Cofniguration resource by identifier.
-
#delete_db_system(db_system_id, opts = {}) ⇒ Response
Deletes a DbSystem resource 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 DbSystem connection details.
-
#get_db_system(db_system_id, opts = {}) ⇒ Response
Gets a DbSystem 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 DbInstance 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 Backup.
-
#list_configurations(opts = {}) ⇒ Response
Returns a list of Configurations.
-
#list_db_systems(opts = {}) ⇒ Response
Returns a list of DbSystems.
-
#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
Patching operation allows to add DbInstances to the DbSystem or remove them.
-
#reset_master_user_password(db_system_id, reset_master_user_password_details, opts = {}) ⇒ Response
Resets the Db 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 DbInstance.
-
#restore_db_system(db_system_id, restore_db_system_details, opts = {}) ⇒ Response
Restore the Db 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 Set.
-
#update_db_system(db_system_id, update_db_system_details, opts = {}) ⇒ Response
Updates the DbSystem.
-
#update_db_system_db_instance(db_system_id, db_instance_id, update_db_system_db_instance_details, opts = {}) ⇒ Response
Updates the DbInstance.
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.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/psql/postgresql_client.rb', line 55 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/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.
15 16 17 |
# File 'lib/oci/psql/postgresql_client.rb', line 15 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
19 20 21 |
# File 'lib/oci/psql/postgresql_client.rb', line 19 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
29 30 31 |
# File 'lib/oci/psql/postgresql_client.rb', line 29 def region @region end |
#retry_config ⇒ OCI::Retry::RetryConfig (readonly)
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil
, which means that an operation will not perform any retries
25 26 27 |
# File 'lib/oci/psql/postgresql_client.rb', line 25 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 resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
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 150 151 152 153 154 155 |
# File 'lib/oci/psql/postgresql_client.rb', line 116 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 resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
178 179 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 217 218 |
# File 'lib/oci/psql/postgresql_client.rb', line 178 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, return_type: 'OCI::Psql::Models::Configuration' ) 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 DbSystem resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
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 274 275 276 277 278 279 280 |
# File 'lib/oci/psql/postgresql_client.rb', line 241 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.
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/oci/psql/postgresql_client.rb', line 301 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 Set.
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/oci/psql/postgresql_client.rb', line 358 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 DbSystem.
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/oci/psql/postgresql_client.rb', line 416 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 resource by identifier
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/oci/psql/postgresql_client.rb', line 473 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 Cofniguration resource by identifier
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 |
# File 'lib/oci/psql/postgresql_client.rb', line 529 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 DbSystem resource by identifier
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/oci/psql/postgresql_client.rb', line 585 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 user can specify the desired AD for 3AD regions.
644 645 646 647 648 649 650 651 652 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 644 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
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 |
# File 'lib/oci/psql/postgresql_client.rb', line 701 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
755 756 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 755 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 DbSystem connection details.
809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 |
# File 'lib/oci/psql/postgresql_client.rb', line 809 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 DbSystem by identifier
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 |
# File 'lib/oci/psql/postgresql_client.rb', line 865 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
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 |
# File 'lib/oci/psql/postgresql_client.rb', line 930 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 DbInstance details.
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 |
# File 'lib/oci/psql/postgresql_client.rb', line 984 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.
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 |
# File 'lib/oci/psql/postgresql_client.rb', line 1038 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 Backup.
Allowed values are: timeCreated, displayName
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 1105 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
1192 1193 1194 1195 1196 1197 1198 1199 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 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 |
# File 'lib/oci/psql/postgresql_client.rb', line 1192 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 DbSystems.
Allowed values are: timeCreated, displayName
1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 |
# File 'lib/oci/psql/postgresql_client.rb', line 1276 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
1359 1360 1361 1362 1363 1364 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 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 |
# File 'lib/oci/psql/postgresql_client.rb', line 1359 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
1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 |
# File 'lib/oci/psql/postgresql_client.rb', line 1439 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
1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 1512 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
1585 1586 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 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 |
# File 'lib/oci/psql/postgresql_client.rb', line 1585 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
1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 |
# File 'lib/oci/psql/postgresql_client.rb', line 1661 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.
94 95 96 |
# File 'lib/oci/psql/postgresql_client.rb', line 94 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.
Patching operation allows to add DbInstances to the DbSystem or remove them.
1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 |
# File 'lib/oci/psql/postgresql_client.rb', line 1736 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 Db system's master password.
1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 |
# File 'lib/oci/psql/postgresql_client.rb', line 1796 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 DbInstance.
1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 |
# File 'lib/oci/psql/postgresql_client.rb', line 1858 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 Db System.
1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 |
# File 'lib/oci/psql/postgresql_client.rb', line 1920 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
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 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 |
# File 'lib/oci/psql/postgresql_client.rb', line 1980 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 Set.
2042 2043 2044 2045 2046 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/psql/postgresql_client.rb', line 2042 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 DbSystem
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 2139 2140 2141 2142 2143 2144 |
# File 'lib/oci/psql/postgresql_client.rb', line 2105 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 DbInstance.
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 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 |
# File 'lib/oci/psql/postgresql_client.rb', line 2168 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 |