Class: OCI::Opsi::OperationsInsightsClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/opsi/operations_insights_client.rb

Overview

Use the Operations Insights API to perform data extraction operations to obtain database resource utilization, performance statistics, and reference information. For more information, see [About Oracle Cloud Infrastructure Operations Insights](docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html).

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

Creates a new OperationsInsightsClient. 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/opsi/operations_insights_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 + '/20200630'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "OperationsInsightsClient 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/opsi/operations_insights_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/opsi/operations_insights_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/opsi/operations_insights_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/opsi/operations_insights_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#add_exadata_insight_members(add_exadata_insight_members_details, exadata_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/add_exadata_insight_members.rb.html) to see an example of how to use add_exadata_insight_members API.

Add new members (e.g. databases and hosts) to an Exadata system in Operations Insights. Exadata-related metric collection and analysis will be started.

Parameters:

  • add_exadata_insight_members_details (OCI::Opsi::Models::AddExadataInsightMembersDetails)

    Details for the members (e.g. databases and hosts) of an Exadata system to be added in Operations Insights.

  • exadata_insight_id (String)

    Unique Exadata insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



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
158
159
160
161
162
163
164
# File 'lib/oci/opsi/operations_insights_client.rb', line 125

def add_exadata_insight_members(add_exadata_insight_members_details, exadata_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#add_exadata_insight_members.' if logger

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

  path = '/exadataInsights/{exadataInsightId}/actions/addMembers'.sub('{exadataInsightId}', exadata_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(add_exadata_insight_members_details)

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

#change_database_insight_compartment(database_insight_id, change_database_insight_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/change_database_insight_compartment.rb.html) to see an example of how to use change_database_insight_compartment API.

Moves a DatabaseInsight resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.

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)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/oci/opsi/operations_insights_client.rb', line 196

def change_database_insight_compartment(database_insight_id, change_database_insight_compartment_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#change_database_insight_compartment.' if logger

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

  path = '/databaseInsights/{databaseInsightId}/actions/changeCompartment'.sub('{databaseInsightId}', database_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_database_insight_compartment_details)

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

#change_enterprise_manager_bridge_compartment(enterprise_manager_bridge_id, change_enterprise_manager_bridge_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/change_enterprise_manager_bridge_compartment.rb.html) to see an example of how to use change_enterprise_manager_bridge_compartment API.

Moves a EnterpriseManagerBridge resource from one compartment to another. When provided, If-Match is checked against ETag values of the resource.

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)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
290
291
292
293
294
295
296
297
# File 'lib/oci/opsi/operations_insights_client.rb', line 260

def change_enterprise_manager_bridge_compartment(enterprise_manager_bridge_id, change_enterprise_manager_bridge_compartment_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#change_enterprise_manager_bridge_compartment.' if logger

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

  path = '/enterpriseManagerBridges/{enterpriseManagerBridgeId}/actions/changeCompartment'.sub('{enterpriseManagerBridgeId}', enterprise_manager_bridge_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(change_enterprise_manager_bridge_compartment_details)

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

#change_exadata_insight_compartment(exadata_insight_id, change_exadata_insight_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/change_exadata_insight_compartment.rb.html) to see an example of how to use change_exadata_insight_compartment API.

Moves an Exadata insight resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.

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)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/oci/opsi/operations_insights_client.rb', line 329

def change_exadata_insight_compartment(exadata_insight_id, change_exadata_insight_compartment_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#change_exadata_insight_compartment.' if logger

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

  path = '/exadataInsights/{exadataInsightId}/actions/changeCompartment'.sub('{exadataInsightId}', exadata_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_exadata_insight_compartment_details)

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

#change_host_insight_compartment(host_insight_id, change_host_insight_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/change_host_insight_compartment.rb.html) to see an example of how to use change_host_insight_compartment API.

Moves a HostInsight resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.

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)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/oci/opsi/operations_insights_client.rb', line 400

def change_host_insight_compartment(host_insight_id, change_host_insight_compartment_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#change_host_insight_compartment.' if logger

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

  path = '/hostInsights/{hostInsightId}/actions/changeCompartment'.sub('{hostInsightId}', host_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_host_insight_compartment_details)

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

#create_awr_hub(create_awr_hub_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/create_awr_hub.rb.html) to see an example of how to use create_awr_hub API.

Create a AWR hub resource for the tenant in Operations Insights. This resource will be created in root compartment.

Parameters:

  • create_awr_hub_details (OCI::Opsi::Models::CreateAwrHubDetails)

    Details using which an AWR hub resource will be created in Operations Insights.

  • 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 that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

  • :opc_request_id (String)

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

Returns:



468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/oci/opsi/operations_insights_client.rb', line 468

def create_awr_hub(create_awr_hub_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#create_awr_hub.' if logger

  raise "Missing the required parameter 'create_awr_hub_details' when calling create_awr_hub." if create_awr_hub_details.nil?

  path = '/awrHubs'
  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_awr_hub_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#create_awr_hub') 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::Opsi::Models::AwrHub'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_database_insight(create_database_insight_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/create_database_insight.rb.html) to see an example of how to use create_database_insight API.

Create a Database Insight resource for a database in Operations Insights. The database will be enabled in Operations Insights. Database metric collection and analysis will be started.

Parameters:

  • create_database_insight_details (OCI::Opsi::Models::CreateDatabaseInsightDetails)

    Details for the database for which a Database Insight resource will be created in Operations Insights.

  • 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 that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

  • :opc_request_id (String)

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

Returns:



533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# File 'lib/oci/opsi/operations_insights_client.rb', line 533

def create_database_insight(create_database_insight_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#create_database_insight.' if logger

  raise "Missing the required parameter 'create_database_insight_details' when calling create_database_insight." if create_database_insight_details.nil?

  path = '/databaseInsights'
  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_database_insight_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#create_database_insight') 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::Opsi::Models::DatabaseInsight'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_enterprise_manager_bridge(create_enterprise_manager_bridge_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/create_enterprise_manager_bridge.rb.html) to see an example of how to use create_enterprise_manager_bridge API.

Create a Enterprise Manager bridge in Operations Insights.

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 that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

  • :opc_request_id (String)

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

Returns:



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
# File 'lib/oci/opsi/operations_insights_client.rb', line 598

def create_enterprise_manager_bridge(create_enterprise_manager_bridge_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#create_enterprise_manager_bridge.' if logger

  raise "Missing the required parameter 'create_enterprise_manager_bridge_details' when calling create_enterprise_manager_bridge." if create_enterprise_manager_bridge_details.nil?

  path = '/enterpriseManagerBridges'
  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_enterprise_manager_bridge_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#create_enterprise_manager_bridge') 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::Opsi::Models::EnterpriseManagerBridge'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_exadata_insight(create_exadata_insight_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/create_exadata_insight.rb.html) to see an example of how to use create_exadata_insight API.

Create an Exadata insight resource for an Exadata system in Operations Insights. The Exadata system will be enabled in Operations Insights. Exadata-related metric collection and analysis will be started.

Parameters:

  • create_exadata_insight_details (OCI::Opsi::Models::CreateExadataInsightDetails)

    Details for the Exadata system for which an Exadata insight resource will be created in Operations Insights.

  • 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 that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

  • :opc_request_id (String)

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

Returns:



663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/oci/opsi/operations_insights_client.rb', line 663

def create_exadata_insight(create_exadata_insight_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#create_exadata_insight.' if logger

  raise "Missing the required parameter 'create_exadata_insight_details' when calling create_exadata_insight." if create_exadata_insight_details.nil?

  path = '/exadataInsights'
  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_exadata_insight_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#create_exadata_insight') 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::Opsi::Models::ExadataInsight'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_host_insight(create_host_insight_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/create_host_insight.rb.html) to see an example of how to use create_host_insight API.

Create a Host Insight resource for a host in Operations Insights. The host will be enabled in Operations Insights. Host metric collection and analysis will be started.

Parameters:

  • create_host_insight_details (OCI::Opsi::Models::CreateHostInsightDetails)

    Details for the host for which a Host Insight resource will be created in Operations Insights.

  • 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 that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

  • :opc_request_id (String)

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

Returns:



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
# File 'lib/oci/opsi/operations_insights_client.rb', line 728

def create_host_insight(create_host_insight_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#create_host_insight.' if logger

  raise "Missing the required parameter 'create_host_insight_details' when calling create_host_insight." if create_host_insight_details.nil?

  path = '/hostInsights'
  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_host_insight_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#create_host_insight') 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::Opsi::Models::HostInsight'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_operations_insights_warehouse(create_operations_insights_warehouse_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/create_operations_insights_warehouse.rb.html) to see an example of how to use create_operations_insights_warehouse API.

Create a Operations Insights Warehouse resource for the tenant in Operations Insights. New ADW will be provisioned for this tenant. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

  • :opc_request_id (String)

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

Returns:



794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
# File 'lib/oci/opsi/operations_insights_client.rb', line 794

def create_operations_insights_warehouse(create_operations_insights_warehouse_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#create_operations_insights_warehouse.' if logger

  raise "Missing the required parameter 'create_operations_insights_warehouse_details' when calling create_operations_insights_warehouse." if create_operations_insights_warehouse_details.nil?

  path = '/operationsInsightsWarehouses'
  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_operations_insights_warehouse_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#create_operations_insights_warehouse') 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::Opsi::Models::OperationsInsightsWarehouse'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_operations_insights_warehouse_user(create_operations_insights_warehouse_user_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/create_operations_insights_warehouse_user.rb.html) to see an example of how to use create_operations_insights_warehouse_user API.

Create a Operations Insights Warehouse user resource for the tenant in Operations Insights. This resource will be created in root compartment.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

  • :opc_request_id (String)

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

Returns:



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
896
897
# File 'lib/oci/opsi/operations_insights_client.rb', line 860

def create_operations_insights_warehouse_user(create_operations_insights_warehouse_user_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#create_operations_insights_warehouse_user.' if logger

  raise "Missing the required parameter 'create_operations_insights_warehouse_user_details' when calling create_operations_insights_warehouse_user." if create_operations_insights_warehouse_user_details.nil?

  path = '/operationsInsightsWarehouseUsers'
  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_operations_insights_warehouse_user_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#create_operations_insights_warehouse_user') 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::Opsi::Models::OperationsInsightsWarehouseUser'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_awr_hub(awr_hub_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/delete_awr_hub.rb.html) to see an example of how to use delete_awr_hub API.

Deletes an AWR hub.

Parameters:

  • awr_hub_id (String)

    Unique Awr Hub identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
# File 'lib/oci/opsi/operations_insights_client.rb', line 921

def delete_awr_hub(awr_hub_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#delete_awr_hub.' if logger

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

  path = '/awrHubs/{awrHubId}'.sub('{awrHubId}', awr_hub_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: 'OperationsInsightsClient#delete_awr_hub') 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_database_insight(database_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/delete_database_insight.rb.html) to see an example of how to use delete_database_insight API.

Deletes a database insight. The database insight will be deleted and cannot be enabled again.

Parameters:

  • database_insight_id (String)

    Unique database insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
# File 'lib/oci/opsi/operations_insights_client.rb', line 981

def delete_database_insight(database_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#delete_database_insight.' if logger

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

  path = '/databaseInsights/{databaseInsightId}'.sub('{databaseInsightId}', database_insight_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: 'OperationsInsightsClient#delete_database_insight') 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_enterprise_manager_bridge(enterprise_manager_bridge_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/delete_enterprise_manager_bridge.rb.html) to see an example of how to use delete_enterprise_manager_bridge API.

Deletes an Operations Insights Enterprise Manager bridge. If any database insight is still referencing this bridge, the operation will fail.

Parameters:

  • enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
# File 'lib/oci/opsi/operations_insights_client.rb', line 1041

def delete_enterprise_manager_bridge(enterprise_manager_bridge_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#delete_enterprise_manager_bridge.' if logger

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

  path = '/enterpriseManagerBridges/{enterpriseManagerBridgeId}'.sub('{enterpriseManagerBridgeId}', enterprise_manager_bridge_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: 'OperationsInsightsClient#delete_enterprise_manager_bridge') 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_exadata_insight(exadata_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/delete_exadata_insight.rb.html) to see an example of how to use delete_exadata_insight API.

Deletes an Exadata insight. The Exadata insight will be deleted and cannot be enabled again.

Parameters:

  • exadata_insight_id (String)

    Unique Exadata insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
# File 'lib/oci/opsi/operations_insights_client.rb', line 1101

def delete_exadata_insight(exadata_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#delete_exadata_insight.' if logger

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

  path = '/exadataInsights/{exadataInsightId}'.sub('{exadataInsightId}', exadata_insight_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: 'OperationsInsightsClient#delete_exadata_insight') 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_host_insight(host_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/delete_host_insight.rb.html) to see an example of how to use delete_host_insight API.

Deletes a host insight. The host insight will be deleted and cannot be enabled again.

Parameters:

  • host_insight_id (String)

    Unique host insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
# File 'lib/oci/opsi/operations_insights_client.rb', line 1161

def delete_host_insight(host_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#delete_host_insight.' if logger

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

  path = '/hostInsights/{hostInsightId}'.sub('{hostInsightId}', host_insight_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: 'OperationsInsightsClient#delete_host_insight') 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_operations_insights_warehouse(operations_insights_warehouse_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/delete_operations_insights_warehouse.rb.html) to see an example of how to use delete_operations_insights_warehouse API.

Deletes an Operations Insights Warehouse. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. User must delete AWR Hub resource for this warehouse before calling this operation. User must delete the warehouse users before calling this operation.

Parameters:

  • operations_insights_warehouse_id (String)

    Unique Operations Insights Warehouse identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
# File 'lib/oci/opsi/operations_insights_client.rb', line 1225

def delete_operations_insights_warehouse(operations_insights_warehouse_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#delete_operations_insights_warehouse.' if logger

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

  path = '/operationsInsightsWarehouses/{operationsInsightsWarehouseId}'.sub('{operationsInsightsWarehouseId}', operations_insights_warehouse_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: 'OperationsInsightsClient#delete_operations_insights_warehouse') 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_operations_insights_warehouse_user(operations_insights_warehouse_user_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/delete_operations_insights_warehouse_user.rb.html) to see an example of how to use delete_operations_insights_warehouse_user API.

Deletes an Operations Insights Warehouse User.

Parameters:

  • operations_insights_warehouse_user_id (String)

    Unique Operations Insights Warehouse User identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/opsi/operations_insights_client.rb', line 1285

def delete_operations_insights_warehouse_user(operations_insights_warehouse_user_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#delete_operations_insights_warehouse_user.' if logger

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

  path = '/operationsInsightsWarehouseUsers/{operationsInsightsWarehouseUserId}'.sub('{operationsInsightsWarehouseUserId}', operations_insights_warehouse_user_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: 'OperationsInsightsClient#delete_operations_insights_warehouse_user') 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

#disable_database_insight(database_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/disable_database_insight.rb.html) to see an example of how to use disable_database_insight API.

Disables a database in Operations Insights. Database metric collection and analysis will be stopped.

Parameters:

  • database_insight_id (String)

    Unique database insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
# File 'lib/oci/opsi/operations_insights_client.rb', line 1352

def disable_database_insight(database_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#disable_database_insight.' if logger

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

  path = '/databaseInsights/{databaseInsightId}/actions/disable'.sub('{databaseInsightId}', database_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#disable_exadata_insight(exadata_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/disable_exadata_insight.rb.html) to see an example of how to use disable_exadata_insight API.

Disables an Exadata system in Operations Insights. Exadata-related metric collection and analysis will be stopped.

Parameters:

  • exadata_insight_id (String)

    Unique Exadata insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
# File 'lib/oci/opsi/operations_insights_client.rb', line 1421

def disable_exadata_insight(exadata_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#disable_exadata_insight.' if logger

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

  path = '/exadataInsights/{exadataInsightId}/actions/disable'.sub('{exadataInsightId}', exadata_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#disable_host_insight(host_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/disable_host_insight.rb.html) to see an example of how to use disable_host_insight API.

Disables a host in Operations Insights. Host metric collection and analysis will be stopped.

Parameters:

  • host_insight_id (String)

    Unique host insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



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
1523
1524
1525
1526
1527
1528
# File 'lib/oci/opsi/operations_insights_client.rb', line 1490

def disable_host_insight(host_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#disable_host_insight.' if logger

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

  path = '/hostInsights/{hostInsightId}/actions/disable'.sub('{hostInsightId}', host_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#disable_host_insight') 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

#download_operations_insights_warehouse_wallet(operations_insights_warehouse_id, download_operations_insights_warehouse_wallet_details, opts = {}, &block) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/download_operations_insights_warehouse_wallet.rb.html) to see an example of how to use download_operations_insights_warehouse_wallet API.

Download the ADW wallet for Operations Insights Warehouse using which the Hub data is exposed.

Parameters:

  • operations_insights_warehouse_id (String)

    Unique Operations Insights Warehouse identifier

  • download_operations_insights_warehouse_wallet_details (OCI::Opsi::Models::DownloadOperationsInsightsWarehouseWalletDetails)

    The information to be updated.

  • 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_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

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



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
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
# File 'lib/oci/opsi/operations_insights_client.rb', line 1558

def download_operations_insights_warehouse_wallet(operations_insights_warehouse_id, download_operations_insights_warehouse_wallet_details, opts = {}, &block)
  logger.debug 'Calling operation OperationsInsightsClient#download_operations_insights_warehouse_wallet.' if logger

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

  path = '/operationsInsightsWarehouses/{operationsInsightsWarehouseId}/actions/downloadWarehouseWallet'.sub('{operationsInsightsWarehouseId}', operations_insights_warehouse_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/octet-stream'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(download_operations_insights_warehouse_wallet_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#download_operations_insights_warehouse_wallet') do
    if !block.nil?
      @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: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @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: '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(
            :POST,
            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(
        :POST,
        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

#enable_database_insight(enable_database_insight_details, database_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/enable_database_insight.rb.html) to see an example of how to use enable_database_insight API.

Enables a database in Operations Insights. Database metric collection and analysis will be started.

Parameters:

  • enable_database_insight_details (OCI::Opsi::Models::EnableDatabaseInsightDetails)

    Details for the database to be enabled in Operations Insights.

  • database_insight_id (String)

    Unique database insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



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

def enable_database_insight(enable_database_insight_details, database_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#enable_database_insight.' if logger

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

  path = '/databaseInsights/{databaseInsightId}/actions/enable'.sub('{databaseInsightId}', database_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(enable_database_insight_details)

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

#enable_exadata_insight(enable_exadata_insight_details, exadata_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/enable_exadata_insight.rb.html) to see an example of how to use enable_exadata_insight API.

Enables an Exadata system in Operations Insights. Exadata-related metric collection and analysis will be started.

Parameters:

  • enable_exadata_insight_details (OCI::Opsi::Models::EnableExadataInsightDetails)

    Details for the Exadata system to be enabled in Operations Insights.

  • exadata_insight_id (String)

    Unique Exadata insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
# File 'lib/oci/opsi/operations_insights_client.rb', line 1744

def enable_exadata_insight(enable_exadata_insight_details, exadata_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#enable_exadata_insight.' if logger

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

  path = '/exadataInsights/{exadataInsightId}/actions/enable'.sub('{exadataInsightId}', exadata_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(enable_exadata_insight_details)

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

#enable_host_insight(enable_host_insight_details, host_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/enable_host_insight.rb.html) to see an example of how to use enable_host_insight API.

Enables a host in Operations Insights. Host metric collection and analysis will be started.

Parameters:

  • enable_host_insight_details (OCI::Opsi::Models::EnableHostInsightDetails)

    Details for the host to be enabled in Operations Insights.

  • host_insight_id (String)

    Unique host insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:

  • (Response)

    A Response object with data of type nil



1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
# File 'lib/oci/opsi/operations_insights_client.rb', line 1815

def enable_host_insight(enable_host_insight_details, host_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#enable_host_insight.' if logger

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

  path = '/hostInsights/{hostInsightId}/actions/enable'.sub('{hostInsightId}', host_insight_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(enable_host_insight_details)

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

#get_awr_hub(awr_hub_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_awr_hub.rb.html) to see an example of how to use get_awr_hub API.

Gets details of an AWR hub.

Parameters:

  • awr_hub_id (String)

    Unique Awr Hub identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

Returns:



1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
# File 'lib/oci/opsi/operations_insights_client.rb', line 1874

def get_awr_hub(awr_hub_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_awr_hub.' if logger

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

  path = '/awrHubs/{awrHubId}'.sub('{awrHubId}', awr_hub_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: 'OperationsInsightsClient#get_awr_hub') 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::Opsi::Models::AwrHub'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_awr_report(awr_hub_id, awr_source_database_identifier, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_awr_report.rb.html) to see an example of how to use get_awr_report API.

Gets the AWR report for the specified source database in the AWR hub. The difference between the timeGreaterThanOrEqualTo and timeLessThanOrEqualTo should not be greater than 7 days. Either beginSnapshotIdentifierGreaterThanOrEqualTo & endSnapshotIdentifierLessThanOrEqualTo params Or timeGreaterThanOrEqualTo & timeLessThanOrEqualTo params are required.

Parameters:

  • awr_hub_id (String)

    Unique Awr Hub identifier

  • awr_source_database_identifier (String)

    AWR source database identifier.

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

    the optional parameters

Options Hash (opts):

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

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

  • :report_format (String)

    The format of the AWR report. Default report format is HTML. (default to HTML)

  • :instance_number (String)

    The optional single value query parameter to filter by database instance number.

  • :begin_snapshot_identifier_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_snapshot_identifier_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot Identifier.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

  • :opc_request_id (String)

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

Returns:



1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
# File 'lib/oci/opsi/operations_insights_client.rb', line 1943

def get_awr_report(awr_hub_id, awr_source_database_identifier, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_awr_report.' if logger

  raise "Missing the required parameter 'awr_hub_id' when calling get_awr_report." if awr_hub_id.nil?
  raise "Missing the required parameter 'awr_source_database_identifier' when calling get_awr_report." if awr_source_database_identifier.nil?

  if opts[:report_format] && !OCI::Opsi::Models::AWR_REPORT_FORMAT_TYPE_ENUM.include?(opts[:report_format])
    raise 'Invalid value for "report_format", must be one of the values in OCI::Opsi::Models::AWR_REPORT_FORMAT_TYPE_ENUM.'
  end
  raise "Parameter value for 'awr_hub_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_hub_id)

  path = '/awrHubs/{awrHubId}/awrReport'.sub('{awrHubId}', awr_hub_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:awrSourceDatabaseIdentifier] = awr_source_database_identifier
  query_params[:reportFormat] = opts[:report_format] if opts[:report_format]
  query_params[:instanceNumber] = opts[:instance_number] if opts[:instance_number]
  query_params[:beginSnapshotIdentifierGreaterThanOrEqualTo] = opts[:begin_snapshot_identifier_greater_than_or_equal_to] if opts[:begin_snapshot_identifier_greater_than_or_equal_to]
  query_params[:endSnapshotIdentifierLessThanOrEqualTo] = opts[:end_snapshot_identifier_less_than_or_equal_to] if opts[:end_snapshot_identifier_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]

  # 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: 'OperationsInsightsClient#get_awr_report') 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::Opsi::Models::AwrReport'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_database_insight(database_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_database_insight.rb.html) to see an example of how to use get_database_insight API.

Gets details of a database insight.

Parameters:

  • database_insight_id (String)

    Unique database insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

Returns:



2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
# File 'lib/oci/opsi/operations_insights_client.rb', line 2011

def get_database_insight(database_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_database_insight.' if logger

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

  path = '/databaseInsights/{databaseInsightId}'.sub('{databaseInsightId}', database_insight_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: 'OperationsInsightsClient#get_database_insight') 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::Opsi::Models::DatabaseInsight'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_enterprise_manager_bridge(enterprise_manager_bridge_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_enterprise_manager_bridge.rb.html) to see an example of how to use get_enterprise_manager_bridge API.

Gets details of an Operations Insights Enterprise Manager bridge.

Parameters:

  • enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

Returns:



2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
# File 'lib/oci/opsi/operations_insights_client.rb', line 2067

def get_enterprise_manager_bridge(enterprise_manager_bridge_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_enterprise_manager_bridge.' if logger

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

  path = '/enterpriseManagerBridges/{enterpriseManagerBridgeId}'.sub('{enterpriseManagerBridgeId}', enterprise_manager_bridge_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: 'OperationsInsightsClient#get_enterprise_manager_bridge') 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::Opsi::Models::EnterpriseManagerBridge'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_exadata_insight(exadata_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_exadata_insight.rb.html) to see an example of how to use get_exadata_insight API.

Gets details of an Exadata insight.

Parameters:

  • exadata_insight_id (String)

    Unique Exadata insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

Returns:



2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
# File 'lib/oci/opsi/operations_insights_client.rb', line 2123

def get_exadata_insight(exadata_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_exadata_insight.' if logger

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

  path = '/exadataInsights/{exadataInsightId}'.sub('{exadataInsightId}', exadata_insight_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: 'OperationsInsightsClient#get_exadata_insight') 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::Opsi::Models::ExadataInsight'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_host_insight(host_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_host_insight.rb.html) to see an example of how to use get_host_insight API.

Gets details of a host insight.

Parameters:

  • host_insight_id (String)

    Unique host insight identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

Returns:



2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
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
# File 'lib/oci/opsi/operations_insights_client.rb', line 2179

def get_host_insight(host_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_host_insight.' if logger

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

  path = '/hostInsights/{hostInsightId}'.sub('{hostInsightId}', host_insight_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: 'OperationsInsightsClient#get_host_insight') 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::Opsi::Models::HostInsight'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_operations_insights_warehouse(operations_insights_warehouse_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_operations_insights_warehouse.rb.html) to see an example of how to use get_operations_insights_warehouse API.

Gets details of an Operations Insights Warehouse. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment.

Parameters:

  • operations_insights_warehouse_id (String)

    Unique Operations Insights Warehouse identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

Returns:



2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
# File 'lib/oci/opsi/operations_insights_client.rb', line 2237

def get_operations_insights_warehouse(operations_insights_warehouse_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_operations_insights_warehouse.' if logger

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

  path = '/operationsInsightsWarehouses/{operationsInsightsWarehouseId}'.sub('{operationsInsightsWarehouseId}', operations_insights_warehouse_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: 'OperationsInsightsClient#get_operations_insights_warehouse') 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::Opsi::Models::OperationsInsightsWarehouse'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_operations_insights_warehouse_user(operations_insights_warehouse_user_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_operations_insights_warehouse_user.rb.html) to see an example of how to use get_operations_insights_warehouse_user API.

Gets details of an Operations Insights Warehouse User.

Parameters:

  • operations_insights_warehouse_user_id (String)

    Unique Operations Insights Warehouse User identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

Returns:



2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
# File 'lib/oci/opsi/operations_insights_client.rb', line 2293

def get_operations_insights_warehouse_user(operations_insights_warehouse_user_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_operations_insights_warehouse_user.' if logger

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

  path = '/operationsInsightsWarehouseUsers/{operationsInsightsWarehouseUserId}'.sub('{operationsInsightsWarehouseUserId}', operations_insights_warehouse_user_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: 'OperationsInsightsClient#get_operations_insights_warehouse_user') 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::Opsi::Models::OperationsInsightsWarehouseUser'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/get_work_request.rb.html) to see an example of how to use get_work_request API.

Gets the status of the work request with the given ID.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous 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)

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

Returns:



2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
# File 'lib/oci/opsi/operations_insights_client.rb', line 2349

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#get_work_request.' if logger

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

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_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: 'OperationsInsightsClient#get_work_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::Opsi::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#ingest_database_configuration(ingest_database_configuration_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/ingest_database_configuration.rb.html) to see an example of how to use ingest_database_configuration API.

This is a generic ingest endpoint for all database configuration metrics.

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

  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :opc_request_id (String)

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update 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_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:



2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
# File 'lib/oci/opsi/operations_insights_client.rb', line 2420

def ingest_database_configuration(ingest_database_configuration_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#ingest_database_configuration.' if logger

  raise "Missing the required parameter 'ingest_database_configuration_details' when calling ingest_database_configuration." if ingest_database_configuration_details.nil?

  path = '/databaseInsights/actions/ingestDatabaseConfiguration'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]

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

  post_body = @api_client.object_to_http_body(ingest_database_configuration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_database_configuration') 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::Opsi::Models::IngestDatabaseConfigurationResponseDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#ingest_host_configuration(id, ingest_host_configuration_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/ingest_host_configuration.rb.html) to see an example of how to use ingest_host_configuration API.

This is a generic ingest endpoint for all the host configuration metrics

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update 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_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:



2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
# File 'lib/oci/opsi/operations_insights_client.rb', line 2493

def ingest_host_configuration(id, ingest_host_configuration_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#ingest_host_configuration.' if logger

  raise "Missing the required parameter 'id' when calling ingest_host_configuration." if id.nil?
  raise "Missing the required parameter 'ingest_host_configuration_details' when calling ingest_host_configuration." if ingest_host_configuration_details.nil?

  path = '/hostInsights/actions/ingestHostConfiguration'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(ingest_host_configuration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_host_configuration') 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::Opsi::Models::IngestHostConfigurationResponseDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#ingest_host_metrics(id, ingest_host_metrics_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/ingest_host_metrics.rb.html) to see an example of how to use ingest_host_metrics API.

This is a generic ingest endpoint for all the host performance metrics

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update 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_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:



2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
# File 'lib/oci/opsi/operations_insights_client.rb', line 2566

def ingest_host_metrics(id, ingest_host_metrics_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#ingest_host_metrics.' if logger

  raise "Missing the required parameter 'id' when calling ingest_host_metrics." if id.nil?
  raise "Missing the required parameter 'ingest_host_metrics_details' when calling ingest_host_metrics." if ingest_host_metrics_details.nil?

  path = '/hostInsights/actions/ingestHostMetrics'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(ingest_host_metrics_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_host_metrics') 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::Opsi::Models::IngestHostMetricsResponseDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#ingest_sql_bucket(ingest_sql_bucket_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/ingest_sql_bucket.rb.html) to see an example of how to use ingest_sql_bucket API.

The sqlbucket endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline. Either databaseId or id must be specified.

Parameters:

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :opc_request_id (String)

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update 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_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:



2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
# File 'lib/oci/opsi/operations_insights_client.rb', line 2644

def ingest_sql_bucket(ingest_sql_bucket_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#ingest_sql_bucket.' if logger

  raise "Missing the required parameter 'ingest_sql_bucket_details' when calling ingest_sql_bucket." if ingest_sql_bucket_details.nil?

  path = '/databaseInsights/actions/ingestSqlBucket'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]

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

  post_body = @api_client.object_to_http_body(ingest_sql_bucket_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_sql_bucket') 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::Opsi::Models::IngestSqlBucketResponseDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#ingest_sql_plan_lines(ingest_sql_plan_lines_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/ingest_sql_plan_lines.rb.html) to see an example of how to use ingest_sql_plan_lines API.

The SqlPlanLines endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. Either databaseId or id must be specified.

Parameters:

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :opc_request_id (String)

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update 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_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:



2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
# File 'lib/oci/opsi/operations_insights_client.rb', line 2723

def ingest_sql_plan_lines(ingest_sql_plan_lines_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#ingest_sql_plan_lines.' if logger

  raise "Missing the required parameter 'ingest_sql_plan_lines_details' when calling ingest_sql_plan_lines." if ingest_sql_plan_lines_details.nil?

  path = '/databaseInsights/actions/ingestSqlPlanLines'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]

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

  post_body = @api_client.object_to_http_body(ingest_sql_plan_lines_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_sql_plan_lines') 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::Opsi::Models::IngestSqlPlanLinesResponseDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#ingest_sql_stats(ingest_sql_stats_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/ingest_sql_stats.rb.html) to see an example of how to use ingest_sql_stats API.

The SQL Stats endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline. Either databaseId or id must be specified.

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

  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :opc_request_id (String)

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update 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_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:



2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
# File 'lib/oci/opsi/operations_insights_client.rb', line 2801

def ingest_sql_stats(ingest_sql_stats_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#ingest_sql_stats.' if logger

  raise "Missing the required parameter 'ingest_sql_stats_details' when calling ingest_sql_stats." if ingest_sql_stats_details.nil?

  path = '/databaseInsights/actions/ingestSqlStatsMetric'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]

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

  post_body = @api_client.object_to_http_body(ingest_sql_stats_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_sql_stats') 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::Opsi::Models::IngestSqlStatsResponseDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#ingest_sql_text(ingest_sql_text_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/ingest_sql_text.rb.html) to see an example of how to use ingest_sql_text API.

The SqlText endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. Either databaseId or id must be specified. Disclaimer: SQL text being uploaded explicitly via APIs is not masked. Any sensitive literals contained in the sqlFullText column should be masked prior to ingestion.

Parameters:

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :opc_request_id (String)

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update 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_retry_token (String)

    A token that uniquely identifies a request that can be retried in case of a timeout or server error without risk of executing the same action again. Retry tokens expire after 24 hours.

    Note: Retry tokens can be invalidated before the 24 hour time limit due to conflicting operations, such as a resource being deleted or purged from the system.

Returns:



2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
# File 'lib/oci/opsi/operations_insights_client.rb', line 2880

def ingest_sql_text(ingest_sql_text_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#ingest_sql_text.' if logger

  raise "Missing the required parameter 'ingest_sql_text_details' when calling ingest_sql_text." if ingest_sql_text_details.nil?

  path = '/databaseInsights/actions/ingestSqlText'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]

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

  post_body = @api_client.object_to_http_body(ingest_sql_text_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_sql_text') 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::Opsi::Models::IngestSqlTextResponseDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_awr_hubs(operations_insights_warehouse_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_awr_hubs.rb.html) to see an example of how to use list_awr_hubs API.

Gets a list of AWR hubs. Either compartmentId or id must be specified. All these resources are expected to be in root compartment.

Allowed values are: timeCreated, displayName

Parameters:

  • operations_insights_warehouse_id (String)

    Unique Operations Insights Warehouse identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :display_name (String)

    A filter to return only resources that match the entire display name.

  • :id (String)

    Unique Awr Hub identifier

  • :lifecycle_state (Array<String>)

    Lifecycle states (default to []) Allowed values are: CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

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

  • :opc_request_id (String)

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

Returns:



2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
# File 'lib/oci/opsi/operations_insights_client.rb', line 2962

def list_awr_hubs(operations_insights_warehouse_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_awr_hubs.' if logger

  raise "Missing the required parameter 'operations_insights_warehouse_id' when calling list_awr_hubs." if operations_insights_warehouse_id.nil?


  lifecycle_state_allowable_values = %w[CREATING UPDATING ACTIVE DELETING DELETED FAILED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED.'
      end
    end
  end

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

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

  path = '/awrHubs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:operationsInsightsWarehouseId] = operations_insights_warehouse_id
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  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: 'OperationsInsightsClient#list_awr_hubs') 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::Opsi::Models::AwrHubSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_awr_snapshots(awr_hub_id, awr_source_database_identifier, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_awr_snapshots.rb.html) to see an example of how to use list_awr_snapshots API.

Lists AWR snapshots for the specified source database in the AWR hub. The difference between the timeGreaterThanOrEqualTo and timeLessThanOrEqualTo should not exceed an elapsed range of 1 day. The timeGreaterThanOrEqualTo & timeLessThanOrEqualTo params are optional. If these params are not provided, by default last 1 day snapshots will be returned.

Parameters:

  • awr_hub_id (String)

    Unique Awr Hub identifier

  • awr_source_database_identifier (String)

    AWR source database identifier.

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

    the optional parameters

Options Hash (opts):

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

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

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The option to sort the AWR snapshot summary data. Default sort is by timeBegin. (default to timeBegin) Allowed values are: timeBegin, snapshotId

  • :opc_request_id (String)

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

Returns:



3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
# File 'lib/oci/opsi/operations_insights_client.rb', line 3065

def list_awr_snapshots(awr_hub_id, awr_source_database_identifier, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_awr_snapshots.' if logger

  raise "Missing the required parameter 'awr_hub_id' when calling list_awr_snapshots." if awr_hub_id.nil?
  raise "Missing the required parameter 'awr_source_database_identifier' when calling list_awr_snapshots." if awr_source_database_identifier.nil?

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

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

  path = '/awrHubs/{awrHubId}/awrSnapshots'.sub('{awrHubId}', awr_hub_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:awrSourceDatabaseIdentifier] = awr_source_database_identifier
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_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: 'OperationsInsightsClient#list_awr_snapshots') 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::Opsi::Models::AwrSnapshotCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_database_configurations(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_database_configurations.rb.html) to see an example of how to use list_database_configurations API.

Gets a list of database insight configurations based on the query parameters specified. Either compartmentId or databaseInsightId query parameter must be specified. When both compartmentId and compartmentIdInSubtree are specified, a list of database insight configurations in that compartment and in all sub-compartments will be returned.

Allowed values are: databaseName, databaseDisplayName, databaseType

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Database configuration list sort options. If fields parameter is selected, the sortBy parameter must be one of the fields specified. (default to databaseName)

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
# File 'lib/oci/opsi/operations_insights_client.rb', line 3192

def list_database_configurations(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_database_configurations.' if logger



  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

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

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

  path = '/databaseInsights/databaseConfigurations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:enterpriseManagerBridgeId] = opts[:enterprise_manager_bridge_id] if opts[:enterprise_manager_bridge_id]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_database_configurations') 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::Opsi::Models::DatabaseConfigurationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_database_insights(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_database_insights.rb.html) to see an example of how to use list_database_insights API.

Gets a list of database insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. When both compartmentId and compartmentIdInSubtree are specified, a list of database insights in that compartment and in all sub-compartments will be returned.

Allowed values are: compartmentId, databaseName, databaseDisplayName, databaseType, databaseVersion, databaseHostNames, freeformTags, definedTags

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :status (Array<String>)

    Resource Status (default to [ENABLED]) Allowed values are: DISABLED, ENABLED, TERMINATED

  • :lifecycle_state (Array<String>)

    Lifecycle states (default to [ACTIVE]) Allowed values are: CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, NEEDS_ATTENTION

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :fields (Array<String>)

    Specifies the fields to return in a database summary response. By default all fields are returned if omitted. (default to [])

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Database insight list sort options. If fields parameter is selected, the sortBy parameter must be one of the fields specified.

    Allowed values are: databaseName, databaseDisplayName, databaseType

  • :exadata_insight_id (String)
  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

  • :opc_request_id (String)

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

Returns:



3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
# File 'lib/oci/opsi/operations_insights_client.rb', line 3318

def list_database_insights(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_database_insights.' if logger



  status_allowable_values = %w[DISABLED ENABLED TERMINATED]
  if opts[:status] && !opts[:status].empty?
    opts[:status].each do |val_to_check|
      unless status_allowable_values.include?(val_to_check)
        raise 'Invalid value for "status", must be one of DISABLED, ENABLED, TERMINATED.'
      end
    end
  end


  lifecycle_state_allowable_values = %w[CREATING UPDATING ACTIVE DELETING DELETED FAILED NEEDS_ATTENTION]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, NEEDS_ATTENTION.'
      end
    end
  end


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end


  fields_allowable_values = %w[compartmentId databaseName databaseDisplayName databaseType databaseVersion databaseHostNames freeformTags definedTags]
  if opts[:fields] && !opts[:fields].empty?
    opts[:fields].each do |val_to_check|
      unless fields_allowable_values.include?(val_to_check)
        raise 'Invalid value for "fields", must be one of compartmentId, databaseName, databaseDisplayName, databaseType, databaseVersion, databaseHostNames, freeformTags, definedTags.'
      end
    end
  end

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

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

  path = '/databaseInsights'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:enterpriseManagerBridgeId] = opts[:enterprise_manager_bridge_id] if opts[:enterprise_manager_bridge_id]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:status] = OCI::ApiClient.build_collection_params(opts[:status], :multi) if opts[:status] && !opts[:status].empty?
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:fields] = OCI::ApiClient.build_collection_params(opts[:fields], :multi) if opts[:fields] && !opts[:fields].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:exadataInsightId] = opts[:exadata_insight_id] if opts[:exadata_insight_id]
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_database_insights') 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::Opsi::Models::DatabaseInsightsCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_enterprise_manager_bridges(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_enterprise_manager_bridges.rb.html) to see an example of how to use list_enterprise_manager_bridges API.

Gets a list of Operations Insights Enterprise Manager bridges. Either compartmentId or id must be specified. When both compartmentId and compartmentIdInSubtree are specified, a list of bridges in that compartment and in all sub-compartments will be returned.

Allowed values are: timeCreated, displayName

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :display_name (String)

    A filter to return only resources that match the entire display name.

  • :id (String)

    Unique Enterprise Manager bridge identifier

  • :lifecycle_state (Array<String>)

    Lifecycle states (default to [ACTIVE]) Allowed values are: CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, NEEDS_ATTENTION

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

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

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

  • :opc_request_id (String)

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

Returns:



3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
# File 'lib/oci/opsi/operations_insights_client.rb', line 3457

def list_enterprise_manager_bridges(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_enterprise_manager_bridges.' if logger



  lifecycle_state_allowable_values = %w[CREATING UPDATING ACTIVE DELETING DELETED FAILED NEEDS_ATTENTION]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, NEEDS_ATTENTION.'
      end
    end
  end

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

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

  path = '/enterpriseManagerBridges'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_enterprise_manager_bridges') 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::Opsi::Models::EnterpriseManagerBridgeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_exadata_configurations(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_exadata_configurations.rb.html) to see an example of how to use list_exadata_configurations API.

Gets a list of exadata insight configurations. Either compartmentId or exadataInsightsId query parameter must be specified.

Allowed values are: exadataName, exadataDisplayName, exadataType

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Exadata configuration list sort options. If fields parameter is selected, the sortBy parameter must be one of the fields specified. (default to exadataName)

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :opc_request_id (String)

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

Returns:



3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
# File 'lib/oci/opsi/operations_insights_client.rb', line 3579

def list_exadata_configurations(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_exadata_configurations.' if logger


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

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

  path = '/exadataInsights/exadataConfigurations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?

  # 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: 'OperationsInsightsClient#list_exadata_configurations') 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::Opsi::Models::ExadataConfigurationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_exadata_insights(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_exadata_insights.rb.html) to see an example of how to use list_exadata_insights API.

Gets a list of Exadata insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. When both compartmentId and compartmentIdInSubtree are specified, a list of Exadata insights in that compartment and in all sub-compartments will be returned.

Allowed values are: timeCreated, exadataName

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

  • :id (Array<String>)

    Optional list of Exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :status (Array<String>)

    Resource Status (default to [ENABLED]) Allowed values are: DISABLED, ENABLED, TERMINATED

  • :lifecycle_state (Array<String>)

    Lifecycle states (default to [ACTIVE]) Allowed values are: CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, NEEDS_ATTENTION

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Exadata insight list sort options. If fields parameter is selected, the sortBy parameter must be one of the fields specified. Default order for timeCreated is descending. Default order for exadataName is ascending. If no value is specified timeCreated is default. (default to timeCreated)

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

  • :opc_request_id (String)

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

Returns:



3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
# File 'lib/oci/opsi/operations_insights_client.rb', line 3681

def list_exadata_insights(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_exadata_insights.' if logger



  status_allowable_values = %w[DISABLED ENABLED TERMINATED]
  if opts[:status] && !opts[:status].empty?
    opts[:status].each do |val_to_check|
      unless status_allowable_values.include?(val_to_check)
        raise 'Invalid value for "status", must be one of DISABLED, ENABLED, TERMINATED.'
      end
    end
  end


  lifecycle_state_allowable_values = %w[CREATING UPDATING ACTIVE DELETING DELETED FAILED NEEDS_ATTENTION]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, NEEDS_ATTENTION.'
      end
    end
  end

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

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

  path = '/exadataInsights'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:enterpriseManagerBridgeId] = opts[:enterprise_manager_bridge_id] if opts[:enterprise_manager_bridge_id]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:status] = OCI::ApiClient.build_collection_params(opts[:status], :multi) if opts[:status] && !opts[:status].empty?
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_exadata_insights') 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::Opsi::Models::ExadataInsightSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_configurations(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_host_configurations.rb.html) to see an example of how to use list_host_configurations API.

Gets a list of host insight configurations based on the query parameters specified. Either compartmentId or hostInsightId query parameter must be specified. When both compartmentId and compartmentIdInSubtree are specified, a list of host insight configurations in that compartment and in all sub-compartments will be returned.

Allowed values are: hostName, platformType

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

  • :id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Host configuration list sort options. (default to hostName)

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
# File 'lib/oci/opsi/operations_insights_client.rb', line 3824

def list_host_configurations(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_host_configurations.' if logger



  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

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

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

  path = '/hostInsights/hostConfigurations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:enterpriseManagerBridgeId] = opts[:enterprise_manager_bridge_id] if opts[:enterprise_manager_bridge_id]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_host_configurations') 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::Opsi::Models::HostConfigurationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_insights(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_host_insights.rb.html) to see an example of how to use list_host_insights API.

Gets a list of host insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. When both compartmentId and compartmentIdInSubtree are specified, a list of host insights in that compartment and in all sub-compartments will be returned.

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :status (Array<String>)

    Resource Status (default to [ENABLED]) Allowed values are: DISABLED, ENABLED, TERMINATED

  • :lifecycle_state (Array<String>)

    Lifecycle states (default to [ACTIVE]) Allowed values are: CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, NEEDS_ATTENTION

  • :host_type (Array<String>)

    Filter by one or more host types. Possible value is EXTERNAL-HOST.

    (default to [])
    
  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Host insight list sort options. If fields parameter is selected, the sortBy parameter must be one of the fields specified.

    Allowed values are: hostName, hostType

  • :enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

  • :exadata_insight_id (String)
  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

  • :opc_request_id (String)

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

Returns:



3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
# File 'lib/oci/opsi/operations_insights_client.rb', line 3946

def list_host_insights(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_host_insights.' if logger



  status_allowable_values = %w[DISABLED ENABLED TERMINATED]
  if opts[:status] && !opts[:status].empty?
    opts[:status].each do |val_to_check|
      unless status_allowable_values.include?(val_to_check)
        raise 'Invalid value for "status", must be one of DISABLED, ENABLED, TERMINATED.'
      end
    end
  end


  lifecycle_state_allowable_values = %w[CREATING UPDATING ACTIVE DELETING DELETED FAILED NEEDS_ATTENTION]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, NEEDS_ATTENTION.'
      end
    end
  end


  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

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

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

  path = '/hostInsights'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:status] = OCI::ApiClient.build_collection_params(opts[:status], :multi) if opts[:status] && !opts[:status].empty?
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:hostType] = OCI::ApiClient.build_collection_params(opts[:host_type], :multi) if opts[:host_type] && !opts[:host_type].empty?
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:enterpriseManagerBridgeId] = opts[:enterprise_manager_bridge_id] if opts[:enterprise_manager_bridge_id]
  query_params[:exadataInsightId] = opts[:exadata_insight_id] if opts[:exadata_insight_id]
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_host_insights') 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::Opsi::Models::HostInsightSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_hosted_entities(compartment_id, id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_hosted_entities.rb.html) to see an example of how to use list_hosted_entities API.

Get a list of hosted entities details.

Parameters:

Options Hash (opts):

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

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :exadata_insight_id (String)
  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Hosted entity list sort options.

    Allowed values are: entityName, entityType

  • :opc_request_id (String)

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

Returns:



4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
# File 'lib/oci/opsi/operations_insights_client.rb', line 4092

def list_hosted_entities(compartment_id, id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_hosted_entities.' if logger

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


  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

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

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

  path = '/hostInsights/hostedEntities'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:id] = id
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:exadataInsightId] = opts[:exadata_insight_id] if opts[:exadata_insight_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: 'OperationsInsightsClient#list_hosted_entities') 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::Opsi::Models::HostedEntityCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_importable_agent_entities.rb.html) to see an example of how to use list_importable_agent_entities API.

Gets a list of agent entities available to add a new hostInsight. An agent entity is \“available\” and will be shown if all the following conditions are true:

1.  The agent OCID is not already being used for an existing hostInsight.
2.  The agent availabilityStatus = 'ACTIVE'
3.  The agent lifecycleState = 'ACTIVE'

Parameters:

Options Hash (opts):

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

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

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Hosted entity list sort options.

    Allowed values are: entityName, entityType

  • :opc_request_id (String)

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

Returns:



4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
# File 'lib/oci/opsi/operations_insights_client.rb', line 4197

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

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

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

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

  path = '/importableAgentEntities'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[: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: 'OperationsInsightsClient#list_importable_agent_entities') 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::Opsi::Models::ImportableAgentEntitySummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_importable_enterprise_manager_entities(enterprise_manager_bridge_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_importable_enterprise_manager_entities.rb.html) to see an example of how to use list_importable_enterprise_manager_entities API.

Gets a list of importable entities for an Operations Insights Enterprise Manager bridge that have not been imported before.

Parameters:

  • enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :enterprise_manager_entity_type (Array<String>)

    Filter by one or more Enterprise Manager entity types. Currently, the supported types are \“oracle_pdb\”, \“oracle_database\”, \“host\”, \“oracle_dbmachine\”, \“oracle_exa_cloud_service\”, and \“oracle_oci_exadata_cloud_service\”. If this parameter is not specified, targets of all supported entity types are returned by default. (default to [])

  • :enterprise_manager_identifier (String)

    Used in combination with enterpriseManagerParentEntityIdentifier to return the members of a particular Enterprise Manager parent entity. Both enterpriseManagerIdentifier and enterpriseManagerParentEntityIdentifier must be specified to identify a particular Enterprise Manager parent entity.

  • :enterprise_manager_parent_entity_identifier (String)

    Used in combination with enterpriseManagerIdentifier to return the members of a particular Enterprise Manager parent entity. Both enterpriseManagerIdentifier and enterpriseManagerParentEntityIdentifier must be specified to identify a particular Enterprise Manager parent entity.

  • :opc_request_id (String)

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

Returns:



4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
# File 'lib/oci/opsi/operations_insights_client.rb', line 4282

def list_importable_enterprise_manager_entities(enterprise_manager_bridge_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_importable_enterprise_manager_entities.' if logger

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

  path = '/enterpriseManagerBridges/{enterpriseManagerBridgeId}/importableEnterpriseManagerEntities'.sub('{enterpriseManagerBridgeId}', enterprise_manager_bridge_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:enterpriseManagerEntityType] = OCI::ApiClient.build_collection_params(opts[:enterprise_manager_entity_type], :multi) if opts[:enterprise_manager_entity_type] && !opts[:enterprise_manager_entity_type].empty?
  query_params[:enterpriseManagerIdentifier] = opts[:enterprise_manager_identifier] if opts[:enterprise_manager_identifier]
  query_params[:enterpriseManagerParentEntityIdentifier] = opts[:enterprise_manager_parent_entity_identifier] if opts[:enterprise_manager_parent_entity_identifier]

  # 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: 'OperationsInsightsClient#list_importable_enterprise_manager_entities') 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::Opsi::Models::ImportableEnterpriseManagerEntityCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_operations_insights_warehouse_users(operations_insights_warehouse_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_operations_insights_warehouse_users.rb.html) to see an example of how to use list_operations_insights_warehouse_users API.

Gets a list of Operations Insights Warehouse users. Either compartmentId or id must be specified. All these resources are expected to be in root compartment.

Allowed values are: timeCreated, displayName

Parameters:

  • operations_insights_warehouse_id (String)

    Unique Operations Insights Warehouse identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :display_name (String)

    A filter to return only resources that match the entire display name.

  • :id (String)

    Unique Operations Insights Warehouse User identifier

  • :lifecycle_state (Array<String>)

    Lifecycle states (default to []) Allowed values are: CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

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

  • :opc_request_id (String)

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

Returns:



4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
# File 'lib/oci/opsi/operations_insights_client.rb', line 4364

def list_operations_insights_warehouse_users(operations_insights_warehouse_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_operations_insights_warehouse_users.' if logger

  raise "Missing the required parameter 'operations_insights_warehouse_id' when calling list_operations_insights_warehouse_users." if operations_insights_warehouse_id.nil?


  lifecycle_state_allowable_values = %w[CREATING UPDATING ACTIVE DELETING DELETED FAILED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED.'
      end
    end
  end

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

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

  path = '/operationsInsightsWarehouseUsers'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:operationsInsightsWarehouseId] = operations_insights_warehouse_id
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  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: 'OperationsInsightsClient#list_operations_insights_warehouse_users') 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::Opsi::Models::OperationsInsightsWarehouseUserSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_operations_insights_warehouses(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_operations_insights_warehouses.rb.html) to see an example of how to use list_operations_insights_warehouses API.

Gets a list of Operations Insights warehouses. Either compartmentId or id must be specified. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment.

Allowed values are: timeCreated, displayName

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :display_name (String)

    A filter to return only resources that match the entire display name.

  • :id (String)

    Unique Operations Insights Warehouse identifier

  • :lifecycle_state (Array<String>)

    Lifecycle states (default to []) Allowed values are: CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

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

  • :opc_request_id (String)

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

Returns:



4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
# File 'lib/oci/opsi/operations_insights_client.rb', line 4467

def list_operations_insights_warehouses(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_operations_insights_warehouses.' if logger



  lifecycle_state_allowable_values = %w[CREATING UPDATING ACTIVE DELETING DELETED FAILED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED.'
      end
    end
  end

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

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

  path = '/operationsInsightsWarehouses'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  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: 'OperationsInsightsClient#list_operations_insights_warehouses') 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::Opsi::Models::OperationsInsightsWarehouseSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_sql_plans(compartment_id, sql_identifier, plan_hash, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_sql_plans.rb.html) to see an example of how to use list_sql_plans API.

Query SQL Warehouse to list the plan xml for a given SQL execution plan. This returns a SqlPlanCollection object, but is currently limited to a single plan. Either databaseId or id must be specified.

Parameters:

  • compartment_id (String)
  • sql_identifier (String)

    Unique SQL_ID for a SQL Statement. Example: 6rgjh9bjmy2s7

  • plan_hash (Array<Integer>)

    Unique plan hash for a SQL Plan of a particular SQL Statement. Example: 9820154385

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

    the optional parameters

Options Hash (opts):

Returns:



4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
# File 'lib/oci/opsi/operations_insights_client.rb', line 4563

def list_sql_plans(compartment_id, sql_identifier, plan_hash, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_sql_plans.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_sql_plans." if compartment_id.nil?
  raise "Missing the required parameter 'sql_identifier' when calling list_sql_plans." if sql_identifier.nil?
  raise "Missing the required parameter 'plan_hash' when calling list_sql_plans." if plan_hash.nil?

  path = '/databaseInsights/sqlPlans'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sqlIdentifier] = sql_identifier
  query_params[:planHash] = OCI::ApiClient.build_collection_params(plan_hash, :multi)
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:page] = opts[:page] if opts[:page]

  # 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: 'OperationsInsightsClient#list_sql_plans') 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::Opsi::Models::SqlPlanCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_sql_searches(compartment_id, sql_identifier, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_sql_searches.rb.html) to see an example of how to use list_sql_searches API.

Search SQL by SQL Identifier across databases in a compartment and in all sub-compartments if specified. And get the SQL Text and the details of the databases executing the SQL for a given time period.

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
# File 'lib/oci/opsi/operations_insights_client.rb', line 4674

def list_sql_searches(compartment_id, sql_identifier, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_sql_searches.' if logger

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

  path = '/databaseInsights/sqlSearches'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sqlIdentifier] = sql_identifier
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_sql_searches') 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::Opsi::Models::SqlSearchCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_sql_texts(compartment_id, sql_identifier, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_sql_texts.rb.html) to see an example of how to use list_sql_texts API.

Query SQL Warehouse to get the full SQL Text for a SQL in a compartment and in all sub-compartments if specified.

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

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the assosicated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. (default to [])

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
# File 'lib/oci/opsi/operations_insights_client.rb', line 4776

def list_sql_texts(compartment_id, sql_identifier, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_sql_texts.' if logger

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

  path = '/databaseInsights/sqlTexts'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sqlIdentifier] = OCI::ApiClient.build_collection_params(sql_identifier, :multi)
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_sql_texts') 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::Opsi::Models::SqlTextCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_errors(work_request_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.

Return a (paginated) list of errors for a given work request.

Allowed values are: timeAccepted

Parameters:

  • work_request_id (String)

    The ID of the asynchronous 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)

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

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :sort_by (String)

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

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

Returns:



4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
# File 'lib/oci/opsi/operations_insights_client.rb', line 4858

def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?

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

  if opts[:sort_order] && !OCI::Opsi::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Opsi::Models::SORT_ORDER_ENUM.'
  end
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_work_request_errors') 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::Opsi::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_logs(work_request_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.

Return a (paginated) list of logs for a given work request.

Allowed values are: timeAccepted

Parameters:

  • work_request_id (String)

    The ID of the asynchronous 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)

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

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :sort_by (String)

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

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

Returns:



4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
# File 'lib/oci/opsi/operations_insights_client.rb', line 4942

def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?

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

  if opts[:sort_order] && !OCI::Opsi::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Opsi::Models::SORT_ORDER_ENUM.'
  end
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_work_request_logs') 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::Opsi::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_requests(opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/list_work_requests.rb.html) to see an example of how to use list_work_requests API.

Lists the work requests in a compartment. Either compartmentId or id must be specified. Only one of id, resourceId or relatedResourceId can be specified optionally.

Allowed values are: timeAccepted

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :compartment_id (String)
  • :id (String)

    The ID of the asynchronous work request.

  • :status (String)

    A filter to return only resources their lifecycleState matches the given OperationStatus.

  • :resource_id (String)

    The ID of the resource affected by the work request.

  • :related_resource_id (String)

    The ID of the related resource for the resource affected by the work request, e.g. the related Exadata Insight OCID of the Database Insight work request

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

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

Returns:



5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
# File 'lib/oci/opsi/operations_insights_client.rb', line 5030

def list_work_requests(opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#list_work_requests.' if logger


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

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

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

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  query_params[:relatedResourceId] = opts[:related_resource_id] if opts[:related_resource_id]
  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: 'OperationsInsightsClient#list_work_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::Opsi::Models::WorkRequestCollection'
    )
  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/opsi/operations_insights_client.rb', line 94

def logger
  @api_client.config.logger
end

#rotate_operations_insights_warehouse_wallet(operations_insights_warehouse_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/rotate_operations_insights_warehouse_wallet.rb.html) to see an example of how to use rotate_operations_insights_warehouse_wallet API.

Rotate the ADW wallet for Operations Insights Warehouse using which the Hub data is exposed.

Parameters:

  • operations_insights_warehouse_id (String)

    Unique Operations Insights Warehouse identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update 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



5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
# File 'lib/oci/opsi/operations_insights_client.rb', line 5109

def rotate_operations_insights_warehouse_wallet(operations_insights_warehouse_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#rotate_operations_insights_warehouse_wallet.' if logger

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

  path = '/operationsInsightsWarehouses/{operationsInsightsWarehouseId}/actions/rotateWarehouseWallet'.sub('{operationsInsightsWarehouseId}', operations_insights_warehouse_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#rotate_operations_insights_warehouse_wallet') 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

#summarize_awr_sources_summaries(awr_hub_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_awr_sources_summaries.rb.html) to see an example of how to use summarize_awr_sources_summaries API.

Gets a list of summary of AWR Sources.

Allowed values are: snapshotsUploaded, name

Parameters:

  • awr_hub_id (String)

    Unique Awr Hub identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :name (String)

    Name for an Awr source database

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_by (String)

    The order in which Awr sources summary records are listed (default to snapshotsUploaded)

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :opc_request_id (String)

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

Returns:



5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
# File 'lib/oci/opsi/operations_insights_client.rb', line 5184

def summarize_awr_sources_summaries(awr_hub_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_awr_sources_summaries.' if logger

  raise "Missing the required parameter 'awr_hub_id' when calling summarize_awr_sources_summaries." if awr_hub_id.nil?

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

  if opts[:sort_order] && !OCI::Opsi::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Opsi::Models::SORT_ORDER_ENUM.'
  end
  raise "Parameter value for 'awr_hub_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_hub_id)

  path = '/awrHubs/{awrHubId}/awrSourcesSummary'.sub('{awrHubId}', awr_hub_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_awr_sources_summaries') 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::Opsi::Models::SummarizeAwrSourcesSummariesCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_database_insight_resource_capacity_trend(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_database_insight_resource_capacity_trend.rb.html) to see an example of how to use summarize_database_insight_resource_capacity_trend API.

Returns response with time series data (endTimestamp, capacity, baseCapacity) for the time period specified. The maximum time range for analysis is 2 years, hence this is intentionally not paginated. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

Allowed values are: HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION
Allowed values are: endTimestamp, capacity, baseCapacity

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :utilization_level (String)

    Filter by utilization level by the following buckets:

    • HIGH_UTILIZATION: DBs with utilization greater or equal than 75.

    • LOW_UTILIZATION: DBs with utilization lower than 25.

    • MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75.

    • MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50.

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Sorts using end timestamp , capacity or baseCapacity (default to endTimestamp)

  • :tablespace_name (String)

    Tablespace name for a database

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :is_database_instance_level_metrics (BOOLEAN)

    Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the whole database which contains an instance on this host.

    (default to false)
    
  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
# File 'lib/oci/opsi/operations_insights_client.rb', line 5335

def summarize_database_insight_resource_capacity_trend(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_capacity_trend.' if logger

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


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

  if opts[:utilization_level] && !%w[HIGH_UTILIZATION LOW_UTILIZATION MEDIUM_HIGH_UTILIZATION MEDIUM_LOW_UTILIZATION].include?(opts[:utilization_level])
    raise 'Invalid value for "utilization_level", must be one of HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION.'
  end

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

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

  path = '/databaseInsights/resourceCapacityTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:utilizationLevel] = opts[:utilization_level] if opts[:utilization_level]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:tablespaceName] = opts[:tablespace_name] if opts[:tablespace_name]
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:isDatabaseInstanceLevelMetrics] = opts[:is_database_instance_level_metrics] if !opts[:is_database_instance_level_metrics].nil?
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_capacity_trend') 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::Opsi::Models::SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_database_insight_resource_forecast_trend(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_database_insight_resource_forecast_trend.rb.html) to see an example of how to use summarize_database_insight_resource_forecast_trend API.

Get Forecast predictions for CPU and Storage resources since a time in the past. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

Allowed values are: HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :statistic (String)

    Choose the type of statistic metric data to be used for forecasting. (default to AVG) Allowed values are: AVG, MAX

  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :forecast_model (String)

    Choose algorithm model for the forecasting. Possible values:

     - LINEAR: Uses linear regression algorithm for forecasting.
     - ML_AUTO: Automatically detects best algorithm to use for forecasting.
     - ML_NO_AUTO: Automatically detects seasonality of the data for forecasting using linear or seasonal algorithm.
    (default to ML_NO_AUTO)
    

    Allowed values are: LINEAR, ML_AUTO, ML_NO_AUTO

  • :utilization_level (String)

    Filter by utilization level by the following buckets:

    • HIGH_UTILIZATION: DBs with utilization greater or equal than 75.

    • LOW_UTILIZATION: DBs with utilization lower than 25.

    • MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75.

    • MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50.

  • :confidence (Integer)

    This parameter is used to change data’s confidence level, this data is ingested by the forecast algorithm. Confidence is the probability of an interval to contain the expected population parameter. Manipulation of this value will lead to different results. If not set, default confidence value is 95%.

    (default to 95)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :tablespace_name (String)

    Tablespace name for a database

  • :is_database_instance_level_metrics (BOOLEAN)

    Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the whole database which contains an instance on this host.

    (default to false)
    
  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
# File 'lib/oci/opsi/operations_insights_client.rb', line 5527

def summarize_database_insight_resource_forecast_trend(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_forecast_trend.' if logger

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


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

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

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

  if opts[:utilization_level] && !%w[HIGH_UTILIZATION LOW_UTILIZATION MEDIUM_HIGH_UTILIZATION MEDIUM_LOW_UTILIZATION].include?(opts[:utilization_level])
    raise 'Invalid value for "utilization_level", must be one of HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION.'
  end

  path = '/databaseInsights/resourceForecastTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:statistic] = opts[:statistic] if opts[:statistic]
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:forecastModel] = opts[:forecast_model] if opts[:forecast_model]
  query_params[:utilizationLevel] = opts[:utilization_level] if opts[:utilization_level]
  query_params[:confidence] = opts[:confidence] if opts[:confidence]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:tablespaceName] = opts[:tablespace_name] if opts[:tablespace_name]
  query_params[:isDatabaseInstanceLevelMetrics] = opts[:is_database_instance_level_metrics] if !opts[:is_database_instance_level_metrics].nil?
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_forecast_trend') 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::Opsi::Models::SummarizeDatabaseInsightResourceForecastTrendAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_database_insight_resource_statistics(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_database_insight_resource_statistics.rb.html) to see an example of how to use summarize_database_insight_resource_statistics API.

Lists the Resource statistics (usage,capacity, usage change percent, utilization percent, base capacity, isAutoScalingEnabled) for each database filtered by utilization level in a compartment and in all sub-compartments if specified.

Allowed values are: utilizationPercent, usage, usageChangePercent, databaseName, databaseType

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :percentile (Integer)

    Percentile values of daily usage to be used for computing the aggregate resource usage. (default to 90)

  • :insight_by (String)

    Return data of a specific insight Possible values are High Utilization, Low Utilization, Any ,High Utilization Forecast, Low Utilization Forecast

    (default to [ANY])
    
  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The order in which resource statistics records are listed (default to utilizationPercent)

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :is_database_instance_level_metrics (BOOLEAN)

    Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the whole database which contains an instance on this host.

    (default to false)
    
  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
# File 'lib/oci/opsi/operations_insights_client.rb', line 5714

def summarize_database_insight_resource_statistics(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_statistics.' if logger

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


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

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

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

  path = '/databaseInsights/resourceStatistics'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:percentile] = opts[:percentile] if opts[:percentile]
  query_params[:insightBy] = opts[:insight_by] if opts[:insight_by]
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:isDatabaseInstanceLevelMetrics] = opts[:is_database_instance_level_metrics] if !opts[:is_database_instance_level_metrics].nil?
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_statistics') 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::Opsi::Models::SummarizeDatabaseInsightResourceStatisticsAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_database_insight_resource_usage(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_database_insight_resource_usage.rb.html) to see an example of how to use summarize_database_insight_resource_usage API.

A cumulative distribution function is used to rank the usage data points per database within the specified time period. For each database, the minimum data point with a ranking > the percentile value is included in the summation. Linear regression functions are used to calculate the usage change percentage. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :is_database_instance_level_metrics (BOOLEAN)

    Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the whole database which contains an instance on this host.

    (default to false)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :percentile (Integer)

    Percentile values of daily usage to be used for computing the aggregate resource usage. (default to 90)

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
# File 'lib/oci/opsi/operations_insights_client.rb', line 5880

def summarize_database_insight_resource_usage(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_usage.' if logger

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


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

  path = '/databaseInsights/resourceUsageSummary'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:isDatabaseInstanceLevelMetrics] = opts[:is_database_instance_level_metrics] if !opts[:is_database_instance_level_metrics].nil?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:percentile] = opts[:percentile] if opts[:percentile]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_usage') 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::Opsi::Models::SummarizeDatabaseInsightResourceUsageAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_database_insight_resource_usage_trend(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_database_insight_resource_usage_trend.rb.html) to see an example of how to use summarize_database_insight_resource_usage_trend API.

Returns response with time series data (endTimestamp, usage, capacity) for the time period specified. The maximum time range for analysis is 2 years, hence this is intentionally not paginated. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

Allowed values are: endTimestamp, usage, capacity

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Sorts using end timestamp, usage or capacity (default to endTimestamp)

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :is_database_instance_level_metrics (BOOLEAN)

    Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the whole database which contains an instance on this host.

    (default to false)
    
  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
# File 'lib/oci/opsi/operations_insights_client.rb', line 6034

def summarize_database_insight_resource_usage_trend(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_usage_trend.' if logger

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


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

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

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

  path = '/databaseInsights/resourceUsageTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:isDatabaseInstanceLevelMetrics] = opts[:is_database_instance_level_metrics] if !opts[:is_database_instance_level_metrics].nil?
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_usage_trend') 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::Opsi::Models::SummarizeDatabaseInsightResourceUsageTrendAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_database_insight_resource_utilization_insight(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_database_insight_resource_utilization_insight.rb.html) to see an example of how to use summarize_database_insight_resource_utilization_insight API.

Gets resources with current utilization (high and low) and projected utilization (high and low) for a resource type over specified time period. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :is_database_instance_level_metrics (BOOLEAN)

    Flag to indicate if database instance level metrics should be returned. The flag is ignored when a host name filter is not applied. When a hostname filter is applied this flag will determine whether to return metrics for the instances located on the specified host or for the whole database which contains an instance on this host.

    (default to false)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
# File 'lib/oci/opsi/operations_insights_client.rb', line 6193

def summarize_database_insight_resource_utilization_insight(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_utilization_insight.' if logger

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


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

  path = '/databaseInsights/resourceUtilizationInsight'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:isDatabaseInstanceLevelMetrics] = opts[:is_database_instance_level_metrics] if !opts[:is_database_instance_level_metrics].nil?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_utilization_insight') 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::Opsi::Models::SummarizeDatabaseInsightResourceUtilizationInsightAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_database_insight_tablespace_usage_trend.rb.html) to see an example of how to use summarize_database_insight_tablespace_usage_trend API.

Returns response with usage time series data (endTimestamp, usage, capacity) with breakdown by tablespaceName for the time period specified. The maximum time range for analysis is 2 years, hence this is intentionally not paginated. Either databaseId or id must be specified.

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :opc_request_id (String)

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

Returns:



6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
# File 'lib/oci/opsi/operations_insights_client.rb', line 6310

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

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

  path = '/databaseInsights/tablespaceUsageTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # 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: 'OperationsInsightsClient#summarize_database_insight_tablespace_usage_trend') 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::Opsi::Models::SummarizeDatabaseInsightTablespaceUsageTrendAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_insight_resource_capacity_trend(resource_type, resource_metric, exadata_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_insight_resource_capacity_trend.rb.html) to see an example of how to use summarize_exadata_insight_resource_capacity_trend API.

Returns response with time series data (endTimestamp, capacity) for the time period specified for an exadata system for a resource metric. Additionally resources can be filtered using databaseInsightId, hostInsightId or storageServerName query parameters. Top five resources are returned if total exceeds the limit specified. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Database name is returned in name field. DatabaseInsightId, cdbName and hostName query parameter applies to ResourceType DATABASE. Valid values for ResourceType HOST are CPU and MEMORY. HostName is returned in name field. HostInsightId and hostName query parameter applies to ResourceType HOST. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. Storage server name is returned in name field for resourceMetric IOPS and THROUGHPUT and asmName is returned in name field for resourceMetric STORAGE. StorageServerName query parameter applies to ResourceType STORAGE_SERVER. Valid values for ResourceType DISKGROUP is STORAGE. Comma delimited (asmName,diskgroupName) is returned in name field.

Parameters:

  • resource_type (String)

    Filter by resource. Supported values are HOST , STORAGE_SERVER and DATABASE

  • resource_metric (String)

    Filter by resource metric. Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_insight_id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :host_insight_id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :storage_server_name (Array<String>)

    Optional storage server name on an exadata system. (default to [])

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by hostname. (default to [])

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 5)
    
  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The order in which resource capacity trend records are listed (default to name) Allowed values are: id, name

  • :opc_request_id (String)

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

Returns:



6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
# File 'lib/oci/opsi/operations_insights_client.rb', line 6432

def summarize_exadata_insight_resource_capacity_trend(resource_type, resource_metric, exadata_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_insight_resource_capacity_trend.' if logger

  raise "Missing the required parameter 'resource_type' when calling summarize_exadata_insight_resource_capacity_trend." if resource_type.nil?
  raise "Missing the required parameter 'resource_metric' when calling summarize_exadata_insight_resource_capacity_trend." if resource_metric.nil?
  raise "Missing the required parameter 'exadata_insight_id' when calling summarize_exadata_insight_resource_capacity_trend." if exadata_insight_id.nil?

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

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

  path = '/exadataInsights/resourceCapacityTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:resourceType] = resource_type
  query_params[:resourceMetric] = resource_metric
  query_params[:exadataInsightId] = exadata_insight_id
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseInsightId] = OCI::ApiClient.build_collection_params(opts[:database_insight_id], :multi) if opts[:database_insight_id] && !opts[:database_insight_id].empty?
  query_params[:hostInsightId] = OCI::ApiClient.build_collection_params(opts[:host_insight_id], :multi) if opts[:host_insight_id] && !opts[:host_insight_id].empty?
  query_params[:storageServerName] = OCI::ApiClient.build_collection_params(opts[:storage_server_name], :multi) if opts[:storage_server_name] && !opts[:storage_server_name].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  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: 'OperationsInsightsClient#summarize_exadata_insight_resource_capacity_trend') 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::Opsi::Models::SummarizeExadataInsightResourceCapacityTrendCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_insight_resource_capacity_trend_aggregated(resource_type, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_insight_resource_capacity_trend_aggregated.rb.html) to see an example of how to use summarize_exadata_insight_resource_capacity_trend_aggregated API.

Returns response with time series data (endTimestamp, capacity) for the time period specified for an exadata system or fleet aggregation for a resource metric. The maximum time range for analysis is 2 years, hence this is intentionally not paginated. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Valid values for ResourceType HOST are CPU and MEMORY. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT.

Allowed values are: endTimestamp, capacity

Parameters:

  • resource_type (String)

    Filter by resource. Supported values are HOST , STORAGE_SERVER and DATABASE

  • resource_metric (String)

    Filter by resource metric. Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by hostname. (default to [])

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Sorts using end timestamp or capacity. (default to endTimestamp)

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :opc_request_id (String)

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

Returns:



6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
# File 'lib/oci/opsi/operations_insights_client.rb', line 6580

def summarize_exadata_insight_resource_capacity_trend_aggregated(resource_type, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_insight_resource_capacity_trend_aggregated.' if logger

  raise "Missing the required parameter 'resource_type' when calling summarize_exadata_insight_resource_capacity_trend_aggregated." if resource_type.nil?
  raise "Missing the required parameter 'resource_metric' when calling summarize_exadata_insight_resource_capacity_trend_aggregated." if resource_metric.nil?

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

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

  path = '/exadataInsights/resourceCapacityTrendAggregated'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:resourceType] = resource_type
  query_params[:resourceMetric] = resource_metric
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?

  # 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: 'OperationsInsightsClient#summarize_exadata_insight_resource_capacity_trend_aggregated') 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::Opsi::Models::SummarizeExadataInsightResourceCapacityTrendAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_insight_resource_forecast_trend(resource_type, resource_metric, exadata_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_insight_resource_forecast_trend.rb.html) to see an example of how to use summarize_exadata_insight_resource_forecast_trend API.

Get historical usage and forecast predictions for an exadata system with breakdown by databases, hosts or storage servers. Additionally resources can be filtered using databaseInsightId, hostInsightId or storageServerName query parameters. Top five resources are returned if total exceeds the limit specified. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Database name is returned in name field. DatabaseInsightId , cdbName and hostName query parameter applies to ResourceType DATABASE. Valid values for ResourceType HOST are CPU and MEMORY. HostName s returned in name field. HostInsightId and hostName query parameter applies to ResourceType HOST. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT. Storage server name is returned in name field for resourceMetric IOPS and THROUGHPUT and asmName is returned in name field for resourceMetric STORAGE. StorageServerName query parameter applies to ResourceType STORAGE_SERVER. Valid value for ResourceType DISKGROUP is STORAGE. Comma delimited (asmName,diskgroupName) is returned in name field.

Parameters:

  • resource_type (String)

    Filter by resource. Supported values are HOST , STORAGE_SERVER and DATABASE

  • resource_metric (String)

    Filter by resource metric. Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT

  • exadata_insight_id (String)
  • 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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :database_insight_id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :host_insight_id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :storage_server_name (Array<String>)

    Optional storage server name on an exadata system. (default to [])

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :statistic (String)

    Choose the type of statistic metric data to be used for forecasting. (default to AVG) Allowed values are: AVG, MAX

  • :forecast_start_day (Integer)

    Number of days used for utilization forecast analysis. (default to 0)

  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :forecast_model (String)

    Choose algorithm model for the forecasting. Possible values:

     - LINEAR: Uses linear regression algorithm for forecasting.
     - ML_AUTO: Automatically detects best algorithm to use for forecasting.
     - ML_NO_AUTO: Automatically detects seasonality of the data for forecasting using linear or seasonal algorithm.
    (default to ML_NO_AUTO)
    

    Allowed values are: LINEAR, ML_AUTO, ML_NO_AUTO

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by hostname. (default to [])

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 5)
    
  • :confidence (Integer)

    This parameter is used to change data’s confidence level, this data is ingested by the forecast algorithm. Confidence is the probability of an interval to contain the expected population parameter. Manipulation of this value will lead to different results. If not set, default confidence value is 95%.

    (default to 95)
    
  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The order in which resource Forecast trend records are listed (default to name) Allowed values are: id, name, daysToReachCapacity

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

Returns:



6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
# File 'lib/oci/opsi/operations_insights_client.rb', line 6738

def summarize_exadata_insight_resource_forecast_trend(resource_type, resource_metric, exadata_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_insight_resource_forecast_trend.' if logger

  raise "Missing the required parameter 'resource_type' when calling summarize_exadata_insight_resource_forecast_trend." if resource_type.nil?
  raise "Missing the required parameter 'resource_metric' when calling summarize_exadata_insight_resource_forecast_trend." if resource_metric.nil?
  raise "Missing the required parameter 'exadata_insight_id' when calling summarize_exadata_insight_resource_forecast_trend." if exadata_insight_id.nil?

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

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

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

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

  path = '/exadataInsights/resourceForecastTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:resourceType] = resource_type
  query_params[:resourceMetric] = resource_metric
  query_params[:exadataInsightId] = exadata_insight_id
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:databaseInsightId] = OCI::ApiClient.build_collection_params(opts[:database_insight_id], :multi) if opts[:database_insight_id] && !opts[:database_insight_id].empty?
  query_params[:hostInsightId] = OCI::ApiClient.build_collection_params(opts[:host_insight_id], :multi) if opts[:host_insight_id] && !opts[:host_insight_id].empty?
  query_params[:storageServerName] = OCI::ApiClient.build_collection_params(opts[:storage_server_name], :multi) if opts[:storage_server_name] && !opts[:storage_server_name].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:statistic] = opts[:statistic] if opts[:statistic]
  query_params[:forecastStartDay] = opts[:forecast_start_day] if opts[:forecast_start_day]
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:forecastModel] = opts[:forecast_model] if opts[:forecast_model]
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:confidence] = opts[:confidence] if opts[:confidence]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:page] = opts[:page] if opts[:page]

  # 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: 'OperationsInsightsClient#summarize_exadata_insight_resource_forecast_trend') 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::Opsi::Models::SummarizeExadataInsightResourceForecastTrendCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_insight_resource_forecast_trend_aggregated(resource_type, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_insight_resource_forecast_trend_aggregated.rb.html) to see an example of how to use summarize_exadata_insight_resource_forecast_trend_aggregated API.

Get aggregated historical usage and forecast predictions for resources. Either compartmentId or exadataInsightsId query parameter must be specified. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Valid values for ResourceType HOST are CPU and MEMORY. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT.

Parameters:

  • resource_type (String)

    Filter by resource. Supported values are HOST , STORAGE_SERVER and DATABASE

  • resource_metric (String)

    Filter by resource metric. Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)
  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :statistic (String)

    Choose the type of statistic metric data to be used for forecasting. (default to AVG) Allowed values are: AVG, MAX

  • :forecast_start_day (Integer)

    Number of days used for utilization forecast analysis. (default to 0)

  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :forecast_model (String)

    Choose algorithm model for the forecasting. Possible values:

     - LINEAR: Uses linear regression algorithm for forecasting.
     - ML_AUTO: Automatically detects best algorithm to use for forecasting.
     - ML_NO_AUTO: Automatically detects seasonality of the data for forecasting using linear or seasonal algorithm.
    (default to ML_NO_AUTO)
    

    Allowed values are: LINEAR, ML_AUTO, ML_NO_AUTO

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by hostname. (default to [])

  • :confidence (Integer)

    This parameter is used to change data’s confidence level, this data is ingested by the forecast algorithm. Confidence is the probability of an interval to contain the expected population parameter. Manipulation of this value will lead to different results. If not set, default confidence value is 95%.

    (default to 95)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :opc_request_id (String)

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

Returns:



6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
# File 'lib/oci/opsi/operations_insights_client.rb', line 6911

def summarize_exadata_insight_resource_forecast_trend_aggregated(resource_type, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_insight_resource_forecast_trend_aggregated.' if logger

  raise "Missing the required parameter 'resource_type' when calling summarize_exadata_insight_resource_forecast_trend_aggregated." if resource_type.nil?
  raise "Missing the required parameter 'resource_metric' when calling summarize_exadata_insight_resource_forecast_trend_aggregated." if resource_metric.nil?

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

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

  path = '/exadataInsights/resourceForecastTrendAggregated'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:resourceType] = resource_type
  query_params[:resourceMetric] = resource_metric
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:statistic] = opts[:statistic] if opts[:statistic]
  query_params[:forecastStartDay] = opts[:forecast_start_day] if opts[:forecast_start_day]
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:forecastModel] = opts[:forecast_model] if opts[:forecast_model]
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:confidence] = opts[:confidence] if opts[:confidence]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?

  # 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: 'OperationsInsightsClient#summarize_exadata_insight_resource_forecast_trend_aggregated') 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::Opsi::Models::SummarizeExadataInsightResourceForecastTrendAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_insight_resource_statistics(exadata_insight_id, resource_type, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_insight_resource_statistics.rb.html) to see an example of how to use summarize_exadata_insight_resource_statistics API.

Lists the Resource statistics (usage, capacity, usage change percent, utilization percent) for each resource based on resourceMetric filtered by utilization level. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Valid values for ResourceType HOST are CPU and MEMORY. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS, THROUGHPUT. Valid value for ResourceType DISKGROUP is STORAGE.

Allowed values are: utilizationPercent, usage, usageChangePercent

Parameters:

  • exadata_insight_id (String)
  • resource_type (String)

    Filter by resource. Supported values are HOST , STORAGE_SERVER and DATABASE

  • resource_metric (String)

    Filter by resource metric. Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT

  • 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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by hostname. (default to [])

  • :percentile (Integer)

    Percentile values of daily usage to be used for computing the aggregate resource usage. (default to 90)

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The order in which resource statistics records are listed (default to utilizationPercent)

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

Returns:



7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
# File 'lib/oci/opsi/operations_insights_client.rb', line 7047

def summarize_exadata_insight_resource_statistics(exadata_insight_id, resource_type, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_insight_resource_statistics.' if logger

  raise "Missing the required parameter 'exadata_insight_id' when calling summarize_exadata_insight_resource_statistics." if exadata_insight_id.nil?
  raise "Missing the required parameter 'resource_type' when calling summarize_exadata_insight_resource_statistics." if resource_type.nil?
  raise "Missing the required parameter 'resource_metric' when calling summarize_exadata_insight_resource_statistics." if resource_metric.nil?

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

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

  path = '/exadataInsights/resourceStatistics'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:exadataInsightId] = exadata_insight_id
  query_params[:resourceType] = resource_type
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:percentile] = opts[:percentile] if opts[:percentile]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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: 'OperationsInsightsClient#summarize_exadata_insight_resource_statistics') 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::Opsi::Models::SummarizeExadataInsightResourceStatisticsAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_insight_resource_usage(compartment_id, resource_type, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_insight_resource_usage.rb.html) to see an example of how to use summarize_exadata_insight_resource_usage API.

A cumulative distribution function is used to rank the usage data points per resource within the specified time period. For each resource, the minimum data point with a ranking > the percentile value is included in the summation. Linear regression functions are used to calculate the usage change percentage. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Valid values for ResourceType HOST are CPU and MEMORY. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT.

Allowed values are: utilizationPercent, usage, capacity, usageChangePercent

Parameters:

  • compartment_id (String)
  • resource_type (String)

    Filter by resource. Supported values are HOST , STORAGE_SERVER and DATABASE

  • resource_metric (String)

    Filter by resource metric. Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT

  • 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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by hostname. (default to [])

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The order in which resource usage summary records are listed (default to utilizationPercent)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 5)
    
  • :percentile (Integer)

    Percentile values of daily usage to be used for computing the aggregate resource usage. (default to 90)

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :opc_request_id (String)

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

Returns:



7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
# File 'lib/oci/opsi/operations_insights_client.rb', line 7201

def summarize_exadata_insight_resource_usage(compartment_id, resource_type, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_insight_resource_usage.' if logger

  raise "Missing the required parameter 'compartment_id' when calling summarize_exadata_insight_resource_usage." if compartment_id.nil?
  raise "Missing the required parameter 'resource_type' when calling summarize_exadata_insight_resource_usage." if resource_type.nil?
  raise "Missing the required parameter 'resource_metric' when calling summarize_exadata_insight_resource_usage." if resource_metric.nil?

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

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

  path = '/exadataInsights/resourceUsageSummary'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceType] = resource_type
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:percentile] = opts[:percentile] if opts[:percentile]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?

  # 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: 'OperationsInsightsClient#summarize_exadata_insight_resource_usage') 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::Opsi::Models::SummarizeExadataInsightResourceUsageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_insight_resource_usage_aggregated(compartment_id, resource_type, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_insight_resource_usage_aggregated.rb.html) to see an example of how to use summarize_exadata_insight_resource_usage_aggregated API.

A cumulative distribution function is used to rank the usage data points per database within the specified time period. For each database, the minimum data point with a ranking > the percentile value is included in the summation. Linear regression functions are used to calculate the usage change percentage. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Valid values for ResourceType HOST are CPU and MEMORY. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT.

Parameters:

  • compartment_id (String)
  • resource_type (String)

    Filter by resource. Supported values are HOST , STORAGE_SERVER and DATABASE

  • resource_metric (String)

    Filter by resource metric. Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT

  • 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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by hostname. (default to [])

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :percentile (Integer)

    Percentile values of daily usage to be used for computing the aggregate resource usage. (default to 90)

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :opc_request_id (String)

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

Returns:



7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
# File 'lib/oci/opsi/operations_insights_client.rb', line 7349

def summarize_exadata_insight_resource_usage_aggregated(compartment_id, resource_type, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_insight_resource_usage_aggregated.' if logger

  raise "Missing the required parameter 'compartment_id' when calling summarize_exadata_insight_resource_usage_aggregated." if compartment_id.nil?
  raise "Missing the required parameter 'resource_type' when calling summarize_exadata_insight_resource_usage_aggregated." if resource_type.nil?
  raise "Missing the required parameter 'resource_metric' when calling summarize_exadata_insight_resource_usage_aggregated." if resource_metric.nil?

  path = '/exadataInsights/resourceUsageSummaryAggregated'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceType] = resource_type
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:percentile] = opts[:percentile] if opts[:percentile]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?

  # 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: 'OperationsInsightsClient#summarize_exadata_insight_resource_usage_aggregated') 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::Opsi::Models::SummarizeExadataInsightResourceUsageAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_insight_resource_utilization_insight(compartment_id, resource_type, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_insight_resource_utilization_insight.rb.html) to see an example of how to use summarize_exadata_insight_resource_utilization_insight API.

Gets current utilization, projected utilization and days to reach projectedUtilization for an exadata system over specified time period. Valid values for ResourceType DATABASE are CPU,MEMORY,IO and STORAGE. Valid values for ResourceType HOST are CPU and MEMORY. Valid values for ResourceType STORAGE_SERVER are STORAGE, IOPS and THROUGHPUT.

Parameters:

  • compartment_id (String)
  • resource_type (String)

    Filter by resource. Supported values are HOST , STORAGE_SERVER and DATABASE

  • resource_metric (String)

    Filter by resource metric. Supported values are CPU , STORAGE, MEMORY, IO, IOPS, THROUGHPUT

  • 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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :forecast_start_day (Integer)

    Number of days used for utilization forecast analysis. (default to 0)

  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by hostname. (default to [])

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 5)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :opc_request_id (String)

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

Returns:



7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
# File 'lib/oci/opsi/operations_insights_client.rb', line 7488

def summarize_exadata_insight_resource_utilization_insight(compartment_id, resource_type, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_insight_resource_utilization_insight.' if logger

  raise "Missing the required parameter 'compartment_id' when calling summarize_exadata_insight_resource_utilization_insight." if compartment_id.nil?
  raise "Missing the required parameter 'resource_type' when calling summarize_exadata_insight_resource_utilization_insight." if resource_type.nil?
  raise "Missing the required parameter 'resource_metric' when calling summarize_exadata_insight_resource_utilization_insight." if resource_metric.nil?

  path = '/exadataInsights/resourceUtilizationInsight'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceType] = resource_type
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:forecastStartDay] = opts[:forecast_start_day] if opts[:forecast_start_day]
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?

  # 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: 'OperationsInsightsClient#summarize_exadata_insight_resource_utilization_insight') 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::Opsi::Models::SummarizeExadataInsightResourceUtilizationInsightAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_exadata_members(exadata_insight_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_exadata_members.rb.html) to see an example of how to use summarize_exadata_members API.

Lists the software and hardware inventory of the Exadata System.

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

  • :exadata_type (Array<String>)

    Filter by one or more Exadata types. Possible value are DBMACHINE, EXACS, and EXACC.

    (default to [])
    
  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The order in which exadata member records are listed (default to name) Allowed values are: name, displayName, entityType

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 500)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

Returns:



7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
# File 'lib/oci/opsi/operations_insights_client.rb', line 7581

def summarize_exadata_members(exadata_insight_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_exadata_members.' if logger

  raise "Missing the required parameter 'exadata_insight_id' when calling summarize_exadata_members." if exadata_insight_id.nil?

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

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

  path = '/exadataInsights/exadataMembers'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:exadataInsightId] = exadata_insight_id
  query_params[:exadataType] = OCI::ApiClient.build_collection_params(opts[:exadata_type], :multi) if opts[:exadata_type] && !opts[:exadata_type].empty?
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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: 'OperationsInsightsClient#summarize_exadata_members') 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::Opsi::Models::ExadataMemberCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_host_insight_resource_capacity_trend(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_host_insight_resource_capacity_trend.rb.html) to see an example of how to use summarize_host_insight_resource_capacity_trend API.

Returns response with time series data (endTimestamp, capacity) for the time period specified. The maximum time range for analysis is 2 years, hence this is intentionally not paginated. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

Allowed values are: HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION
Allowed values are: endTimestamp, capacity

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :utilization_level (String)

    Filter by utilization level by the following buckets:

    • HIGH_UTILIZATION: DBs with utilization greater or equal than 75.

    • LOW_UTILIZATION: DBs with utilization lower than 25.

    • MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75.

    • MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50.

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Sorts using end timestamp or capacity (default to endTimestamp)

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
# File 'lib/oci/opsi/operations_insights_client.rb', line 7720

def summarize_host_insight_resource_capacity_trend(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_host_insight_resource_capacity_trend.' if logger

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


  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

  if opts[:utilization_level] && !%w[HIGH_UTILIZATION LOW_UTILIZATION MEDIUM_HIGH_UTILIZATION MEDIUM_LOW_UTILIZATION].include?(opts[:utilization_level])
    raise 'Invalid value for "utilization_level", must be one of HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION.'
  end

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

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

  path = '/hostInsights/resourceCapacityTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:utilizationLevel] = opts[:utilization_level] if opts[:utilization_level]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_host_insight_resource_capacity_trend') 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::Opsi::Models::SummarizeHostInsightResourceCapacityTrendAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_host_insight_resource_forecast_trend(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_host_insight_resource_forecast_trend.rb.html) to see an example of how to use summarize_host_insight_resource_forecast_trend API.

Get Forecast predictions for CPU or memory resources since a time in the past. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

Allowed values are: HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :statistic (String)

    Choose the type of statistic metric data to be used for forecasting. (default to AVG) Allowed values are: AVG, MAX

  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :forecast_model (String)

    Choose algorithm model for the forecasting. Possible values:

     - LINEAR: Uses linear regression algorithm for forecasting.
     - ML_AUTO: Automatically detects best algorithm to use for forecasting.
     - ML_NO_AUTO: Automatically detects seasonality of the data for forecasting using linear or seasonal algorithm.
    (default to ML_NO_AUTO)
    

    Allowed values are: LINEAR, ML_AUTO, ML_NO_AUTO

  • :utilization_level (String)

    Filter by utilization level by the following buckets:

    • HIGH_UTILIZATION: DBs with utilization greater or equal than 75.

    • LOW_UTILIZATION: DBs with utilization lower than 25.

    • MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75.

    • MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50.

  • :confidence (Integer)

    This parameter is used to change data’s confidence level, this data is ingested by the forecast algorithm. Confidence is the probability of an interval to contain the expected population parameter. Manipulation of this value will lead to different results. If not set, default confidence value is 95%.

    (default to 95)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
# File 'lib/oci/opsi/operations_insights_client.rb', line 7896

def summarize_host_insight_resource_forecast_trend(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_host_insight_resource_forecast_trend.' if logger

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


  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

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

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

  if opts[:utilization_level] && !%w[HIGH_UTILIZATION LOW_UTILIZATION MEDIUM_HIGH_UTILIZATION MEDIUM_LOW_UTILIZATION].include?(opts[:utilization_level])
    raise 'Invalid value for "utilization_level", must be one of HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION.'
  end

  path = '/hostInsights/resourceForecastTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:statistic] = opts[:statistic] if opts[:statistic]
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:forecastModel] = opts[:forecast_model] if opts[:forecast_model]
  query_params[:utilizationLevel] = opts[:utilization_level] if opts[:utilization_level]
  query_params[:confidence] = opts[:confidence] if opts[:confidence]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_host_insight_resource_forecast_trend') 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::Opsi::Models::SummarizeHostInsightResourceForecastTrendAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_host_insight_resource_statistics(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_host_insight_resource_statistics.rb.html) to see an example of how to use summarize_host_insight_resource_statistics API.

Lists the resource statistics (usage, capacity, usage change percent, utilization percent, load) for each host filtered by utilization level in a compartment and in all sub-compartments if specified.

Allowed values are: utilizationPercent, usage, usageChangePercent, hostName, platformType

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :percentile (Integer)

    Percentile values of daily usage to be used for computing the aggregate resource usage. (default to 90)

  • :insight_by (String)

    Return data of a specific insight Possible values are High Utilization, Low Utilization, Any ,High Utilization Forecast, Low Utilization Forecast

    (default to [ANY])
    
  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The order in which resource statistics records are listed. (default to utilizationPercent)

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
# File 'lib/oci/opsi/operations_insights_client.rb', line 8069

def summarize_host_insight_resource_statistics(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_host_insight_resource_statistics.' if logger

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


  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

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

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

  path = '/hostInsights/resourceStatistics'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:percentile] = opts[:percentile] if opts[:percentile]
  query_params[:insightBy] = opts[:insight_by] if opts[:insight_by]
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_host_insight_resource_statistics') 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::Opsi::Models::SummarizeHostInsightResourceStatisticsAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_host_insight_resource_usage(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_host_insight_resource_usage.rb.html) to see an example of how to use summarize_host_insight_resource_usage API.

A cumulative distribution function is used to rank the usage data points per host within the specified time period. For each host, the minimum data point with a ranking > the percentile value is included in the summation. Linear regression functions are used to calculate the usage change percentage. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :percentile (Integer)

    Percentile values of daily usage to be used for computing the aggregate resource usage. (default to 90)

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
# File 'lib/oci/opsi/operations_insights_client.rb', line 8224

def summarize_host_insight_resource_usage(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_host_insight_resource_usage.' if logger

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


  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

  path = '/hostInsights/resourceUsageSummary'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:percentile] = opts[:percentile] if opts[:percentile]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_host_insight_resource_usage') 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::Opsi::Models::SummarizeHostInsightResourceUsageAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_host_insight_resource_usage_trend(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_host_insight_resource_usage_trend.rb.html) to see an example of how to use summarize_host_insight_resource_usage_trend API.

Returns response with time series data (endTimestamp, usage, capacity) for the time period specified. The maximum time range for analysis is 2 years, hence this is intentionally not paginated. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

Allowed values are: endTimestamp, usage, capacity

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    Sorts using end timestamp, usage or capacity (default to endTimestamp)

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
# File 'lib/oci/opsi/operations_insights_client.rb', line 8368

def summarize_host_insight_resource_usage_trend(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_host_insight_resource_usage_trend.' if logger

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


  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

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

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

  path = '/hostInsights/resourceUsageTrend'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_host_insight_resource_usage_trend') 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::Opsi::Models::SummarizeHostInsightResourceUsageTrendAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_host_insight_resource_utilization_insight(compartment_id, resource_metric, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_host_insight_resource_utilization_insight.rb.html) to see an example of how to use summarize_host_insight_resource_utilization_insight API.

Gets resources with current utilization (high and low) and projected utilization (high and low) for a resource type over specified time period. If compartmentIdInSubtree is specified, aggregates resources in a compartment and in all sub-compartments.

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

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :platform_type (Array<String>)

    Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS].

    (default to [])
    

    Allowed values are: LINUX, SOLARIS, SUNOS

  • :id (Array<String>)

    Optional list of host insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :forecast_days (Integer)

    Number of days used for utilization forecast analysis. (default to 30)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
# File 'lib/oci/opsi/operations_insights_client.rb', line 8517

def summarize_host_insight_resource_utilization_insight(compartment_id, resource_metric, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_host_insight_resource_utilization_insight.' if logger

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


  platform_type_allowable_values = %w[LINUX SOLARIS SUNOS]
  if opts[:platform_type] && !opts[:platform_type].empty?
    opts[:platform_type].each do |val_to_check|
      unless platform_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "platform_type", must be one of LINUX, SOLARIS, SUNOS.'
      end
    end
  end

  path = '/hostInsights/resourceUtilizationInsight'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetric] = resource_metric
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:platformType] = OCI::ApiClient.build_collection_params(opts[:platform_type], :multi) if opts[:platform_type] && !opts[:platform_type].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_host_insight_resource_utilization_insight') 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::Opsi::Models::SummarizeHostInsightResourceUtilizationInsightAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_operations_insights_warehouse_resource_usage(operations_insights_warehouse_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_operations_insights_warehouse_resource_usage.rb.html) to see an example of how to use summarize_operations_insights_warehouse_resource_usage API.

Gets the details of resources used by an Operations Insights Warehouse. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment.

Parameters:

  • operations_insights_warehouse_id (String)

    Unique Operations Insights Warehouse identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

Returns:



8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
# File 'lib/oci/opsi/operations_insights_client.rb', line 8600

def summarize_operations_insights_warehouse_resource_usage(operations_insights_warehouse_id, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_operations_insights_warehouse_resource_usage.' if logger

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

  path = '/operationsInsightsWarehouses/{operationsInsightsWarehouseId}/resourceUsageSummary'.sub('{operationsInsightsWarehouseId}', operations_insights_warehouse_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: 'OperationsInsightsClient#summarize_operations_insights_warehouse_resource_usage') 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::Opsi::Models::SummarizeOperationsInsightsWarehouseResourceUsageAggregation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_sql_insights.rb.html) to see an example of how to use summarize_sql_insights API.

Query SQL Warehouse to get the performance insights for SQLs taking greater than X% database time for a given time period across the given databases or database types in a compartment and in all sub-compartments if specified.

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

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :database_time_pct_greater_than (Float)

    Filter sqls by percentage of db time. (default to 1)

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
# File 'lib/oci/opsi/operations_insights_client.rb', line 8717

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

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


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

  path = '/databaseInsights/sqlInsights'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:databaseTimePctGreaterThan] = opts[:database_time_pct_greater_than] if opts[:database_time_pct_greater_than]
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_insights') 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::Opsi::Models::SqlInsightAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_sql_plan_insights(compartment_id, sql_identifier, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_sql_plan_insights.rb.html) to see an example of how to use summarize_sql_plan_insights API.

Query SQL Warehouse to get the performance insights on the execution plans for a given SQL for a given time period. Either databaseId or id must be specified.

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

  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

Returns:



8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
# File 'lib/oci/opsi/operations_insights_client.rb', line 8828

def summarize_sql_plan_insights(compartment_id, sql_identifier, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_plan_insights.' if logger

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

  path = '/databaseInsights/sqlPlanInsights'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sqlIdentifier] = sql_identifier
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:page] = opts[:page] if opts[:page]

  # 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: 'OperationsInsightsClient#summarize_sql_plan_insights') 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::Opsi::Models::SqlPlanInsightAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_sql_response_time_distributions(compartment_id, sql_identifier, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_sql_response_time_distributions.rb.html) to see an example of how to use summarize_sql_response_time_distributions API.

Query SQL Warehouse to summarize the response time distribution of query executions for a given SQL for a given time period. Either databaseId or id must be specified.

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

  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

Returns:



8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
# File 'lib/oci/opsi/operations_insights_client.rb', line 8921

def summarize_sql_response_time_distributions(compartment_id, sql_identifier, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_response_time_distributions.' if logger

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

  path = '/databaseInsights/sqlResponseTimeDistributions'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sqlIdentifier] = sql_identifier
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:page] = opts[:page] if opts[:page]

  # 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: 'OperationsInsightsClient#summarize_sql_response_time_distributions') 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::Opsi::Models::SqlResponseTimeDistributionAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_sql_statistics.rb.html) to see an example of how to use summarize_sql_statistics API.

Query SQL Warehouse to get the performance statistics for SQLs taking greater than X% database time for a given time period across the given databases or database types in a compartment and in all sub-compartments if specified.

Allowed values are: DEGRADING, VARIANT, INEFFICIENT, CHANGING_PLANS, IMPROVING, DEGRADING_VARIANT, DEGRADING_INEFFICIENT, DEGRADING_CHANGING_PLANS, DEGRADING_INCREASING_IO, DEGRADING_INCREASING_CPU, DEGRADING_INCREASING_INEFFICIENT_WAIT, DEGRADING_CHANGING_PLANS_AND_INCREASING_IO, DEGRADING_CHANGING_PLANS_AND_INCREASING_CPU, DEGRADING_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT, VARIANT_INEFFICIENT, VARIANT_CHANGING_PLANS, VARIANT_INCREASING_IO, VARIANT_INCREASING_CPU, VARIANT_INCREASING_INEFFICIENT_WAIT, VARIANT_CHANGING_PLANS_AND_INCREASING_IO, VARIANT_CHANGING_PLANS_AND_INCREASING_CPU, VARIANT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT, INEFFICIENT_CHANGING_PLANS, INEFFICIENT_INCREASING_INEFFICIENT_WAIT, INEFFICIENT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT

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

  • :database_type (Array<String>)

    Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.

    (default to [])
    

    Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :database_time_pct_greater_than (Float)

    Filter sqls by percentage of db time. (default to 1)

  • :sql_identifier (Array<String>)

    One or more unique SQL_IDs for a SQL Statement. Example: 6rgjh9bjmy2s7

    (default to [])
    
  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). Example: 50

    (default to 50)
    
  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC).

  • :sort_by (String)

    The field to use when sorting SQL statistics. Example: databaseTimeInSec

    (default to databaseTimeInSec)
    

    Allowed values are: databaseTimeInSec, executionsPerHour, executionsCount, cpuTimeInSec, ioTimeInSec, inefficientWaitTimeInSec, responseTimeInSec, planCount, variability, averageActiveSessions, databaseTimePct, inefficiencyInPct, changeInCpuTimeInPct, changeInIoTimeInPct, changeInInefficientWaitTimeInPct, changeInResponseTimeInPct, changeInAverageActiveSessionsInPct, changeInExecutionsPerHourInPct, changeInInefficiencyInPct

  • :category (Array<String>)

    Filter sqls by one or more performance categories. (default to [])

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
# File 'lib/oci/opsi/operations_insights_client.rb', line 9064

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

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


  database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D EXTERNAL-PDB EXTERNAL-NONCDB]
  if opts[:database_type] && !opts[:database_type].empty?
    opts[:database_type].each do |val_to_check|
      unless database_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB.'
      end
    end
  end

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

  if opts[:sort_by] && !%w[databaseTimeInSec executionsPerHour executionsCount cpuTimeInSec ioTimeInSec inefficientWaitTimeInSec responseTimeInSec planCount variability averageActiveSessions databaseTimePct inefficiencyInPct changeInCpuTimeInPct changeInIoTimeInPct changeInInefficientWaitTimeInPct changeInResponseTimeInPct changeInAverageActiveSessionsInPct changeInExecutionsPerHourInPct changeInInefficiencyInPct].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of databaseTimeInSec, executionsPerHour, executionsCount, cpuTimeInSec, ioTimeInSec, inefficientWaitTimeInSec, responseTimeInSec, planCount, variability, averageActiveSessions, databaseTimePct, inefficiencyInPct, changeInCpuTimeInPct, changeInIoTimeInPct, changeInInefficientWaitTimeInPct, changeInResponseTimeInPct, changeInAverageActiveSessionsInPct, changeInExecutionsPerHourInPct, changeInInefficiencyInPct.'
  end


  category_allowable_values = %w[DEGRADING VARIANT INEFFICIENT CHANGING_PLANS IMPROVING DEGRADING_VARIANT DEGRADING_INEFFICIENT DEGRADING_CHANGING_PLANS DEGRADING_INCREASING_IO DEGRADING_INCREASING_CPU DEGRADING_INCREASING_INEFFICIENT_WAIT DEGRADING_CHANGING_PLANS_AND_INCREASING_IO DEGRADING_CHANGING_PLANS_AND_INCREASING_CPU DEGRADING_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT VARIANT_INEFFICIENT VARIANT_CHANGING_PLANS VARIANT_INCREASING_IO VARIANT_INCREASING_CPU VARIANT_INCREASING_INEFFICIENT_WAIT VARIANT_CHANGING_PLANS_AND_INCREASING_IO VARIANT_CHANGING_PLANS_AND_INCREASING_CPU VARIANT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT INEFFICIENT_CHANGING_PLANS INEFFICIENT_INCREASING_INEFFICIENT_WAIT INEFFICIENT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT]
  if opts[:category] && !opts[:category].empty?
    opts[:category].each do |val_to_check|
      unless category_allowable_values.include?(val_to_check)
        raise 'Invalid value for "category", must be one of DEGRADING, VARIANT, INEFFICIENT, CHANGING_PLANS, IMPROVING, DEGRADING_VARIANT, DEGRADING_INEFFICIENT, DEGRADING_CHANGING_PLANS, DEGRADING_INCREASING_IO, DEGRADING_INCREASING_CPU, DEGRADING_INCREASING_INEFFICIENT_WAIT, DEGRADING_CHANGING_PLANS_AND_INCREASING_IO, DEGRADING_CHANGING_PLANS_AND_INCREASING_CPU, DEGRADING_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT, VARIANT_INEFFICIENT, VARIANT_CHANGING_PLANS, VARIANT_INCREASING_IO, VARIANT_INCREASING_CPU, VARIANT_INCREASING_INEFFICIENT_WAIT, VARIANT_CHANGING_PLANS_AND_INCREASING_IO, VARIANT_CHANGING_PLANS_AND_INCREASING_CPU, VARIANT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT, INEFFICIENT_CHANGING_PLANS, INEFFICIENT_INCREASING_INEFFICIENT_WAIT, INEFFICIENT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT.'
      end
    end
  end

  path = '/databaseInsights/sqlStatistics'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:databaseTimePctGreaterThan] = opts[:database_time_pct_greater_than] if opts[:database_time_pct_greater_than]
  query_params[:sqlIdentifier] = OCI::ApiClient.build_collection_params(opts[:sql_identifier], :multi) if opts[:sql_identifier] && !opts[:sql_identifier].empty?
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:category] = OCI::ApiClient.build_collection_params(opts[:category], :multi) if opts[:category] && !opts[:category].empty?
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_statistics') 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::Opsi::Models::SqlStatisticAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_sql_statistics_time_series(compartment_id, sql_identifier, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_sql_statistics_time_series.rb.html) to see an example of how to use summarize_sql_statistics_time_series API.

Query SQL Warehouse to get the performance statistics time series for a given SQL across given databases for a given time period in a compartment and in all sub-compartments if specified.

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

  • :database_id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. (default to [])

  • :id (Array<String>)

    Optional list of database [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. (default to [])

  • :exadata_insight_id (Array<String>)

    Optional list of exadata insight resource [OCIDs](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). (default to [])

  • :cdb_name (Array<String>)

    Filter by one or more cdb name. (default to [])

  • :host_name (Array<String>)

    Filter by one or more hostname. (default to [])

  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

  • :defined_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. Each item in the list has the format \“namespace.tagName.value\”. All inputs are case-insensitive. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_equals (Array<String>)

    A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. The key for each tag is \“tagName.value\”. All inputs are case-insensitive. Multiple values for the same tag name are interpreted as \“OR\”. Values for different tag names are interpreted as \“AND\”.

  • :defined_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. Each item in the list has the format \“namespace.tagName.true\” (for checking existence of a defined tag) or \“namespace.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for the same key (i.e. same namespace and tag name) are interpreted as \“OR\”. Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as \“AND\”.

  • :freeform_tag_exists (Array<String>)

    A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. The key for each tag is \“tagName.true\”. All inputs are case-insensitive. Currently, only existence (\“true\” at the end) is supported. Absence (\“false\” at the end) is not supported. Multiple values for different tag names are interpreted as \“AND\”.

  • :compartment_id_in_subtree (BOOLEAN)

    A flag to search all resources within a given compartment and all sub-compartments. (default to false)

Returns:



9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
# File 'lib/oci/opsi/operations_insights_client.rb', line 9227

def summarize_sql_statistics_time_series(compartment_id, sql_identifier, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_statistics_time_series.' if logger

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

  path = '/databaseInsights/sqlStatisticsTimeSeries'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sqlIdentifier] = sql_identifier
  query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:exadataInsightId] = OCI::ApiClient.build_collection_params(opts[:exadata_insight_id], :multi) if opts[:exadata_insight_id] && !opts[:exadata_insight_id].empty?
  query_params[:cdbName] = OCI::ApiClient.build_collection_params(opts[:cdb_name], :multi) if opts[:cdb_name] && !opts[:cdb_name].empty?
  query_params[:hostName] = OCI::ApiClient.build_collection_params(opts[:host_name], :multi) if opts[:host_name] && !opts[:host_name].empty?
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:definedTagEquals] = OCI::ApiClient.build_collection_params(opts[:defined_tag_equals], :multi) if opts[:defined_tag_equals] && !opts[:defined_tag_equals].empty?
  query_params[:freeformTagEquals] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_equals], :multi) if opts[:freeform_tag_equals] && !opts[:freeform_tag_equals].empty?
  query_params[:definedTagExists] = OCI::ApiClient.build_collection_params(opts[:defined_tag_exists], :multi) if opts[:defined_tag_exists] && !opts[:defined_tag_exists].empty?
  query_params[:freeformTagExists] = OCI::ApiClient.build_collection_params(opts[:freeform_tag_exists], :multi) if opts[:freeform_tag_exists] && !opts[:freeform_tag_exists].empty?
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_statistics_time_series') 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::Opsi::Models::SqlStatisticsTimeSeriesAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#summarize_sql_statistics_time_series_by_plan(compartment_id, sql_identifier, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_sql_statistics_time_series_by_plan.rb.html) to see an example of how to use summarize_sql_statistics_time_series_by_plan API.

Query SQL Warehouse to get the performance statistics time series for a given SQL by execution plans for a given time period. Either databaseId or id must be specified.

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

  • :database_id (String)

    Optional [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity.

  • :id (String)
  • :analysis_time_interval (String)

    Specify time period in ISO 8601 format with respect to current time. Default is last 30 days represented by P30D. If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).

    (default to P30D)
    
  • :time_interval_start (DateTime)

    Analysis start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). The minimum allowed value is 2 years prior to the current day. timeIntervalStart and timeIntervalEnd parameters are used together. If analysisTimeInterval is specified, this parameter is ignored.

  • :time_interval_end (DateTime)

    Analysis end time in UTC in ISO 8601 format(exclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd are used together. If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous \“List\” call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).

  • :opc_request_id (String)

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

Returns:



9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'lib/oci/opsi/operations_insights_client.rb', line 9328

def summarize_sql_statistics_time_series_by_plan(compartment_id, sql_identifier, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_statistics_time_series_by_plan.' if logger

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

  path = '/databaseInsights/sqlStatisticsTimeSeriesByPlan'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sqlIdentifier] = sql_identifier
  query_params[:databaseId] = opts[:database_id] if opts[:database_id]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
  query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
  query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
  query_params[:page] = opts[:page] if opts[:page]

  # 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: 'OperationsInsightsClient#summarize_sql_statistics_time_series_by_plan') 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::Opsi::Models::SqlStatisticsTimeSeriesByPlanAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_awr_hub(awr_hub_id, update_awr_hub_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/update_awr_hub.rb.html) to see an example of how to use update_awr_hub API.

Updates the configuration of a hub .

Parameters:

  • awr_hub_id (String)

    Unique Awr Hub identifier

  • update_awr_hub_details (OCI::Opsi::Models::UpdateAwrHubDetails)

    The configuration to be updated.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
# File 'lib/oci/opsi/operations_insights_client.rb', line 9397

def update_awr_hub(awr_hub_id, update_awr_hub_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#update_awr_hub.' if logger

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

  path = '/awrHubs/{awrHubId}'.sub('{awrHubId}', awr_hub_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_awr_hub_details)

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

#update_database_insight(database_insight_id, update_database_insight_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/update_database_insight.rb.html) to see an example of how to use update_database_insight API.

Updates configuration of a database insight.

Parameters:

  • database_insight_id (String)

    Unique database insight identifier

  • update_database_insight_details (OCI::Opsi::Models::UpdateDatabaseInsightDetails)

    The configuration to be updated.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
# File 'lib/oci/opsi/operations_insights_client.rb', line 9459

def update_database_insight(database_insight_id, update_database_insight_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#update_database_insight.' if logger

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

  path = '/databaseInsights/{databaseInsightId}'.sub('{databaseInsightId}', database_insight_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_database_insight_details)

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

#update_enterprise_manager_bridge(enterprise_manager_bridge_id, update_enterprise_manager_bridge_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/update_enterprise_manager_bridge.rb.html) to see an example of how to use update_enterprise_manager_bridge API.

Updates configuration of an Operations Insights Enterprise Manager bridge.

Parameters:

  • enterprise_manager_bridge_id (String)

    Unique Enterprise Manager bridge identifier

  • update_enterprise_manager_bridge_details (OCI::Opsi::Models::UpdateEnterpriseManagerBridgeDetails)

    The configuration to be updated.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
# File 'lib/oci/opsi/operations_insights_client.rb', line 9521

def update_enterprise_manager_bridge(enterprise_manager_bridge_id, update_enterprise_manager_bridge_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#update_enterprise_manager_bridge.' if logger

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

  path = '/enterpriseManagerBridges/{enterpriseManagerBridgeId}'.sub('{enterpriseManagerBridgeId}', enterprise_manager_bridge_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_enterprise_manager_bridge_details)

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

#update_exadata_insight(exadata_insight_id, update_exadata_insight_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/update_exadata_insight.rb.html) to see an example of how to use update_exadata_insight API.

Updates configuration of an Exadata insight.

Parameters:

  • exadata_insight_id (String)

    Unique Exadata insight identifier

  • update_exadata_insight_details (OCI::Opsi::Models::UpdateExadataInsightDetails)

    The configuration to be updated.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
# File 'lib/oci/opsi/operations_insights_client.rb', line 9583

def update_exadata_insight(exadata_insight_id, update_exadata_insight_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#update_exadata_insight.' if logger

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

  path = '/exadataInsights/{exadataInsightId}'.sub('{exadataInsightId}', exadata_insight_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_exadata_insight_details)

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

#update_host_insight(host_insight_id, update_host_insight_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/update_host_insight.rb.html) to see an example of how to use update_host_insight API.

Updates configuration of a host insight.

Parameters:

  • host_insight_id (String)

    Unique host insight identifier

  • update_host_insight_details (OCI::Opsi::Models::UpdateHostInsightDetails)

    The configuration to be updated.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
# File 'lib/oci/opsi/operations_insights_client.rb', line 9645

def update_host_insight(host_insight_id, update_host_insight_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#update_host_insight.' if logger

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

  path = '/hostInsights/{hostInsightId}'.sub('{hostInsightId}', host_insight_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_host_insight_details)

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

#update_operations_insights_warehouse(operations_insights_warehouse_id, update_operations_insights_warehouse_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/update_operations_insights_warehouse.rb.html) to see an example of how to use update_operations_insights_warehouse API.

Updates the configuration of an Operations Insights Warehouse. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment.

Parameters:

  • operations_insights_warehouse_id (String)

    Unique Operations Insights Warehouse identifier

  • update_operations_insights_warehouse_details (OCI::Opsi::Models::UpdateOperationsInsightsWarehouseDetails)

    The configuration to be updated.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
# File 'lib/oci/opsi/operations_insights_client.rb', line 9709

def update_operations_insights_warehouse(operations_insights_warehouse_id, update_operations_insights_warehouse_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#update_operations_insights_warehouse.' if logger

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

  path = '/operationsInsightsWarehouses/{operationsInsightsWarehouseId}'.sub('{operationsInsightsWarehouseId}', operations_insights_warehouse_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_operations_insights_warehouse_details)

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

#update_operations_insights_warehouse_user(operations_insights_warehouse_user_id, update_operations_insights_warehouse_user_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/update_operations_insights_warehouse_user.rb.html) to see an example of how to use update_operations_insights_warehouse_user API.

Updates the configuration of an Operations Insights Warehouse User.

Parameters:

  • operations_insights_warehouse_user_id (String)

    Unique Operations Insights Warehouse User identifier

  • update_operations_insights_warehouse_user_details (OCI::Opsi::Models::UpdateOperationsInsightsWarehouseUserDetails)

    The configuration to be updated.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

    Used for optimistic concurrency control. In the update or delete call for a resource, set the if-match parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
# File 'lib/oci/opsi/operations_insights_client.rb', line 9771

def update_operations_insights_warehouse_user(operations_insights_warehouse_user_id, update_operations_insights_warehouse_user_details, opts = {})
  logger.debug 'Calling operation OperationsInsightsClient#update_operations_insights_warehouse_user.' if logger

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

  path = '/operationsInsightsWarehouseUsers/{operationsInsightsWarehouseUserId}'.sub('{operationsInsightsWarehouseUserId}', operations_insights_warehouse_user_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_operations_insights_warehouse_user_details)

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