Class: OCI::Sch::ServiceConnectorClient
- Inherits:
-
Object
- Object
- OCI::Sch::ServiceConnectorClient
- Defined in:
- lib/oci/sch/service_connector_client.rb
Overview
Use the Service Connector Hub API to transfer data between services in Oracle Cloud Infrastructure. For more information about Service Connector Hub, see Service Connector Hub Overview.
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
-
#activate_service_connector(service_connector_id, opts = {}) ⇒ Response
Activates the specified service connector.
-
#change_service_connector_compartment(service_connector_id, change_service_connector_compartment_details, opts = {}) ⇒ Response
Moves a service connector into a different compartment within the same tenancy.
-
#create_service_connector(create_service_connector_details, opts = {}) ⇒ Response
Creates a new service connector in the specified compartment.
-
#deactivate_service_connector(service_connector_id, opts = {}) ⇒ Response
Deactivates the specified service connector.
-
#delete_service_connector(service_connector_id, opts = {}) ⇒ Response
Deletes the specified service connector.
-
#get_service_connector(service_connector_id, opts = {}) ⇒ Response
Gets the specified service connector's configuration information.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the details of the specified work request.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ServiceConnectorClient
constructor
Creates a new ServiceConnectorClient.
-
#list_service_connectors(compartment_id, opts = {}) ⇒ Response
Lists service connectors in the specified compartment.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Lists work request errors for the specified work request.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Lists logs for the specified work request.
-
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Lists the work requests in the specified compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#update_service_connector(service_connector_id, update_service_connector_details, opts = {}) ⇒ Response
Updates the configuration information for the specified service connector.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ServiceConnectorClient
Creates a new ServiceConnectorClient. 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.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/sch/service_connector_client.rb', line 57 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 + '/20200909' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "ServiceConnectorClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
17 18 19 |
# File 'lib/oci/sch/service_connector_client.rb', line 17 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
21 22 23 |
# File 'lib/oci/sch/service_connector_client.rb', line 21 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
31 32 33 |
# File 'lib/oci/sch/service_connector_client.rb', line 31 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
27 28 29 |
# File 'lib/oci/sch/service_connector_client.rb', line 27 def retry_config @retry_config end |
Instance Method Details
#activate_service_connector(service_connector_id, opts = {}) ⇒ Response
Click here to see an example of how to use activate_service_connector API.
Activates the specified service connector.
After you send your request, the service connector's state is temporarily UPDATING. When the state changes to ACTIVE, data begins transferring from the source service to the target service. For instructions on activating service connectors, see To activate a service connector.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/sch/service_connector_client.rb', line 135 def activate_service_connector(service_connector_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#activate_service_connector.' if logger raise "Missing the required parameter 'service_connector_id' when calling activate_service_connector." if service_connector_id.nil? raise "Parameter value for 'service_connector_id' must not be blank" if OCI::Internal::Util.blank_string?(service_connector_id) path = '/serviceConnectors/{serviceConnectorId}/actions/activate'.sub('{serviceConnectorId}', service_connector_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 = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ServiceConnectorClient#activate_service_connector') 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_service_connector_compartment(service_connector_id, change_service_connector_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_service_connector_compartment API.
Moves a service connector into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
When provided, If-Match is checked against ETag values of the resource.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/oci/sch/service_connector_client.rb', line 207 def change_service_connector_compartment(service_connector_id, change_service_connector_compartment_details, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#change_service_connector_compartment.' if logger raise "Missing the required parameter 'service_connector_id' when calling change_service_connector_compartment." if service_connector_id.nil? raise "Missing the required parameter 'change_service_connector_compartment_details' when calling change_service_connector_compartment." if change_service_connector_compartment_details.nil? raise "Parameter value for 'service_connector_id' must not be blank" if OCI::Internal::Util.blank_string?(service_connector_id) path = '/serviceConnectors/{serviceConnectorId}/actions/changeCompartment'.sub('{serviceConnectorId}', service_connector_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(change_service_connector_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ServiceConnectorClient#change_service_connector_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#create_service_connector(create_service_connector_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_service_connector API.
Creates a new service connector in the specified compartment. A service connector is a logically defined flow for moving data from a source service to a destination service in Oracle Cloud Infrastructure. For instructions, see To create a service connector. For general information about service connectors, see Service Connector Hub Overview.
For purposes of access control, you must provide the OCID of the compartment where you want the service connector to reside. Notice that the service connector doesn't have to be in the same compartment as the source or target services. For information about access control and compartments, see Overview of the IAM Service.
After you send your request, the new service connector's state is temporarily CREATING. When the state changes to ACTIVE, data begins transferring from the source service to the target service. For instructions on deactivating and activating service connectors, see To activate or deactivate a service connector.
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/oci/sch/service_connector_client.rb', line 291 def create_service_connector(create_service_connector_details, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#create_service_connector.' if logger raise "Missing the required parameter 'create_service_connector_details' when calling create_service_connector." if create_service_connector_details.nil? path = '/serviceConnectors' 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_service_connector_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ServiceConnectorClient#create_service_connector') 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 |
#deactivate_service_connector(service_connector_id, opts = {}) ⇒ Response
Click here to see an example of how to use deactivate_service_connector API.
Deactivates the specified service connector.
After you send your request, the service connector's state is temporarily UPDATING and any data transfer stops. The state then changes to INACTIVE. For instructions on deactivating service connectors, see To deactivate a service connector.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/oci/sch/service_connector_client.rb', line 366 def deactivate_service_connector(service_connector_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#deactivate_service_connector.' if logger raise "Missing the required parameter 'service_connector_id' when calling deactivate_service_connector." if service_connector_id.nil? raise "Parameter value for 'service_connector_id' must not be blank" if OCI::Internal::Util.blank_string?(service_connector_id) path = '/serviceConnectors/{serviceConnectorId}/actions/deactivate'.sub('{serviceConnectorId}', service_connector_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 = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ServiceConnectorClient#deactivate_service_connector') 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 |
#delete_service_connector(service_connector_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_service_connector API.
Deletes the specified service connector.
After you send your request, the service connector's state is temporarily DELETING and any data transfer stops. The state then changes to DELETED.
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/oci/sch/service_connector_client.rb', line 435 def delete_service_connector(service_connector_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#delete_service_connector.' if logger raise "Missing the required parameter 'service_connector_id' when calling delete_service_connector." if service_connector_id.nil? raise "Parameter value for 'service_connector_id' must not be blank" if OCI::Internal::Util.blank_string?(service_connector_id) path = '/serviceConnectors/{serviceConnectorId}'.sub('{serviceConnectorId}', service_connector_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: 'ServiceConnectorClient#delete_service_connector') 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 |
#get_service_connector(service_connector_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_service_connector API.
Gets the specified service connector's configuration information.
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/oci/sch/service_connector_client.rb', line 493 def get_service_connector(service_connector_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#get_service_connector.' if logger raise "Missing the required parameter 'service_connector_id' when calling get_service_connector." if service_connector_id.nil? raise "Parameter value for 'service_connector_id' must not be blank" if OCI::Internal::Util.blank_string?(service_connector_id) path = '/serviceConnectors/{serviceConnectorId}'.sub('{serviceConnectorId}', service_connector_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: 'ServiceConnectorClient#get_service_connector') 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::Sch::Models::ServiceConnector' ) 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 the details of the specified work request.
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/oci/sch/service_connector_client.rb', line 551 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#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: 'ServiceConnectorClient#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::Sch::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#list_service_connectors(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_service_connectors API.
Lists service connectors in the specified compartment.
631 632 633 634 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 673 674 675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/oci/sch/service_connector_client.rb', line 631 def list_service_connectors(compartment_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#list_service_connectors.' if logger raise "Missing the required parameter 'compartment_id' when calling list_service_connectors." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::Sch::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Sch::Models::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::Sch::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Sch::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 = '/serviceConnectors' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] 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: 'ServiceConnectorClient#list_service_connectors') 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::Sch::Models::ServiceConnectorCollection' ) 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.
Lists work request errors for the specified work request. Results are paginated.
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 |
# File 'lib/oci/sch/service_connector_client.rb', line 715 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#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? 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] # 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: 'ServiceConnectorClient#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::Sch::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.
Lists logs for the specified work request. Results are paginated.
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 |
# File 'lib/oci/sch/service_connector_client.rb', line 783 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#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? 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] # 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: 'ServiceConnectorClient#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::Sch::Models::WorkRequestLogEntryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_requests API.
Lists the work requests in the specified compartment.
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 |
# File 'lib/oci/sch/service_connector_client.rb', line 851 def list_work_requests(compartment_id, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#list_work_requests.' if logger raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil? path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] # 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: 'ServiceConnectorClient#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::Sch::Models::WorkRequestCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
96 97 98 |
# File 'lib/oci/sch/service_connector_client.rb', line 96 def logger @api_client.config.logger end |
#update_service_connector(service_connector_id, update_service_connector_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_service_connector API.
Updates the configuration information for the specified service connector.
After you send your request, the service connector's state is temporarily UPDATING and any data transfer pauses. The state then changes back to its original value: if ACTIVE, then data transfer resumes.
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 |
# File 'lib/oci/sch/service_connector_client.rb', line 923 def update_service_connector(service_connector_id, update_service_connector_details, opts = {}) logger.debug 'Calling operation ServiceConnectorClient#update_service_connector.' if logger raise "Missing the required parameter 'service_connector_id' when calling update_service_connector." if service_connector_id.nil? raise "Missing the required parameter 'update_service_connector_details' when calling update_service_connector." if update_service_connector_details.nil? raise "Parameter value for 'service_connector_id' must not be blank" if OCI::Internal::Util.blank_string?(service_connector_id) path = '/serviceConnectors/{serviceConnectorId}'.sub('{serviceConnectorId}', service_connector_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_service_connector_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ServiceConnectorClient#update_service_connector') 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 |