Class: OCI::LicenseManager::LicenseManagerClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/license_manager/license_manager_client.rb

Overview

Use the License Manager API to manage product licenses and license records. For more information, see License Manager Overview.

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) ⇒ LicenseManagerClient

Creates a new LicenseManagerClient. 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/license_manager/license_manager_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 + '/20220430'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "LicenseManagerClient 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/license_manager/license_manager_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/license_manager/license_manager_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/license_manager/license_manager_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/license_manager/license_manager_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#bulk_upload_license_records(bulk_upload_license_records_details, opts = {}) ⇒ Response

Note:

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

Bulk upload the product licenses and license records for a given compartment.

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)

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

Returns:



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/oci/license_manager/license_manager_client.rb', line 113

def bulk_upload_license_records(bulk_upload_license_records_details, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#bulk_upload_license_records.' if logger

  raise "Missing the required parameter 'bulk_upload_license_records_details' when calling bulk_upload_license_records." if bulk_upload_license_records_details.nil?

  path = '/licenses/actions/bulkUpload'
  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 = @api_client.object_to_http_body(bulk_upload_license_records_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LicenseManagerClient#bulk_upload_license_records') 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::LicenseManager::Models::BulkUploadResponse'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_license_record(create_license_record_details, product_license_id, opts = {}) ⇒ Response

Note:

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

Creates a new license record for the given product license ID.

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)

    The 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).

Returns:



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/oci/license_manager/license_manager_client.rb', line 174

def create_license_record(create_license_record_details, product_license_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#create_license_record.' if logger

  raise "Missing the required parameter 'create_license_record_details' when calling create_license_record." if create_license_record_details.nil?
  raise "Missing the required parameter 'product_license_id' when calling create_license_record." if product_license_id.nil?

  path = '/licenseRecords'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:productLicenseId] = product_license_id

  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_license_record_details)

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

#create_product_license(create_product_license_details, opts = {}) ⇒ Response

Note:

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

Creates a new product license.

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)

    The 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).

Returns:



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/oci/license_manager/license_manager_client.rb', line 238

def create_product_license(create_product_license_details, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#create_product_license.' if logger

  raise "Missing the required parameter 'create_product_license_details' when calling create_product_license." if create_product_license_details.nil?

  path = '/productLicenses'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_product_license_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LicenseManagerClient#create_product_license') 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::LicenseManager::Models::ProductLicense'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_license_record(license_record_id, opts = {}) ⇒ Response

Note:

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

Removes a license record.

Parameters:

  • license_record_id (String)

    Unique license record identifier.

  • 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)

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

  • :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



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/oci/license_manager/license_manager_client.rb', line 299

