Class: OCI::CapacityManagement::CapacityManagementClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/capacity_management/capacity_management_client.rb

Overview

OCI Control Center (OCC) Capacity Management enables you to manage capacity requests in realms where OCI Control Center Capacity Management is available. For more information, see OCI Control Center.

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

Creates a new CapacityManagementClient. 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/capacity_management/capacity_management_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 + '/20231107'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "CapacityManagementClient 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/capacity_management/capacity_management_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/capacity_management/capacity_management_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/capacity_management/capacity_management_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/capacity_management/capacity_management_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#create_occ_availability_catalog(create_occ_availability_catalog_details, opts = {}) ⇒ Response

Note:

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

Create availability catalog

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)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 120

def create_occ_availability_catalog(create_occ_availability_catalog_details, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#create_occ_availability_catalog.' if logger

  raise "Missing the required parameter 'create_occ_availability_catalog_details' when calling create_occ_availability_catalog." if create_occ_availability_catalog_details.nil?

  path = '/occAvailabilityCatalogs'
  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_occ_availability_catalog_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#create_occ_availability_catalog') 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::CapacityManagement::Models::OccAvailabilityCatalog'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_occ_capacity_request(create_occ_capacity_request_details, opts = {}) ⇒ Response

Note:

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

Create Capacity Request.

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)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



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
214
215
216
217
218
219
220
221
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 184

def create_occ_capacity_request(create_occ_capacity_request_details, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#create_occ_capacity_request.' if logger

  raise "Missing the required parameter 'create_occ_capacity_request_details' when calling create_occ_capacity_request." if create_occ_capacity_request_details.nil?

  path = '/occCapacityRequests'
  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_occ_capacity_request_details)

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

#create_occ_customer(create_occ_customer_details, occ_customer_group_id, opts = {}) ⇒ Response

Note:

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

Create customer.

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)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 250

