Class: OCI::StackMonitoring::StackMonitoringClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/stack_monitoring/stack_monitoring_client.rb

Overview

Stack Monitoring API.

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

Creates a new StackMonitoringClient. 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/stack_monitoring/stack_monitoring_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 + '/20210330'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "StackMonitoringClient 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/stack_monitoring/stack_monitoring_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/stack_monitoring/stack_monitoring_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/stack_monitoring/stack_monitoring_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/stack_monitoring/stack_monitoring_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#apply_monitoring_template(monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Apply the Monitoring Template identified by the id

Parameters:

  • monitoring_template_id (String)

    The OCID of the monitoring template.

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 125

def apply_monitoring_template(monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#apply_monitoring_template.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}/actions/apply'.sub('{monitoringTemplateId}', monitoring_template_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#associate_monitored_resources(associate_monitored_resources_details, opts = {}) ⇒ Response

Note:

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

Create an association between two monitored resources. Associations can be created between resources from different compartments as long they are in same tenancy. User should have required access in both the 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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 199

def associate_monitored_resources(associate_monitored_resources_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#associate_monitored_resources.' if logger

  raise "Missing the required parameter 'associate_monitored_resources_details' when calling associate_monitored_resources." if associate_monitored_resources_details.nil?

  path = '/monitoredResources/actions/associateMonitoredResources'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(associate_monitored_resources_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#associate_monitored_resources') 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::StackMonitoring::Models::MonitoredResourceAssociation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_config_compartment(config_id, change_config_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves the configuration item to another compartment. Basically, this will disable any configuration for this configuration type in thie compartment, and will enable it in the new one.

For example, if for a HOST resource type, the configuration with AUTO_PROMOTE in the configuration type and TRUE as value is moved, automatic discovery will not take place in this compartment any more, but in the new one.

So this operation will have the same effect as deleting the configuration item in the old compartment and recreating it in another compartment.

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)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 281

def change_config_compartment(config_id, change_config_compartment_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#change_config_compartment.' if logger

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

  path = '/configs/{configId}/actions/changeCompartment'.sub('{configId}', config_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_config_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#change_config_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_metric_extension_compartment(metric_extension_id, change_metric_extension_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a Metric Extension 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)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def change_metric_extension_compartment(metric_extension_id, change_metric_extension_compartment_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#change_metric_extension_compartment.' if logger

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

  path = '/metricExtensions/{metricExtensionId}/actions/changeCompartment'.sub('{metricExtensionId}', metric_extension_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_metric_extension_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#change_metric_extension_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_monitored_resource_compartment(monitored_resource_id, change_monitored_resource_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a monitored 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)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 429

def change_monitored_resource_compartment(monitored_resource_id, change_monitored_resource_compartment_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#change_monitored_resource_compartment.' if logger

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

  path = '/monitoredResources/{monitoredResourceId}/actions/changeCompartment'.sub('{monitoredResourceId}', monitored_resource_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_monitored_resource_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#change_monitored_resource_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_monitored_resource_task_compartment(monitored_resource_task_id, change_monitored_resource_task_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a stack monitoring resource task from one compartment to another.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def change_monitored_resource_task_compartment(monitored_resource_task_id, change_monitored_resource_task_compartment_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#change_monitored_resource_task_compartment.' if logger

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

  path = '/monitoredResourceTasks/{monitoredResourceTaskId}/actions/changeCompartment'.sub('{monitoredResourceTaskId}', monitored_resource_task_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_monitored_resource_task_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#change_monitored_resource_task_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_process_set_compartment(process_set_id, change_process_set_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a ProcessSet 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)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 575

def change_process_set_compartment(process_set_id, change_process_set_compartment_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#change_process_set_compartment.' if logger

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

  path = '/processSets/{processSetId}/actions/changeCompartment'.sub('{processSetId}', process_set_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_process_set_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#change_process_set_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_alarm_condition(create_alarm_condition_details, monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Create a new alarm condition in same monitoringTemplate 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 so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

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

Returns:



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

def create_alarm_condition(create_alarm_condition_details, monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_alarm_condition.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}/alarmConditions'.sub('{monitoringTemplateId}', monitoring_template_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_alarm_condition_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_alarm_condition') 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::StackMonitoring::Models::AlarmCondition'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_baselineable_metric(create_baselineable_metric_details, opts = {}) ⇒ Response

Note:

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

Creates the specified Baseline-able metric

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:



706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 706

def create_baselineable_metric(create_baselineable_metric_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_baselineable_metric.' if logger

  raise "Missing the required parameter 'create_baselineable_metric_details' when calling create_baselineable_metric." if create_baselineable_metric_details.nil?

  path = '/baselineableMetrics'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_baselineable_metric_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_baselineable_metric') 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::StackMonitoring::Models::BaselineableMetric'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_config(create_config_details, opts = {}) ⇒ Response

Note:

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

Creates a configuration item, for example to define whether resources of a specific type should be discovered automatically.

For example, when a new Management Agent gets registered in a certain compartment, this Management Agent can potentially get promoted to a HOST resource. The configuration item will determine if HOST resources in the selected compartment will be discovered automatically.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

Returns:



776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 776

def create_config(create_config_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_config.' if logger

  raise "Missing the required parameter 'create_config_details' when calling create_config." if create_config_details.nil?

  path = '/configs'
  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_config_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_config') 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::StackMonitoring::Models::Config'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_discovery_job(create_discovery_job_details, opts = {}) ⇒ Response

Note:

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

API to create discovery Job and submit discovery Details to agent.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:



840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 840

def create_discovery_job(create_discovery_job_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_discovery_job.' if logger

  raise "Missing the required parameter 'create_discovery_job_details' when calling create_discovery_job." if create_discovery_job_details.nil?

  path = '/discoveryJobs'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_discovery_job_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_discovery_job') 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::StackMonitoring::Models::DiscoveryJob'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_maintenance_window(create_maintenance_window_details, opts = {}) ⇒ Response

Note:

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

Creates a new Maintenance Window for the given resources. It will create also the Alarms Suppression for each alarm that the resource migth trigger.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

Returns:



906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 906

def create_maintenance_window(create_maintenance_window_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_maintenance_window.' if logger

  raise "Missing the required parameter 'create_maintenance_window_details' when calling create_maintenance_window." if create_maintenance_window_details.nil?

  path = '/maintenanceWindows'
  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_maintenance_window_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_maintenance_window') 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::StackMonitoring::Models::MaintenanceWindow'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_metric_extension(create_metric_extension_details, opts = {}) ⇒ Response

Note:

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

Creates a new metric extension resource for a given compartment

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

Returns:



970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 970

def create_metric_extension(create_metric_extension_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_metric_extension.' if logger

  raise "Missing the required parameter 'create_metric_extension_details' when calling create_metric_extension." if create_metric_extension_details.nil?

  path = '/metricExtensions'
  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_metric_extension_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_metric_extension') 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::StackMonitoring::Models::MetricExtension'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_monitored_resource(create_monitored_resource_details, opts = {}) ⇒ Response

Note:

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

Creates a new monitored resource for the given resource type with the details and submits a work request for promoting the resource to agent. Once the resource is successfully added to agent, resource state will be marked 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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

  • :external_resource_id (String)

    Generally used by DBaaS to send the Database OCID stored on the DBaaS. The same will be passed to resource service to enable Stack Monitoring Service on DBM. This will be stored in Stack Monitoring Resource Service data store as identifier for monitored resource. If this header is not set as part of the request, then an id will be generated and stored for the resource.

Returns:



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

def create_monitored_resource(create_monitored_resource_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_monitored_resource.' if logger

  raise "Missing the required parameter 'create_monitored_resource_details' when calling create_monitored_resource." if create_monitored_resource_details.nil?

  path = '/monitoredResources'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'external-resource-id'] = opts[:external_resource_id] if opts[:external_resource_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_monitored_resource_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_monitored_resource') 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::StackMonitoring::Models::MonitoredResource'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_monitored_resource_task(create_monitored_resource_task_details, opts = {}) ⇒ Response

Note:

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

Create a new stack monitoring resource task.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:



1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1106

def create_monitored_resource_task(create_monitored_resource_task_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_monitored_resource_task.' if logger

  raise "Missing the required parameter 'create_monitored_resource_task_details' when calling create_monitored_resource_task." if create_monitored_resource_task_details.nil?

  path = '/monitoredResourceTasks'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_monitored_resource_task_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_monitored_resource_task') 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::StackMonitoring::Models::MonitoredResourceTask'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_monitored_resource_type(create_monitored_resource_type_details, opts = {}) ⇒ Response

Note:

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

Creates a new monitored resource type.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:



1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1169

def create_monitored_resource_type(create_monitored_resource_type_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_monitored_resource_type.' if logger

  raise "Missing the required parameter 'create_monitored_resource_type_details' when calling create_monitored_resource_type." if create_monitored_resource_type_details.nil?

  path = '/monitoredResourceTypes'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_monitored_resource_type_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_monitored_resource_type') 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::StackMonitoring::Models::MonitoredResourceType'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_monitoring_template(create_monitoring_template_details, opts = {}) ⇒ Response

Note:

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

Creates a new monitoring template for a given compartment.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

Returns:



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
1262
1263
1264
1265
1266
1267
1268
1269
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1232

def create_monitoring_template(create_monitoring_template_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_monitoring_template.' if logger

  raise "Missing the required parameter 'create_monitoring_template_details' when calling create_monitoring_template." if create_monitoring_template_details.nil?

  path = '/monitoringTemplates'
  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_monitoring_template_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_monitoring_template') 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::StackMonitoring::Models::MonitoringTemplate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_process_set(create_process_set_details, opts = {}) ⇒ Response

Note:

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

API to create Process Set.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:



1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1295

def create_process_set(create_process_set_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#create_process_set.' if logger

  raise "Missing the required parameter 'create_process_set_details' when calling create_process_set." if create_process_set_details.nil?

  path = '/processSets'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_process_set_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#create_process_set') 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::StackMonitoring::Models::ProcessSet'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_alarm_condition(alarm_condition_id, monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Deletes the alarm conditions by identifier

Parameters:

  • alarm_condition_id (String)

    The OCID of the alarm condition.

  • monitoring_template_id (String)

    The OCID of the monitoring template.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1359

def delete_alarm_condition(alarm_condition_id, monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_alarm_condition.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}/alarmConditions/{alarmConditionId}'.sub('{alarmConditionId}', alarm_condition_id.to_s).sub('{monitoringTemplateId}', monitoring_template_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: 'StackMonitoringClient#delete_alarm_condition') 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_baselineable_metric(baselineable_metric_id, opts = {}) ⇒ Response

Note:

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

Deletes the Baseline-able metric for the given id

Parameters:

  • baselineable_metric_id (String)

    Identifier for the metric

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

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

Returns:

  • (Response)

    A Response object with data of type nil



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/stack_monitoring/stack_monitoring_client.rb', line 1423

def delete_baselineable_metric(baselineable_metric_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_baselineable_metric.' if logger

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

  path = '/baselineableMetrics/{baselineableMetricId}'.sub('{baselineableMetricId}', baselineable_metric_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: 'StackMonitoringClient#delete_baselineable_metric') 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_config(config_id, opts = {}) ⇒ Response

Note:

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

Deletes a configuration identified by the id.

Parameters:

  • config_id (String)

    Unique Config 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)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1485

def delete_config(config_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_config.' if logger

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

  path = '/configs/{configId}'.sub('{configId}', config_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: 'StackMonitoringClient#delete_config') 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_discovery_job(discovery_job_id, opts = {}) ⇒ Response

Note:

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

Deletes a DiscoveryJob by identifier

Parameters:

  • discovery_job_id (String)

    The Discovery Job ID

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1547

def delete_discovery_job(discovery_job_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_discovery_job.' if logger

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

  path = '/discoveryJobs/{discoveryJobId}'.sub('{discoveryJobId}', discovery_job_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: 'StackMonitoringClient#delete_discovery_job') 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_maintenance_window(maintenance_window_id, opts = {}) ⇒ Response

Note:

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

Deletes a maintenance window by identifier

Parameters:

  • maintenance_window_id (String)

    The OCID of maintenance window.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
1642
1643
1644
1645
1646
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1610

def delete_maintenance_window(maintenance_window_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_maintenance_window.' if logger

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

  path = '/maintenanceWindows/{maintenanceWindowId}'.sub('{maintenanceWindowId}', maintenance_window_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: 'StackMonitoringClient#delete_maintenance_window') 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_metric_extension(metric_extension_id, opts = {}) ⇒ Response

Note:

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

Deletes a metric extension by identifier

Parameters:

  • metric_extension_id (String)

    The OCID of the metric extension resource.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def delete_metric_extension(metric_extension_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_metric_extension.' if logger

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

  path = '/metricExtensions/{metricExtensionId}'.sub('{metricExtensionId}', metric_extension_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: 'StackMonitoringClient#delete_metric_extension') 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_monitored_resource(monitored_resource_id, opts = {}) ⇒ Response

Note:

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

Delete monitored resource by the given identifier OCID. By default, only the specified resource is deleted. If the parameter 'isDeleteMembers' is set to true, then the member resources will be deleted too. If the operation fails partially, the deleted entries will not be rolled back.

Parameters:

  • monitored_resource_id (String)

    The OCID of monitored resource.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :is_delete_members (BOOLEAN)

    If this query parameter is specified and set to true, all the member resources will be deleted before deleting the specified resource. (default to false)

Returns:

  • (Response)

    A Response object with data of type nil



1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1741

def delete_monitored_resource(monitored_resource_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_monitored_resource.' if logger

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

  path = '/monitoredResources/{monitoredResourceId}'.sub('{monitoredResourceId}', monitored_resource_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isDeleteMembers] = opts[:is_delete_members] if !opts[:is_delete_members].nil?

  # 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: 'StackMonitoringClient#delete_monitored_resource') 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_monitored_resource_type(monitored_resource_type_id, opts = {}) ⇒ Response

Note:

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

Deletes a monitored resource type by identifier OCID.

Parameters:

  • monitored_resource_type_id (String)

    The OCID of monitored resource type.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1804

def delete_monitored_resource_type(monitored_resource_type_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_monitored_resource_type.' if logger

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

  path = '/monitoredResourceTypes/{monitoredResourceTypeId}'.sub('{monitoredResourceTypeId}', monitored_resource_type_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: 'StackMonitoringClient#delete_monitored_resource_type') 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_monitoring_template(monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Deletes the monitoring template by identifier

Parameters:

  • monitoring_template_id (String)

    The OCID of the monitoring template.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1866
1867
1868
1869
1870
1871
1872
1873
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1866

def delete_monitoring_template(monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_monitoring_template.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}'.sub('{monitoringTemplateId}', monitoring_template_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: 'StackMonitoringClient#delete_monitoring_template') 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_process_set(process_set_id, opts = {}) ⇒ Response

Note:

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

Deletes a Process Set

Parameters:

  • process_set_id (String)

    The Process Set ID

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1928

def delete_process_set(process_set_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#delete_process_set.' if logger

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

  path = '/processSets/{processSetId}'.sub('{processSetId}', process_set_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: 'StackMonitoringClient#delete_process_set') 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_external_database(monitored_resource_id, opts = {}) ⇒ Response

Note:

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

Disable external database resource monitoring. All the references in DBaaS, DBM and resource service will be deleted as part of this operation.

Parameters:

  • monitored_resource_id (String)

    The OCID of monitored resource.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1998

def disable_external_database(monitored_resource_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#disable_external_database.' if logger

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

  path = '/monitoredResources/{monitoredResourceId}/actions/disableExternalDatabase'.sub('{monitoredResourceId}', monitored_resource_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#disable_external_database') 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_metric_extension(metric_extension_id, disable_metric_extension_details, opts = {}) ⇒ Response

Note:

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

Submits a request to disable matching metric extension Id for the given Resource IDs

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2070

def disable_metric_extension(metric_extension_id, disable_metric_extension_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#disable_metric_extension.' if logger

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

  path = '/metricExtensions/{metricExtensionId}/actions/disable'.sub('{metricExtensionId}', metric_extension_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(disable_metric_extension_details)

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

#disassociate_monitored_resources(disassociate_monitored_resources_details, opts = {}) ⇒ Response

Note:

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

Removes associations between two monitored resources.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2141

def disassociate_monitored_resources(disassociate_monitored_resources_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#disassociate_monitored_resources.' if logger

  raise "Missing the required parameter 'disassociate_monitored_resources_details' when calling disassociate_monitored_resources." if disassociate_monitored_resources_details.nil?

  path = '/monitoredResources/actions/disassociateMonitoredResources'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(disassociate_monitored_resources_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#disassociate_monitored_resources') 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_metric_extension(metric_extension_id, enable_metric_extension_details, opts = {}) ⇒ Response

Note:

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

Submits a request to enable matching metric extension Id for the given Resource IDs

Parameters:

  • metric_extension_id (String)

    The OCID of the metric extension resource.

  • enable_metric_extension_details (OCI::StackMonitoring::Models::EnableMetricExtensionDetails)

    The list of Resource IDs for which given metric extension needs to be enabled

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2212

def enable_metric_extension(metric_extension_id, enable_metric_extension_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#enable_metric_extension.' if logger

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

  path = '/metricExtensions/{metricExtensionId}/actions/enable'.sub('{metricExtensionId}', metric_extension_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_metric_extension_details)

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

#evaluate_baselineable_metric(evaluate_baselineable_metric_details, baselineable_metric_id, opts = {}) ⇒ Response

Note:

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

Evaluates metric for anomalies for the given data points

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)

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

  • :opc_retry_token (String)

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

Returns:



2284
2285
2286
2287
2288
2289
2290
2291
2292
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2284

def evaluate_baselineable_metric(evaluate_baselineable_metric_details, baselineable_metric_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#evaluate_baselineable_metric.' if logger

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

  path = '/baselineableMetrics/{baselineableMetricId}/actions/evaluate'.sub('{baselineableMetricId}', baselineable_metric_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]
  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(evaluate_baselineable_metric_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#evaluate_baselineable_metric') 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::StackMonitoring::Models::EvaluateBaselineableMetricResult'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#export_metric_extension(metric_extension_id, opts = {}, &block) ⇒ Response

Note:

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

Export generates a template used to create new metric extension resources similar to matching metric extension id. Response is a file that contains metric extension definition with placeholders for fields to be changed.

Parameters:

  • metric_extension_id (String)

    The OCID of the metric extension resource.

  • 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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

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



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
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2360

def export_metric_extension(metric_extension_id, opts = {}, &block)
  logger.debug 'Calling operation StackMonitoringClient#export_metric_extension.' if logger

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

  path = '/metricExtensions/{metricExtensionId}/actions/export'.sub('{metricExtensionId}', metric_extension_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/json'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  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: 'StackMonitoringClient#export_metric_extension') 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

#export_monitoring_template(monitoring_template_id, opts = {}, &block) ⇒ Response

Note:

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

Export the specified monitoring template

Parameters:

  • monitoring_template_id (String)

    The OCID of the monitoring template.

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

  • :if_match (String)

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

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



2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
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
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2477

def export_monitoring_template(monitoring_template_id, opts = {}, &block)
  logger.debug 'Calling operation StackMonitoringClient#export_monitoring_template.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}/actions/export'.sub('{monitoringTemplateId}', monitoring_template_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/json'
  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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#get_alarm_condition(alarm_condition_id, monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Gets a Alarm Condition by identifier.

Parameters:

  • alarm_condition_id (String)

    The OCID of the alarm condition.

  • monitoring_template_id (String)

    The OCID of the monitoring template.

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



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
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2581

def get_alarm_condition(alarm_condition_id, monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_alarm_condition.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}/alarmConditions/{alarmConditionId}'.sub('{alarmConditionId}', alarm_condition_id.to_s).sub('{monitoringTemplateId}', monitoring_template_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: 'StackMonitoringClient#get_alarm_condition') 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::StackMonitoring::Models::AlarmCondition'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_baselineable_metric(baselineable_metric_id, opts = {}) ⇒ Response

Note:

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

Get the Baseline-able metric for the given id

Parameters:

  • baselineable_metric_id (String)

    Identifier for the metric

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



2639
2640
2641
2642
2643
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2639

def get_baselineable_metric(baselineable_metric_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_baselineable_metric.' if logger

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

  path = '/baselineableMetrics/{baselineableMetricId}'.sub('{baselineableMetricId}', baselineable_metric_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: 'StackMonitoringClient#get_baselineable_metric') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::StackMonitoring::Models::BaselineableMetric'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_config(config_id, opts = {}) ⇒ Response

Note:

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

Gets the details of a configuration.

Parameters:

  • config_id (String)

    Unique Config 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:



2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2695

def get_config(config_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_config.' if logger

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

  path = '/configs/{configId}'.sub('{configId}', config_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: 'StackMonitoringClient#get_config') 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::StackMonitoring::Models::Config'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_discovery_job(discovery_job_id, opts = {}) ⇒ Response

Note:

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

API to get the details of discovery Job by identifier.

Parameters:

  • discovery_job_id (String)

    The Discovery Job ID

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



2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2752

def get_discovery_job(discovery_job_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_discovery_job.' if logger

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

  path = '/discoveryJobs/{discoveryJobId}'.sub('{discoveryJobId}', discovery_job_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: 'StackMonitoringClient#get_discovery_job') 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::StackMonitoring::Models::DiscoveryJob'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_maintenance_window(maintenance_window_id, opts = {}) ⇒ Response

Note:

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

Get maintenance window for the given identifier OCID.

Parameters:

  • maintenance_window_id (String)

    The OCID of maintenance window.

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



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
2842
2843
2844
2845
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2809

def get_maintenance_window(maintenance_window_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_maintenance_window.' if logger

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

  path = '/maintenanceWindows/{maintenanceWindowId}'.sub('{maintenanceWindowId}', maintenance_window_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: 'StackMonitoringClient#get_maintenance_window') 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::StackMonitoring::Models::MaintenanceWindow'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_metric_extension(metric_extension_id, opts = {}) ⇒ Response

Note:

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

Gets a Metric Extension by identifier

Parameters:

  • metric_extension_id (String)

    The OCID of the metric extension resource.

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



2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2865

def get_metric_extension(metric_extension_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_metric_extension.' if logger

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

  path = '/metricExtensions/{metricExtensionId}'.sub('{metricExtensionId}', metric_extension_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: 'StackMonitoringClient#get_metric_extension') 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::StackMonitoring::Models::MetricExtension'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_monitored_resource(monitored_resource_id, opts = {}) ⇒ Response

Note:

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

Get monitored resource for the given identifier OCID.

Parameters:

  • monitored_resource_id (String)

    The OCID of monitored resource.

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



2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2922

def get_monitored_resource(monitored_resource_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_monitored_resource.' if logger

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

  path = '/monitoredResources/{monitoredResourceId}'.sub('{monitoredResourceId}', monitored_resource_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: 'StackMonitoringClient#get_monitored_resource') 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::StackMonitoring::Models::MonitoredResource'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_monitored_resource_task(monitored_resource_task_id, opts = {}) ⇒ Response

Note:

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

Gets stack monitoring resource task details by identifier OCID.

Parameters:

  • monitored_resource_task_id (String)

    The OCID of stack monitoring resource task.

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



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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2978

def get_monitored_resource_task(monitored_resource_task_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_monitored_resource_task.' if logger

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

  path = '/monitoredResourceTasks/{monitoredResourceTaskId}'.sub('{monitoredResourceTaskId}', monitored_resource_task_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: 'StackMonitoringClient#get_monitored_resource_task') 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::StackMonitoring::Models::MonitoredResourceTask'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_monitored_resource_type(monitored_resource_type_id, opts = {}) ⇒ Response

Note:

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

Gets a monitored resource type by identifier OCID.

Parameters:

  • monitored_resource_type_id (String)

    The OCID of monitored resource type.

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



3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3034

def get_monitored_resource_type(monitored_resource_type_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_monitored_resource_type.' if logger

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

  path = '/monitoredResourceTypes/{monitoredResourceTypeId}'.sub('{monitoredResourceTypeId}', monitored_resource_type_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: 'StackMonitoringClient#get_monitored_resource_type') 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::StackMonitoring::Models::MonitoredResourceType'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_monitoring_template(monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Gets a Monitoring Template by identifier

Parameters:

  • monitoring_template_id (String)

    The OCID of the monitoring template.

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



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
3118
3119
3120
3121
3122
3123
3124
3125
3126
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3090

def get_monitoring_template(monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_monitoring_template.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}'.sub('{monitoringTemplateId}', monitoring_template_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: 'StackMonitoringClient#get_monitoring_template') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::StackMonitoring::Models::MonitoringTemplate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_process_set(process_set_id, opts = {}) ⇒ Response

Note:

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

API to get the details of a Process Set by identifier.

Parameters:

  • process_set_id (String)

    The Process Set ID

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



3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3146

def get_process_set(process_set_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#get_process_set.' if logger

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

  path = '/processSets/{processSetId}'.sub('{processSetId}', process_set_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: 'StackMonitoringClient#get_process_set') 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::StackMonitoring::Models::ProcessSet'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here 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 OCID of the work 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:



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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3202

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#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: 'StackMonitoringClient#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::StackMonitoring::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_alarm_conditions(monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Returns a list of Alarm Conditions.

Parameters:

  • monitoring_template_id (String)

    The OCID of the monitoring template.

  • 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. (default to 10)

  • :page (String)

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

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeUpdated is descending. (default to timeUpdated) Allowed values are: metricName, lifeCycleState, resourceType, status, timeUpdated, timeCreated

  • :sort_order (String)

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

  • :status (String)

    A filter to return alarm condition based on input status. (default to APPLIED)

  • :lifecycle_state (String)

    A filter to return alarm condition based on Lifecycle State. (default to CREATING)

  • :resource_types (Array<String>)

    Multiple resource types filter.

  • :metric_name (Array<String>)

    metricName filter.

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



3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3276

def list_alarm_conditions(monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#list_alarm_conditions.' if logger

  raise "Missing the required parameter 'monitoring_template_id' when calling list_alarm_conditions." if monitoring_template_id.nil?

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

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

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

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

  path = '/monitoringTemplates/{monitoringTemplateId}/alarmConditions'.sub('{monitoringTemplateId}', monitoring_template_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[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:resourceTypes] = OCI::ApiClient.build_collection_params(opts[:resource_types], :multi) if opts[:resource_types] && !opts[:resource_types].empty?
  query_params[:metricName] = OCI::ApiClient.build_collection_params(opts[:metric_name], :multi) if opts[:metric_name] && !opts[:metric_name].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: 'StackMonitoringClient#list_alarm_conditions') 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::StackMonitoring::Models::AlarmConditionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_baselineable_metrics(opts = {}) ⇒ Response

Note:

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

List of summary of baseline-able metrics for a given resource group if specified. Allowed values are: name, namespace, resourceGroup

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.

  • :resource_group (String)

    Resource Group

  • :resource_type (String)

    Resource Type

  • :is_out_of_box (BOOLEAN)

    Is the baseline enabled metric defined out of box by Oracle or by end-user

  • :name (String)

    Metric Name

  • :metric_namespace (String)

    A filter to return monitored resource types that has the matching namespace.

  • :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. (default to 10)

  • :page (String)

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

  • :compartment_id (String)

    The ID of the compartment in which data is listed.

  • :baselineable_metric_id (String)

    Identifier for the metric

  • :sort_order (String)

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

  • :sort_by (String)

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

Returns:



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
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3377

def list_baselineable_metrics(opts = {})
  logger.debug 'Calling operation StackMonitoringClient#list_baselineable_metrics.' if logger


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

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

  path = '/baselineableMetrics'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:resourceGroup] = opts[:resource_group] if opts[:resource_group]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:isOutOfBox] = opts[:is_out_of_box] if !opts[:is_out_of_box].nil?
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:metricNamespace] = opts[:metric_namespace] if opts[:metric_namespace]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:baselineableMetricId] = opts[:baselineable_metric_id] if opts[:baselineable_metric_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: 'StackMonitoringClient#list_baselineable_metrics') 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::StackMonitoring::Models::BaselineableMetricSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Get a list of configurations in a compartment.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which data is listed.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :type (String)

    A filter to return only configuration items for a given config type.

  • :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. (default to 10)

  • :page (String)

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

  • :lifecycle_state (String)

    The current state of the Config.

  • :sort_order (String)

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

  • :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' and 'configType' is ascending. (default to timeCreated) Allowed values are: timeCreated, configType, displayName

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



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
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3469

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

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

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

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

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

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

  path = '/configs'
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#list_configs') 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::StackMonitoring::Models::ConfigCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

List Defined Monitoring Templates.

Parameters:

  • compartment_id (String)

    The OCID of the tenancy(root) for which defined monitored templates should be listed.

  • 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. (default to 10)

  • :page (String)

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

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for 'namespace' is ascending. (default to namespace) Allowed values are: namespace

  • :display_name (String)

    A filter to return monitoring template based on name.

  • :sort_order (String)

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

  • :resource_types (Array<String>)

    Multiple resource types filter.

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



3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3566

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

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

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

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

  path = '/definedMonitoringTemplates'
  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[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:resourceTypes] = OCI::ApiClient.build_collection_params(opts[:resource_types], :multi) if opts[:resource_types] && !opts[:resource_types].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: 'StackMonitoringClient#list_defined_monitoring_templates') 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::StackMonitoring::Models::DefinedMonitoringTemplateCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_discovery_job_logs(discovery_job_id, opts = {}) ⇒ Response

Note:

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

API to get all the logs of a Discovery Job.

Allowed values are: timeCreated, logType

Parameters:

  • discovery_job_id (String)

    The Discovery Job ID

  • 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

  • :log_type (String)

    The log type like INFO, WARNING, ERROR, SUCCESS Allowed values are: INFO, WARNING, ERROR, SUCCESS

  • :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. (default to 10)

  • :page (String)

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

  • :sort_order (String)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

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

Returns:



3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3652

def list_discovery_job_logs(discovery_job_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#list_discovery_job_logs.' if logger

  raise "Missing the required parameter 'discovery_job_id' when calling list_discovery_job_logs." if discovery_job_id.nil?

  if opts[:log_type] && !%w[INFO WARNING ERROR SUCCESS].include?(opts[:log_type])
    raise 'Invalid value for "log_type", must be one of INFO, WARNING, ERROR, SUCCESS.'
  end

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

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

  path = '/discoveryJobs/{discoveryJobId}/logs'.sub('{discoveryJobId}', discovery_job_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:logType] = opts[:log_type] if opts[:log_type]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#list_discovery_job_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::StackMonitoring::Models::DiscoveryJobLogCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

API to get the details of all Discovery Jobs.

Allowed values are: timeUpdated, resourceName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which data is listed.

  • 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

  • :name (String)

    A filter to return only discovery jobs that match the entire resource name given.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

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

  • :sort_by (String)

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

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



3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3740

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

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

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

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

  path = '/discoveryJobs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = 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[: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: 'StackMonitoringClient#list_discovery_jobs') 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::StackMonitoring::Models::DiscoveryJobCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of maintenance windows.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which data is listed.

  • 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

  • :name (String)

    A filter to return maintenance windows that match exact resource name.

  • :lifecycle_details (String)

    A filter to return maintenance windows with matching lifecycleDetails.

  • :status (String)

    A filter to return only maintenance windows with matching lifecycleState.

  • :sort_by (String)

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

  • :sort_order (String)

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

  • :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. (default to 10)

  • :page (String)

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

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



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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3825

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

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

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

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

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

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

  path = '/maintenanceWindows'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:lifecycleDetails] = opts[:lifecycle_details] if opts[:lifecycle_details]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  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: 'StackMonitoringClient#list_maintenance_windows') 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::StackMonitoring::Models::MaintenanceWindowCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_metric_extensions(opts = {}) ⇒ Response

Note:

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

Returns a list of metric extensions

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

  • :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. (default to 10)

  • :page (String)

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

  • :sort_by (String)

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

  • :sort_order (String)

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

  • :compartment_id (String)

    The ID of the compartment in which data is listed.

  • :resource_type (String)

    A filter to return resources based on resource type.

  • :name (String)

    A filter to return resources based on name.

  • :status (String)

    A filter to return resources based on status e.g. Draft or Published

  • :lifecycle_state (String)

    A filter to return metric extensions based on Lifecycle State

  • :enabled_on_resource_id (String)

    A filter to return metric extensions based on input resource Id on which metric extension is enabled

  • :metric_extension_id (String)

    Identifier for the metric extension

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



3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3923

def list_metric_extensions(opts = {})
  logger.debug 'Calling operation StackMonitoringClient#list_metric_extensions.' if logger


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

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

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

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

  path = '/metricExtensions'
  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[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:enabledOnResourceId] = opts[:enabled_on_resource_id] if opts[:enabled_on_resource_id]
  query_params[:metricExtensionId] = opts[:metric_extension_id] if opts[:metric_extension_id]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#list_metric_extensions') 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::StackMonitoring::Models::MetricExtensionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of stack monitoring resource tasks in the compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment for which stack monitoring resource tasks should be listed.

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

    the optional parameters

Options Hash (opts):

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

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

  • :status (String)

    A filter to return only resources that matches with lifecycleState given.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for 'timeUpdated' is descending. (default to timeUpdated) Allowed values are: timeUpdated

  • :sort_order (String)

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

  • :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. (default to 10)

  • :page (String)

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

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



4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4022

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

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

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

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

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

  path = '/monitoredResourceTasks'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  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: 'StackMonitoringClient#list_monitored_resource_tasks') 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::StackMonitoring::Models::MonitoredResourceTasksCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns list of resource types accessible to the customer. There are two types of resource types - System resource types and User resource types. System resource types are available out of the box in the stack monitoring resource service and are accessible to all the tenant users. User resource types are created in the context of a tenancy and are visible only for the tenancy. By default, both System resource types and User resource types are returned.

Parameters:

  • compartment_id (String)

    The OCID of the tenancy for which monitored resource types should be listed.

  • 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

  • :name (String)

    A filter to return monitored resource types that match exactly with the resource type name given.

  • :status (String)

    A filter to return only resources that matches with lifecycleState given.

  • :is_exclude_system_types (BOOLEAN)

    A filter to exclude system resource types. If set to true, system resource types will be excluded. (default to false)

  • :metric_namespace (String)

    A filter to return monitored resource types that has the matching namespace.

  • :source_type (String)

    A filter to return only resources with matching source type.

  • :resource_category (String)

    A filter to return only resources with matching resource category.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for 'timeUpdated' is descending. Default order for 'name' is ascending. (default to timeUpdated) Allowed values are: timeUpdated, name

  • :sort_order (String)

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

  • :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. (default to 10)

  • :page (String)

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

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

  • :fields (Array<String>)

    Partial response refers to an optimization technique offered by the RESTful web APIs, to return only the information (fields) required by the client. In this mechanism, the client sends the required field names as the query parameters for an API to the server, and the server trims down the default response content by removing the fields that are not required by the client. The parameter controls which fields to return and should be a query string parameter called "fields" of an array type, provide the values as enums, and use collectionFormat.

    MonitoredResourceType Id, name and compartment will be added by default.

  • :exclude_fields (Array<String>)

    Partial response refers to an optimization technique offered by the RESTful web APIs, to return all the information except the fields requested to be excluded (excludeFields) by the client. In this mechanism, the client sends the exclude field names as the query parameters for an API to the server, and the server trims down the default response content by removing the fields that are not required by the client. The parameter controls which fields to exlude and to return and should be a query string parameter called "excludeFields" of an array type, provide the values as enums, and use collectionFormat.

Returns:



4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4150

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

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

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

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

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

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

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

  path = '/monitoredResourceTypes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:isExcludeSystemTypes] = opts[:is_exclude_system_types] if !opts[:is_exclude_system_types].nil?
  query_params[:metricNamespace] = opts[:metric_namespace] if opts[:metric_namespace]
  query_params[:sourceType] = opts[:source_type] if opts[:source_type]
  query_params[:resourceCategory] = opts[:resource_category] if opts[:resource_category]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:fields] = OCI::ApiClient.build_collection_params(opts[:fields], :multi) if opts[:fields] && !opts[:fields].empty?
  query_params[:excludeFields] = OCI::ApiClient.build_collection_params(opts[:exclude_fields], :multi) if opts[:exclude_fields] && !opts[:exclude_fields].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: 'StackMonitoringClient#list_monitored_resource_types') 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::StackMonitoring::Models::MonitoredResourceTypesCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of monitored resources.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which data is listed.

  • 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

  • :name (String)

    A filter to return resources that match exact resource name.

  • :work_request_id (String)

    A filter to return resources which were impacted as part of this work request identifier.

  • :status (String)

    A filter to return only resources with matching lifecycleState.

  • :sort_by (String)

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

  • :sort_order (String)

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

  • :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. (default to 10)

  • :page (String)

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

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



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4254

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

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

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

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

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

  path = '/monitoredResources'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  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: 'StackMonitoringClient#list_monitored_resources') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::StackMonitoring::Models::MonitoredResourceCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_monitoring_templates(opts = {}) ⇒ Response

Note:

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

Returns a list of Monitoring Templates.

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.

  • :compartment_id (String)

    The ID of the compartment in which data is listed.

  • :monitoring_template_id (String)

    A filter to return monitoring template based on input monitoringTemplateId

  • :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. (default to 10)

  • :page (String)

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

  • :sort_order (String)

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

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeUpdated is descending. (default to timeUpdated) Allowed values are: displayName, lifeCycleState, status, timeUpdated, timeCreated

  • :display_name (String)

    A filter to return monitoring template based on name.

  • :status (String)

    A filter to return monitoring template based on input status (default to APPLIED)

  • :lifecycle_state (String)

    A filter to return monitoring template based on Lifecycle State (default to CREATING)

  • :resource_types (Array<String>)

    Multiple resource types filter.

  • :metric_name (Array<String>)

    metricName filter.

  • :namespace (Array<String>)

    namespace filter.

Returns:



4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4350

def list_monitoring_templates(opts = {})
  logger.debug 'Calling operation StackMonitoringClient#list_monitoring_templates.' if logger


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

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

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

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

  path = '/monitoringTemplates'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:monitoringTemplateId] = opts[:monitoring_template_id] if opts[:monitoring_template_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:resourceTypes] = OCI::ApiClient.build_collection_params(opts[:resource_types], :multi) if opts[:resource_types] && !opts[:resource_types].empty?
  query_params[:metricName] = OCI::ApiClient.build_collection_params(opts[:metric_name], :multi) if opts[:metric_name] && !opts[:metric_name].empty?
  query_params[:namespace] = OCI::ApiClient.build_collection_params(opts[:namespace], :multi) if opts[:namespace] && !opts[:namespace].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: 'StackMonitoringClient#list_monitoring_templates') 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::StackMonitoring::Models::MonitoringTemplateCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

API to get the details of all Process Sets. Allowed values are: timeUpdated, name

Parameters:

  • compartment_id (String)

    The ID of the compartment in which data is listed.

  • 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. (default to 10)

  • :page (String)

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

  • :sort_order (String)

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

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

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

  • :display_name (String)

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

Returns:



4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4446

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

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

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

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

  path = '/processSets'
  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]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]

  # 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: 'StackMonitoringClient#list_process_sets') 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::StackMonitoring::Models::ProcessSetCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here 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: timestamp

Parameters:

  • work_request_id (String)

    The OCID of the work 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.

  • :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. (default to 10)

  • :sort_order (String)

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

  • :sort_by (String)

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

Returns:



4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4529

def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#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_order] && !OCI::StackMonitoring::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::StackMonitoring::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timestamp].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timestamp.'
  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[: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: 'StackMonitoringClient#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::StackMonitoring::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here 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: timestamp

Parameters:

  • work_request_id (String)

    The OCID of the work 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.

  • :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. (default to 10)

  • :sort_order (String)

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

  • :sort_by (String)

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

Returns:



4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4611

def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#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_order] && !OCI::StackMonitoring::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::StackMonitoring::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timestamp].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timestamp.'
  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[: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: 'StackMonitoringClient#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::StackMonitoring::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists the work requests in a compartment.

Allowed values are: timeAccepted

Parameters:

  • compartment_id (String)

    The ID of the compartment in which data is listed.

  • 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

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

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

  • :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. (default to 10)

  • :sort_order (String)

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

  • :sort_by (String)

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

Returns:



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
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4696

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

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

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

  if opts[:sort_order] && !OCI::StackMonitoring::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::StackMonitoring::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[:compartmentId] = compartment_id
  query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  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: 'StackMonitoringClient#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::StackMonitoring::Models::WorkRequestSummaryCollection'
    )
  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/stack_monitoring/stack_monitoring_client.rb', line 94

def logger
  @api_client.config.logger
end

#manage_license(monitored_resource_id, manage_license_details, opts = {}) ⇒ Response

Note:

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

Each resource is assigned a license based on which features are enabled for it. User is charged differently based on license. Specify the license type to be updated for the parent resource in the topology. The license type value is propagated to the member resources as well. Member resource is a resource which has "contains" association with 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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
4823
4824
4825
4826
4827
4828
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4789

def manage_license(monitored_resource_id, manage_license_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#manage_license.' if logger

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

  path = '/monitoredResources/{monitoredResourceId}/actions/manageLicense'.sub('{monitoredResourceId}', monitored_resource_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(manage_license_details)

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

#publish_metric_extension(metric_extension_id, opts = {}) ⇒ Response

Note:

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

Publish the Metric Extension identified by the id

Parameters:

  • metric_extension_id (String)

    The OCID of the metric extension resource.

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4860

def publish_metric_extension(metric_extension_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#publish_metric_extension.' if logger

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

  path = '/metricExtensions/{metricExtensionId}/actions/publish'.sub('{metricExtensionId}', metric_extension_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#publish_metric_extension') 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::StackMonitoring::Models::MetricExtension'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Gets resource count based on the aggregation criteria specified using "groupBy" parameter.

Allowed values are: resourceType, license, parentResourceId, namespace Allowed values are: count

Parameters:

  • compartment_id (String)

    The ID of the compartment in which data is listed.

  • 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

  • :group_by (String)

    The field to group by. Default group by is 'resourceType'. (default to resourceType)

  • :license (String)

    Filter to return resource counts that match with the given licence edition.

  • :resource_type (String)

    A filter to return resource counts that match exact resource type.

  • :sort_by (String)

    If this query parameter is specified, the result is sorted by this query parameter value. (default to count)

  • :sort_order (String)

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

  • :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. (default to 10)

  • :page (String)

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

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



4939
4940
4941
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
4991
4992
4993
4994
4995
4996
4997
4998
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4939

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

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

  if opts[:group_by] && !%w[resourceType license parentResourceId namespace].include?(opts[:group_by])
    raise 'Invalid value for "group_by", must be one of resourceType, license, parentResourceId, namespace.'
  end

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

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

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

  path = '/monitoredResources/actions/summarizeCount'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:groupBy] = opts[:group_by] if opts[:group_by]
  query_params[:license] = opts[:license] if opts[:license]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  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: 'StackMonitoringClient#request_monitored_resources_summarized_count') 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::StackMonitoring::Models::MonitoredResourcesCountAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#request_summarized_metric_extensions_metrics(request_summarized_metric_extensions_metrics_details, opts = {}) ⇒ Response

Note:

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

Gets metric extension metrics count based on the aggregation criteria specified using request body. Either metricExtensionId or compartmentId must be passed even when no other filter property is passed.

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. (default to 10)

  • :page (String)

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

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



5028
5029
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5028

def request_summarized_metric_extensions_metrics(request_summarized_metric_extensions_metrics_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#request_summarized_metric_extensions_metrics.' if logger

  raise "Missing the required parameter 'request_summarized_metric_extensions_metrics_details' when calling request_summarized_metric_extensions_metrics." if request_summarized_metric_extensions_metrics_details.nil?

  path = '/metricExtensions/actions/summarizeMetrics'
  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]

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

  post_body = @api_client.object_to_http_body(request_summarized_metric_extensions_metrics_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#request_summarized_metric_extensions_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::StackMonitoring::Models::MetricExtensionMetricAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#request_summarized_metric_extensions_resources(request_summarized_metric_extensions_resources_details, opts = {}) ⇒ Response

Note:

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

Gets metric extension resources count based on the aggregation criteria specified using request body. Either metricExtensionId or compartmentId should be passed, if no other property is passed.

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. (default to 10)

  • :page (String)

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

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



5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5095

def request_summarized_metric_extensions_resources(request_summarized_metric_extensions_resources_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#request_summarized_metric_extensions_resources.' if logger

  raise "Missing the required parameter 'request_summarized_metric_extensions_resources_details' when calling request_summarized_metric_extensions_resources." if request_summarized_metric_extensions_resources_details.nil?

  path = '/metricExtensions/actions/summarizeResources'
  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]

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

  post_body = @api_client.object_to_http_body(request_summarized_metric_extensions_resources_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#request_summarized_metric_extensions_resources') 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::StackMonitoring::Models::MetricExtensionResourceAggregationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#retry_failed_maintenance_window_operation(maintenance_window_id, opts = {}) ⇒ Response

Note:

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

Retry the last failed operation. The operation failed will be the most recent one. It won't apply for previous failed operations.

Parameters:

  • maintenance_window_id (String)

    The OCID of maintenance window.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5159

def retry_failed_maintenance_window_operation(maintenance_window_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#retry_failed_maintenance_window_operation.' if logger

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

  path = '/maintenanceWindows/{maintenanceWindowId}/actions/retryFailedOperation'.sub('{maintenanceWindowId}', maintenance_window_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: 'StackMonitoringClient#retry_failed_maintenance_window_operation') 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

#search_associated_resources(search_associated_resources_details, opts = {}) ⇒ Response

Note:

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

List all associated resources recursively up-to a specified level, for the monitored resources of type 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

  • :fields (Array<String>)

    Partial response refers to an optimization technique offered by the RESTful web APIs, to return only the information (fields) required by the client. In this mechanism, the client sends the required field names as the query parameters for an API to the server, and the server trims down the default response content by removing the fields that are not required by the client. The parameter controls which fields to return and should be a query string parameter called "fields" of an array type, provide the values as enums, and use collectionFormat.

  • :exclude_fields (Array<String>)

    Partial response refers to an optimization technique offered by the RESTful web APIs, to return all the information except the fields requested to be excluded (excludeFields) by the client. In this mechanism, the client sends the exclude field names as the query parameters for an API to the server, and the server trims down the default response content by removing the fields that are not required by the client. The parameter controls which fields to exlude and to return and should be a query string parameter called "excludeFields" of an array type, provide the values as enums, and use collectionFormat.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

  • :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. (default to 10)

  • :page (String)

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

Returns:



5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5259

def search_associated_resources(search_associated_resources_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#search_associated_resources.' if logger

  raise "Missing the required parameter 'search_associated_resources_details' when calling search_associated_resources." if search_associated_resources_details.nil?

  path = '/monitoredResources/actions/searchAssociatedResources'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:fields] = OCI::ApiClient.build_collection_params(opts[:fields], :multi) if opts[:fields] && !opts[:fields].empty?
  query_params[:excludeFields] = OCI::ApiClient.build_collection_params(opts[:exclude_fields], :multi) if opts[:exclude_fields] && !opts[:exclude_fields].empty?
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(search_associated_resources_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#search_associated_resources') 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::StackMonitoring::Models::AssociatedResourcesCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#search_monitored_resource_associations(search_monitored_resource_associations_details, opts = {}) ⇒ Response

Note:

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

Search associations in the given compartment based on the search criteria.

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. (default to 10)

  • :page (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5343

def search_monitored_resource_associations(search_monitored_resource_associations_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#search_monitored_resource_associations.' if logger

  raise "Missing the required parameter 'search_monitored_resource_associations_details' when calling search_monitored_resource_associations." if search_monitored_resource_associations_details.nil?

  path = '/monitoredResources/actions/searchAssociations'
  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]

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

  post_body = @api_client.object_to_http_body(search_monitored_resource_associations_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#search_monitored_resource_associations') 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::StackMonitoring::Models::MonitoredResourceAssociationsCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#search_monitored_resource_members(monitored_resource_id, search_monitored_resource_members_details, opts = {}) ⇒ Response

Note:

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

List the member resources for the given monitored resource identifier OCID.

Allowed values are: resourceName, resourceType, sourceResourceType

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

  • :sort_by (String)

    If this query parameter is specified, the result is sorted by this query parameter value. (default to resourceName)

  • :sort_order (String)

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

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

  • :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. (default to 10)

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

  • :if_match (String)

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

Returns:



5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5431

def search_monitored_resource_members(monitored_resource_id, search_monitored_resource_members_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#search_monitored_resource_members.' if logger

  raise "Missing the required parameter 'monitored_resource_id' when calling search_monitored_resource_members." if monitored_resource_id.nil?
  raise "Missing the required parameter 'search_monitored_resource_members_details' when calling search_monitored_resource_members." if search_monitored_resource_members_details.nil?

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

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

  path = '/monitoredResources/{monitoredResourceId}/actions/listMembers'.sub('{monitoredResourceId}', monitored_resource_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  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-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(search_monitored_resource_members_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#search_monitored_resource_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,
      return_type: 'OCI::StackMonitoring::Models::MonitoredResourceMembersCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#search_monitored_resources(search_monitored_resources_details, opts = {}) ⇒ Response

Note:

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

Gets a list of all monitored resources in a compartment for the given search criteria.

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. (default to 10)

  • :page (String)

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

  • :fields (Array<String>)

    Partial response refers to an optimization technique offered by the RESTful web APIs, to return only the information (fields) required by the client. In this mechanism, the client sends the required field names as the query parameters for an API to the server, and the server trims down the default response content by removing the fields that are not required by the client. The parameter controls which fields to return and should be a query string parameter called "fields" of an array type, provide the values as enums, and use collectionFormat.

  • :exclude_fields (Array<String>)

    Partial response refers to an optimization technique offered by the RESTful web APIs, to return all the information except the fields requested to be excluded (excludeFields) by the client. In this mechanism, the client sends the exclude field names as the query parameters for an API to the server, and the server trims down the default response content by removing the fields that are not required by the client. The parameter controls which fields to exlude and to return and should be a query string parameter called "excludeFields" of an array type, provide the values as enums, and use collectionFormat.

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5547

def search_monitored_resources(search_monitored_resources_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#search_monitored_resources.' if logger

  raise "Missing the required parameter 'search_monitored_resources_details' when calling search_monitored_resources." if search_monitored_resources_details.nil?

  path = '/monitoredResources/actions/search'
  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[:fields] = OCI::ApiClient.build_collection_params(opts[:fields], :multi) if opts[:fields] && !opts[:fields].empty?
  query_params[:excludeFields] = OCI::ApiClient.build_collection_params(opts[:exclude_fields], :multi) if opts[:exclude_fields] && !opts[:exclude_fields].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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(search_monitored_resources_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#search_monitored_resources') 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::StackMonitoring::Models::MonitoredResourceCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#stop_maintenance_window(maintenance_window_id, opts = {}) ⇒ Response

Note:

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

Stop a maintenance window before the end time is reached.

Parameters:

  • maintenance_window_id (String)

    The OCID of maintenance window.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5616

def stop_maintenance_window(maintenance_window_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#stop_maintenance_window.' if logger

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

  path = '/maintenanceWindows/{maintenanceWindowId}/actions/stop'.sub('{maintenanceWindowId}', maintenance_window_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: 'StackMonitoringClient#stop_maintenance_window') 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

#test_metric_extension(metric_extension_id, test_metric_extension_details, opts = {}) ⇒ Response

Note:

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

Performs test of Metric Extension on a specific resource Id

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:



5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5685

def test_metric_extension(metric_extension_id, test_metric_extension_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#test_metric_extension.' if logger

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

  path = '/metricExtensions/{metricExtensionId}/actions/test'.sub('{metricExtensionId}', metric_extension_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(test_metric_extension_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#test_metric_extension') 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::StackMonitoring::Models::TestMetricExtensionData'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#unapply_monitoring_template(monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Unapply the Monitoring Template identified by the id

Parameters:

  • monitoring_template_id (String)

    The OCID of the monitoring template.

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
5793
5794
5795
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5757

def unapply_monitoring_template(monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#unapply_monitoring_template.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}/actions/unapply'.sub('{monitoringTemplateId}', monitoring_template_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#update_alarm_condition(update_alarm_condition_details, alarm_condition_id, monitoring_template_id, opts = {}) ⇒ Response

Note:

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

Update a Alarm Condition by identifier

Parameters:

  • update_alarm_condition_details (OCI::StackMonitoring::Models::UpdateAlarmConditionDetails)

    Details required for updating a new alarm condition

  • alarm_condition_id (String)

    The OCID of the alarm condition.

  • monitoring_template_id (String)

    The OCID of the monitoring template.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:



5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5823

def update_alarm_condition(update_alarm_condition_details, alarm_condition_id, monitoring_template_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_alarm_condition.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}/alarmConditions/{alarmConditionId}'.sub('{alarmConditionId}', alarm_condition_id.to_s).sub('{monitoringTemplateId}', monitoring_template_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_alarm_condition_details)

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

#update_and_propagate_tags(monitored_resource_id, update_and_propagate_tags_details, opts = {}) ⇒ Response

Note:

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

Provided tags will be added or updated in the existing list of tags for the affected resources. Resources to be updated are identified based on association types specified. If association types not specified, then tags will be updated only for the resource identified by the given monitored resource identifier OCID.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5900

def update_and_propagate_tags(monitored_resource_id, update_and_propagate_tags_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_and_propagate_tags.' if logger

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

  path = '/monitoredResources/{monitoredResourceId}/actions/updateAndPropagateTags'.sub('{monitoredResourceId}', monitored_resource_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_and_propagate_tags_details)

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

#update_baselineable_metric(update_baselineable_metric_details, baselineable_metric_id, opts = {}) ⇒ Response

Note:

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

Updates the Baseline-able metric for the given id

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:



5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 5966

def update_baselineable_metric(update_baselineable_metric_details, baselineable_metric_id, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_baselineable_metric.' if logger

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

  path = '/baselineableMetrics/{baselineableMetricId}'.sub('{baselineableMetricId}', baselineable_metric_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_baselineable_metric_details)

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

#update_config(config_id, update_config_details, opts = {}) ⇒ Response

Note:

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

Updates the configuration identified by the id given.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:



6031
6032
6033
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 6031

def update_config(config_id, update_config_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_config.' if logger

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

  path = '/configs/{configId}'.sub('{configId}', config_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_config_details)

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

#update_maintenance_window(maintenance_window_id, update_maintenance_window_details, opts = {}) ⇒ Response

Note:

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

Update maintenance window by the given identifier OCID.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 6097

def update_maintenance_window(maintenance_window_id, update_maintenance_window_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_maintenance_window.' if logger

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

  path = '/maintenanceWindows/{maintenanceWindowId}'.sub('{maintenanceWindowId}', maintenance_window_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_maintenance_window_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#update_maintenance_window') 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_metric_extension(metric_extension_id, update_metric_extension_details, opts = {}) ⇒ Response

Note:

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

Updates the Metric Extension

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:



6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 6161

def update_metric_extension(metric_extension_id, update_metric_extension_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_metric_extension.' if logger

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

  path = '/metricExtensions/{metricExtensionId}'.sub('{metricExtensionId}', metric_extension_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_metric_extension_details)

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

#update_monitored_resource(monitored_resource_id, update_monitored_resource_details, opts = {}) ⇒ Response

Note:

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

Update monitored resource by the given identifier OCID. Note that "properties" object, if specified, will entirely replace the existing object, as part this operation.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
6258
6259
6260
6261
6262
6263
6264
6265
6266
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 6229

def update_monitored_resource(monitored_resource_id, update_monitored_resource_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_monitored_resource.' if logger

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

  path = '/monitoredResources/{monitoredResourceId}'.sub('{monitoredResourceId}', monitored_resource_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_monitored_resource_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'StackMonitoringClient#update_monitored_resource') 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_monitored_resource_task(monitored_resource_task_id, update_monitored_resource_task_details, opts = {}) ⇒ Response

Note:

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

Update stack monitoring resource task by the given identifier OCID.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:



6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 6294

def update_monitored_resource_task(monitored_resource_task_id, update_monitored_resource_task_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_monitored_resource_task.' if logger

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

  path = '/monitoredResourceTasks/{monitoredResourceTaskId}'.sub('{monitoredResourceTaskId}', monitored_resource_task_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_monitored_resource_task_details)

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

#update_monitored_resource_type(monitored_resource_type_id, update_monitored_resource_type_details, opts = {}) ⇒ Response

Note:

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

Update the Monitored Resource Type identified by the identifier OCID.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:



6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 6360

def update_monitored_resource_type(monitored_resource_type_id, update_monitored_resource_type_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_monitored_resource_type.' if logger

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

  path = '/monitoredResourceTypes/{monitoredResourceTypeId}'.sub('{monitoredResourceTypeId}', monitored_resource_type_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_monitored_resource_type_details)

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

#update_monitoring_template(monitoring_template_id, update_monitoring_template_details, opts = {}) ⇒ Response

Note:

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

Updates the Monitoring Template

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

Returns:



6425
6426
6427
6428
6429
6430
6431
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
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 6425

def update_monitoring_template(monitoring_template_id, update_monitoring_template_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_monitoring_template.' if logger

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

  path = '/monitoringTemplates/{monitoringTemplateId}'.sub('{monitoringTemplateId}', monitoring_template_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_monitoring_template_details)

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

#update_process_set(process_set_id, update_process_set_details, opts = {}) ⇒ Response

Note:

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

API to update a Process Set identified by a given ocid.

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)

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

Returns:



6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 6490

def update_process_set(process_set_id, update_process_set_details, opts = {})
  logger.debug 'Calling operation StackMonitoringClient#update_process_set.' if logger

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

  path = '/processSets/{processSetId}'.sub('{processSetId}', process_set_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 = @api_client.object_to_http_body(update_process_set_details)

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