Class: OCI::Lockbox::LockboxClient
- Inherits:
-
Object
- Object
- OCI::Lockbox::LockboxClient
- Defined in:
- lib/oci/lockbox/lockbox_client.rb
Overview
Use the Managed Access API to approve access requests, create and manage templates, and manage resource approval settings. For more information, see Managed Access Overview.
Use the table of contents and search tool to explore the Managed Access API.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#cancel_work_request(work_request_id, opts = {}) ⇒ Response
Cancels the work request with the given ID.
-
#change_approval_template_compartment(approval_template_id, change_approval_template_compartment_details, opts = {}) ⇒ Response
Moves an ApprovalTemplate resource from one compartment identifier to another.
-
#change_lockbox_compartment(lockbox_id, change_lockbox_compartment_details, opts = {}) ⇒ Response
Moves a Lockbox resource from one compartment identifier to another.
-
#create_access_request(create_access_request_details, opts = {}) ⇒ Response
Creates a new access request.
-
#create_approval_template(create_approval_template_details, opts = {}) ⇒ Response
Creates a new approval template.
-
#create_lockbox(create_lockbox_details, opts = {}) ⇒ Response
Creates a new Lockbox.
-
#delete_approval_template(approval_template_id, opts = {}) ⇒ Response
Deletes an ApprovalTemplate resource by identifier.
-
#delete_lockbox(lockbox_id, opts = {}) ⇒ Response
Deletes a Lockbox resource by identifier.
-
#export_access_requests(export_access_requests_details, opts = {}, &block) ⇒ Response
Exports a list of AccessRequestSummary objects within a compartment and during a specified time range in text format.
-
#get_access_materials(access_request_id, opts = {}) ⇒ Response
Retrieves the access credential/material associated with the access request.
-
#get_access_request(access_request_id, opts = {}) ⇒ Response
Retrieves an access request identified by the access request ID.
-
#get_access_request_internal(access_request_id, opts = {}) ⇒ Response
Retrieves an access request identified by the access request ID for internal use.
-
#get_approval_template(approval_template_id, opts = {}) ⇒ Response
Retrieves an approval template identified by the approval template ID.
-
#get_lockbox(lockbox_id, opts = {}) ⇒ Response
Gets a Lockbox by identifier.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets details of the work request with the given ID.
-
#handle_access_request(access_request_id, handle_access_request_details, opts = {}) ⇒ Response
Handle the AccessRequest.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ LockboxClient
constructor
Creates a new LockboxClient.
-
#list_access_requests(opts = {}) ⇒ Response
Retrieves a list of AccessRequestSummary objects in a compartment.
-
#list_approval_templates(opts = {}) ⇒ Response
Retrieves a list of ApprovalTemplateSummary objects in a compartment.
-
#list_lockboxes(opts = {}) ⇒ Response
Returns a list of Lockboxes.
-
#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.
-
#update_approval_template(approval_template_id, update_approval_template_details, opts = {}) ⇒ Response
Updates the ApprovalTemplate.
-
#update_lockbox(lockbox_id, update_lockbox_details, opts = {}) ⇒ Response
Updates the Lockbox.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ LockboxClient
Creates a new LockboxClient. 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/lockbox/lockbox_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 + '/20220126' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "LockboxClient 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/lockbox/lockbox_client.rb', line 17 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
21 22 23 |
# File 'lib/oci/lockbox/lockbox_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/lockbox/lockbox_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/lockbox/lockbox_client.rb', line 27 def retry_config @retry_config end |
Instance Method Details
#cancel_work_request(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use cancel_work_request API.
Cancels the work request with the given ID.
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 119 def cancel_work_request(work_request_id, opts = {}) logger.debug 'Calling operation LockboxClient#cancel_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling cancel_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[:'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: 'LockboxClient#cancel_work_request') 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 |
#change_approval_template_compartment(approval_template_id, change_approval_template_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_approval_template_compartment API.
Moves an ApprovalTemplate resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 186 def change_approval_template_compartment(approval_template_id, change_approval_template_compartment_details, opts = {}) logger.debug 'Calling operation LockboxClient#change_approval_template_compartment.' if logger raise "Missing the required parameter 'approval_template_id' when calling change_approval_template_compartment." if approval_template_id.nil? raise "Missing the required parameter 'change_approval_template_compartment_details' when calling change_approval_template_compartment." if change_approval_template_compartment_details.nil? raise "Parameter value for 'approval_template_id' must not be blank" if OCI::Internal::Util.blank_string?(approval_template_id) path = '/approvalTemplates/{approvalTemplateId}/actions/changeCompartment'.sub('{approvalTemplateId}', approval_template_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_approval_template_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#change_approval_template_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_lockbox_compartment(lockbox_id, change_lockbox_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_lockbox_compartment API.
Moves a Lockbox resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
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 293 294 295 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 256 def change_lockbox_compartment(lockbox_id, change_lockbox_compartment_details, opts = {}) logger.debug 'Calling operation LockboxClient#change_lockbox_compartment.' if logger raise "Missing the required parameter 'lockbox_id' when calling change_lockbox_compartment." if lockbox_id.nil? raise "Missing the required parameter 'change_lockbox_compartment_details' when calling change_lockbox_compartment." if change_lockbox_compartment_details.nil? raise "Parameter value for 'lockbox_id' must not be blank" if OCI::Internal::Util.blank_string?(lockbox_id) path = '/lockboxes/{lockboxId}/actions/changeCompartment'.sub('{lockboxId}', lockbox_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_lockbox_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#change_lockbox_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_access_request(create_access_request_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_access_request API.
Creates a new access request.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 320 def create_access_request(create_access_request_details, opts = {}) logger.debug 'Calling operation LockboxClient#create_access_request.' if logger raise "Missing the required parameter 'create_access_request_details' when calling create_access_request." if create_access_request_details.nil? path = '/accessRequests' 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_access_request_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#create_access_request') 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::Lockbox::Models::AccessRequest' ) end # rubocop:enable Metrics/BlockLength end |
#create_approval_template(create_approval_template_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_approval_template API.
Creates a new approval template.
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 382 def create_approval_template(create_approval_template_details, opts = {}) logger.debug 'Calling operation LockboxClient#create_approval_template.' if logger raise "Missing the required parameter 'create_approval_template_details' when calling create_approval_template." if create_approval_template_details.nil? path = '/approvalTemplates' 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_approval_template_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#create_approval_template') 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::Lockbox::Models::ApprovalTemplate' ) end # rubocop:enable Metrics/BlockLength end |
#create_lockbox(create_lockbox_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_lockbox API.
Creates a new Lockbox.
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 444 def create_lockbox(create_lockbox_details, opts = {}) logger.debug 'Calling operation LockboxClient#create_lockbox.' if logger raise "Missing the required parameter 'create_lockbox_details' when calling create_lockbox." if create_lockbox_details.nil? path = '/lockboxes' 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_lockbox_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#create_lockbox') 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::Lockbox::Models::Lockbox' ) end # rubocop:enable Metrics/BlockLength end |
#delete_approval_template(approval_template_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_approval_template API.
Deletes an ApprovalTemplate resource by identifier
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 505 def delete_approval_template(approval_template_id, opts = {}) logger.debug 'Calling operation LockboxClient#delete_approval_template.' if logger raise "Missing the required parameter 'approval_template_id' when calling delete_approval_template." if approval_template_id.nil? raise "Parameter value for 'approval_template_id' must not be blank" if OCI::Internal::Util.blank_string?(approval_template_id) path = '/approvalTemplates/{approvalTemplateId}'.sub('{approvalTemplateId}', approval_template_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: 'LockboxClient#delete_approval_template') 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_lockbox(lockbox_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_lockbox API.
Deletes a Lockbox resource by identifier
571 572 573 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 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 571 def delete_lockbox(lockbox_id, opts = {}) logger.debug 'Calling operation LockboxClient#delete_lockbox.' if logger raise "Missing the required parameter 'lockbox_id' when calling delete_lockbox." if lockbox_id.nil? raise "Parameter value for 'lockbox_id' must not be blank" if OCI::Internal::Util.blank_string?(lockbox_id) path = '/lockboxes/{lockboxId}'.sub('{lockboxId}', lockbox_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: 'LockboxClient#delete_lockbox') 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 |
#export_access_requests(export_access_requests_details, opts = {}, &block) ⇒ Response
Click here to see an example of how to use export_access_requests API.
Exports a list of AccessRequestSummary objects within a compartment and during a specified time range in text format. You can filter the results by problem severity.
Allowed values are: timeCreated, displayName, id
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 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 642 def export_access_requests(export_access_requests_details, opts = {}, &block) logger.debug 'Calling operation LockboxClient#export_access_requests.' if logger raise "Missing the required parameter 'export_access_requests_details' when calling export_access_requests." if export_access_requests_details.nil? if opts[:lifecycle_state] && !OCI::Lockbox::Models::AccessRequest::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Lockbox::Models::AccessRequest::LIFECYCLE_STATE_ENUM.' end if opts[:lockbox_partner] && !OCI::Lockbox::Models::LOCKBOX_PARTNER_ENUM.include?(opts[:lockbox_partner]) raise 'Invalid value for "lockbox_partner", must be one of the values in OCI::Lockbox::Models::LOCKBOX_PARTNER_ENUM.' end if opts[:sort_order] && !OCI::Lockbox::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Lockbox::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName id].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName, id.' end path = '/accessRequests/actions/export' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:id] = opts[:id] if opts[:id] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:lockboxPartner] = opts[:lockbox_partner] if opts[:lockbox_partner] query_params[:partnerId] = opts[:partner_id] if opts[:partner_id] query_params[:requestorId] = opts[:requestor_id] if opts[:requestor_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] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'text/csv' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] 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 = @api_client.object_to_http_body(export_access_requests_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#export_access_requests') do if !block.nil? @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: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @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: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @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: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @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: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_access_materials(access_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_access_materials API.
Retrieves the access credential/material associated with the access request.
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 766 def get_access_materials(access_request_id, opts = {}) logger.debug 'Calling operation LockboxClient#get_access_materials.' if logger raise "Missing the required parameter 'access_request_id' when calling get_access_materials." if access_request_id.nil? raise "Parameter value for 'access_request_id' must not be blank" if OCI::Internal::Util.blank_string?(access_request_id) path = '/accessRequests/{accessRequestId}/accessMaterials'.sub('{accessRequestId}', access_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: 'LockboxClient#get_access_materials') 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::Lockbox::Models::AccessMaterials' ) end # rubocop:enable Metrics/BlockLength end |
#get_access_request(access_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_access_request API.
Retrieves an access request identified by the access request ID.
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 820 def get_access_request(access_request_id, opts = {}) logger.debug 'Calling operation LockboxClient#get_access_request.' if logger raise "Missing the required parameter 'access_request_id' when calling get_access_request." if access_request_id.nil? raise "Parameter value for 'access_request_id' must not be blank" if OCI::Internal::Util.blank_string?(access_request_id) path = '/accessRequests/{accessRequestId}'.sub('{accessRequestId}', access_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: 'LockboxClient#get_access_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::Lockbox::Models::AccessRequest' ) end # rubocop:enable Metrics/BlockLength end |
#get_access_request_internal(access_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_access_request_internal API.
Retrieves an access request identified by the access request ID for internal use.
874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 874 def get_access_request_internal(access_request_id, opts = {}) logger.debug 'Calling operation LockboxClient#get_access_request_internal.' if logger raise "Missing the required parameter 'access_request_id' when calling get_access_request_internal." if access_request_id.nil? raise "Parameter value for 'access_request_id' must not be blank" if OCI::Internal::Util.blank_string?(access_request_id) path = '/accessRequests/{accessRequestId}/internal'.sub('{accessRequestId}', access_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: 'LockboxClient#get_access_request_internal') 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::Lockbox::Models::AccessRequestExt' ) end # rubocop:enable Metrics/BlockLength end |
#get_approval_template(approval_template_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_approval_template API.
Retrieves an approval template identified by the approval template ID.
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 964 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 928 def get_approval_template(approval_template_id, opts = {}) logger.debug 'Calling operation LockboxClient#get_approval_template.' if logger raise "Missing the required parameter 'approval_template_id' when calling get_approval_template." if approval_template_id.nil? raise "Parameter value for 'approval_template_id' must not be blank" if OCI::Internal::Util.blank_string?(approval_template_id) path = '/approvalTemplates/{approvalTemplateId}'.sub('{approvalTemplateId}', approval_template_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: 'LockboxClient#get_approval_template') 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::Lockbox::Models::ApprovalTemplate' ) end # rubocop:enable Metrics/BlockLength end |
#get_lockbox(lockbox_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_lockbox API.
Gets a Lockbox by identifier
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 1018 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 982 def get_lockbox(lockbox_id, opts = {}) logger.debug 'Calling operation LockboxClient#get_lockbox.' if logger raise "Missing the required parameter 'lockbox_id' when calling get_lockbox." if lockbox_id.nil? raise "Parameter value for 'lockbox_id' must not be blank" if OCI::Internal::Util.blank_string?(lockbox_id) path = '/lockboxes/{lockboxId}'.sub('{lockboxId}', lockbox_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: 'LockboxClient#get_lockbox') 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::Lockbox::Models::Lockbox' ) 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.
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 1072 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1036 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation LockboxClient#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: 'LockboxClient#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::Lockbox::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#handle_access_request(access_request_id, handle_access_request_details, opts = {}) ⇒ Response
Click here to see an example of how to use handle_access_request API.
Handle the AccessRequest
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 1139 1140 1141 1142 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1103 def handle_access_request(access_request_id, handle_access_request_details, opts = {}) logger.debug 'Calling operation LockboxClient#handle_access_request.' if logger raise "Missing the required parameter 'access_request_id' when calling handle_access_request." if access_request_id.nil? raise "Missing the required parameter 'handle_access_request_details' when calling handle_access_request." if handle_access_request_details.nil? raise "Parameter value for 'access_request_id' must not be blank" if OCI::Internal::Util.blank_string?(access_request_id) path = '/accessRequests/{accessRequestId}/actions/handle'.sub('{accessRequestId}', access_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[:'if-match'] = opts[:if_match] if opts[:if_match] 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(handle_access_request_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#handle_access_request') 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 |
#list_access_requests(opts = {}) ⇒ Response
Click here to see an example of how to use list_access_requests API.
Retrieves a list of AccessRequestSummary objects in a compartment.
Allowed values are: timeCreated, displayName, id
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1175 def list_access_requests(opts = {}) logger.debug 'Calling operation LockboxClient#list_access_requests.' if logger if opts[:lifecycle_state] && !OCI::Lockbox::Models::AccessRequest::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Lockbox::Models::AccessRequest::LIFECYCLE_STATE_ENUM.' end if opts[:lockbox_partner] && !OCI::Lockbox::Models::LOCKBOX_PARTNER_ENUM.include?(opts[:lockbox_partner]) raise 'Invalid value for "lockbox_partner", must be one of the values in OCI::Lockbox::Models::LOCKBOX_PARTNER_ENUM.' end if opts[:sort_order] && !OCI::Lockbox::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Lockbox::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName id].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName, id.' end path = '/accessRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:lockboxId] = opts[:lockbox_id] if opts[:lockbox_id] query_params[:id] = opts[:id] if opts[:id] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:lockboxPartner] = opts[:lockbox_partner] if opts[:lockbox_partner] query_params[:partnerId] = opts[:partner_id] if opts[:partner_id] query_params[:requestorId] = opts[:requestor_id] if opts[:requestor_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[:timeCreatedAfter] = opts[:time_created_after] if opts[:time_created_after] query_params[:timeCreatedBefore] = opts[:time_created_before] if opts[:time_created_before] # 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: 'LockboxClient#list_access_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::Lockbox::Models::AccessRequestCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_approval_templates(opts = {}) ⇒ Response
Click here to see an example of how to use list_approval_templates API.
Retrieves a list of ApprovalTemplateSummary objects in a compartment.
Allowed values are: timeCreated, displayName, id
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 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1266 def list_approval_templates(opts = {}) logger.debug 'Calling operation LockboxClient#list_approval_templates.' if logger if opts[:lifecycle_state] && !OCI::Lockbox::Models::ApprovalTemplate::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Lockbox::Models::ApprovalTemplate::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::Lockbox::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Lockbox::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName id].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName, id.' end path = '/approvalTemplates' 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[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] 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: 'LockboxClient#list_approval_templates') 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::Lockbox::Models::ApprovalTemplateCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_lockboxes(opts = {}) ⇒ Response
Click here to see an example of how to use list_lockboxes API.
Returns a list of Lockboxes.
Allowed values are: timeCreated, displayName, id
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1351 def list_lockboxes(opts = {}) logger.debug 'Calling operation LockboxClient#list_lockboxes.' if logger if opts[:lifecycle_state] && !OCI::Lockbox::Models::Lockbox::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Lockbox::Models::Lockbox::LIFECYCLE_STATE_ENUM.' end if opts[:lockbox_partner] && !OCI::Lockbox::Models::LOCKBOX_PARTNER_ENUM.include?(opts[:lockbox_partner]) raise 'Invalid value for "lockbox_partner", must be one of the values in OCI::Lockbox::Models::LOCKBOX_PARTNER_ENUM.' end if opts[:sort_order] && !OCI::Lockbox::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Lockbox::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName id].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName, id.' end path = '/lockboxes' 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[:resourceId] = opts[:resource_id] if opts[:resource_id] query_params[:lockboxPartner] = opts[:lockbox_partner] if opts[:lockbox_partner] query_params[:partnerId] = opts[:partner_id] if opts[:partner_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: 'LockboxClient#list_lockboxes') 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::Lockbox::Models::LockboxCollection' ) 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: timeAccepted
1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1437 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation LockboxClient#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[timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeAccepted.' end if opts[:sort_order] && !OCI::Lockbox::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Lockbox::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: 'LockboxClient#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::Lockbox::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: timeAccepted
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 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1510 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation LockboxClient#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[timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeAccepted.' end if opts[:sort_order] && !OCI::Lockbox::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Lockbox::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: 'LockboxClient#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::Lockbox::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
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1586 def list_work_requests(opts = {}) logger.debug 'Calling operation LockboxClient#list_work_requests.' if logger if opts[:status] && !OCI::Lockbox::Models::OPERATION_STATUS_ENUM.include?(opts[:status]) raise 'Invalid value for "status", must be one of the values in OCI::Lockbox::Models::OPERATION_STATUS_ENUM.' end if opts[:sort_order] && !OCI::Lockbox::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Lockbox::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: 'LockboxClient#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::Lockbox::Models::WorkRequestSummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
96 97 98 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 96 def logger @api_client.config.logger end |
#update_approval_template(approval_template_id, update_approval_template_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_approval_template API.
Updates the ApprovalTemplate
1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1665 def update_approval_template(approval_template_id, update_approval_template_details, opts = {}) logger.debug 'Calling operation LockboxClient#update_approval_template.' if logger raise "Missing the required parameter 'approval_template_id' when calling update_approval_template." if approval_template_id.nil? raise "Missing the required parameter 'update_approval_template_details' when calling update_approval_template." if update_approval_template_details.nil? raise "Parameter value for 'approval_template_id' must not be blank" if OCI::Internal::Util.blank_string?(approval_template_id) path = '/approvalTemplates/{approvalTemplateId}'.sub('{approvalTemplateId}', approval_template_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_approval_template_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#update_approval_template') 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::Lockbox::Models::ApprovalTemplate' ) end # rubocop:enable Metrics/BlockLength end |
#update_lockbox(lockbox_id, update_lockbox_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_lockbox API.
Updates the Lockbox
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 |
# File 'lib/oci/lockbox/lockbox_client.rb', line 1728 def update_lockbox(lockbox_id, update_lockbox_details, opts = {}) logger.debug 'Calling operation LockboxClient#update_lockbox.' if logger raise "Missing the required parameter 'lockbox_id' when calling update_lockbox." if lockbox_id.nil? raise "Missing the required parameter 'update_lockbox_details' when calling update_lockbox." if update_lockbox_details.nil? raise "Parameter value for 'lockbox_id' must not be blank" if OCI::Internal::Util.blank_string?(lockbox_id) path = '/lockboxes/{lockboxId}'.sub('{lockboxId}', lockbox_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_lockbox_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'LockboxClient#update_lockbox') 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::Lockbox::Models::Lockbox' ) end # rubocop:enable Metrics/BlockLength end |