def create_occ_customer(create_occ_customer_details, occ_customer_group_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#create_occ_customer.' if logger

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

  path = '/occCustomerGroups/{occCustomerGroupId}/occCustomers'.sub('{occCustomerGroupId}', occ_customer_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-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_occ_customer_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#create_occ_customer') 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::CapacityManagement::Models::OccCustomer'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_occ_customer_group(create_occ_customer_group_details, opts = {}) ⇒ Response

Note:

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

Create customer 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)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 316

def create_occ_customer_group(create_occ_customer_group_details, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#create_occ_customer_group.' if logger

  raise "Missing the required parameter 'create_occ_customer_group_details' when calling create_occ_customer_group." if create_occ_customer_group_details.nil?

  path = '/occCustomerGroups'
  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_occ_customer_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#create_occ_customer_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::CapacityManagement::Models::OccCustomerGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_occ_availability_catalog(occ_availability_catalog_id, opts = {}) ⇒ Response

Note:

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

Deletes the availability catalog resource.

Parameters:

  • occ_availability_catalog_id (String)

    The OCID of the availability catalog.

  • 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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:

  • (Response)

    A Response object with data of type nil



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 379

def delete_occ_availability_catalog(occ_availability_catalog_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#delete_occ_availability_catalog.' if logger

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

  path = '/occAvailabilityCatalogs/{occAvailabilityCatalogId}'.sub('{occAvailabilityCatalogId}', occ_availability_catalog_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: 'CapacityManagementClient#delete_occ_availability_catalog') 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_occ_capacity_request(occ_capacity_request_id, opts = {}) ⇒ Response

Note:

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

Deletes the capacity request resource.

Parameters:

  • occ_capacity_request_id (String)

    The OCID of the capacity request.

  • 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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:

  • (Response)

    A Response object with data of type nil



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 441

def delete_occ_capacity_request(occ_capacity_request_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#delete_occ_capacity_request.' if logger

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

  path = '/occCapacityRequests/{occCapacityRequestId}'.sub('{occCapacityRequestId}', occ_capacity_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#delete_occ_customer(occ_customer_group_id, occ_customer_id, opts = {}) ⇒ Response

Note:

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

Deletes the customer resource.

Parameters:

  • occ_customer_group_id (String)

    The OCID of the customer group.

  • occ_customer_id (String)

    The tenancy id of the customer.

  • 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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:

  • (Response)

    A Response object with data of type nil



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 506

def delete_occ_customer(occ_customer_group_id, occ_customer_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#delete_occ_customer.' if logger

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

  path = '/occCustomerGroups/{occCustomerGroupId}/occCustomers/{occCustomerId}'.sub('{occCustomerGroupId}', occ_customer_group_id.to_s).sub('{occCustomerId}', occ_customer_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: 'CapacityManagementClient#delete_occ_customer') 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_occ_customer_group(occ_customer_group_id, opts = {}) ⇒ Response

Note:

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

Deletes the customer group resource.

Parameters:

  • occ_customer_group_id (String)

    The OCID of the customer group.

  • 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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:

  • (Response)

    A Response object with data of type nil



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 571

def delete_occ_customer_group(occ_customer_group_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#delete_occ_customer_group.' if logger

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

  path = '/occCustomerGroups/{occCustomerGroupId}'.sub('{occCustomerGroupId}', occ_customer_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: 'CapacityManagementClient#delete_occ_customer_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

#get_occ_availability_catalog(occ_availability_catalog_id, opts = {}) ⇒ Response

Note:

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

Get details about availability catalog.

Parameters:

  • occ_availability_catalog_id (String)

    The OCID of the availability catalog.

  • 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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 627

def get_occ_availability_catalog(occ_availability_catalog_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#get_occ_availability_catalog.' if logger

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

  path = '/occAvailabilityCatalogs/{occAvailabilityCatalogId}'.sub('{occAvailabilityCatalogId}', occ_availability_catalog_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: 'CapacityManagementClient#get_occ_availability_catalog') 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::CapacityManagement::Models::OccAvailabilityCatalog'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_occ_availability_catalog_content(occ_availability_catalog_id, opts = {}, &block) ⇒ Response

Note:

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

Returns the binary contents of the availability catalog. Can be saved as a csv file.

Parameters:

  • occ_availability_catalog_id (String)

    The OCID of the availability catalog.

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

    the optional parameters

  • [Block] (Hash)

    a customizable set of options

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)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

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

  • :response_target (String, IO)

    Streaming http body into a file (specified by file name or File object) or IO object if the block is not given

Returns:

  • (Response)

    A Response object with data of type String if response_target and block are not given, otherwise with nil data



698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
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
779
780
781
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 698

def get_occ_availability_catalog_content(occ_availability_catalog_id, opts = {}, &block)
  logger.debug 'Calling operation CapacityManagementClient#get_occ_availability_catalog_content.' if logger

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

  path = '/occAvailabilityCatalogs/{occAvailabilityCatalogId}/content'.sub('{occAvailabilityCatalogId}', occ_availability_catalog_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'application/binary'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  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]
  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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#get_occ_availability_catalog_content') do
    if !block.nil?
      @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: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @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: 'Stream',
          &proc { |chunk, _response| opts[:response_target].write(chunk) }
        )
      elsif opts[:response_target].is_a?(String)
        File.open(opts[:response_target], 'wb') do |output|
          return @api_client.call_api(
            :GET,
            path,
            endpoint,
            header_params: header_params,
            query_params: query_params,
            operation_signing_strategy: operation_signing_strategy,
            body: post_body,
            return_type: 'Stream',
            &proc { |chunk, _response| output.write(chunk) }
          )
        end
      end
    else
      @api_client.call_api(
        :GET,
        path,
        endpoint,
        header_params: header_params,
        query_params: query_params,
        operation_signing_strategy: operation_signing_strategy,
        body: post_body,
        return_type: 'String'
      )
    end
  end
  # rubocop:enable Metrics/BlockLength
end

#get_occ_capacity_request(occ_capacity_request_id, opts = {}) ⇒ Response

Note:

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

Get details about the capacity request.

Parameters:

  • occ_capacity_request_id (String)

    The OCID of the capacity request.

  • 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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



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
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 801

def get_occ_capacity_request(occ_capacity_request_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#get_occ_capacity_request.' if logger

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

  path = '/occCapacityRequests/{occCapacityRequestId}'.sub('{occCapacityRequestId}', occ_capacity_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#get_occ_customer_group(occ_customer_group_id, opts = {}) ⇒ Response

Note:

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

Gets information about the specified customer group.

Parameters:

  • occ_customer_group_id (String)

    The OCID of the customer group.

  • 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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 859

def get_occ_customer_group(occ_customer_group_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#get_occ_customer_group.' if logger

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

  path = '/occCustomerGroups/{occCustomerGroupId}'.sub('{occCustomerGroupId}', occ_customer_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: 'CapacityManagementClient#get_occ_customer_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::CapacityManagement::Models::OccCustomerGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_internal_namespace_occ_overviews(namespace, compartment_id, occ_customer_group_id, opts = {}) ⇒ Response

Note:

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

Lists an overview of all resources in that namespace in a given time interval.

Allowed values are: periodValue

Parameters:

  • namespace (String)

    The namespace by which we would filter the list.

  • compartment_id (String)

    The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes.

  • occ_customer_group_id (String)

    The customer group ocid by which we would filter the list.

  • 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

  • :workload_type (String)

    Workload type using the resources in an availability catalog can be filtered.

  • :from (DateTime)

    The month corresponding to this date would be considered as the starting point of the time period against which we would like to perform an aggregation.

  • :to (DateTime)

    The month corresponding to this date would be considered as the ending point of the time period against which we would like to perform an aggregation.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for periodValue is chronological order(latest month item at the end). (default to periodValue)

Returns:



927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 927

def list_internal_namespace_occ_overviews(namespace, compartment_id, occ_customer_group_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_internal_namespace_occ_overviews.' if logger

  raise "Missing the required parameter 'namespace' when calling list_internal_namespace_occ_overviews." if namespace.nil?
  unless OCI::CapacityManagement::Models::NAMESPACE_ENUM.include?(namespace)
    raise 'Invalid value for "namespace", must be one of the values in OCI::CapacityManagement::Models::NAMESPACE_ENUM.'
  end

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

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

  if opts[:sort_by] && !%w[periodValue].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of periodValue.'
  end
  raise "Parameter value for 'namespace' must not be blank" if OCI::Internal::Util.blank_string?(namespace)

  path = '/internal/namespace/{namespace}/occOverview'.sub('{namespace}', namespace.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:occCustomerGroupId] = occ_customer_group_id
  query_params[:workloadType] = opts[:workload_type] if opts[:workload_type]
  query_params[:from] = opts[:from] if opts[:from]
  query_params[:to] = opts[:to] if opts[:to]
  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: 'CapacityManagementClient#list_internal_namespace_occ_overviews') 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::CapacityManagement::Models::OccOverviewCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_internal_occ_handover_resource_block_details(occ_handover_resource_block_id, opts = {}) ⇒ Response

Note:

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

List details about a given occHandoverResourceBlock.

Parameters:

  • occ_handover_resource_block_id (String)

    The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails.

  • 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

  • :host_id (String)

    This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for handoverDate is chronological order(latest date item at the end). (default to handoverDate) Allowed values are: handoverDate

Returns:



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1017

def list_internal_occ_handover_resource_block_details(occ_handover_resource_block_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_internal_occ_handover_resource_block_details.' if logger

  raise "Missing the required parameter 'occ_handover_resource_block_id' when calling list_internal_occ_handover_resource_block_details." if occ_handover_resource_block_id.nil?

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

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

  path = '/internal/occHandoverResourceBlockDetails'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:occHandoverResourceBlockId] = occ_handover_resource_block_id
  query_params[:hostId] = opts[:host_id] if opts[:host_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: 'CapacityManagementClient#list_internal_occ_handover_resource_block_details') 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::CapacityManagement::Models::OccHandoverResourceBlockDetailCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_internal_occ_handover_resource_blocks(namespace, compartment_id, occ_customer_group_id, opts = {}) ⇒ Response

Note:

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

List Occ Handover Resource blocks.

Parameters:

  • namespace (String)

    The namespace enum value that needs to be passed as a required query parameter.

  • compartment_id (String)

    The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes.

  • occ_customer_group_id (String)

    The customer group ocid by which we would filter the list.

  • 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

  • :handover_resource_name (String)

    A filter to return only the list of resources that match the name provided in this filter.

  • :handover_date_greater_than_or_equal_to (DateTime)

    This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate.

  • :handover_date_less_than_or_equal_to (DateTime)

    This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate.

  • :occ_handover_resource_block_id (String)

    This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for handoverDate is chronological order(latest date item at the end). (default to handoverDate) Allowed values are: handoverDate

Returns:



1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1105

def list_internal_occ_handover_resource_blocks(namespace, compartment_id, occ_customer_group_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_internal_occ_handover_resource_blocks.' if logger

  raise "Missing the required parameter 'namespace' when calling list_internal_occ_handover_resource_blocks." if namespace.nil?
  unless OCI::CapacityManagement::Models::NAMESPACE_ENUM.include?(namespace)
    raise 'Invalid value for "namespace", must be one of the values in OCI::CapacityManagement::Models::NAMESPACE_ENUM.'
  end

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

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

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

  path = '/internal/occHandoverResourceBlocks'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:namespace] = namespace
  query_params[:compartmentId] = compartment_id
  query_params[:occCustomerGroupId] = occ_customer_group_id
  query_params[:handoverResourceName] = opts[:handover_resource_name] if opts[:handover_resource_name]
  query_params[:handoverDateGreaterThanOrEqualTo] = opts[:handover_date_greater_than_or_equal_to] if opts[:handover_date_greater_than_or_equal_to]
  query_params[:handoverDateLessThanOrEqualTo] = opts[:handover_date_less_than_or_equal_to] if opts[:handover_date_less_than_or_equal_to]
  query_params[:occHandoverResourceBlockId] = opts[:occ_handover_resource_block_id] if opts[:occ_handover_resource_block_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: 'CapacityManagementClient#list_internal_occ_handover_resource_blocks') 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::CapacityManagement::Models::OccHandoverResourceBlockCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_occ_availabilities(occ_availability_catalog_id, opts = {}) ⇒ Response

Note:

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

Lists availabilities for a particular availability catalog. Allowed values are: dateExpectedCapacityHandover, resourceName

Parameters:

  • occ_availability_catalog_id (String)

    The OCID of the availability catalog.

  • 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

  • :date_expected_capacity_handover (String)

    The capacity handover date of the capacity constraint to filter the list of capacity constraints.

  • :resource_name (String)

    The name of the resource to filter the list of capacity constraints.

  • :resource_type (String)

    Resource type using which the capacity constraints of an availability catalog can be filtered.

  • :workload_type (String)

    Workload type using the resources in an availability catalog can be filtered.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for resource name is ascending. The default order for date of capacity handover is descending. (default to dateExpectedCapacityHandover)

Returns:



1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1195

def list_occ_availabilities(occ_availability_catalog_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_occ_availabilities.' if logger

  raise "Missing the required parameter 'occ_availability_catalog_id' when calling list_occ_availabilities." if occ_availability_catalog_id.nil?

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

  if opts[:sort_by] && !%w[dateExpectedCapacityHandover resourceName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of dateExpectedCapacityHandover, resourceName.'
  end
  raise "Parameter value for 'occ_availability_catalog_id' must not be blank" if OCI::Internal::Util.blank_string?(occ_availability_catalog_id)

  path = '/occAvailabilityCatalogs/{occAvailabilityCatalogId}/occAvailabilities'.sub('{occAvailabilityCatalogId}', occ_availability_catalog_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:dateExpectedCapacityHandover] = opts[:date_expected_capacity_handover] if opts[:date_expected_capacity_handover]
  query_params[:resourceName] = opts[:resource_name] if opts[:resource_name]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:workloadType] = opts[:workload_type] if opts[:workload_type]
  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: 'CapacityManagementClient#list_occ_availabilities') 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::CapacityManagement::Models::OccAvailabilityCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists all availability catalogs. Allowed values are: displayName, timeCreated

Parameters:

  • compartment_id (String)

    The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes.

  • 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

  • :namespace (String)

    The namespace by which we would filter the list.

  • :id (String)

    The OCID of the availability catalog to filter the list of availability catalogs.

  • :display_name (String)

    A filter to return only the resources that match the entire display name. The match is not case sensitive.

  • :catalog_state (String)

    Filter the list of availability catalogs based on the catalog state.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for displayName is ascending. The default order for timeCreated is descending. (default to timeCreated)

Returns:



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

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

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

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

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

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

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

  path = '/occAvailabilityCatalogs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:namespace] = opts[:namespace] if opts[:namespace]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:catalogState] = opts[:catalog_state] if opts[:catalog_state]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#list_occ_availability_catalogs') 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::CapacityManagement::Models::OccAvailabilityCatalogCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_occ_availability_catalogs_internal(compartment_id, occ_customer_group_id, opts = {}) ⇒ Response

Note:

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

An internal api to list availability catalogs. Allowed values are: displayName, timeCreated

Parameters:

  • compartment_id (String)

    The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes.

  • occ_customer_group_id (String)

    The customer group ocid by which we would filter the list.

  • 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

  • :namespace (String)

    The namespace by which we would filter the list.

  • :id (String)

    The OCID of the availability catalog to filter the list of availability catalogs.

  • :display_name (String)

    A filter to return only the resources that match the entire display name. The match is not case sensitive.

  • :catalog_state (String)

    Filter the list of availability catalogs based on the catalog state.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for displayName is ascending. The default order for timeCreated is descending. (default to timeCreated)

Returns:



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

def list_occ_availability_catalogs_internal(compartment_id, occ_customer_group_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_occ_availability_catalogs_internal.' if logger

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

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

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

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

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

  path = '/internal/occAvailabilityCatalogs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:occCustomerGroupId] = occ_customer_group_id
  query_params[:namespace] = opts[:namespace] if opts[:namespace]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:catalogState] = opts[:catalog_state] if opts[:catalog_state]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

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

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

Note:

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

Lists all capacity requests. Allowed values are: displayName, timeCreated

Parameters:

  • compartment_id (String)

    The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes.

  • 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

  • :occ_availability_catalog_id (String)

    A filter to return the list of capacity requests based on the OCID of the availability catalog against which they were created.

  • :namespace (String)

    The namespace by which we would filter the list.

  • :request_type (String)

    A filter to return only the resources that match the request type. The match is not case sensitive.

  • :display_name (String)

    A filter to return only the resources that match the entire display name. The match is not case sensitive.

  • :id (String)

    A filter to return the list of capacity requests based on the OCID of the capacity request. This is done for the users who have INSPECT permission on the resource but do not have READ permission.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for display name is ascending. The default order for time created is reverse chronological order(latest date at the top). (default to timeCreated)

Returns:



1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1461

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

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

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

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

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

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

  path = '/occCapacityRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:occAvailabilityCatalogId] = opts[:occ_availability_catalog_id] if opts[:occ_availability_catalog_id]
  query_params[:namespace] = opts[:namespace] if opts[:namespace]
  query_params[:requestType] = opts[:request_type] if opts[:request_type]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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: 'CapacityManagementClient#list_occ_capacity_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CapacityManagement::Models::OccCapacityRequestCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_occ_capacity_requests_internal(compartment_id, occ_customer_group_id, opts = {}) ⇒ Response

Note:

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

An internal api to list all capacity requests. Allowed values are: displayName, timeCreated

Parameters:

  • compartment_id (String)

    The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes.

  • occ_customer_group_id (String)

    The customer group ocid by which we would filter the list.

  • 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

  • :occ_availability_catalog_id (String)

    A filter to return the list of capacity requests based on the OCID of the availability catalog against which they were created.

  • :namespace (String)

    The namespace by which we would filter the list.

  • :display_name (String)

    A filter to return only the resources that match the entire display name. The match is not case sensitive.

  • :request_type (String)

    A filter to return only the resources that match the request type. The match is not case sensitive.

  • :id (String)

    A filter to return the list of capacity requests based on the OCID of the capacity request. This is done for the users who have INSPECT permission on the resource but do not have READ permission.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for display name is ascending. The default order for time created is reverse chronological order(latest date at the top). (default to timeCreated)

Returns:



1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1554

def list_occ_capacity_requests_internal(compartment_id, occ_customer_group_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_occ_capacity_requests_internal.' if logger

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

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

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

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

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

  path = '/internal/occCapacityRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:occCustomerGroupId] = occ_customer_group_id
  query_params[:occAvailabilityCatalogId] = opts[:occ_availability_catalog_id] if opts[:occ_availability_catalog_id]
  query_params[:namespace] = opts[:namespace] if opts[:namespace]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:requestType] = opts[:request_type] if opts[:request_type]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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: 'CapacityManagementClient#list_occ_capacity_requests_internal') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CapacityManagement::Models::OccCapacityRequestCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists all the customer groups.

Allowed values are: compartmentId, name, timeCreated

Parameters:

  • compartment_id (String)

    The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes.

  • 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

  • :status (String)

    A query filter to return the list result based on status. (default to ENABLED)

  • :display_name (String)

    A filter to return only the resources that match the entire display name. The match is not case sensitive.

  • :id (String)

    A query filter to return the list result based on the customer group OCID. This is done for users who have INSPECT permission but do not have READ permission.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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 and compartment ID is ascending. Default order for time created is descending. (default to timeCreated)

Returns:



1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1647

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

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

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

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

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

  path = '/occCustomerGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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: 'CapacityManagementClient#list_occ_customer_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::CapacityManagement::Models::OccCustomerGroupCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_occ_handover_resource_block_details(occ_handover_resource_block_id, opts = {}) ⇒ Response

Note:

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

List details about a given occHandoverResourceBlock.

Parameters:

  • occ_handover_resource_block_id (String)

    The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails.

  • 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

  • :host_id (String)

    This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for handoverDate is chronological order(latest date item at the end). (default to handoverDate) Allowed values are: handoverDate

Returns:



1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1733

def list_occ_handover_resource_block_details(occ_handover_resource_block_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_occ_handover_resource_block_details.' if logger

  raise "Missing the required parameter 'occ_handover_resource_block_id' when calling list_occ_handover_resource_block_details." if occ_handover_resource_block_id.nil?

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

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

  path = '/occHandoverResourceBlockDetails'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:occHandoverResourceBlockId] = occ_handover_resource_block_id
  query_params[:hostId] = opts[:host_id] if opts[:host_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: 'CapacityManagementClient#list_occ_handover_resource_block_details') 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::CapacityManagement::Models::OccHandoverResourceBlockDetailCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_occ_handover_resource_blocks(opts = {}) ⇒ Response

Note:

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

List Occ Handover Resource blocks.

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

  • :namespace (String)

    The namespace by which we would filter the list.

  • :compartment_id (String)

    The OCID of the compartment or tenancy in which resources are to be listed.

  • :handover_resource_name (String)

    A filter to return only the list of resources that match the name provided in this filter.

  • :handover_date_greater_than_or_equal_to (DateTime)

    This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate.

  • :handover_date_less_than_or_equal_to (DateTime)

    This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate.

  • :occ_handover_resource_block_id (String)

    This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for handoverDate is chronological order(latest date item at the end). (default to handoverDate) Allowed values are: handoverDate

Returns:



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
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1819

def list_occ_handover_resource_blocks(opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_occ_handover_resource_blocks.' if logger


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

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

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

  path = '/occHandoverResourceBlocks'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:namespace] = opts[:namespace] if opts[:namespace]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:handoverResourceName] = opts[:handover_resource_name] if opts[:handover_resource_name]
  query_params[:handoverDateGreaterThanOrEqualTo] = opts[:handover_date_greater_than_or_equal_to] if opts[:handover_date_greater_than_or_equal_to]
  query_params[:handoverDateLessThanOrEqualTo] = opts[:handover_date_less_than_or_equal_to] if opts[:handover_date_less_than_or_equal_to]
  query_params[:occHandoverResourceBlockId] = opts[:occ_handover_resource_block_id] if opts[:occ_handover_resource_block_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: 'CapacityManagementClient#list_occ_handover_resource_blocks') 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::CapacityManagement::Models::OccHandoverResourceBlockCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_occ_overviews(namespace, compartment_id, opts = {}) ⇒ Response

Note:

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

Lists an overview of all resources in that namespace in a given time interval.

Allowed values are: periodValue

Parameters:

  • namespace (String)

    The namespace by which we would filter the list.

  • compartment_id (String)

    The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes.

  • 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

  • :from (DateTime)

    The month corresponding to this date would be considered as the starting point of the time period against which we would like to perform an aggregation.

  • :to (DateTime)

    The month corresponding to this date would be considered as the ending point of the time period against which we would like to perform an aggregation.

  • :workload_type (String)

    Workload type using the resources in an availability catalog can be filtered.

  • :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 opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

  • :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. The default order for periodValue is chronological order(latest month item at the end). (default to periodValue)

Returns:



1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1906

def list_occ_overviews(namespace, compartment_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#list_occ_overviews.' if logger

  raise "Missing the required parameter 'namespace' when calling list_occ_overviews." if namespace.nil?
  unless OCI::CapacityManagement::Models::NAMESPACE_ENUM.include?(namespace)
    raise 'Invalid value for "namespace", must be one of the values in OCI::CapacityManagement::Models::NAMESPACE_ENUM.'
  end

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

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

  if opts[:sort_by] && !%w[periodValue].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of periodValue.'
  end
  raise "Parameter value for 'namespace' must not be blank" if OCI::Internal::Util.blank_string?(namespace)

  path = '/namespace/{namespace}/occOverview'.sub('{namespace}', namespace.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:from] = opts[:from] if opts[:from]
  query_params[:to] = opts[:to] if opts[:to]
  query_params[:workloadType] = opts[:workload_type] if opts[:workload_type]
  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: 'CapacityManagementClient#list_occ_overviews') 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::CapacityManagement::Models::OccOverviewCollection'
    )
  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/capacity_management/capacity_management_client.rb', line 94

def logger
  @api_client.config.logger
end

#patch_internal_occ_capacity_request(patch_occ_capacity_request_details, occ_capacity_request_id, opts = {}) ⇒ Response

Note:

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

Updates the OccCapacityRequest by evaluating a sequence of instructions.

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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 1990

def patch_internal_occ_capacity_request(patch_occ_capacity_request_details, occ_capacity_request_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#patch_internal_occ_capacity_request.' if logger

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

  path = '/internal/occCapacityRequests/{occCapacityRequestId}'.sub('{occCapacityRequestId}', occ_capacity_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(patch_occ_capacity_request_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#patch_internal_occ_capacity_request') do
    @api_client.call_api(
      :PATCH,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CapacityManagement::Models::OccCapacityRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#patch_occ_capacity_request(patch_occ_capacity_request_details, occ_capacity_request_id, opts = {}) ⇒ Response

Note:

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

Updates the OccCapacityRequest by evaluating a sequence of instructions.

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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 2055

def patch_occ_capacity_request(patch_occ_capacity_request_details, occ_capacity_request_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#patch_occ_capacity_request.' if logger

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

  path = '/occCapacityRequests/{occCapacityRequestId}'.sub('{occCapacityRequestId}', occ_capacity_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(patch_occ_capacity_request_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#patch_occ_capacity_request') do
    @api_client.call_api(
      :PATCH,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CapacityManagement::Models::OccCapacityRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#publish_occ_availability_catalog(occ_availability_catalog_id, opts = {}) ⇒ Response

Note:

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

Publishes the version of availability catalog specified by the operator. This makes that catalog version visible to customers.

Parameters:

  • occ_availability_catalog_id (String)

    The OCID of the availability catalog.

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

    The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

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



2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 2126

def publish_occ_availability_catalog(occ_availability_catalog_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#publish_occ_availability_catalog.' if logger

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

  path = '/occAvailabilityCatalogs/{occAvailabilityCatalogId}/actions/publish'.sub('{occAvailabilityCatalogId}', occ_availability_catalog_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-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]
  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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#publish_occ_availability_catalog') 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_internal_occ_capacity_request(update_internal_occ_capacity_request_details, occ_capacity_request_id, opts = {}) ⇒ Response

Note:

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

The internal api to update the capacity request. This api will be used by operators for updating the capacity request to either completed, resubmitted or rejected.

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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 2191

def update_internal_occ_capacity_request(update_internal_occ_capacity_request_details, occ_capacity_request_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#update_internal_occ_capacity_request.' if logger

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

  path = '/internal/occCapacityRequests/{occCapacityRequestId}'.sub('{occCapacityRequestId}', occ_capacity_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_internal_occ_capacity_request_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#update_internal_occ_capacity_request') 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::CapacityManagement::Models::OccCapacityRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_occ_availability_catalog(update_occ_availability_catalog_details, occ_availability_catalog_id, opts = {}) ⇒ Response

Note:

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

The request to update the availability catalog. Currently only freeform tags can be updated via this api.

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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 2256

def update_occ_availability_catalog(update_occ_availability_catalog_details, occ_availability_catalog_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#update_occ_availability_catalog.' if logger

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

  path = '/occAvailabilityCatalogs/{occAvailabilityCatalogId}'.sub('{occAvailabilityCatalogId}', occ_availability_catalog_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_occ_availability_catalog_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#update_occ_availability_catalog') 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::CapacityManagement::Models::OccAvailabilityCatalog'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_occ_capacity_request(update_occ_capacity_request_details, occ_capacity_request_id, opts = {}) ⇒ Response

Note:

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

The request to update the capacity request. The user can perform actions like closing a partially completed request so that it doesn't go ahead for full completion.

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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 2321

def update_occ_capacity_request(update_occ_capacity_request_details, occ_capacity_request_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#update_occ_capacity_request.' if logger

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

  path = '/occCapacityRequests/{occCapacityRequestId}'.sub('{occCapacityRequestId}', occ_capacity_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_occ_capacity_request_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#update_occ_capacity_request') 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::CapacityManagement::Models::OccCapacityRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_occ_customer(update_occ_customer_details, occ_customer_group_id, occ_customer_id, opts = {}) ⇒ Response

Note:

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

The request to update the customer.

Parameters:

  • update_occ_customer_details (OCI::CapacityManagement::Models::UpdateOccCustomerDetails)

    Request to update the properties of the customer group.

  • occ_customer_group_id (String)

    The OCID of the customer group.

  • occ_customer_id (String)

    The tenancy id of the customer.

  • 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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 2389

def update_occ_customer(update_occ_customer_details, occ_customer_group_id, occ_customer_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#update_occ_customer.' if logger

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

  path = '/occCustomerGroups/{occCustomerGroupId}/occCustomers/{occCustomerId}'.sub('{occCustomerGroupId}', occ_customer_group_id.to_s).sub('{occCustomerId}', occ_customer_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_occ_customer_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#update_occ_customer') 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::CapacityManagement::Models::OccCustomer'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_occ_customer_group(update_occ_customer_group_details, occ_customer_group_id, opts = {}) ⇒ Response

Note:

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

The request to update the customer 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

  • :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 client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.

Returns:



2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
# File 'lib/oci/capacity_management/capacity_management_client.rb', line 2457

def update_occ_customer_group(update_occ_customer_group_details, occ_customer_group_id, opts = {})
  logger.debug 'Calling operation CapacityManagementClient#update_occ_customer_group.' if logger

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

  path = '/occCustomerGroups/{occCustomerGroupId}'.sub('{occCustomerGroupId}', occ_customer_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_occ_customer_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CapacityManagementClient#update_occ_customer_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::CapacityManagement::Models::OccCustomerGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end