Class: OCI::OsManagementHub::ManagedInstanceClient
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::ManagedInstanceClient
- Defined in:
- lib/oci/os_management_hub/managed_instance_client.rb
Overview
Use the OS Management Hub API to manage and monitor updates and patches for instances in OCI, your private data center, or 3rd-party clouds. For more information, see Overview of OS Management Hub.
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
-
#associate_managed_instances_with_management_station(management_station_id, associate_managed_instances_with_management_station_details, opts = {}) ⇒ Response
Associates managed instances to the specified management station.
-
#attach_profile_to_managed_instance(managed_instance_id, attach_profile_to_managed_instance_details, opts = {}) ⇒ Response
Adds profile to a managed instance.
-
#attach_software_sources_to_managed_instance(managed_instance_id, attach_software_sources_to_managed_instance_details, opts = {}) ⇒ Response
Adds software sources to a managed instance.
-
#delete_managed_instance(managed_instance_id, opts = {}) ⇒ Response
Unregisters the specified managed instance from the service.
-
#detach_profile_from_managed_instance(managed_instance_id, opts = {}) ⇒ Response
Detaches profile from a managed instance.
-
#detach_software_sources_from_managed_instance(managed_instance_id, detach_software_sources_from_managed_instance_details, opts = {}) ⇒ Response
Removes software sources from a managed instance.
-
#disable_module_stream_on_managed_instance(managed_instance_id, disable_module_stream_on_managed_instance_details, opts = {}) ⇒ Response
Disables a module stream on a managed instance.
-
#enable_module_stream_on_managed_instance(managed_instance_id, enable_module_stream_on_managed_instance_details, opts = {}) ⇒ Response
Enables a module stream on a managed instance.
-
#get_managed_instance(managed_instance_id, opts = {}) ⇒ Response
Gets information about the specified managed instance.
-
#get_windows_update(windows_update_id, opts = {}) ⇒ Response
Returns a Windows Update object.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ManagedInstanceClient
constructor
Creates a new ManagedInstanceClient.
-
#install_all_windows_updates_on_managed_instances_in_compartment(install_all_windows_updates_on_managed_instances_in_compartment_details, opts = {}) ⇒ Response
Installs all of the available Windows updates for managed instances in a compartment.
-
#install_module_stream_profile_on_managed_instance(managed_instance_id, install_module_stream_profile_on_managed_instance_details, opts = {}) ⇒ Response
Installs a profile for an module stream.
-
#install_packages_on_managed_instance(managed_instance_id, install_packages_on_managed_instance_details, opts = {}) ⇒ Response
Installs packages on a managed instance.
-
#install_snaps_on_managed_instance(managed_instance_id, install_snaps_on_managed_instance_details, opts = {}) ⇒ Response
Installs specified snaps on a managed instance.
-
#install_windows_updates_on_managed_instance(managed_instance_id, install_windows_updates_on_managed_instance_details, opts = {}) ⇒ Response
Installs Windows updates on the specified managed instance.
-
#list_managed_instance_available_packages(managed_instance_id, opts = {}) ⇒ Response
Returns a list of packages that are available for installation on a managed instance.
-
#list_managed_instance_available_software_sources(managed_instance_id, opts = {}) ⇒ Response
Returns a list of software sources that can be attached to the specified managed instance.
-
#list_managed_instance_available_windows_updates(managed_instance_id, opts = {}) ⇒ Response
Returns a list of Windows updates that can be installed on the specified managed instance.
-
#list_managed_instance_errata(managed_instance_id, opts = {}) ⇒ Response
Returns a list of applicable errata on the managed instance.
-
#list_managed_instance_installed_packages(managed_instance_id, opts = {}) ⇒ Response
Lists the packages that are installed on the managed instance.
-
#list_managed_instance_installed_windows_updates(managed_instance_id, opts = {}) ⇒ Response
Returns a list of Windows updates that have been installed on the specified managed instance.
-
#list_managed_instance_modules(managed_instance_id, opts = {}) ⇒ Response
Retrieves a list of modules, along with streams of the modules, from a managed instance.
-
#list_managed_instance_snaps(managed_instance_id, opts = {}) ⇒ Response
Retrieves a list of snaps for a managed instance.
-
#list_managed_instance_updatable_packages(managed_instance_id, opts = {}) ⇒ Response
Returns a list of updatable packages for a managed instance.
-
#list_managed_instances(opts = {}) ⇒ Response
Lists managed instances that match the specified compartment or managed instance OCID.
-
#list_windows_updates(compartment_id, opts = {}) ⇒ Response
Lists Windows updates that have been reported to the service.
-
#logger ⇒ Logger
The logger for this client.
-
#manage_module_streams_on_managed_instance(managed_instance_id, manage_module_streams_on_managed_instance_details, opts = {}) ⇒ Response
Enables or disables module streams and installs or removes module stream profiles.
-
#reboot_managed_instance(managed_instance_id, reboot_managed_instance_details, opts = {}) ⇒ Response
Initiates a reboot of the specified managed instance.
-
#refresh_software_on_managed_instance(managed_instance_id, opts = {}) ⇒ Response
Refreshes the package or Windows update information on a managed instance with the latest data from the software source.
-
#remove_module_stream_profile_from_managed_instance(managed_instance_id, remove_module_stream_profile_from_managed_instance_details, opts = {}) ⇒ Response
Removes a profile for a module stream that is installed on a managed instance.
-
#remove_packages_from_managed_instance(managed_instance_id, remove_packages_from_managed_instance_details, opts = {}) ⇒ Response
Removes an installed package from a managed instance.
-
#remove_snaps_from_managed_instance(managed_instance_id, remove_snaps_from_managed_instance_details, opts = {}) ⇒ Response
Removes specified snaps from a managed instance.
-
#switch_module_stream_on_managed_instance(managed_instance_id, switch_module_stream_on_managed_instance_details, opts = {}) ⇒ Response
Enables a new stream for a module that already has a stream enabled.
-
#switch_snap_channel_on_managed_instance(managed_instance_id, switch_snap_channel_on_managed_instance_details, opts = {}) ⇒ Response
Switches the snap channel on a managed instance.
-
#update_all_packages_on_managed_instances_in_compartment(update_all_packages_on_managed_instances_in_compartment_details, opts = {}) ⇒ Response
Install all of the available package updates for all of the managed instances in a compartment.
-
#update_managed_instance(managed_instance_id, update_managed_instance_details, opts = {}) ⇒ Response
Updates the specified managed instance information, such as description, ONS topic, and associated management station.
-
#update_packages_on_managed_instance(managed_instance_id, update_packages_on_managed_instance_details, opts = {}) ⇒ Response
Updates a package on a managed instance.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ManagedInstanceClient
Creates a new ManagedInstanceClient. Notes: If a config is not specified, then the global OCI.config will be used.
This client is not thread-safe
Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 56 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20220901' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "ManagedInstanceClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
16 17 18 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 16 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
20 21 22 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 20 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
30 31 32 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 30 def region @region end |
#retry_config ⇒ OCI::Retry::RetryConfig (readonly)
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries
26 27 28 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 26 def retry_config @retry_config end |
Instance Method Details
#associate_managed_instances_with_management_station(management_station_id, associate_managed_instances_with_management_station_details, opts = {}) ⇒ Response
Click here to see an example of how to use associate_managed_instances_with_management_station API.
Associates managed instances to the specified management station
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/os_management_hub/managed_instance_client.rb', line 126 def associate_managed_instances_with_management_station(management_station_id, associate_managed_instances_with_management_station_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#associate_managed_instances_with_management_station.' if logger raise "Missing the required parameter 'management_station_id' when calling associate_managed_instances_with_management_station." if management_station_id.nil? raise "Missing the required parameter 'associate_managed_instances_with_management_station_details' when calling associate_managed_instances_with_management_station." if associate_managed_instances_with_management_station_details.nil? raise "Parameter value for 'management_station_id' must not be blank" if OCI::Internal::Util.blank_string?(management_station_id) path = '/managementStations/{managementStationId}/actions/associateManagedInstances'.sub('{managementStationId}', management_station_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(associate_managed_instances_with_management_station_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#associate_managed_instances_with_management_station') 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 |
#attach_profile_to_managed_instance(managed_instance_id, attach_profile_to_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use attach_profile_to_managed_instance API.
Adds profile to a managed instance. After the profile has been added, the instance can be registered as a managed instance.
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/os_management_hub/managed_instance_client.rb', line 198 def attach_profile_to_managed_instance(managed_instance_id, attach_profile_to_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#attach_profile_to_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling attach_profile_to_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'attach_profile_to_managed_instance_details' when calling attach_profile_to_managed_instance." if attach_profile_to_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/attachProfile'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(attach_profile_to_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#attach_profile_to_managed_instance') 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 |
#attach_software_sources_to_managed_instance(managed_instance_id, attach_software_sources_to_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use attach_software_sources_to_managed_instance API.
Adds software sources to a managed instance. After the software source has been added, then packages from that software source can be installed on the managed instance.
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 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 270 def attach_software_sources_to_managed_instance(managed_instance_id, attach_software_sources_to_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#attach_software_sources_to_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling attach_software_sources_to_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'attach_software_sources_to_managed_instance_details' when calling attach_software_sources_to_managed_instance." if attach_software_sources_to_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/attachSoftwareSources'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(attach_software_sources_to_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#attach_software_sources_to_managed_instance') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_managed_instance(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_managed_instance API.
Unregisters the specified managed instance from the service. Once unregistered, the service will no longer manage the instance. For Linux instances, yum or DNF repository files will be restored to their state prior to registration.
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 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 335 def delete_managed_instance(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#delete_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling delete_managed_instance." if managed_instance_id.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#delete_managed_instance') 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 |
#detach_profile_from_managed_instance(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use detach_profile_from_managed_instance API.
Detaches profile from a managed instance. After the profile has been removed, the instance cannot be registered as a managed instance.
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 403 def detach_profile_from_managed_instance(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#detach_profile_from_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling detach_profile_from_managed_instance." if managed_instance_id.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/detachProfile'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#detach_profile_from_managed_instance') 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 |
#detach_software_sources_from_managed_instance(managed_instance_id, detach_software_sources_from_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use detach_software_sources_from_managed_instance API.
Removes software sources from a managed instance. Packages will no longer be able to be installed from these software sources.
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 474 def detach_software_sources_from_managed_instance(managed_instance_id, detach_software_sources_from_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#detach_software_sources_from_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling detach_software_sources_from_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'detach_software_sources_from_managed_instance_details' when calling detach_software_sources_from_managed_instance." if detach_software_sources_from_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/detachSoftwareSources'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(detach_software_sources_from_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#detach_software_sources_from_managed_instance') 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 |
#disable_module_stream_on_managed_instance(managed_instance_id, disable_module_stream_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use disable_module_stream_on_managed_instance API.
Disables a module stream on a managed instance. After the stream is disabled, it is no longer possible to install the profiles that are contained by the stream. All installed profiles must be removed prior to disabling a module stream.
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 548 def disable_module_stream_on_managed_instance(managed_instance_id, disable_module_stream_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#disable_module_stream_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling disable_module_stream_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'disable_module_stream_on_managed_instance_details' when calling disable_module_stream_on_managed_instance." if disable_module_stream_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/disableModuleStreams'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(disable_module_stream_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#disable_module_stream_on_managed_instance') 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 |
#enable_module_stream_on_managed_instance(managed_instance_id, enable_module_stream_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use enable_module_stream_on_managed_instance API.
Enables a module stream on a managed instance. After the stream is enabled, it is possible to install the profiles that are contained by the stream. Enabling a stream that is already enabled will succeed. Attempting to enable a different stream for a module that already has a stream enabled results in an error.
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 658 659 660 661 662 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 623 def enable_module_stream_on_managed_instance(managed_instance_id, enable_module_stream_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#enable_module_stream_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling enable_module_stream_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'enable_module_stream_on_managed_instance_details' when calling enable_module_stream_on_managed_instance." if enable_module_stream_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/enableModuleStreams'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(enable_module_stream_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#enable_module_stream_on_managed_instance') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#get_managed_instance(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_managed_instance API.
Gets information about the specified managed instance.
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 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 680 def get_managed_instance(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#get_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling get_managed_instance." if managed_instance_id.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'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: 'ManagedInstanceClient#get_managed_instance') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ManagedInstance' ) end # rubocop:enable Metrics/BlockLength end |
#get_windows_update(windows_update_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_windows_update API.
Returns a Windows Update object.
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 766 767 768 769 770 771 772 773 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 737 def get_windows_update(windows_update_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#get_windows_update.' if logger raise "Missing the required parameter 'windows_update_id' when calling get_windows_update." if windows_update_id.nil? raise "Parameter value for 'windows_update_id' must not be blank" if OCI::Internal::Util.blank_string?(windows_update_id) path = '/windowsUpdates/{windowsUpdateId}'.sub('{windowsUpdateId}', windows_update_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: 'ManagedInstanceClient#get_windows_update') 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::OsManagementHub::Models::WindowsUpdate' ) end # rubocop:enable Metrics/BlockLength end |
#install_all_windows_updates_on_managed_instances_in_compartment(install_all_windows_updates_on_managed_instances_in_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use install_all_windows_updates_on_managed_instances_in_compartment API.
Installs all of the available Windows updates for managed instances in a compartment. This applies only to standalone Windows instances. This will not update instances that belong to a group.
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 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 804 def install_all_windows_updates_on_managed_instances_in_compartment(install_all_windows_updates_on_managed_instances_in_compartment_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#install_all_windows_updates_on_managed_instances_in_compartment.' if logger raise "Missing the required parameter 'install_all_windows_updates_on_managed_instances_in_compartment_details' when calling install_all_windows_updates_on_managed_instances_in_compartment." if install_all_windows_updates_on_managed_instances_in_compartment_details.nil? path = '/managedInstances/actions/installWindowsUpdates' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(install_all_windows_updates_on_managed_instances_in_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#install_all_windows_updates_on_managed_instances_in_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 |
#install_module_stream_profile_on_managed_instance(managed_instance_id, install_module_stream_profile_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use install_module_stream_profile_on_managed_instance API.
Installs a profile for an module stream. The stream must be enabled before a profile can be installed. If a module stream defines multiple profiles, each one can be installed independently.
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 875 def install_module_stream_profile_on_managed_instance(managed_instance_id, install_module_stream_profile_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#install_module_stream_profile_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling install_module_stream_profile_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'install_module_stream_profile_on_managed_instance_details' when calling install_module_stream_profile_on_managed_instance." if install_module_stream_profile_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/installStreamProfiles'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(install_module_stream_profile_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#install_module_stream_profile_on_managed_instance') 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 |
#install_packages_on_managed_instance(managed_instance_id, install_packages_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use install_packages_on_managed_instance API.
Installs packages on a managed instance.
946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 946 def install_packages_on_managed_instance(managed_instance_id, install_packages_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#install_packages_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling install_packages_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'install_packages_on_managed_instance_details' when calling install_packages_on_managed_instance." if install_packages_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/installPackages'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(install_packages_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#install_packages_on_managed_instance') 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 |
#install_snaps_on_managed_instance(managed_instance_id, install_snaps_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use install_snaps_on_managed_instance API.
Installs specified snaps on a managed instance.
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 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1016 def install_snaps_on_managed_instance(managed_instance_id, install_snaps_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#install_snaps_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling install_snaps_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'install_snaps_on_managed_instance_details' when calling install_snaps_on_managed_instance." if install_snaps_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/installSnaps'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-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(install_snaps_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#install_snaps_on_managed_instance') 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 |
#install_windows_updates_on_managed_instance(managed_instance_id, install_windows_updates_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use install_windows_updates_on_managed_instance API.
Installs Windows updates on the specified managed instance.
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 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1087 def install_windows_updates_on_managed_instance(managed_instance_id, install_windows_updates_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#install_windows_updates_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling install_windows_updates_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'install_windows_updates_on_managed_instance_details' when calling install_windows_updates_on_managed_instance." if install_windows_updates_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/installWindowsUpdates'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(install_windows_updates_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#install_windows_updates_on_managed_instance') 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_managed_instance_available_packages(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_available_packages API.
Returns a list of packages that are available for installation on a managed instance.
Allowed values are: timeCreated, displayName
1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1161 def list_managed_instance_available_packages(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_available_packages.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_available_packages." if managed_instance_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/availablePackages'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty? query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ManagedInstanceClient#list_managed_instance_available_packages') 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::OsManagementHub::Models::AvailablePackageCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instance_available_software_sources(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_available_software_sources API.
Returns a list of software sources that can be attached to the specified managed instance. Any software sources already attached to the instance are not included in the list.
Allowed values are: timeCreated, displayName
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1248 def list_managed_instance_available_software_sources(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_available_software_sources.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_available_software_sources." if managed_instance_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/availableSoftwareSources'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty? query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ManagedInstanceClient#list_managed_instance_available_software_sources') 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::OsManagementHub::Models::AvailableSoftwareSourceCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instance_available_windows_updates(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_available_windows_updates API.
Returns a list of Windows updates that can be installed on the specified managed instance.
Allowed values are: timeCreated, name, displayName
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 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 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1341 def list_managed_instance_available_windows_updates(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_available_windows_updates.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_available_windows_updates." if managed_instance_id.nil? classification_type_allowable_values = %w[SECURITY BUGFIX ENHANCEMENT OTHER] if opts[:classification_type] && !opts[:classification_type].empty? opts[:classification_type].each do |val_to_check| unless classification_type_allowable_values.include?(val_to_check) raise 'Invalid value for "classification_type", must be one of SECURITY, BUGFIX, ENHANCEMENT, OTHER.' end end end if opts[:is_installable] && !OCI::OsManagementHub::Models::WindowsUpdate::INSTALLABLE_ENUM.include?(opts[:is_installable]) raise 'Invalid value for "is_installable", must be one of the values in OCI::OsManagementHub::Models::WindowsUpdate::INSTALLABLE_ENUM.' end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated name displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, name, displayName.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/availableWindowsUpdates'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:classificationType] = OCI::ApiClient.build_collection_params(opts[:classification_type], :multi) if opts[:classification_type] && !opts[:classification_type].empty? query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty? query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:isInstallable] = opts[:is_installable] if opts[:is_installable] query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ManagedInstanceClient#list_managed_instance_available_windows_updates') 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::OsManagementHub::Models::AvailableWindowsUpdateCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instance_errata(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_errata API.
Returns a list of applicable errata on the managed instance.
Allowed values are: timeIssued, name
1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1450 def list_managed_instance_errata(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_errata.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_errata." if managed_instance_id.nil? classification_type_allowable_values = %w[SECURITY BUGFIX ENHANCEMENT OTHER] if opts[:classification_type] && !opts[:classification_type].empty? opts[:classification_type].each do |val_to_check| unless classification_type_allowable_values.include?(val_to_check) raise 'Invalid value for "classification_type", must be one of SECURITY, BUGFIX, ENHANCEMENT, OTHER.' end end end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeIssued name].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeIssued, name.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/errata'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:classificationType] = OCI::ApiClient.build_collection_params(opts[:classification_type], :multi) if opts[:classification_type] && !opts[:classification_type].empty? query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty? query_params[:nameContains] = opts[:name_contains] if opts[:name_contains] query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ManagedInstanceClient#list_managed_instance_errata') 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::OsManagementHub::Models::ManagedInstanceErratumSummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instance_installed_packages(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_installed_packages API.
Lists the packages that are installed on the managed instance.
Allowed values are: timeInstalled, timeCreated, displayName
1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1556 def list_managed_instance_installed_packages(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_installed_packages.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_installed_packages." if managed_instance_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeInstalled timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeInstalled, timeCreated, displayName.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/installedPackages'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty? query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:timeInstallDateStart] = opts[:time_install_date_start] if opts[:time_install_date_start] query_params[:timeInstallDateEnd] = opts[:time_install_date_end] if opts[:time_install_date_end] query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ManagedInstanceClient#list_managed_instance_installed_packages') 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::OsManagementHub::Models::InstalledPackageCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instance_installed_windows_updates(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_installed_windows_updates API.
Returns a list of Windows updates that have been installed on the specified managed instance.
Allowed values are: timeCreated, name, displayName
1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1648 def list_managed_instance_installed_windows_updates(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_installed_windows_updates.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_installed_windows_updates." if managed_instance_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated name displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, name, displayName.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/installedWindowsUpdates'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty? query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ManagedInstanceClient#list_managed_instance_installed_windows_updates') 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::OsManagementHub::Models::InstalledWindowsUpdateCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instance_modules(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_modules API.
Retrieves a list of modules, along with streams of the modules, from a managed instance. Filters may be applied to select a subset of modules based on the filter criteria.
Allowed values are: name
1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1737 def list_managed_instance_modules(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_modules.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_modules." if managed_instance_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[name].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of name.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/modules'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:name] = opts[:name] if opts[:name] query_params[:nameContains] = opts[:name_contains] if opts[:name_contains] 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: 'ManagedInstanceClient#list_managed_instance_modules') 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::OsManagementHub::Models::ManagedInstanceModuleCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instance_snaps(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_snaps API.
Retrieves a list of snaps for a managed instance. Filters may be applied to select a subset of snaps based on the filter criteria.
Allowed values are: name
1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1825 def list_managed_instance_snaps(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_snaps.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_snaps." if managed_instance_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[name].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of name.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/snaps'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:name] = opts[:name] if opts[:name] query_params[:nameContains] = opts[:name_contains] if opts[:name_contains] 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: 'ManagedInstanceClient#list_managed_instance_snaps') 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::OsManagementHub::Models::SnapCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instance_updatable_packages(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instance_updatable_packages API.
Returns a list of updatable packages for a managed instance.
Allowed values are: timeCreated, displayName
1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 1921 def list_managed_instance_updatable_packages(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instance_updatable_packages.' if logger raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_updatable_packages." if managed_instance_id.nil? classification_type_allowable_values = %w[SECURITY BUGFIX ENHANCEMENT OTHER] if opts[:classification_type] && !opts[:classification_type].empty? opts[:classification_type].each do |val_to_check| unless classification_type_allowable_values.include?(val_to_check) raise 'Invalid value for "classification_type", must be one of SECURITY, BUGFIX, ENHANCEMENT, OTHER.' end end end advisory_severity_allowable_values = %w[LOW MODERATE IMPORTANT CRITICAL] if opts[:advisory_severity] && !opts[:advisory_severity].empty? opts[:advisory_severity].each do |val_to_check| unless advisory_severity_allowable_values.include?(val_to_check) raise 'Invalid value for "advisory_severity", must be one of LOW, MODERATE, IMPORTANT, CRITICAL.' end end end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/updatablePackages'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:classificationType] = OCI::ApiClient.build_collection_params(opts[:classification_type], :multi) if opts[:classification_type] && !opts[:classification_type].empty? query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty? query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:advisoryName] = OCI::ApiClient.build_collection_params(opts[:advisory_name], :multi) if opts[:advisory_name] && !opts[:advisory_name].empty? query_params[:advisorySeverity] = OCI::ApiClient.build_collection_params(opts[:advisory_severity], :multi) if opts[:advisory_severity] && !opts[:advisory_severity].empty? query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ManagedInstanceClient#list_managed_instance_updatable_packages') 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::OsManagementHub::Models::UpdatablePackageCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_managed_instances(opts = {}) ⇒ Response
Click here to see an example of how to use list_managed_instances API.
Lists managed instances that match the specified compartment or managed instance OCID. Filter the list against a variety of criteria including but not limited to its name, status, architecture, and OS version. Allowed values are: timeCreated, displayName
2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2066 def list_managed_instances(opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_managed_instances.' if logger status_allowable_values = %w[NORMAL UNREACHABLE ERROR WARNING REGISTRATION_ERROR DELETING ONBOARDING REBOOTING] if opts[:status] && !opts[:status].empty? opts[:status].each do |val_to_check| unless status_allowable_values.include?(val_to_check) raise 'Invalid value for "status", must be one of NORMAL, UNREACHABLE, ERROR, WARNING, REGISTRATION_ERROR, DELETING, ONBOARDING, REBOOTING.' end end end arch_type_allowable_values = %w[X86_64 AARCH64 I686 NOARCH SRC I386 AMD64 ARM64 ALL] if opts[:arch_type] && !opts[:arch_type].empty? opts[:arch_type].each do |val_to_check| unless arch_type_allowable_values.include?(val_to_check) raise 'Invalid value for "arch_type", must be one of X86_64, AARCH64, I686, NOARCH, SRC, I386, AMD64, ARM64, ALL.' end end end os_family_allowable_values = %w[ORACLE_LINUX_10 ORACLE_LINUX_9 ORACLE_LINUX_8 ORACLE_LINUX_7 ORACLE_LINUX_6 WINDOWS_SERVER_2016 WINDOWS_SERVER_2019 WINDOWS_SERVER_2022 WINDOWS_SERVER_2025 WINDOWS_11 ALL UBUNTU_20_04 UBUNTU_22_04 UBUNTU_24_04] if opts[:os_family] && !opts[:os_family].empty? opts[:os_family].each do |val_to_check| unless os_family_allowable_values.include?(val_to_check) raise 'Invalid value for "os_family", must be one of ORACLE_LINUX_10, ORACLE_LINUX_9, ORACLE_LINUX_8, ORACLE_LINUX_7, ORACLE_LINUX_6, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, WINDOWS_SERVER_2025, WINDOWS_11, ALL, UBUNTU_20_04, UBUNTU_22_04, UBUNTU_24_04.' end end end location_allowable_values = %w[ON_PREMISE OCI_COMPUTE AZURE EC2 GCP] if opts[:location] && !opts[:location].empty? opts[:location].each do |val_to_check| unless location_allowable_values.include?(val_to_check) raise 'Invalid value for "location", must be one of ON_PREMISE, OCI_COMPUTE, AZURE, EC2, GCP.' end end end location_not_equal_to_allowable_values = %w[ON_PREMISE OCI_COMPUTE AZURE EC2 GCP] if opts[:location_not_equal_to] && !opts[:location_not_equal_to].empty? opts[:location_not_equal_to].each do |val_to_check| unless location_not_equal_to_allowable_values.include?(val_to_check) raise 'Invalid value for "location_not_equal_to", must be one of ON_PREMISE, OCI_COMPUTE, AZURE, EC2, GCP.' end end end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/managedInstances' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty? query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:managedInstanceId] = opts[:managed_instance_id] if opts[:managed_instance_id] query_params[:status] = OCI::ApiClient.build_collection_params(opts[:status], :multi) if opts[:status] && !opts[:status].empty? query_params[:archType] = OCI::ApiClient.build_collection_params(opts[:arch_type], :multi) if opts[:arch_type] && !opts[:arch_type].empty? query_params[:osFamily] = OCI::ApiClient.build_collection_params(opts[:os_family], :multi) if opts[:os_family] && !opts[:os_family].empty? query_params[:isManagementStation] = opts[:is_management_station] if !opts[:is_management_station].nil? query_params[:group] = opts[:group] if opts[:group] query_params[:groupNotEqualTo] = opts[:group_not_equal_to] if opts[:group_not_equal_to] query_params[:lifecycleStage] = opts[:lifecycle_stage] if opts[:lifecycle_stage] query_params[:lifecycleStageNotEqualTo] = opts[:lifecycle_stage_not_equal_to] if opts[:lifecycle_stage_not_equal_to] query_params[:isAttachedToGroupOrLifecycleStage] = opts[:is_attached_to_group_or_lifecycle_stage] if !opts[:is_attached_to_group_or_lifecycle_stage].nil? query_params[:softwareSourceId] = opts[:software_source_id] if opts[:software_source_id] query_params[:advisoryName] = OCI::ApiClient.build_collection_params(opts[:advisory_name], :multi) if opts[:advisory_name] && !opts[:advisory_name].empty? query_params[:lifecycleEnvironment] = opts[:lifecycle_environment] if opts[:lifecycle_environment] query_params[:lifecycleEnvironmentNotEqualTo] = opts[:lifecycle_environment_not_equal_to] if opts[:lifecycle_environment_not_equal_to] query_params[:location] = OCI::ApiClient.build_collection_params(opts[:location], :multi) if opts[:location] && !opts[:location].empty? query_params[:locationNotEqualTo] = OCI::ApiClient.build_collection_params(opts[:location_not_equal_to], :multi) if opts[:location_not_equal_to] && !opts[:location_not_equal_to].empty? query_params[:profile] = OCI::ApiClient.build_collection_params(opts[:profile], :multi) if opts[:profile] && !opts[:profile].empty? query_params[:profileNotEqualTo] = OCI::ApiClient.build_collection_params(opts[:profile_not_equal_to], :multi) if opts[:profile_not_equal_to] && !opts[:profile_not_equal_to].empty? query_params[:isProfileAttached] = opts[:is_profile_attached] if !opts[:is_profile_attached].nil? query_params[:isManagedByAutonomousLinux] = opts[:is_managed_by_autonomous_linux] if !opts[:is_managed_by_autonomous_linux].nil? query_params[:agentVersion] = opts[:agent_version] if opts[:agent_version] query_params[:managementStation] = OCI::ApiClient.build_collection_params(opts[:management_station], :multi) if opts[:management_station] && !opts[:management_station].empty? query_params[:managementStationNotEqualTo] = OCI::ApiClient.build_collection_params(opts[:management_station_not_equal_to], :multi) if opts[:management_station_not_equal_to] && !opts[:management_station_not_equal_to].empty? query_params[:isRebootRequired] = opts[:is_reboot_required] if !opts[:is_reboot_required].nil? 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: 'ManagedInstanceClient#list_managed_instances') 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::OsManagementHub::Models::ManagedInstanceCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_windows_updates(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_windows_updates API.
Lists Windows updates that have been reported to the service.
Allowed values are: timeCreated, name, displayName
2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2228 def list_windows_updates(compartment_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#list_windows_updates.' if logger raise "Missing the required parameter 'compartment_id' when calling list_windows_updates." if compartment_id.nil? classification_type_allowable_values = %w[SECURITY BUGFIX ENHANCEMENT OTHER] if opts[:classification_type] && !opts[:classification_type].empty? opts[:classification_type].each do |val_to_check| unless classification_type_allowable_values.include?(val_to_check) raise 'Invalid value for "classification_type", must be one of SECURITY, BUGFIX, ENHANCEMENT, OTHER.' end end end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated name displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, name, displayName.' end path = '/windowsUpdates' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:classificationType] = OCI::ApiClient.build_collection_params(opts[:classification_type], :multi) if opts[:classification_type] && !opts[:classification_type].empty? query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty? query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] 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: 'ManagedInstanceClient#list_windows_updates') 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::OsManagementHub::Models::WindowsUpdateCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
95 96 97 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 95 def logger @api_client.config.logger end |
#manage_module_streams_on_managed_instance(managed_instance_id, manage_module_streams_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use manage_module_streams_on_managed_instance API.
Enables or disables module streams and installs or removes module stream profiles. Once complete, the state of the modules, streams, and profiles will match the state indicated in the operation. See manage_module_streams_on_managed_instance_details for more information. You can preform this operation as a dry run. For a dry run, the service evaluates the operation against the current module, stream, and profile state on the managed instance, but does not commit the changes. Instead, the service returns work request log or error entries indicating the impact of the operation.
2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2324 def manage_module_streams_on_managed_instance(managed_instance_id, manage_module_streams_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#manage_module_streams_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling manage_module_streams_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'manage_module_streams_on_managed_instance_details' when calling manage_module_streams_on_managed_instance." if manage_module_streams_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/manageModuleStreams'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(manage_module_streams_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#manage_module_streams_on_managed_instance') 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 |
#reboot_managed_instance(managed_instance_id, reboot_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use reboot_managed_instance API.
Initiates a reboot of the specified managed instance. You can also specify the number of minutes the service waits before marking the reboot operation as failed.
2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2398 def reboot_managed_instance(managed_instance_id, reboot_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#reboot_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling reboot_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'reboot_managed_instance_details' when calling reboot_managed_instance." if reboot_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/reboot'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(reboot_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#reboot_managed_instance') 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 |
#refresh_software_on_managed_instance(managed_instance_id, opts = {}) ⇒ Response
Click here to see an example of how to use refresh_software_on_managed_instance API.
Refreshes the package or Windows update information on a managed instance with the latest data from the software source. This does not update packages on the instance. It provides the service with the latest package data.
2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2468 def refresh_software_on_managed_instance(managed_instance_id, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#refresh_software_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling refresh_software_on_managed_instance." if managed_instance_id.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/refreshSoftware'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#refresh_software_on_managed_instance') 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 |
#remove_module_stream_profile_from_managed_instance(managed_instance_id, remove_module_stream_profile_from_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use remove_module_stream_profile_from_managed_instance API.
Removes a profile for a module stream that is installed on a managed instance. If a module stream is provided, rather than a fully qualified profile, all profiles that have been installed for the module stream will be removed.
2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2540 def remove_module_stream_profile_from_managed_instance(managed_instance_id, remove_module_stream_profile_from_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#remove_module_stream_profile_from_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling remove_module_stream_profile_from_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'remove_module_stream_profile_from_managed_instance_details' when calling remove_module_stream_profile_from_managed_instance." if remove_module_stream_profile_from_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/removeStreamProfiles'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(remove_module_stream_profile_from_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#remove_module_stream_profile_from_managed_instance') 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 |
#remove_packages_from_managed_instance(managed_instance_id, remove_packages_from_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use remove_packages_from_managed_instance API.
Removes an installed package from a managed instance.
2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2611 def remove_packages_from_managed_instance(managed_instance_id, remove_packages_from_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#remove_packages_from_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling remove_packages_from_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'remove_packages_from_managed_instance_details' when calling remove_packages_from_managed_instance." if remove_packages_from_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/removePackages'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(remove_packages_from_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#remove_packages_from_managed_instance') 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 |
#remove_snaps_from_managed_instance(managed_instance_id, remove_snaps_from_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use remove_snaps_from_managed_instance API.
Removes specified snaps from a managed instance.
2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2681 def remove_snaps_from_managed_instance(managed_instance_id, remove_snaps_from_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#remove_snaps_from_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling remove_snaps_from_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'remove_snaps_from_managed_instance_details' when calling remove_snaps_from_managed_instance." if remove_snaps_from_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/removeSnaps'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-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(remove_snaps_from_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#remove_snaps_from_managed_instance') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#switch_module_stream_on_managed_instance(managed_instance_id, switch_module_stream_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use switch_module_stream_on_managed_instance API.
Enables a new stream for a module that already has a stream enabled. If any profiles or packages from the original module are installed, switching to a new stream will remove the existing packages and install their counterparts in the new stream.
2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2755 def switch_module_stream_on_managed_instance(managed_instance_id, switch_module_stream_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#switch_module_stream_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling switch_module_stream_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'switch_module_stream_on_managed_instance_details' when calling switch_module_stream_on_managed_instance." if switch_module_stream_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/switchModuleStreams'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(switch_module_stream_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#switch_module_stream_on_managed_instance') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#switch_snap_channel_on_managed_instance(managed_instance_id, switch_snap_channel_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use switch_snap_channel_on_managed_instance API.
Switches the snap channel on a managed instance.
2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2825 def switch_snap_channel_on_managed_instance(managed_instance_id, switch_snap_channel_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#switch_snap_channel_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling switch_snap_channel_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'switch_snap_channel_on_managed_instance_details' when calling switch_snap_channel_on_managed_instance." if switch_snap_channel_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/switchSnapChannel'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-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(switch_snap_channel_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#switch_snap_channel_on_managed_instance') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_all_packages_on_managed_instances_in_compartment(update_all_packages_on_managed_instances_in_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_all_packages_on_managed_instances_in_compartment API.
Install all of the available package updates for all of the managed instances in a compartment. This applies only to standalone non-Windows instances. This will not update instances that belong to a group or lifecycle environment.
2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2895 def update_all_packages_on_managed_instances_in_compartment(update_all_packages_on_managed_instances_in_compartment_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#update_all_packages_on_managed_instances_in_compartment.' if logger raise "Missing the required parameter 'update_all_packages_on_managed_instances_in_compartment_details' when calling update_all_packages_on_managed_instances_in_compartment." if update_all_packages_on_managed_instances_in_compartment_details.nil? path = '/managedInstances/actions/updatePackages' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(update_all_packages_on_managed_instances_in_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#update_all_packages_on_managed_instances_in_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 |
#update_managed_instance(managed_instance_id, update_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_managed_instance API.
Updates the specified managed instance information, such as description, ONS topic, and associated management station.
2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 2958 def update_managed_instance(managed_instance_id, update_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#update_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling update_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'update_managed_instance_details' when calling update_managed_instance." if update_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#update_managed_instance') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ManagedInstance' ) end # rubocop:enable Metrics/BlockLength end |
#update_packages_on_managed_instance(managed_instance_id, update_packages_on_managed_instance_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_packages_on_managed_instance API.
Updates a package on a managed instance.
3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 |
# File 'lib/oci/os_management_hub/managed_instance_client.rb', line 3028 def update_packages_on_managed_instance(managed_instance_id, update_packages_on_managed_instance_details, opts = {}) logger.debug 'Calling operation ManagedInstanceClient#update_packages_on_managed_instance.' if logger raise "Missing the required parameter 'managed_instance_id' when calling update_packages_on_managed_instance." if managed_instance_id.nil? raise "Missing the required parameter 'update_packages_on_managed_instance_details' when calling update_packages_on_managed_instance." if update_packages_on_managed_instance_details.nil? raise "Parameter value for 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id) path = '/managedInstances/{managedInstanceId}/actions/updatePackages'.sub('{managedInstanceId}', managed_instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(update_packages_on_managed_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ManagedInstanceClient#update_packages_on_managed_instance') 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 |