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
-
#backup_copy(backup_id, backup_copy_details, opts = {}) ⇒ Response
Backup Copy Request to copy back up in remote region.
-
#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.
-
#change_role_to_replica(change_role_to_replica_details, db_system_id, opts = {}) ⇒ Response
Changes a standalone database system's role to warm-standby replica, converting it into a replica database system that replicates data from the specified primary database system.
-
#change_role_to_standalone(change_role_to_standalone_details, db_system_id, opts = {}) ⇒ Response
Convert a replica database system into a standalone database system.
-
#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_pitr_details(db_system_id, opts = {}) ⇒ Response
Gets the database system PITR details.
-
#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_system_replicas(db_system_id, opts = {}) ⇒ Response
Returns a list of replica database systems.
-
#list_db_systems(opts = {}) ⇒ Response
Returns a list of database systems.
-
#list_default_configurations(opts = {}) ⇒ Response
Returns a list of default configurations.
-
#list_insight_capabilities(opts = {}) ⇒ Response
Returns the supported insight types and their capabilities.
-
#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.
-
#start_db_system(db_system_id, start_db_system_details, opts = {}) ⇒ Response
Start the DB System.
-
#stop_db_system(db_system_id, opts = {}) ⇒ Response
Stop the DB System.
-
#switch_over(switch_over_details, db_system_id, opts = {}) ⇒ Response
Switchover the roles between a primary database system and its replica, making the replica the new primary and the original primary become its replica.
-
#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
#backup_copy(backup_id, backup_copy_details, opts = {}) ⇒ Response
Click here to see an example of how to use backup_copy API.
Backup Copy Request to copy back up in remote region. 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 backup_copy(backup_id, backup_copy_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#backup_copy.' if logger raise "Missing the required parameter 'backup_id' when calling backup_copy." if backup_id.nil? raise "Missing the required parameter 'backup_copy_details' when calling backup_copy." if backup_copy_details.nil? raise "Parameter value for 'backup_id' must not be blank" if OCI::Internal::Util.blank_string?(backup_id) path = '/backups/{backupId}/actions/copy'.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] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(backup_copy_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#backup_copy') 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_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.
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_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.
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_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.
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/oci/psql/postgresql_client.rb', line 319 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 |
#change_role_to_replica(change_role_to_replica_details, db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use change_role_to_replica API.
Changes a standalone database system's role to warm-standby replica, converting it into a replica database system that replicates data from the specified primary database system.
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 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/oci/psql/postgresql_client.rb', line 385 def change_role_to_replica(change_role_to_replica_details, db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#change_role_to_replica.' if logger raise "Missing the required parameter 'change_role_to_replica_details' when calling change_role_to_replica." if change_role_to_replica_details.nil? raise "Missing the required parameter 'db_system_id' when calling change_role_to_replica." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/actions/changeRoleToReplica'.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_role_to_replica_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#change_role_to_replica') 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_role_to_standalone(change_role_to_standalone_details, db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use change_role_to_standalone API.
Convert a replica database system into a standalone database system.
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/oci/psql/postgresql_client.rb', line 451 def change_role_to_standalone(change_role_to_standalone_details, db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#change_role_to_standalone.' if logger raise "Missing the required parameter 'change_role_to_standalone_details' when calling change_role_to_standalone." if change_role_to_standalone_details.nil? raise "Missing the required parameter 'db_system_id' when calling change_role_to_standalone." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/actions/changeRoleToStandalone'.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_role_to_standalone_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#change_role_to_standalone') 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.
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/oci/psql/postgresql_client.rb', line 514 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.
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/oci/psql/postgresql_client.rb', line 574 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.
635 636 637 638 639 640 641 642 643 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 635 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.
693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 |
# File 'lib/oci/psql/postgresql_client.rb', line 693 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.
750 751 752 753 754 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 750 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.
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 |
# File 'lib/oci/psql/postgresql_client.rb', line 807 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.
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 |
# File 'lib/oci/psql/postgresql_client.rb', line 870 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.
927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 |
# File 'lib/oci/psql/postgresql_client.rb', line 927 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.
981 982 983 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 981 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.
1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 |
# File 'lib/oci/psql/postgresql_client.rb', line 1035 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.
1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'lib/oci/psql/postgresql_client.rb', line 1091 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.
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 1191 1192 |
# File 'lib/oci/psql/postgresql_client.rb', line 1156 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_pitr_details(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_pitr_details API.
Gets the database system PITR details.
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 |
# File 'lib/oci/psql/postgresql_client.rb', line 1210 def get_pitr_details(db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#get_pitr_details.' if logger raise "Missing the required parameter 'db_system_id' when calling get_pitr_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}/pitrDetails'.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_pitr_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::PitrDetails' ) 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.
1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 |
# File 'lib/oci/psql/postgresql_client.rb', line 1264 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.
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 |
# File 'lib/oci/psql/postgresql_client.rb', line 1318 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
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 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 1386 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] query_params[:backupSourceType] = opts[:backup_source_type] if opts[:backup_source_type] # 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
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 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 |
# File 'lib/oci/psql/postgresql_client.rb', line 1478 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[:config_type] && !OCI::Psql::Models::Configuration::CONFIG_TYPE_ENUM.include?(opts[:config_type]) raise 'Invalid value for "config_type", must be one of the values in OCI::Psql::Models::Configuration::CONFIG_TYPE_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[:configType] = opts[:config_type] if opts[:config_type] 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[:instanceOcpuCount] = opts[:instance_ocpu_count] if opts[:instance_ocpu_count] query_params[:instanceMemorySizeInGBs] = opts[:instance_memory_size_in_gbs] if opts[:instance_memory_size_in_gbs] 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_system_replicas(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_db_system_replicas API.
Returns a list of replica database systems.
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 1593 1594 1595 1596 1597 1598 1599 1600 |
# File 'lib/oci/psql/postgresql_client.rb', line 1562 def list_db_system_replicas(db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#list_db_system_replicas.' if logger raise "Missing the required parameter 'db_system_id' when calling list_db_system_replicas." 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}/replicas'.sub('{dbSystemId}', db_system_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' 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_system_replicas') 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::DbSystemReplicaCollection' ) 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
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 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 |
# File 'lib/oci/psql/postgresql_client.rb', line 1629 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 if opts[:system_role] && !OCI::Psql::Models::DbSystem::SYSTEM_ROLE_ENUM.include?(opts[:system_role]) raise 'Invalid value for "system_role", must be one of the values in OCI::Psql::Models::DbSystem::SYSTEM_ROLE_ENUM.' 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] query_params[:systemRole] = opts[:system_role] if opts[:system_role] # 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
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 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 1774 1775 1776 1777 |
# File 'lib/oci/psql/postgresql_client.rb', line 1720 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[:instanceOcpuCount] = opts[:instance_ocpu_count] if opts[:instance_ocpu_count] query_params[:instanceMemorySizeInGBs] = opts[:instance_memory_size_in_gbs] if opts[:instance_memory_size_in_gbs] 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_insight_capabilities(opts = {}) ⇒ Response
Click here to see an example of how to use list_insight_capabilities API.
Returns the supported insight types and their capabilities. This API allows clients to discover: - Supported insight types - Supported insight data types for each insight type - Filters, sorting, pagination, limits, and data contracts required to use the unified insights API.
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 1836 1837 1838 |
# File 'lib/oci/psql/postgresql_client.rb', line 1802 def list_insight_capabilities(opts = {}) logger.debug 'Calling operation PostgresqlClient#list_insight_capabilities.' if logger path = '/insightCapabilities' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' 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_insight_capabilities') 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::InsightCapabilityCollection' ) 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
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 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 |
# File 'lib/oci/psql/postgresql_client.rb', line 1863 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
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 |
# File 'lib/oci/psql/postgresql_client.rb', line 1936 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
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 2009 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
2085 2086 2087 2088 2089 2090 2091 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 2133 2134 2135 2136 2137 2138 2139 |
# File 'lib/oci/psql/postgresql_client.rb', line 2085 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.
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 2161 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.
2225 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 |
# File 'lib/oci/psql/postgresql_client.rb', line 2225 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.
2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 |
# File 'lib/oci/psql/postgresql_client.rb', line 2291 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.
2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 |
# File 'lib/oci/psql/postgresql_client.rb', line 2357 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 |
#start_db_system(db_system_id, start_db_system_details, opts = {}) ⇒ Response
Click here to see an example of how to use start_db_system API.
Start the DB System.
2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 |
# File 'lib/oci/psql/postgresql_client.rb', line 2423 def start_db_system(db_system_id, start_db_system_details, opts = {}) logger.debug 'Calling operation PostgresqlClient#start_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling start_db_system." if db_system_id.nil? raise "Missing the required parameter 'start_db_system_details' when calling start_db_system." if start_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/start'.sub('{dbSystemId}', db_system_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(start_db_system_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#start_db_system') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#stop_db_system(db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use stop_db_system API.
Stop the DB System.
2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 |
# File 'lib/oci/psql/postgresql_client.rb', line 2488 def stop_db_system(db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#stop_db_system.' if logger raise "Missing the required parameter 'db_system_id' when calling stop_db_system." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/actions/stop'.sub('{dbSystemId}', db_system_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#stop_db_system') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#switch_over(switch_over_details, db_system_id, opts = {}) ⇒ Response
Click here to see an example of how to use switch_over API.
Switchover the roles between a primary database system and its replica, making the replica the new primary and the original primary become its replica.
2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 |
# File 'lib/oci/psql/postgresql_client.rb', line 2553 def switch_over(switch_over_details, db_system_id, opts = {}) logger.debug 'Calling operation PostgresqlClient#switch_over.' if logger raise "Missing the required parameter 'switch_over_details' when calling switch_over." if switch_over_details.nil? raise "Missing the required parameter 'db_system_id' when calling switch_over." if db_system_id.nil? raise "Parameter value for 'db_system_id' must not be blank" if OCI::Internal::Util.blank_string?(db_system_id) path = '/dbSystems/{dbSystemId}/actions/switchover'.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(switch_over_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'PostgresqlClient#switch_over') 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.
2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 |
# File 'lib/oci/psql/postgresql_client.rb', line 2614 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.
2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 |
# File 'lib/oci/psql/postgresql_client.rb', line 2680 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.
2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 |
# File 'lib/oci/psql/postgresql_client.rb', line 2747 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.
2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 |
# File 'lib/oci/psql/postgresql_client.rb', line 2814 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 |