Method: OCI::ApmConfig::ConfigClient#update_config
- Defined in:
- lib/oci/apm_config/config_client.rb
#update_config(apm_domain_id, config_id, update_config_details, opts = {}) ⇒ Response
Note:
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/apmconfig/update_config.rb.html) to see an example of how to use update_config API.
Updates the details of the configuration item identified by the OCID.
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/oci/apm_config/config_client.rb', line 411 def update_config(apm_domain_id, config_id, update_config_details, opts = {}) logger.debug 'Calling operation ConfigClient#update_config.' if logger raise "Missing the required parameter 'apm_domain_id' when calling update_config." if apm_domain_id.nil? 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 = {} query_params[:apmDomainId] = apm_domain_id # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-dry-run'] = opts[:opc_dry_run] if opts[:opc_dry_run] # 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: 'ConfigClient#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::ApmConfig::Models::Config' ) end # rubocop:enable Metrics/BlockLength end |