Class: OCI::OsManagementHub::ManagedInstanceGroupClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/os_management_hub/managed_instance_group_client.rb

Overview

Use the OS Management Hub API to manage and monitor updates and patches for the operating system environments in your private data centers through a single management console. For more information, see Overview of OS Management Hub.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ManagedInstanceGroupClient

Creates a new ManagedInstanceGroupClient. 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.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. 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



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 55

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20220901'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "ManagedInstanceGroupClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


29
30
31
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 29

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



25
26
27
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#attach_managed_instances_to_managed_instance_group(managed_instance_group_id, attach_managed_instances_to_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use attach_managed_instances_to_managed_instance_group API.

Adds managed instances to the specified managed instance group. After the managed instances have been added, then operations can be performed on the managed instance group which will then apply to all managed instances in the group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



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
166
167
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 128

def attach_managed_instances_to_managed_instance_group(managed_instance_group_id, attach_managed_instances_to_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#attach_managed_instances_to_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling attach_managed_instances_to_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'attach_managed_instances_to_managed_instance_group_details' when calling attach_managed_instances_to_managed_instance_group." if attach_managed_instances_to_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/attachManagedInstances'.sub('{managedInstanceGroupId}', managed_instance_group_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(attach_managed_instances_to_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#attach_managed_instances_to_managed_instance_group') 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_group(managed_instance_group_id, attach_software_sources_to_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use attach_software_sources_to_managed_instance_group API.

Attaches software sources to the specified managed instance group. The software sources must be compatible with the content for the managed instance group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



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
238
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 199

def attach_software_sources_to_managed_instance_group(managed_instance_group_id, attach_software_sources_to_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#attach_software_sources_to_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling attach_software_sources_to_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'attach_software_sources_to_managed_instance_group_details' when calling attach_software_sources_to_managed_instance_group." if attach_software_sources_to_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/attachSoftwareSources'.sub('{managedInstanceGroupId}', managed_instance_group_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(attach_software_sources_to_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#attach_software_sources_to_managed_instance_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_managed_instance_group(create_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_managed_instance_group API.

Creates a new managed instance group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 263

def create_managed_instance_group(create_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#create_managed_instance_group.' if logger

  raise "Missing the required parameter 'create_managed_instance_group_details' when calling create_managed_instance_group." if create_managed_instance_group_details.nil?

  path = '/managedInstanceGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#create_managed_instance_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::OsManagementHub::Models::ManagedInstanceGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_managed_instance_group(managed_instance_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_managed_instance_group API.

Deletes a specified managed instance group.

Parameters:

  • managed_instance_group_id (String)

    The managed instance group OCID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 324

def delete_managed_instance_group(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#delete_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling delete_managed_instance_group." if managed_instance_group_id.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}'.sub('{managedInstanceGroupId}', managed_instance_group_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.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#delete_managed_instance_group') 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_managed_instances_from_managed_instance_group(managed_instance_group_id, detach_managed_instances_from_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use detach_managed_instances_from_managed_instance_group API.

Removes a managed instance from the specified managed instance group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 392

def detach_managed_instances_from_managed_instance_group(managed_instance_group_id, detach_managed_instances_from_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#detach_managed_instances_from_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling detach_managed_instances_from_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'detach_managed_instances_from_managed_instance_group_details' when calling detach_managed_instances_from_managed_instance_group." if detach_managed_instances_from_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/detachManagedInstances'.sub('{managedInstanceGroupId}', managed_instance_group_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(detach_managed_instances_from_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#detach_managed_instances_from_managed_instance_group') 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_group(managed_instance_group_id, detach_software_sources_from_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use detach_software_sources_from_managed_instance_group API.

Detaches software sources from a group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 463

def detach_software_sources_from_managed_instance_group(managed_instance_group_id, detach_software_sources_from_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#detach_software_sources_from_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling detach_software_sources_from_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'detach_software_sources_from_managed_instance_group_details' when calling detach_software_sources_from_managed_instance_group." if detach_software_sources_from_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/detachSoftwareSources'.sub('{managedInstanceGroupId}', managed_instance_group_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(detach_software_sources_from_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#detach_software_sources_from_managed_instance_group') 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_group(managed_instance_group_id, disable_module_stream_on_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use disable_module_stream_on_managed_instance_group API.

Disables a module stream on a managed instance group. 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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



537
538
539
540
541
542
543
544
545
546
547
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
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 537

def disable_module_stream_on_managed_instance_group(managed_instance_group_id, disable_module_stream_on_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#disable_module_stream_on_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling disable_module_stream_on_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'disable_module_stream_on_managed_instance_group_details' when calling disable_module_stream_on_managed_instance_group." if disable_module_stream_on_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/disableModuleStream'.sub('{managedInstanceGroupId}', managed_instance_group_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(disable_module_stream_on_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#disable_module_stream_on_managed_instance_group') 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_group(managed_instance_group_id, enable_module_stream_on_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use enable_module_stream_on_managed_instance_group API.

Enables a module stream on a managed instance group. 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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 612

def enable_module_stream_on_managed_instance_group(managed_instance_group_id, enable_module_stream_on_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#enable_module_stream_on_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling enable_module_stream_on_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'enable_module_stream_on_managed_instance_group_details' when calling enable_module_stream_on_managed_instance_group." if enable_module_stream_on_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/enableModuleStream'.sub('{managedInstanceGroupId}', managed_instance_group_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(enable_module_stream_on_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#enable_module_stream_on_managed_instance_group') 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_group(managed_instance_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_managed_instance_group API.

Gets information about the specified managed instance group.

Parameters:

  • managed_instance_group_id (String)

    The managed instance group OCID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 669

def get_managed_instance_group(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#get_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling get_managed_instance_group." if managed_instance_group_id.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}'.sub('{managedInstanceGroupId}', managed_instance_group_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.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#get_managed_instance_group') 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::ManagedInstanceGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#install_module_stream_profile_on_managed_instance_group(managed_instance_group_id, install_module_stream_profile_on_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use install_module_stream_profile_on_managed_instance_group 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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



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
774
775
776
777
778
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 739

def install_module_stream_profile_on_managed_instance_group(managed_instance_group_id, install_module_stream_profile_on_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#install_module_stream_profile_on_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling install_module_stream_profile_on_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'install_module_stream_profile_on_managed_instance_group_details' when calling install_module_stream_profile_on_managed_instance_group." if install_module_stream_profile_on_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/installStreamProfile'.sub('{managedInstanceGroupId}', managed_instance_group_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(install_module_stream_profile_on_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#install_module_stream_profile_on_managed_instance_group') 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_group(managed_instance_group_id, install_packages_on_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use install_packages_on_managed_instance_group API.

Installs package(s) on each managed instance in a managed instance group. The package must be compatible with the instances in the managed instance group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 811

def install_packages_on_managed_instance_group(managed_instance_group_id, install_packages_on_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#install_packages_on_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling install_packages_on_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'install_packages_on_managed_instance_group_details' when calling install_packages_on_managed_instance_group." if install_packages_on_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/installPackages'.sub('{managedInstanceGroupId}', managed_instance_group_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(install_packages_on_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#install_packages_on_managed_instance_group') 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_group_available_modules(managed_instance_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_managed_instance_group_available_modules API.

Lists available modules that for the specified managed instance group. Filter the list against a variety of criteria including but not limited to its name.

Allowed values are: name

Parameters:

  • managed_instance_group_id (String)

    The managed instance group OCID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :compartment_id (String)

    The OCID of the compartment that contains the resources to list.

  • :name (String)

    The resource name.

  • :name_contains (String)

    A filter to return resources that may partially match the name given.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for name is ascending. (default to name)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 888

def list_managed_instance_group_available_modules(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#list_managed_instance_group_available_modules.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling list_managed_instance_group_available_modules." if managed_instance_group_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_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/availableModules'.sub('{managedInstanceGroupId}', managed_instance_group_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.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#list_managed_instance_group_available_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::ManagedInstanceGroupAvailableModuleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_managed_instance_group_available_packages(managed_instance_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_managed_instance_group_available_packages API.

Lists available packages on the specified managed instances group. Filter the list against a variety of criteria including but not limited to the package name.

Allowed values are: timeCreated, displayName

Parameters:

  • managed_instance_group_id (String)

    The managed instance group OCID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :display_name (Array<String>)

    A filter to return resources that match the given display names.

  • :display_name_contains (String)

    A filter to return resources that may partially match the given display name.

  • :compartment_id (String)

    The OCID of the compartment that contains the resources to list.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :is_latest (BOOLEAN)

    A boolean variable that is used to list only the latest versions of packages, module streams, and stream profiles when set to true. All packages, module streams, and stream profiles are returned when set to false.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 980

def list_managed_instance_group_available_packages(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#list_managed_instance_group_available_packages.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling list_managed_instance_group_available_packages." if managed_instance_group_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_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/availablePackages'.sub('{managedInstanceGroupId}', managed_instance_group_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]
  query_params[:isLatest] = opts[:is_latest] if !opts[:is_latest].nil?

  # 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.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#list_managed_instance_group_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::ManagedInstanceGroupAvailablePackageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_managed_instance_group_available_software_sources(managed_instance_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_managed_instance_group_available_software_sources API.

Lists available software sources for a specified managed instance group. Filter the list against a variety of criteria including but not limited to its name.

Allowed values are: timeCreated, displayName

Parameters:

  • managed_instance_group_id (String)

    The managed instance group OCID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :display_name (Array<String>)

    A filter to return resources that match the given display names.

  • :display_name_contains (String)

    A filter to return resources that may partially match the given display name.

  • :compartment_id (String)

    The OCID of the compartment that contains the resources to list.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1069

def list_managed_instance_group_available_software_sources(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#list_managed_instance_group_available_software_sources.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling list_managed_instance_group_available_software_sources." if managed_instance_group_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_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/availableSoftwareSources'.sub('{managedInstanceGroupId}', managed_instance_group_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.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#list_managed_instance_group_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_group_installed_packages(managed_instance_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_managed_instance_group_installed_packages API.

Lists installed packages on the specified managed instances group. Filter the list against a variety of criteria including but not limited to the package name.

Allowed values are: timeInstalled, timeCreated, displayName

Parameters:

  • managed_instance_group_id (String)

    The managed instance group OCID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :display_name (Array<String>)

    A filter to return resources that match the given display names.

  • :display_name_contains (String)

    A filter to return resources that may partially match the given display name.

  • :time_install_date_start (DateTime)

    The install date after which to list all packages, in ISO 8601 format

    Example: 2017-07-14T02:40:00.000Z

  • :time_install_date_end (DateTime)

    The install date before which to list all packages, in ISO 8601 format.

    Example: 2017-07-14T02:40:00.000Z

  • :compartment_id (String)

    The OCID of the compartment that contains the resources to list.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeInstalled is descending. Default order for displayName is ascending. (default to timeInstalled)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



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
1213
1214
1215
1216
1217
1218
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1165

def list_managed_instance_group_installed_packages(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#list_managed_instance_group_installed_packages.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling list_managed_instance_group_installed_packages." if managed_instance_group_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_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/installedPackages'.sub('{managedInstanceGroupId}', managed_instance_group_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.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#list_managed_instance_group_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::ManagedInstanceGroupInstalledPackageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_managed_instance_group_modules(managed_instance_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_managed_instance_group_modules API.

Retrieve a list of module streams, along with a summary of their status, from a managed instance group. Filters may be applied to select a subset of module streams based on the filter criteria.

The 'moduleName' attribute filters against the name of a module. It accepts strings of the format "<module>". If this attribute is defined, only streams that belong to the specified module are included in the result set. If it is not defined, the request is not subject to this filter.

The "status" attribute filters against the state of a module stream. Valid values are "ENABLED", "DISABLED", and "ACTIVE". If the attribute is set to "ENABLED", only module streams that are enabled are included in the result set. If the attribute is set to "DISABLED", only module streams that are not enabled are included in the result set. If the attribute is set to "ACTIVE", only module streams that are active are included in the result set. If the attribute is not defined, the request is not subject to this filter.

When sorting by the display name, the result set is sorted first by the module name and then by the stream name.

Allowed values are: name

Parameters:

  • managed_instance_group_id (String)

    The managed instance group OCID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :compartment_id (String)

    The OCID of the compartment that contains the resources to list.

  • :name (String)

    The resource name.

  • :name_contains (String)

    A filter to return resources that may partially match the name given.

  • :stream_name (String)

    The name of the stream of the containing module. This parameter is required if a profileName is specified.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for name is ascending. (default to name)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1278

def list_managed_instance_group_modules(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#list_managed_instance_group_modules.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling list_managed_instance_group_modules." if managed_instance_group_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_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/modules'.sub('{managedInstanceGroupId}', managed_instance_group_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[:streamName] = opts[:stream_name] if opts[:stream_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#list_managed_instance_group_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::ManagedInstanceGroupModuleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_managed_instance_groups(opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_managed_instance_groups API.

Lists managed instance groups that match the specified compartment or managed instance group OCID. Filter the list against a variety of criteria including but not limited to its name, status, architecture, and OS family.

Allowed values are: timeCreated, displayName

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :compartment_id (String)

    The OCID of the compartment that contains the resources to list.

  • :managed_instance_group_id (String)

    The OCID of the managed instance group for which to list resources.

  • :software_source_id (String)

    The OCID for the software source.

  • :display_name (Array<String>)

    A filter to return resources that match the given display names.

  • :display_name_contains (String)

    A filter to return resources that may partially match the given display name.

  • :arch_type (String)

    A filter to return only profiles that match the given archType.

  • :os_family (String)

    A filter to return only profiles that match the given osFamily.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :lifecycle_state (String)

    A filter to return only resources their lifecycle state matches the given lifecycle state.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1371

def list_managed_instance_groups(opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#list_managed_instance_groups.' if logger


  if opts[:arch_type] && !OCI::OsManagementHub::Models::ARCH_TYPE_ENUM.include?(opts[:arch_type])
    raise 'Invalid value for "arch_type", must be one of the values in OCI::OsManagementHub::Models::ARCH_TYPE_ENUM.'
  end

  if opts[:os_family] && !OCI::OsManagementHub::Models::OS_FAMILY_ENUM.include?(opts[:os_family])
    raise 'Invalid value for "os_family", must be one of the values in OCI::OsManagementHub::Models::OS_FAMILY_ENUM.'
  end

  if opts[:lifecycle_state] && !OCI::OsManagementHub::Models::ManagedInstanceGroup::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::OsManagementHub::Models::ManagedInstanceGroup::LIFECYCLE_STATE_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 displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/managedInstanceGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:managedInstanceGroupId] = opts[:managed_instance_group_id] if opts[:managed_instance_group_id]
  query_params[:softwareSourceId] = opts[:software_source_id] if opts[:software_source_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[:archType] = opts[:arch_type] if opts[:arch_type]
  query_params[:osFamily] = opts[:os_family] if opts[:os_family]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[: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.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#list_managed_instance_groups') 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::ManagedInstanceGroupCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 94

def logger
  @api_client.config.logger
end

#manage_module_streams_on_managed_instance_group(managed_instance_group_id, manage_module_streams_on_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use manage_module_streams_on_managed_instance_group API.

Perform an operation involving modules, streams, and profiles on a managed instance group. Each operation may enable or disable an arbitrary amount of module streams, and install or remove an arbitrary number of module stream profiles. When the operation is complete, the state of the modules, streams, and profiles on the managed instance group will match the state indicated in the operation.

Each module stream specified in the list of module streams to enable will be in the "ENABLED" state upon completion of the operation. If there was already a stream of that module enabled, any work required to switch from the current stream to the new stream is performed implicitly.

Each module stream specified in the list of module streams to disable will be in the "DISABLED" state upon completion of the operation. Any profiles that are installed for the module stream will be removed as part of the operation.

Each module stream profile specified in the list of profiles to install will be in the "INSTALLED" state upon completion of the operation, indicating that any packages that are part of the profile are installed on the managed instance. If the module stream containing the profile is not enabled, it will be enabled as part of the operation. There is an exception when attempting to install a stream of a profile when another stream of the same module is enabled. It is an error to attempt to install a profile of another module stream, unless enabling the new module stream is explicitly included in this operation.

Each module stream profile specified in the list of profiles to remove will be in the "AVAILABLE" state upon completion of the operation. The status of packages within the profile after the operation is complete is defined by the package manager on the managed instance group.

Operations that contain one or more elements that are not allowed are rejected.

The result of this request is a work request object. The returned work request is the parent of a structure of other work requests. Taken as a whole, this structure indicates the entire set of work to be performed to complete the operation.

This interface can also be used to perform a dry run of the operation rather than committing it to a managed instance group. If a dry run is requested, the OS Management Hub service will evaluate the operation against the current module, stream, and profile state on the managed instance. It will calculate the impact of the operation on all modules, streams, and profiles on the managed instance, including those that are implicitly impacted by the operation.

The work request resulting from a dry run behaves differently than a work request resulting from a committable operation. Dry run work requests are always singletons and never have children. The impact of the operation is returned using the log and error facilities of work requests. The impact of operations that are allowed by the OS Management Hub service are communicated as one or more work request log entries. Operations that are not allowed by the OS Management Hub service are communicated as one or more work request error entries. Each entry, for either logs or errors, contains a structured message containing the results of one or more operations.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1528

def manage_module_streams_on_managed_instance_group(managed_instance_group_id, manage_module_streams_on_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#manage_module_streams_on_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling manage_module_streams_on_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'manage_module_streams_on_managed_instance_group_details' when calling manage_module_streams_on_managed_instance_group." if manage_module_streams_on_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/manageModuleStreams'.sub('{managedInstanceGroupId}', managed_instance_group_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(manage_module_streams_on_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#manage_module_streams_on_managed_instance_group') 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_group(managed_instance_group_id, remove_module_stream_profile_from_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use remove_module_stream_profile_from_managed_instance_group API.

Removes a profile for a module stream that is installed on a managed instance group. 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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1601

def remove_module_stream_profile_from_managed_instance_group(managed_instance_group_id, remove_module_stream_profile_from_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#remove_module_stream_profile_from_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling remove_module_stream_profile_from_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'remove_module_stream_profile_from_managed_instance_group_details' when calling remove_module_stream_profile_from_managed_instance_group." if remove_module_stream_profile_from_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/removeStreamProfile'.sub('{managedInstanceGroupId}', managed_instance_group_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(remove_module_stream_profile_from_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#remove_module_stream_profile_from_managed_instance_group') 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_group(managed_instance_group_id, remove_packages_from_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use remove_packages_from_managed_instance_group API.

Removes package(s) from each managed instance in a specified managed instance group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1672

def remove_packages_from_managed_instance_group(managed_instance_group_id, remove_packages_from_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#remove_packages_from_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling remove_packages_from_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'remove_packages_from_managed_instance_group_details' when calling remove_packages_from_managed_instance_group." if remove_packages_from_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/removePackages'.sub('{managedInstanceGroupId}', managed_instance_group_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(remove_packages_from_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#remove_packages_from_managed_instance_group') 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_instance_group(managed_instance_group_id, update_all_packages_on_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_all_packages_on_managed_instance_group API.

Updates all packages on each managed instance in the specified managed instance group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1743

def update_all_packages_on_managed_instance_group(managed_instance_group_id, update_all_packages_on_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#update_all_packages_on_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling update_all_packages_on_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'update_all_packages_on_managed_instance_group_details' when calling update_all_packages_on_managed_instance_group." if update_all_packages_on_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/updateAllPackages'.sub('{managedInstanceGroupId}', managed_instance_group_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(update_all_packages_on_managed_instance_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#update_all_packages_on_managed_instance_group') 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_group(managed_instance_group_id, update_managed_instance_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_managed_instance_group API.

Updates the specified managed instance group's name, description, and tags.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
# File 'lib/oci/os_management_hub/managed_instance_group_client.rb', line 1807

def update_managed_instance_group(managed_instance_group_id, update_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation ManagedInstanceGroupClient#update_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling update_managed_instance_group." if managed_instance_group_id.nil?
  raise "Missing the required parameter 'update_managed_instance_group_details' when calling update_managed_instance_group." if update_managed_instance_group_details.nil?
  raise "Parameter value for 'managed_instance_group_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_group_id)

  path = '/managedInstanceGroups/{managedInstanceGroupId}'.sub('{managedInstanceGroupId}', managed_instance_group_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_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ManagedInstanceGroupClient#update_managed_instance_group') 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::ManagedInstanceGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end