def delete_license_record(license_record_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#delete_license_record.' if logger

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

  path = '/licenseRecords/{licenseRecordId}'.sub('{licenseRecordId}', license_record_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#delete_product_license(product_license_id, opts = {}) ⇒ Response

Note:

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

Removes a product license.

Parameters:

  • product_license_id (String)

    Unique product license identifier.

  • 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)

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

  • :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



359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/oci/license_manager/license_manager_client.rb', line 359

def delete_product_license(product_license_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#delete_product_license.' if logger

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

  path = '/productLicenses/{productLicenseId}'.sub('{productLicenseId}', product_license_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[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_bulk_upload_template(opts = {}) ⇒ Response

Note:

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

Provides the bulk upload file template.

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

  • :opc_request_id (String)

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

Returns:



414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/oci/license_manager/license_manager_client.rb', line 414

def get_bulk_upload_template(opts = {})
  logger.debug 'Calling operation LicenseManagerClient#get_bulk_upload_template.' if logger


  path = '/licenses/actions/bulkUploadTemplate'
  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: 'LicenseManagerClient#get_bulk_upload_template') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::LicenseManager::Models::BulkUploadTemplate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_configuration(compartment_id, opts = {}) ⇒ Response

Note:

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

Retrieves configuration for a compartment.

Parameters:

  • compartment_id (String)

    The compartment OCID used for the license record, product license, and configuration.

  • 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)

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

Returns:



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
503
504
505
# File 'lib/oci/license_manager/license_manager_client.rb', line 469

def get_configuration(compartment_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#get_configuration.' if logger

  raise "Missing the required parameter 'compartment_id' when calling get_configuration." if compartment_id.nil?

  path = '/configuration'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id

  # 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: 'LicenseManagerClient#get_configuration') 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::LicenseManager::Models::Configuration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_license_metric(compartment_id, opts = {}) ⇒ Response

Note:

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

Retrieves the license metrics for a given compartment.

Parameters:

  • compartment_id (String)

    The compartment OCID used for the license record, product license, and configuration.

  • 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)

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

  • :is_compartment_id_in_subtree (BOOLEAN)

    Indicates if the given compartment is the root compartment. (default to false)

Returns:



527
528
529
530
531
532
533
534
535
536
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
# File 'lib/oci/license_manager/license_manager_client.rb', line 527

def get_license_metric(compartment_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#get_license_metric.' if logger

  raise "Missing the required parameter 'compartment_id' when calling get_license_metric." if compartment_id.nil?

  path = '/licenseMetrics'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:isCompartmentIdInSubtree] = opts[:is_compartment_id_in_subtree] if !opts[:is_compartment_id_in_subtree].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: 'LicenseManagerClient#get_license_metric') 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::LicenseManager::Models::LicenseMetric'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_license_record(license_record_id, opts = {}) ⇒ Response

Note:

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

Retrieves license record details by the license record ID in a given compartment.

Parameters:

  • license_record_id (String)

    Unique license record identifier.

  • 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)

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

Returns:



584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
# File 'lib/oci/license_manager/license_manager_client.rb', line 584

def get_license_record(license_record_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#get_license_record.' if logger

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

  path = '/licenseRecords/{licenseRecordId}'.sub('{licenseRecordId}', license_record_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LicenseManagerClient#get_license_record') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::LicenseManager::Models::LicenseRecord'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_product_license(product_license_id, opts = {}) ⇒ Response

Note:

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

Retrieves product license details by product license ID in a given compartment.

Parameters:

  • product_license_id (String)

    Unique product license identifier.

  • 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)

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

Returns:



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
# File 'lib/oci/license_manager/license_manager_client.rb', line 640

def get_product_license(product_license_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#get_product_license.' if logger

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

  path = '/productLicenses/{productLicenseId}'.sub('{productLicenseId}', product_license_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: 'LicenseManagerClient#get_product_license') 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::LicenseManager::Models::ProductLicense'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_license_records(product_license_id, opts = {}) ⇒ Response

Note:

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

Retrieves all license records for a given product license ID.

Parameters:

  • product_license_id (String)

    Unique product license identifier.

  • 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

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :opc_request_id (String)

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

  • :sort_order (String)

    The sort order to use, whether ASC or DESC. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

    Specifies the attribute with which to sort the rules.

    Default: expirationDate

    • expirationDate: Sorts by expiration date of the license record. (default to expirationDate) Allowed values are: expirationDate

Returns:



707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
# File 'lib/oci/license_manager/license_manager_client.rb', line 707

def list_license_records(product_license_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#list_license_records.' if logger

  raise "Missing the required parameter 'product_license_id' when calling list_license_records." if product_license_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[expirationDate].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of expirationDate.'
  end

  path = '/licenseRecords'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:productLicenseId] = product_license_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: 'LicenseManagerClient#list_license_records') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::LicenseManager::Models::LicenseRecordCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_product_license_consumers(product_license_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Retrieves the product license consumers for a particular product license ID.

Parameters:

  • product_license_id (String)

    Unique product license identifier.

  • compartment_id (String)

    The compartment OCID used for the license record, product license, and configuration.

  • 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

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :opc_request_id (String)

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

  • :is_compartment_id_in_subtree (BOOLEAN)

    Indicates if the given compartment is the root compartment. (default to false)

  • :sort_order (String)

    The sort order to use, whether ASC or DESC. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

    Specifies the attribute with which to sort the rules.

    Default: licenseUnitsRequired

    • licenseUnitsRequired: Sorts by licenseUnitsRequired of the Resource. (default to licenseUnitsRequired) Allowed values are: licenseUnitsRequired

Returns:



789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
# File 'lib/oci/license_manager/license_manager_client.rb', line 789

def list_product_license_consumers(product_license_id, compartment_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#list_product_license_consumers.' if logger

  raise "Missing the required parameter 'product_license_id' when calling list_product_license_consumers." if product_license_id.nil?
  raise "Missing the required parameter 'compartment_id' when calling list_product_license_consumers." if compartment_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[licenseUnitsRequired].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of licenseUnitsRequired.'
  end

  path = '/productLicenseConsumers'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:productLicenseId] = product_license_id
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:isCompartmentIdInSubtree] = opts[:is_compartment_id_in_subtree] if !opts[:is_compartment_id_in_subtree].nil?
  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: 'LicenseManagerClient#list_product_license_consumers') 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::LicenseManager::Models::ProductLicenseConsumerCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_product_licenses(compartment_id, opts = {}) ⇒ Response

