Class: OCI::StackMonitoring::StackMonitoringClient
- Inherits:
-
Object
- Object
- OCI::StackMonitoring::StackMonitoringClient
- Defined in:
- lib/oci/stack_monitoring/stack_monitoring_client.rb
Overview
Stack Monitoring API.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#associate_monitored_resources(associate_monitored_resources_details, opts = {}) ⇒ Response
Create an association between two monitored resources.
-
#change_config_compartment(config_id, change_config_compartment_details, opts = {}) ⇒ Response
Moves the configuration item to another compartment.
-
#change_metric_extension_compartment(metric_extension_id, change_metric_extension_compartment_details, opts = {}) ⇒ Response
Moves a Metric Extension resource from one compartment identifier to another.
-
#change_monitored_resource_compartment(monitored_resource_id, change_monitored_resource_compartment_details, opts = {}) ⇒ Response
Moves a monitored resource from one compartment to another.
-
#change_monitored_resource_task_compartment(monitored_resource_task_id, change_monitored_resource_task_compartment_details, opts = {}) ⇒ Response
Moves a stack monitoring resource task from one compartment to another.
-
#create_baselineable_metric(create_baselineable_metric_details, opts = {}) ⇒ Response
Creates the specified Baseline-able metric.
-
#create_config(create_config_details, opts = {}) ⇒ Response
Creates a configuration item, for example to define whether resources of a specific type should be discovered automatically.
-
#create_discovery_job(create_discovery_job_details, opts = {}) ⇒ Response
API to create discovery Job and submit discovery Details to agent.
-
#create_metric_extension(create_metric_extension_details, opts = {}) ⇒ Response
Creates a new metric extension resource for a given compartment.
-
#create_monitored_resource(create_monitored_resource_details, opts = {}) ⇒ Response
Creates a new monitored resource for the given resource type with the details and submits a work request for promoting the resource to agent.
-
#create_monitored_resource_task(create_monitored_resource_task_details, opts = {}) ⇒ Response
Create a new stack monitoring resource task.
-
#create_monitored_resource_type(create_monitored_resource_type_details, opts = {}) ⇒ Response
Creates a new monitored resource type.
-
#delete_baselineable_metric(baselineable_metric_id, opts = {}) ⇒ Response
Deletes the Baseline-able metric for the given id.
-
#delete_config(config_id, opts = {}) ⇒ Response
Deletes a configuration identified by the id.
-
#delete_discovery_job(discovery_job_id, opts = {}) ⇒ Response
Deletes a DiscoveryJob by identifier.
-
#delete_metric_extension(metric_extension_id, opts = {}) ⇒ Response
Deletes a metric extension by identifier.
-
#delete_monitored_resource(monitored_resource_id, opts = {}) ⇒ Response
Delete monitored resource by the given identifier OCID.
-
#delete_monitored_resource_type(monitored_resource_type_id, opts = {}) ⇒ Response
Deletes a monitored resource type by identifier OCID.
-
#disable_external_database(monitored_resource_id, opts = {}) ⇒ Response
Disable external database resource monitoring.
-
#disable_metric_extension(metric_extension_id, disable_metric_extension_details, opts = {}) ⇒ Response
Submits a request to disable matching metric extension Id for the given Resource IDs.
-
#disassociate_monitored_resources(disassociate_monitored_resources_details, opts = {}) ⇒ Response
Removes associations between two monitored resources.
-
#enable_metric_extension(metric_extension_id, enable_metric_extension_details, opts = {}) ⇒ Response
Submits a request to enable matching metric extension Id for the given Resource IDs.
-
#evaluate_baselineable_metric(evaluate_baselineable_metric_details, baselineable_metric_id, opts = {}) ⇒ Response
Evaluates metric for anomalies for the given data points.
-
#export_metric_extension(metric_extension_id, opts = {}, &block) ⇒ Response
Export generates a template used to create new metric extension resources similar to matching metric extension id.
-
#get_baselineable_metric(baselineable_metric_id, opts = {}) ⇒ Response
Get the Baseline-able metric for the given id.
-
#get_config(config_id, opts = {}) ⇒ Response
Gets the details of a configuration.
-
#get_discovery_job(discovery_job_id, opts = {}) ⇒ Response
API to get the details of discovery Job by identifier.
-
#get_metric_extension(metric_extension_id, opts = {}) ⇒ Response
Gets a Metric Extension by identifier.
-
#get_monitored_resource(monitored_resource_id, opts = {}) ⇒ Response
Get monitored resource for the given identifier OCID.
-
#get_monitored_resource_task(monitored_resource_task_id, opts = {}) ⇒ Response
Gets stack monitoring resource task details by identifier OCID.
-
#get_monitored_resource_type(monitored_resource_type_id, opts = {}) ⇒ Response
Gets a monitored resource type by identifier OCID.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the status of the work request with the given ID.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ StackMonitoringClient
constructor
Creates a new StackMonitoringClient.
-
#list_baselineable_metrics(opts = {}) ⇒ Response
List of summary of baseline-able metrics for a given resource group if specified.
-
#list_configs(compartment_id, opts = {}) ⇒ Response
Get a list of configurations in a compartment.
-
#list_discovery_job_logs(discovery_job_id, opts = {}) ⇒ Response
API to get all the logs of a Discovery Job.
-
#list_discovery_jobs(compartment_id, opts = {}) ⇒ Response
API to get the details of all Discovery Jobs.
-
#list_metric_extensions(compartment_id, opts = {}) ⇒ Response
Returns a list of metric extensions.
-
#list_monitored_resource_tasks(compartment_id, opts = {}) ⇒ Response
Returns a list of stack monitoring resource tasks in the compartment.
-
#list_monitored_resource_types(compartment_id, opts = {}) ⇒ Response
Returns list of resource types accessible to the customer.
-
#list_monitored_resources(compartment_id, opts = {}) ⇒ Response
Returns a list of monitored resources.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Return a (paginated) list of errors for a given work request.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Return a (paginated) list of logs for a given work request.
-
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Lists the work requests in a compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#manage_license(monitored_resource_id, manage_license_details, opts = {}) ⇒ Response
Each resource is assigned a license based on which features are enabled for it.
-
#publish_metric_extension(metric_extension_id, opts = {}) ⇒ Response
Publish the Metric Extension identified by the id.
-
#request_monitored_resources_summarized_count(compartment_id, opts = {}) ⇒ Response
Gets resource count based on the aggregation criteria specified using "groupBy" parameter.
-
#search_associated_resources(search_associated_resources_details, opts = {}) ⇒ Response
List all associated resources recursively up-to a specified level, for the monitored resources of type specified.
-
#search_monitored_resource_associations(search_monitored_resource_associations_details, opts = {}) ⇒ Response
Search associations in the given compartment based on the search criteria.
-
#search_monitored_resource_members(monitored_resource_id, search_monitored_resource_members_details, opts = {}) ⇒ Response
List the member resources for the given monitored resource identifier OCID.
-
#search_monitored_resources(search_monitored_resources_details, opts = {}) ⇒ Response
Gets a list of all monitored resources in a compartment for the given search criteria.
-
#test_metric_extension(metric_extension_id, test_metric_extension_details, opts = {}) ⇒ Response
Performs test of Metric Extension on a specific resource Id.
-
#update_and_propagate_tags(monitored_resource_id, update_and_propagate_tags_details, opts = {}) ⇒ Response
Provided tags will be added or updated in the existing list of tags for the affected resources.
-
#update_baselineable_metric(update_baselineable_metric_details, baselineable_metric_id, opts = {}) ⇒ Response
Updates the Baseline-able metric for the given id.
-
#update_config(config_id, update_config_details, opts = {}) ⇒ Response
Updates the configuration identified by the id given.
-
#update_metric_extension(metric_extension_id, update_metric_extension_details, opts = {}) ⇒ Response
Updates the Metric Extension.
-
#update_monitored_resource(monitored_resource_id, update_monitored_resource_details, opts = {}) ⇒ Response
Update monitored resource by the given identifier OCID.
-
#update_monitored_resource_task(monitored_resource_task_id, update_monitored_resource_task_details, opts = {}) ⇒ Response
Update stack monitoring resource task by the given identifier OCID.
-
#update_monitored_resource_type(monitored_resource_type_id, update_monitored_resource_type_details, opts = {}) ⇒ Response
Update the Monitored Resource Type identified by the identifier OCID.
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.
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_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
15 16 17 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 15 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
19 20 21 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 19 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
29 30 31 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 29 def region @region end |
#retry_config ⇒ OCI::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
#associate_monitored_resources(associate_monitored_resources_details, opts = {}) ⇒ Response
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.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 129 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.(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
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.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 211 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.(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
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.
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 321 322 323 324 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 285 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.(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
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.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 359 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.(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
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.
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 469 470 471 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 432 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.(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 |
#create_baselineable_metric(create_baselineable_metric_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_baselineable_metric API.
Creates the specified Baseline-able metric
497 498 499 500 501 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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 497 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.(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
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.
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 567 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.(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
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.
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 631 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.(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_metric_extension(create_metric_extension_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_metric_extension API.
Creates a new metric extension resource for a given compartment
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 695 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.(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
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.
767 768 769 770 771 772 773 774 775 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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 767 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.(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
Click here to see an example of how to use create_monitored_resource_task API.
Create a new stack monitoring resource task.
831 832 833 834 835 836 837 838 839 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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 831 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.(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
Click here to see an example of how to use create_monitored_resource_type API.
Creates a new monitored resource type.
894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 894 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.(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 |
#delete_baselineable_metric(baselineable_metric_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_baselineable_metric API.
Deletes the Baseline-able metric for the given id
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 957 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.(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
Click here to see an example of how to use delete_config API.
Deletes a configuration identified by the id.
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1019 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.(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
Click here to see an example of how to use delete_discovery_job API.
Deletes a DiscoveryJob by identifier
1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1081 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.(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_metric_extension(metric_extension_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_metric_extension API.
Deletes a metric extension by identifier
1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1143 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.(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
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.
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1212 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.(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
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1275 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.(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 |
#disable_external_database(monitored_resource_id, opts = {}) ⇒ Response
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.
1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1345 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.(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
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
1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1417 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.(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
Click here to see an example of how to use disassociate_monitored_resources API.
Removes associations between two monitored resources.
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1488 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.(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
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
1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1559 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.(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
Click here to see an example of how to use evaluate_baselineable_metric API.
Evaluates metric for anomalies for the given data points
1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1631 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.(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
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.
1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1707 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.(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 |
#get_baselineable_metric(baselineable_metric_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_baselineable_metric API.
Get the Baseline-able metric for the given id
1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1810 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.(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
Click here to see an example of how to use get_config API.
Gets the details of a configuration.
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 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.(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
Click here to see an example of how to use get_discovery_job API.
API to get the details of discovery Job by identifier.
1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1923 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.(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_metric_extension(metric_extension_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_metric_extension API.
Gets a Metric Extension by identifier
1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 1979 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.(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
2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2036 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.(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
2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2092 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.(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
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 2179 2180 2181 2182 2183 2184 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2148 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.(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_work_request(work_request_id, opts = {}) ⇒ Response
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.
2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2204 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.(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_baselineable_metrics(opts = {}) ⇒ Response
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
2278 2279 2280 2281 2282 2283 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 2325 2326 2327 2328 2329 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2278 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[: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.(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
Click here to see an example of how to use list_configs API.
Get a list of configurations in a compartment.
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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2368 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.(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_discovery_job_logs(discovery_job_id, opts = {}) ⇒ Response
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
2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2463 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.(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
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
2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2551 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.(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_metric_extensions(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_metric_extensions API.
Returns a list of metric extensions
2638 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 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2638 def list_metric_extensions(compartment_id, opts = {}) logger.debug 'Calling operation StackMonitoringClient#list_metric_extensions.' if logger raise "Missing the required parameter 'compartment_id' when calling list_metric_extensions." if compartment_id.nil? 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[: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[:sortOrder] = opts[:sort_order] if opts[:sort_order] 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] # 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.(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
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.
2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2737 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.(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
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.
2863 2864 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 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2863 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[: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[: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.(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
Click here to see an example of how to use list_monitored_resources API.
Returns a list of monitored resources.
2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 2956 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[: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[: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.(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_work_request_errors(work_request_id, opts = {}) ⇒ Response
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
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 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3040 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.(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
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
3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3122 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.(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
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
3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3207 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.(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 |
#logger ⇒ Logger
Returns 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
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.
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 3337 3338 3339 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3300 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.(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
Click here to see an example of how to use publish_metric_extension API.
Publish the Metric Extension identified by the id
3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3371 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.(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
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 Allowed values are: count
3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3450 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].include?(opts[:group_by]) raise 'Invalid value for "group_by", must be one of resourceType, license, parentResourceId.' 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.(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 |
#search_associated_resources(search_associated_resources_details, opts = {}) ⇒ Response
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.
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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3573 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.(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
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.
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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3657 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.(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
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 3790 3791 3792 3793 3794 3795 3796 3797 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3745 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.(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
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.
3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3861 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.(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 |
#test_metric_extension(metric_extension_id, test_metric_extension_details, opts = {}) ⇒ Response
Click here to see an example of how to use test_metric_extension API.
Performs test of Metric Extension on a specific resource Id
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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 3936 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.(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 |
#update_and_propagate_tags(monitored_resource_id, update_and_propagate_tags_details, opts = {}) ⇒ Response
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.
4013 4014 4015 4016 4017 4018 4019 4020 4021 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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4013 def (monitored_resource_id, , 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 .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() # rubocop:disable Metrics/BlockLength OCI::Retry.(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
Click here to see an example of how to use update_baselineable_metric API.
Updates the Baseline-able metric for the given id
4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4079 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.(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
Click here to see an example of how to use update_config API.
Updates the configuration identified by the id given.
4144 4145 4146 4147 4148 4149 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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4144 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.(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_metric_extension(metric_extension_id, update_metric_extension_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_metric_extension API.
Updates the Metric Extension
4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4209 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.(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
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 4310 4311 4312 4313 4314 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4277 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.(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
4342 4343 4344 4345 4346 4347 4348 4349 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 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4342 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.(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
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 |
# File 'lib/oci/stack_monitoring/stack_monitoring_client.rb', line 4408 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.(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 |