Class: OCI::FleetAppsManagement::FleetAppsManagementRunbooksClient
- Inherits:
-
Object
- Object
- OCI::FleetAppsManagement::FleetAppsManagementRunbooksClient
- Defined in:
- lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb
Overview
Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#change_runbook_compartment(runbook_id, change_runbook_compartment_details, opts = {}) ⇒ Response
Moves a Runbook into a different compartment within the same tenancy.
-
#change_task_record_compartment(task_record_id, change_task_record_compartment_details, opts = {}) ⇒ Response
Moves a task record into a different compartment within the same tenancy.
-
#create_runbook(create_runbook_details, opts = {}) ⇒ Response
Creates a runbook.
-
#create_runbook_version(create_runbook_version_details, opts = {}) ⇒ Response
Add RunbookVersion inu00A0Fleet Application Management.
-
#create_task_record(create_task_record_details, opts = {}) ⇒ Response
Creates a new task record.
-
#delete_runbook(runbook_id, opts = {}) ⇒ Response
Deletes a runbook specified by the identifier.
-
#delete_runbook_version(runbook_version_id, opts = {}) ⇒ Response
Removes a Runbook Version from the runbook in Fleet Application Management.
-
#delete_task_record(task_record_id, opts = {}) ⇒ Response
Deletes the task record specified by an identifier.
-
#get_runbook(runbook_id, opts = {}) ⇒ Response
Get the details of a runbook in Fleet Application Management.
-
#get_runbook_version(runbook_version_id, opts = {}) ⇒ Response
Gets a Runbook Version by identifier.
-
#get_task_record(task_record_id, opts = {}) ⇒ Response
Gets information for the specified task record.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ FleetAppsManagementRunbooksClient
constructor
Creates a new FleetAppsManagementRunbooksClient.
-
#list_runbook_versions(opts = {}) ⇒ Response
List versions for a runbook in Fleet Application Management.
-
#list_runbooks(opts = {}) ⇒ Response
Returns a list of all the runbooks in the specified compartment.
-
#list_task_records(opts = {}) ⇒ Response
Returns a list of all the task records in the specified compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#publish_runbook(publish_runbook_details, opts = {}) ⇒ Response
Publish the specified version of the runbook.
-
#set_default_runbook(set_default_runbook_details, opts = {}) ⇒ Response
Set a runbook as default.
-
#update_runbook(runbook_id, update_runbook_details, opts = {}) ⇒ Response
Updates the runbook specified by the identifier.
-
#update_runbook_version(runbook_version_id, update_runbook_version_details, opts = {}) ⇒ Response
Updates the RunbookVersion.
-
#update_task_record(task_record_id, update_task_record_details, opts = {}) ⇒ Response
Updates certain attributes for the specified task record.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ FleetAppsManagementRunbooksClient
Creates a new FleetAppsManagementRunbooksClient. Notes: If a config is not specified, then the global OCI.config will be used.
This client is not thread-safe
Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 55 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20250228' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "FleetAppsManagementRunbooksClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
15 16 17 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 15 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
19 20 21 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 19 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
29 30 31 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 29 def region @region end |
#retry_config ⇒ OCI::Retry::RetryConfig (readonly)
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil
, which means that an operation will not perform any retries
25 26 27 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 25 def retry_config @retry_config end |
Instance Method Details
#change_runbook_compartment(runbook_id, change_runbook_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_runbook_compartment API.
Moves a Runbook into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
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 161 162 163 164 165 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 126 def change_runbook_compartment(runbook_id, change_runbook_compartment_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#change_runbook_compartment.' if logger raise "Missing the required parameter 'runbook_id' when calling change_runbook_compartment." if runbook_id.nil? raise "Missing the required parameter 'change_runbook_compartment_details' when calling change_runbook_compartment." if change_runbook_compartment_details.nil? raise "Parameter value for 'runbook_id' must not be blank" if OCI::Internal::Util.blank_string?(runbook_id) path = '/runbooks/{runbookId}/actions/changeCompartment'.sub('{runbookId}', runbook_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_runbook_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#change_runbook_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_task_record_compartment(task_record_id, change_task_record_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_task_record_compartment API.
Moves a task record into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
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 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 198 def change_task_record_compartment(task_record_id, change_task_record_compartment_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#change_task_record_compartment.' if logger raise "Missing the required parameter 'task_record_id' when calling change_task_record_compartment." if task_record_id.nil? raise "Missing the required parameter 'change_task_record_compartment_details' when calling change_task_record_compartment." if change_task_record_compartment_details.nil? raise "Parameter value for 'task_record_id' must not be blank" if OCI::Internal::Util.blank_string?(task_record_id) path = '/taskRecords/{taskRecordId}/actions/changeCompartment'.sub('{taskRecordId}', task_record_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_task_record_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#change_task_record_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_runbook(create_runbook_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_runbook API.
Creates a runbook.
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 296 297 298 299 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 262 def create_runbook(create_runbook_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#create_runbook.' if logger raise "Missing the required parameter 'create_runbook_details' when calling create_runbook." if create_runbook_details.nil? path = '/runbooks' 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_runbook_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#create_runbook') 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::FleetAppsManagement::Models::Runbook' ) end # rubocop:enable Metrics/BlockLength end |
#create_runbook_version(create_runbook_version_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_runbook_version API.
Add RunbookVersion inu00A0Fleet Application Management.
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 359 360 361 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 324 def create_runbook_version(create_runbook_version_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#create_runbook_version.' if logger raise "Missing the required parameter 'create_runbook_version_details' when calling create_runbook_version." if create_runbook_version_details.nil? path = '/runbookVersions' 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_runbook_version_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#create_runbook_version') 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::FleetAppsManagement::Models::RunbookVersion' ) end # rubocop:enable Metrics/BlockLength end |
#create_task_record(create_task_record_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_task_record API.
Creates a new task record.
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 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 386 def create_task_record(create_task_record_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#create_task_record.' if logger raise "Missing the required parameter 'create_task_record_details' when calling create_task_record." if create_task_record_details.nil? path = '/taskRecords' 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_task_record_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#create_task_record') 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::FleetAppsManagement::Models::TaskRecord' ) end # rubocop:enable Metrics/BlockLength end |
#delete_runbook(runbook_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_runbook API.
Deletes a runbook specified by the identifier.
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 482 483 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 447 def delete_runbook(runbook_id, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#delete_runbook.' if logger raise "Missing the required parameter 'runbook_id' when calling delete_runbook." if runbook_id.nil? raise "Parameter value for 'runbook_id' must not be blank" if OCI::Internal::Util.blank_string?(runbook_id) path = '/runbooks/{runbookId}'.sub('{runbookId}', runbook_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: 'FleetAppsManagementRunbooksClient#delete_runbook') 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_runbook_version(runbook_version_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_runbook_version API.
Removes a Runbook Version from the runbook in Fleet Application Management.
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 542 543 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 507 def delete_runbook_version(runbook_version_id, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#delete_runbook_version.' if logger raise "Missing the required parameter 'runbook_version_id' when calling delete_runbook_version." if runbook_version_id.nil? raise "Parameter value for 'runbook_version_id' must not be blank" if OCI::Internal::Util.blank_string?(runbook_version_id) path = '/runbookVersions/{runbookVersionId}'.sub('{runbookVersionId}', runbook_version_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: 'FleetAppsManagementRunbooksClient#delete_runbook_version') 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_task_record(task_record_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_task_record API.
Deletes the task record specified by an identifier.
567 568 569 570 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 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 567 def delete_task_record(task_record_id, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#delete_task_record.' if logger raise "Missing the required parameter 'task_record_id' when calling delete_task_record." if task_record_id.nil? raise "Parameter value for 'task_record_id' must not be blank" if OCI::Internal::Util.blank_string?(task_record_id) path = '/taskRecords/{taskRecordId}'.sub('{taskRecordId}', task_record_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: 'FleetAppsManagementRunbooksClient#delete_task_record') 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_runbook(runbook_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_runbook API.
Get the details of a runbook in Fleet Application Management.
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 621 def get_runbook(runbook_id, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#get_runbook.' if logger raise "Missing the required parameter 'runbook_id' when calling get_runbook." if runbook_id.nil? raise "Parameter value for 'runbook_id' must not be blank" if OCI::Internal::Util.blank_string?(runbook_id) path = '/runbooks/{runbookId}'.sub('{runbookId}', runbook_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: 'FleetAppsManagementRunbooksClient#get_runbook') 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::FleetAppsManagement::Models::Runbook' ) end # rubocop:enable Metrics/BlockLength end |
#get_runbook_version(runbook_version_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_runbook_version API.
Gets a Runbook Version by identifier.
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 675 def get_runbook_version(runbook_version_id, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#get_runbook_version.' if logger raise "Missing the required parameter 'runbook_version_id' when calling get_runbook_version." if runbook_version_id.nil? raise "Parameter value for 'runbook_version_id' must not be blank" if OCI::Internal::Util.blank_string?(runbook_version_id) path = '/runbookVersions/{runbookVersionId}'.sub('{runbookVersionId}', runbook_version_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: 'FleetAppsManagementRunbooksClient#get_runbook_version') 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::FleetAppsManagement::Models::RunbookVersion' ) end # rubocop:enable Metrics/BlockLength end |
#get_task_record(task_record_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_task_record API.
Gets information for the specified task record.
729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 729 def get_task_record(task_record_id, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#get_task_record.' if logger raise "Missing the required parameter 'task_record_id' when calling get_task_record." if task_record_id.nil? raise "Parameter value for 'task_record_id' must not be blank" if OCI::Internal::Util.blank_string?(task_record_id) path = '/taskRecords/{taskRecordId}'.sub('{taskRecordId}', task_record_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: 'FleetAppsManagementRunbooksClient#get_task_record') 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::FleetAppsManagement::Models::TaskRecord' ) end # rubocop:enable Metrics/BlockLength end |
#list_runbook_versions(opts = {}) ⇒ Response
Click here to see an example of how to use list_runbook_versions API.
List versions for a runbook in Fleet Application Management.
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 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 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 795 def list_runbook_versions(opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#list_runbook_versions.' if logger if opts[:lifecycle_state] && !OCI::FleetAppsManagement::Models::RunbookVersion::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::FleetAppsManagement::Models::RunbookVersion::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::FleetAppsManagement::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::FleetAppsManagement::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !OCI::FleetAppsManagement::Models::SORT_BY_ENUM.include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of the values in OCI::FleetAppsManagement::Models::SORT_BY_ENUM.' end path = '/runbookVersions' 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[:runbookId] = opts[:runbook_id] if opts[:runbook_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[:name] = opts[:name] if opts[:name] # 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: 'FleetAppsManagementRunbooksClient#list_runbook_versions') 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::FleetAppsManagement::Models::RunbookVersionCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_runbooks(opts = {}) ⇒ Response
Click here to see an example of how to use list_runbooks API.
Returns a list of all the runbooks in the specified compartment. The query parameter compartmentId
is required unless the query parameter id
is specified.
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 887 def list_runbooks(opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#list_runbooks.' if logger if opts[:lifecycle_state] && !OCI::FleetAppsManagement::Models::Runbook::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::FleetAppsManagement::Models::Runbook::LIFECYCLE_STATE_ENUM.' end if opts[:type] && !OCI::FleetAppsManagement::Models::Runbook::TYPE_ENUM.include?(opts[:type]) raise 'Invalid value for "type", must be one of the values in OCI::FleetAppsManagement::Models::Runbook::TYPE_ENUM.' end if opts[:sort_order] && !OCI::FleetAppsManagement::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::FleetAppsManagement::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !OCI::FleetAppsManagement::Models::RUNBOOK_SORT_BY_ENUM.include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of the values in OCI::FleetAppsManagement::Models::RUNBOOK_SORT_BY_ENUM.' end path = '/runbooks' 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[:type] = opts[:type] if opts[:type] query_params[:platform] = opts[:platform] if opts[:platform] query_params[:operation] = opts[:operation] if opts[:operation] 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: 'FleetAppsManagementRunbooksClient#list_runbooks') 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::FleetAppsManagement::Models::RunbookCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_task_records(opts = {}) ⇒ Response
Click here to see an example of how to use list_task_records API.
Returns a list of all the task records in the specified compartment. The query parameter compartmentId
is required unless the query parameter id
is specified.
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 984 def list_task_records(opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#list_task_records.' if logger if opts[:type] && !OCI::FleetAppsManagement::Models::TaskRecord::TYPE_ENUM.include?(opts[:type]) raise 'Invalid value for "type", must be one of the values in OCI::FleetAppsManagement::Models::TaskRecord::TYPE_ENUM.' end if opts[:lifecycle_state] && !OCI::FleetAppsManagement::Models::TaskRecord::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::FleetAppsManagement::Models::TaskRecord::LIFECYCLE_STATE_ENUM.' end if opts[:sort_by] && !OCI::FleetAppsManagement::Models::TASK_RECORD_SORT_BY_ENUM.include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of the values in OCI::FleetAppsManagement::Models::TASK_RECORD_SORT_BY_ENUM.' end if opts[:sort_order] && !OCI::FleetAppsManagement::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::FleetAppsManagement::Models::SORT_ORDER_ENUM.' end path = '/taskRecords' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:platform] = opts[:platform] if opts[:platform] query_params[:type] = opts[:type] if opts[:type] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:operation] = opts[:operation] if opts[:operation] 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[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] 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: 'FleetAppsManagementRunbooksClient#list_task_records') 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::FleetAppsManagement::Models::TaskRecordCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
94 95 96 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 94 def logger @api_client.config.logger end |
#publish_runbook(publish_runbook_details, opts = {}) ⇒ Response
Click here to see an example of how to use publish_runbook API.
Publish the specified version of the runbook. The specified version of the runbook becomes acitve when it is published.Only active versions of runbook can be used in execution.
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 1077 def publish_runbook(publish_runbook_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#publish_runbook.' if logger raise "Missing the required parameter 'publish_runbook_details' when calling publish_runbook." if publish_runbook_details.nil? path = '/runbooks/actions/publishRunbook' 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(publish_runbook_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#publish_runbook') 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 |
#set_default_runbook(set_default_runbook_details, opts = {}) ⇒ Response
Click here to see an example of how to use set_default_runbook API.
Set a runbook as default.
1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 1145 def set_default_runbook(set_default_runbook_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#set_default_runbook.' if logger raise "Missing the required parameter 'set_default_runbook_details' when calling set_default_runbook." if set_default_runbook_details.nil? path = '/runbooks/actions/setDefaultRunbook' 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(set_default_runbook_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#set_default_runbook') 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::FleetAppsManagement::Models::Runbook' ) end # rubocop:enable Metrics/BlockLength end |
#update_runbook(runbook_id, update_runbook_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_runbook API.
Updates the runbook specified by the identifier.
1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 1208 def update_runbook(runbook_id, update_runbook_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#update_runbook.' if logger raise "Missing the required parameter 'runbook_id' when calling update_runbook." if runbook_id.nil? raise "Missing the required parameter 'update_runbook_details' when calling update_runbook." if update_runbook_details.nil? raise "Parameter value for 'runbook_id' must not be blank" if OCI::Internal::Util.blank_string?(runbook_id) path = '/runbooks/{runbookId}'.sub('{runbookId}', runbook_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_runbook_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#update_runbook') 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_runbook_version(runbook_version_id, update_runbook_version_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_runbook_version API.
Updates the RunbookVersion.
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 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 1270 def update_runbook_version(runbook_version_id, update_runbook_version_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#update_runbook_version.' if logger raise "Missing the required parameter 'runbook_version_id' when calling update_runbook_version." if runbook_version_id.nil? raise "Missing the required parameter 'update_runbook_version_details' when calling update_runbook_version." if update_runbook_version_details.nil? raise "Parameter value for 'runbook_version_id' must not be blank" if OCI::Internal::Util.blank_string?(runbook_version_id) path = '/runbookVersions/{runbookVersionId}'.sub('{runbookVersionId}', runbook_version_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_runbook_version_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#update_runbook_version') 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_task_record(task_record_id, update_task_record_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_task_record API.
Updates certain attributes for the specified task record.
1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 |
# File 'lib/oci/fleet_apps_management/fleet_apps_management_runbooks_client.rb', line 1332 def update_task_record(task_record_id, update_task_record_details, opts = {}) logger.debug 'Calling operation FleetAppsManagementRunbooksClient#update_task_record.' if logger raise "Missing the required parameter 'task_record_id' when calling update_task_record." if task_record_id.nil? raise "Missing the required parameter 'update_task_record_details' when calling update_task_record." if update_task_record_details.nil? raise "Parameter value for 'task_record_id' must not be blank" if OCI::Internal::Util.blank_string?(task_record_id) path = '/taskRecords/{taskRecordId}'.sub('{taskRecordId}', task_record_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_task_record_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'FleetAppsManagementRunbooksClient#update_task_record') 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 |