Note:

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

Retrieves all the product licenses from a given compartment.

Parameters:

  • compartment_id (String)

    The compartment OCID used for the license record, product license, and configuration.

  • 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

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :opc_request_id (String)

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

  • :is_compartment_id_in_subtree (BOOLEAN)

    Indicates if the given compartment is the root compartment. (default to false)

  • :sort_order (String)

    The sort order to use, whether ASC or DESC. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

    Specifies the attribute with which to sort the rules.

    Default: totalLicenseUnitsConsumed

    • totalLicenseUnitsConsumed: Sorts by totalLicenseUnitsConsumed of ProductLicense. (default to totalLicenseUnitsConsumed) Allowed values are: totalLicenseUnitsConsumed

Returns:



873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
# File 'lib/oci/license_manager/license_manager_client.rb', line 873

def list_product_licenses(compartment_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#list_product_licenses.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_product_licenses." if compartment_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[totalLicenseUnitsConsumed].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of totalLicenseUnitsConsumed.'
  end

  path = '/productLicenses'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:isCompartmentIdInSubtree] = opts[:is_compartment_id_in_subtree] if !opts[:is_compartment_id_in_subtree].nil?
  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: 'LicenseManagerClient#list_product_licenses') 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::LicenseManager::Models::ProductLicenseCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_top_utilized_product_licenses(compartment_id, opts = {}) ⇒ Response

Note:

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

Retrieves the top utilized product licenses for a given compartment.

Parameters:

  • compartment_id (String)

    The compartment OCID used for the license record, product license, and configuration.

  • 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

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :opc_request_id (String)

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

  • :is_compartment_id_in_subtree (BOOLEAN)

    Indicates if the given compartment is the root compartment. (default to false)

  • :sort_order (String)

    The sort order to use, whether ASC or DESC. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

    Specifies the attribute with which to sort the rules.

    Default: totalLicenseUnitsConsumed

    • totalLicenseUnitsConsumed: Sorts by totalLicenseUnitsConsumed of ProductLicense. (default to totalLicenseUnitsConsumed) Allowed values are: totalLicenseUnitsConsumed

Returns:



955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
# File 'lib/oci/license_manager/license_manager_client.rb', line 955

def list_top_utilized_product_licenses(compartment_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#list_top_utilized_product_licenses.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_top_utilized_product_licenses." if compartment_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[totalLicenseUnitsConsumed].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of totalLicenseUnitsConsumed.'
  end

  path = '/topUtilizedProductLicenses'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:isCompartmentIdInSubtree] = opts[:is_compartment_id_in_subtree] if !opts[:is_compartment_id_in_subtree].nil?
  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: 'LicenseManagerClient#list_top_utilized_product_licenses') 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::LicenseManager::Models::TopUtilizedProductLicenseCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_top_utilized_resources(compartment_id, opts = {}) ⇒ Response

Note:

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

Retrieves the top utilized resources for a given compartment.

Parameters:

  • compartment_id (String)

    The compartment OCID used for the license record, product license, and configuration.

  • 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

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :opc_request_id (String)

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

  • :is_compartment_id_in_subtree (BOOLEAN)

    Indicates if the given compartment is the root compartment. (default to false)

  • :resource_unit_type (String)

    A filter to return only resources whose unit matches the given resource unit.

  • :sort_order (String)

    The sort order to use, whether ASC or DESC. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

    Specifies the attribute with which to sort the rules.

    Default: totalUnits

    • totalUnits: Sorts by totalUnits consumed by resource. (default to totalUnits) Allowed values are: totalUnits

Returns:



1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
# File 'lib/oci/license_manager/license_manager_client.rb', line 1038

def list_top_utilized_resources(compartment_id, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#list_top_utilized_resources.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_top_utilized_resources." if compartment_id.nil?

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[totalUnits].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of totalUnits.'
  end

  path = '/topUtilizedResources'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:isCompartmentIdInSubtree] = opts[:is_compartment_id_in_subtree] if !opts[:is_compartment_id_in_subtree].nil?
  query_params[:resourceUnitType] = opts[:resource_unit_type] if opts[:resource_unit_type]
  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: 'LicenseManagerClient#list_top_utilized_resources') 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::LicenseManager::Models::TopUtilizedResourceCollection'
    )
  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/license_manager/license_manager_client.rb', line 94

def logger
  @api_client.config.logger
end

#update_configuration(compartment_id, update_configuration_details, opts = {}) ⇒ Response

Note:

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

Updates the configuration for the compartment.

Parameters:

  • compartment_id (String)

    The compartment OCID used for the license record, product license, and configuration.

  • update_configuration_details (OCI::LicenseManager::Models::UpdateConfigurationDetails)

    Configuration details that need to be updated.

  • 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)

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

Returns:



1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
# File 'lib/oci/license_manager/license_manager_client.rb', line 1118

def update_configuration(compartment_id, update_configuration_details, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#update_configuration.' if logger

  raise "Missing the required parameter 'compartment_id' when calling update_configuration." if compartment_id.nil?
  raise "Missing the required parameter 'update_configuration_details' when calling update_configuration." if update_configuration_details.nil?

  path = '/configuration'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id

  # 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_configuration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LicenseManagerClient#update_configuration') 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::LicenseManager::Models::Configuration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_license_record(license_record_id, update_license_record_details, opts = {}) ⇒ Response

Note:

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

Updates license record entity details.

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)

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

Returns:



1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
# File 'lib/oci/license_manager/license_manager_client.rb', line 1181

def update_license_record(license_record_id, update_license_record_details, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#update_license_record.' if logger

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

  path = '/licenseRecords/{licenseRecordId}'.sub('{licenseRecordId}', license_record_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_license_record_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LicenseManagerClient#update_license_record') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::LicenseManager::Models::LicenseRecord'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_product_license(product_license_id, update_product_license_details, opts = {}) ⇒ Response

Note:

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

Updates the list of images for a product license.

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)

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

Returns:



1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
# File 'lib/oci/license_manager/license_manager_client.rb', line 1244

def update_product_license(product_license_id, update_product_license_details, opts = {})
  logger.debug 'Calling operation LicenseManagerClient#update_product_license.' if logger

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

  path = '/productLicenses/{productLicenseId}'.sub('{productLicenseId}', product_license_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_product_license_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LicenseManagerClient#update_product_license') 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::LicenseManager::Models::ProductLicense'
    )
  end
  # rubocop:enable Metrics/BlockLength
end