Class: OCI::ResourceManager::ResourceManagerClient
- Inherits:
-
Object
- Object
- OCI::ResourceManager::ResourceManagerClient
- Defined in:
- lib/oci/resource_manager/resource_manager_client.rb
Overview
API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm).
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 OCI::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
-
#cancel_job(job_id, opts = {}) ⇒ Response
Indicates the intention to cancel the specified job.
-
#change_configuration_source_provider_compartment(configuration_source_provider_id, change_configuration_source_provider_compartment_details, opts = {}) ⇒ Response
Moves a configuration source provider into a different compartment within the same tenancy.
-
#change_stack_compartment(stack_id, change_stack_compartment_details, opts = {}) ⇒ Response
Moves a Stack and it’s associated Jobs into a different compartment.
-
#change_template_compartment(template_id, change_template_compartment_details, opts = {}) ⇒ Response
Moves a template into a different compartment within the same tenancy.
-
#create_configuration_source_provider(create_configuration_source_provider_details, opts = {}) ⇒ Response
Creates a configuration source provider in the specified compartment.
-
#create_job(create_job_details, opts = {}) ⇒ Response
Creates a job.
-
#create_stack(create_stack_details, opts = {}) ⇒ Response
Creates a stack in the specified compartment.
-
#create_template(create_template_details, opts = {}) ⇒ Response
Creates a custom template in the specified compartment.
-
#delete_configuration_source_provider(configuration_source_provider_id, opts = {}) ⇒ Response
Deletes the specified configuration source provider.
-
#delete_stack(stack_id, opts = {}) ⇒ Response
Deletes the specified stack object.
-
#delete_template(template_id, opts = {}) ⇒ Response
Deletes the specified template.
-
#detect_stack_drift(stack_id, opts = {}) ⇒ Response
Checks drift status for the specified stack.
-
#get_configuration_source_provider(configuration_source_provider_id, opts = {}) ⇒ Response
Gets the properties of the specified configuration source provider.
-
#get_job(job_id, opts = {}) ⇒ Response
Returns the specified job along with the job details.
-
#get_job_logs(job_id, opts = {}) ⇒ Response
Returns log entries for the specified job in JSON format.
-
#get_job_logs_content(job_id, opts = {}) ⇒ Response
Returns raw log file for the specified job in text format.
-
#get_job_tf_config(job_id, opts = {}, &block) ⇒ Response
Returns the Terraform configuration file for the specified job in .zip format.
-
#get_job_tf_state(job_id, opts = {}, &block) ⇒ Response
Returns the Terraform state for the specified job.
-
#get_stack(stack_id, opts = {}) ⇒ Response
Gets a stack using the stack ID.
-
#get_stack_tf_config(stack_id, opts = {}, &block) ⇒ Response
Returns the Terraform configuration file in .zip format for the specified stack.
-
#get_stack_tf_state(stack_id, opts = {}, &block) ⇒ Response
Returns the Terraform state for the specified stack.
-
#get_template(template_id, opts = {}) ⇒ Response
Gets the specified template.
-
#get_template_logo(template_id, opts = {}, &block) ⇒ Response
Returns the Terraform logo file in .logo format for the specified template.
-
#get_template_tf_config(template_id, opts = {}, &block) ⇒ Response
Returns the Terraform configuration file in .zip format for the specified template.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Return the given work request.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ResourceManagerClient
constructor
Creates a new ResourceManagerClient.
-
#list_configuration_source_providers(opts = {}) ⇒ Response
Lists configuration source providers according to the specified filter.
-
#list_jobs(opts = {}) ⇒ Response
Returns a list of jobs in a stack or compartment, ordered by time created.
-
#list_resource_discovery_services(opts = {}) ⇒ Response
Returns a list of supported services for Resource Discovery.
-
#list_stack_resource_drift_details(stack_id, opts = {}) ⇒ Response
Lists drift status details for each resource defined in the specified stack.
-
#list_stacks(opts = {}) ⇒ Response
Returns a list of stacks.
-
#list_template_categories(opts = {}) ⇒ Response
Lists template categories.
-
#list_templates(opts = {}) ⇒ Response
Lists templates according to the specified filter.
-
#list_terraform_versions(opts = {}) ⇒ Response
Returns a list of supported Terraform versions for use with stacks.
-
#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 given compartment or for a given resource.
-
#logger ⇒ Logger
The logger for this client.
-
#update_configuration_source_provider(configuration_source_provider_id, update_configuration_source_provider_details, opts = {}) ⇒ Response
Updates the properties of the specified configuration source provider.
-
#update_job(job_id, update_job_details, opts = {}) ⇒ Response
Updates the specified job.
-
#update_stack(stack_id, update_stack_details, opts = {}) ⇒ Response
Updates the specified stack object.
-
#update_template(template_id, update_template_details, opts = {}) ⇒ Response
Updates the specified template.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ResourceManagerClient
Creates a new ResourceManagerClient. 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.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 56 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 + '/20180917' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "ResourceManagerClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
16 17 18 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 16 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
20 21 22 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 20 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in OCI::Regions::REGION_ENUM.
30 31 32 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 30 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
26 27 28 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 26 def retry_config @retry_config end |
Instance Method Details
#cancel_job(job_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/cancel_job.rb.html) to see an example of how to use cancel_job API.
Indicates the intention to cancel the specified job. Cancellation of the job is not immediate, and may be delayed, or may not happen at all.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 121 def cancel_job(job_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#cancel_job.' if logger raise "Missing the required parameter 'job_id' when calling cancel_job." if job_id.nil? raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id) path = '/jobs/{jobId}'.sub('{jobId}', 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] 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: 'ResourceManagerClient#cancel_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 |
#change_configuration_source_provider_compartment(configuration_source_provider_id, change_configuration_source_provider_compartment_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/change_configuration_source_provider_compartment.rb.html) to see an example of how to use change_configuration_source_provider_compartment API.
Moves a configuration source provider into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 192 def change_configuration_source_provider_compartment(configuration_source_provider_id, change_configuration_source_provider_compartment_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#change_configuration_source_provider_compartment.' if logger raise "Missing the required parameter 'configuration_source_provider_id' when calling change_configuration_source_provider_compartment." if configuration_source_provider_id.nil? raise "Missing the required parameter 'change_configuration_source_provider_compartment_details' when calling change_configuration_source_provider_compartment." if change_configuration_source_provider_compartment_details.nil? raise "Parameter value for 'configuration_source_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(configuration_source_provider_id) path = '/configurationSourceProviders/{configurationSourceProviderId}/actions/changeCompartment'.sub('{configurationSourceProviderId}', configuration_source_provider_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_configuration_source_provider_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#change_configuration_source_provider_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_stack_compartment(stack_id, change_stack_compartment_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/change_stack_compartment.rb.html) to see an example of how to use change_stack_compartment API.
Moves a Stack and it’s associated Jobs into a different compartment.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 262 def change_stack_compartment(stack_id, change_stack_compartment_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#change_stack_compartment.' if logger raise "Missing the required parameter 'stack_id' when calling change_stack_compartment." if stack_id.nil? raise "Missing the required parameter 'change_stack_compartment_details' when calling change_stack_compartment." if change_stack_compartment_details.nil? raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id) path = '/stacks/{stackId}/actions/changeCompartment'.sub('{stackId}', stack_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_stack_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#change_stack_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_template_compartment(template_id, change_template_compartment_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/change_template_compartment.rb.html) to see an example of how to use change_template_compartment API.
Moves a template into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 335 def change_template_compartment(template_id, change_template_compartment_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#change_template_compartment.' if logger raise "Missing the required parameter 'template_id' when calling change_template_compartment." if template_id.nil? raise "Missing the required parameter 'change_template_compartment_details' when calling change_template_compartment." if change_template_compartment_details.nil? raise "Parameter value for 'template_id' must not be blank" if OCI::Internal::Util.blank_string?(template_id) path = '/templates/{templateId}/actions/changeCompartment'.sub('{templateId}', template_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] 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_template_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#change_template_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_configuration_source_provider(create_configuration_source_provider_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/create_configuration_source_provider.rb.html) to see an example of how to use create_configuration_source_provider API.
Creates a configuration source provider in the specified compartment. For more information, see [To create a configuration source provider](docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#CreateConfigurationSourceProvider).
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 403 def create_configuration_source_provider(create_configuration_source_provider_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#create_configuration_source_provider.' if logger raise "Missing the required parameter 'create_configuration_source_provider_details' when calling create_configuration_source_provider." if create_configuration_source_provider_details.nil? path = '/configurationSourceProviders' 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_configuration_source_provider_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#create_configuration_source_provider') 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::ResourceManager::Models::ConfigurationSourceProvider' ) end # rubocop:enable Metrics/BlockLength end |
#create_job(create_job_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/create_job.rb.html) to see an example of how to use create_job API.
Creates a job.
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 466 def create_job(create_job_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#create_job.' if logger raise "Missing the required parameter 'create_job_details' when calling create_job." if create_job_details.nil? path = '/jobs' 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_job_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#create_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::ResourceManager::Models::Job' ) end # rubocop:enable Metrics/BlockLength end |
#create_stack(create_stack_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/create_stack.rb.html) to see an example of how to use create_stack API.
Creates a stack in the specified compartment. You can create a stack from a Terraform configuration. The Terraform configuration can be directly uploaded or referenced from a source code control system. You can also create a stack from an existing compartment. You can also upload the Terraform configuration from an Object Storage bucket. For more information, see [To create a stack](docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#CreateStack).
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 536 def create_stack(create_stack_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#create_stack.' if logger raise "Missing the required parameter 'create_stack_details' when calling create_stack." if create_stack_details.nil? path = '/stacks' 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_stack_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#create_stack') 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::ResourceManager::Models::Stack' ) end # rubocop:enable Metrics/BlockLength end |
#create_template(create_template_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/create_template.rb.html) to see an example of how to use create_template API.
Creates a custom template in the specified compartment.
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 602 def create_template(create_template_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#create_template.' if logger raise "Missing the required parameter 'create_template_details' when calling create_template." if create_template_details.nil? path = '/templates' 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[:'oci-splat-generated-ocids'] = opts[:oci_splat_generated_ocids] if opts[:oci_splat_generated_ocids] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_template_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#create_template') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::ResourceManager::Models::Template' ) end # rubocop:enable Metrics/BlockLength end |
#delete_configuration_source_provider(configuration_source_provider_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/delete_configuration_source_provider.rb.html) to see an example of how to use delete_configuration_source_provider API.
Deletes the specified configuration source provider.
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 665 def delete_configuration_source_provider(configuration_source_provider_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#delete_configuration_source_provider.' if logger raise "Missing the required parameter 'configuration_source_provider_id' when calling delete_configuration_source_provider." if configuration_source_provider_id.nil? raise "Parameter value for 'configuration_source_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(configuration_source_provider_id) path = '/configurationSourceProviders/{configurationSourceProviderId}'.sub('{configurationSourceProviderId}', configuration_source_provider_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: 'ResourceManagerClient#delete_configuration_source_provider') 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_stack(stack_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/delete_stack.rb.html) to see an example of how to use delete_stack API.
Deletes the specified stack object.
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 725 def delete_stack(stack_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#delete_stack.' if logger raise "Missing the required parameter 'stack_id' when calling delete_stack." if stack_id.nil? raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id) path = '/stacks/{stackId}'.sub('{stackId}', stack_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: 'ResourceManagerClient#delete_stack') 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_template(template_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/delete_template.rb.html) to see an example of how to use delete_template API.
Deletes the specified template.
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 785 def delete_template(template_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#delete_template.' if logger raise "Missing the required parameter 'template_id' when calling delete_template." if template_id.nil? raise "Parameter value for 'template_id' must not be blank" if OCI::Internal::Util.blank_string?(template_id) path = '/templates/{templateId}'.sub('{templateId}', template_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'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: 'ResourceManagerClient#delete_template') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#detect_stack_drift(stack_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/detect_stack_drift.rb.html) to see an example of how to use detect_stack_drift API.
Checks drift status for the specified stack.
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 852 def detect_stack_drift(stack_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#detect_stack_drift.' if logger raise "Missing the required parameter 'stack_id' when calling detect_stack_drift." if stack_id.nil? raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id) path = '/stacks/{stackId}/actions/detectDrift'.sub('{stackId}', stack_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(opts[:detect_stack_drift_details]) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#detect_stack_drift') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#get_configuration_source_provider(configuration_source_provider_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_configuration_source_provider.rb.html) to see an example of how to use get_configuration_source_provider API.
Gets the properties of the specified configuration source provider.
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 911 def get_configuration_source_provider(configuration_source_provider_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#get_configuration_source_provider.' if logger raise "Missing the required parameter 'configuration_source_provider_id' when calling get_configuration_source_provider." if configuration_source_provider_id.nil? raise "Parameter value for 'configuration_source_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(configuration_source_provider_id) path = '/configurationSourceProviders/{configurationSourceProviderId}'.sub('{configurationSourceProviderId}', configuration_source_provider_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: 'ResourceManagerClient#get_configuration_source_provider') 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::ResourceManager::Models::ConfigurationSourceProvider' ) end # rubocop:enable Metrics/BlockLength end |
#get_job(job_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_job.rb.html) to see an example of how to use get_job API.
Returns the specified job along with the job details.
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 994 995 996 997 998 999 1000 1001 1002 1003 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 967 def get_job(job_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#get_job.' if logger raise "Missing the required parameter 'job_id' when calling get_job." if job_id.nil? raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id) path = '/jobs/{jobId}'.sub('{jobId}', 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: 'ResourceManagerClient#get_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::ResourceManager::Models::Job' ) end # rubocop:enable Metrics/BlockLength end |
#get_job_logs(job_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_job_logs.rb.html) to see an example of how to use get_job_logs API.
Returns log entries for the specified job in JSON format.
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1045 def get_job_logs(job_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#get_job_logs.' if logger raise "Missing the required parameter 'job_id' when calling get_job_logs." if job_id.nil? if opts[:level_greater_than_or_equal_to] && !OCI::ResourceManager::Models::LogEntry::LEVEL_ENUM.include?(opts[:level_greater_than_or_equal_to]) raise 'Invalid value for "level_greater_than_or_equal_to", must be one of the values in OCI::ResourceManager::Models::LogEntry::LEVEL_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id) path = '/jobs/{jobId}/logs'.sub('{jobId}', job_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:type] = OCI::ApiClient.build_collection_params(opts[:type], :multi) if opts[:type] && !opts[:type].empty? query_params[:levelGreaterThanOrEqualTo] = opts[:level_greater_than_or_equal_to] if opts[:level_greater_than_or_equal_to] 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[:timestampGreaterThanOrEqualTo] = opts[:timestamp_greater_than_or_equal_to] if opts[:timestamp_greater_than_or_equal_to] query_params[:timestampLessThanOrEqualTo] = opts[:timestamp_less_than_or_equal_to] if opts[:timestamp_less_than_or_equal_to] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_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: 'Array<OCI::ResourceManager::Models::LogEntry>' ) end # rubocop:enable Metrics/BlockLength end |
#get_job_logs_content(job_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_job_logs_content.rb.html) to see an example of how to use get_job_logs_content API.
Returns raw log file for the specified job in text format. Returns a maximum of 100,000 log entries.
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1118 def get_job_logs_content(job_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#get_job_logs_content.' if logger raise "Missing the required parameter 'job_id' when calling get_job_logs_content." if job_id.nil? raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id) path = '/jobs/{jobId}/logs/content'.sub('{jobId}', job_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'text/plain; charset=utf-8' 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: 'ResourceManagerClient#get_job_logs_content') 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: 'String' ) end # rubocop:enable Metrics/BlockLength end |
#get_job_tf_config(job_id, opts = {}, &block) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_job_tf_config.rb.html) to see an example of how to use get_job_tf_config API.
Returns the Terraform configuration file for the specified job in .zip format. Returns an error if no zip file is found.
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1178 def get_job_tf_config(job_id, opts = {}, &block) logger.debug 'Calling operation ResourceManagerClient#get_job_tf_config.' if logger raise "Missing the required parameter 'job_id' when calling get_job_tf_config." if job_id.nil? raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id) path = '/jobs/{jobId}/tfConfig'.sub('{jobId}', job_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/zip' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_job_tf_config') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_job_tf_state(job_id, opts = {}, &block) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_job_tf_state.rb.html) to see an example of how to use get_job_tf_state API.
Returns the Terraform state for the specified job.
1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1280 def get_job_tf_state(job_id, opts = {}, &block) logger.debug 'Calling operation ResourceManagerClient#get_job_tf_state.' if logger raise "Missing the required parameter 'job_id' when calling get_job_tf_state." if job_id.nil? raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id) path = '/jobs/{jobId}/tfState'.sub('{jobId}', job_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'application/octet-stream' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_job_tf_state') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_stack(stack_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_stack.rb.html) to see an example of how to use get_stack API.
Gets a stack using the stack ID.
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1380 def get_stack(stack_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#get_stack.' if logger raise "Missing the required parameter 'stack_id' when calling get_stack." if stack_id.nil? raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id) path = '/stacks/{stackId}'.sub('{stackId}', stack_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: 'ResourceManagerClient#get_stack') 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::ResourceManager::Models::Stack' ) end # rubocop:enable Metrics/BlockLength end |
#get_stack_tf_config(stack_id, opts = {}, &block) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_stack_tf_config.rb.html) to see an example of how to use get_stack_tf_config API.
Returns the Terraform configuration file in .zip format for the specified stack. Returns an error if no zip file is found.
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1440 def get_stack_tf_config(stack_id, opts = {}, &block) logger.debug 'Calling operation ResourceManagerClient#get_stack_tf_config.' if logger raise "Missing the required parameter 'stack_id' when calling get_stack_tf_config." if stack_id.nil? raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id) path = '/stacks/{stackId}/tfConfig'.sub('{stackId}', stack_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/zip' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_stack_tf_config') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_stack_tf_state(stack_id, opts = {}, &block) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_stack_tf_state.rb.html) to see an example of how to use get_stack_tf_state API.
Returns the Terraform state for the specified stack.
1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1542 def get_stack_tf_state(stack_id, opts = {}, &block) logger.debug 'Calling operation ResourceManagerClient#get_stack_tf_state.' if logger raise "Missing the required parameter 'stack_id' when calling get_stack_tf_state." if stack_id.nil? raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id) path = '/stacks/{stackId}/tfState'.sub('{stackId}', stack_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'application/octet-stream' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_stack_tf_state') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_template(template_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_template.rb.html) to see an example of how to use get_template API.
Gets the specified template.
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 1672 1673 1674 1675 1676 1677 1678 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1642 def get_template(template_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#get_template.' if logger raise "Missing the required parameter 'template_id' when calling get_template." if template_id.nil? raise "Parameter value for 'template_id' must not be blank" if OCI::Internal::Util.blank_string?(template_id) path = '/templates/{templateId}'.sub('{templateId}', template_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_template') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::ResourceManager::Models::Template' ) end # rubocop:enable Metrics/BlockLength end |
#get_template_logo(template_id, opts = {}, &block) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_template_logo.rb.html) to see an example of how to use get_template_logo API.
Returns the Terraform logo file in .logo format for the specified template. Returns an error if no logo file is found.
1702 1703 1704 1705 1706 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 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1702 def get_template_logo(template_id, opts = {}, &block) logger.debug 'Calling operation ResourceManagerClient#get_template_logo.' if logger raise "Missing the required parameter 'template_id' when calling get_template_logo." if template_id.nil? raise "Parameter value for 'template_id' must not be blank" if OCI::Internal::Util.blank_string?(template_id) path = '/templates/{templateId}/logo'.sub('{templateId}', template_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'image/png' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_template_logo') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_template_tf_config(template_id, opts = {}, &block) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_template_tf_config.rb.html) to see an example of how to use get_template_tf_config API.
Returns the Terraform configuration file in .zip format for the specified template. Returns an error if no zip file is found.
1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1806 def get_template_tf_config(template_id, opts = {}, &block) logger.debug 'Calling operation ResourceManagerClient#get_template_tf_config.' if logger raise "Missing the required parameter 'template_id' when calling get_template_tf_config." if template_id.nil? raise "Parameter value for 'template_id' must not be blank" if OCI::Internal::Util.blank_string?(template_id) path = '/templates/{templateId}/tfConfig'.sub('{templateId}', template_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'application/zip' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_template_tf_config') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_work_request(work_request_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/get_work_request.rb.html) to see an example of how to use get_work_request API.
Return the given work request.
1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1906 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#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: 'ResourceManagerClient#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::ResourceManager::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#list_configuration_source_providers(opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_configuration_source_providers.rb.html) to see an example of how to use list_configuration_source_providers API.
Lists configuration source providers according to the specified filter.
-
For
compartmentId, lists all configuration source providers in the matching compartment. -
For
configurationSourceProviderId, lists the matching configuration source provider.
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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 1986 def list_configuration_source_providers(opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_configuration_source_providers.' if logger if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end path = '/configurationSourceProviders' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:configurationSourceProviderId] = opts[:configuration_source_provider_id] if opts[:configuration_source_provider_id] query_params[:displayName] = opts[:display_name] if opts[:display_name] 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[:configSourceProviderType] = opts[:config_source_provider_type] if opts[:config_source_provider_type] # 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: 'ResourceManagerClient#list_configuration_source_providers') 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::ResourceManager::Models::ConfigurationSourceProviderCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_jobs(opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_jobs.rb.html) to see an example of how to use list_jobs API.
Returns a list of jobs in a stack or compartment, ordered by time created.
-
To list all jobs in a stack, provide the stack [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
-
To list all jobs in a compartment, provide the compartment [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
-
To return a specific job, provide the job [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
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 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2093 def list_jobs(opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_jobs.' if logger if opts[:lifecycle_state] && !OCI::ResourceManager::Models::Job::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::ResourceManager::Models::Job::LIFECYCLE_STATE_ENUM.' end if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end path = '/jobs' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:stackId] = opts[:stack_id] if opts[:stack_id] query_params[:id] = opts[:id] if opts[:id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] 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: 'ResourceManagerClient#list_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: 'Array<OCI::ResourceManager::Models::JobSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_resource_discovery_services(opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_resource_discovery_services.rb.html) to see an example of how to use list_resource_discovery_services API.
Returns a list of supported services for Resource Discovery. For reference on service names, see the [Terraform provider documentation](www.terraform.io/docs/providers/oci/guides/resource_discovery.html#services).
2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2170 def list_resource_discovery_services(opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_resource_discovery_services.' if logger path = '/resourceDiscoveryServices' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ResourceManagerClient#list_resource_discovery_services') 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::ResourceManager::Models::ResourceDiscoveryServiceCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_stack_resource_drift_details(stack_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_stack_resource_drift_details.rb.html) to see an example of how to use list_stack_resource_drift_details API.
Lists drift status details for each resource defined in the specified stack. The drift status details for a given resource indicate differences, if any, between the actual state and the expected (defined) state for that resource. The drift status details correspond to the specified work request (workRequestId). If no work request is specified, then the drift status details correspond to the latest completed work request for the stack.
2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2244 def list_stack_resource_drift_details(stack_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_stack_resource_drift_details.' if logger raise "Missing the required parameter 'stack_id' when calling list_stack_resource_drift_details." if stack_id.nil? raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id) path = '/stacks/{stackId}/actions/listResourceDriftDetails'.sub('{stackId}', stack_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id] query_params[:resourceDriftStatus] = OCI::ApiClient.build_collection_params(opts[:resource_drift_status], :multi) if opts[:resource_drift_status] && !opts[:resource_drift_status].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] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#list_stack_resource_drift_details') 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::ResourceManager::Models::StackResourceDriftCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_stacks(opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_stacks.rb.html) to see an example of how to use list_stacks API.
Returns a list of stacks.
-
If called using the compartment ID, returns all stacks in the specified compartment.
-
If called using the stack ID, returns the specified stack.
2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2338 def list_stacks(opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_stacks.' if logger if opts[:lifecycle_state] && !OCI::ResourceManager::Models::Stack::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::ResourceManager::Models::Stack::LIFECYCLE_STATE_ENUM.' end if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end path = '/stacks' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:id] = opts[:id] if opts[:id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] 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: 'ResourceManagerClient#list_stacks') 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: 'Array<OCI::ResourceManager::Models::StackSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_template_categories(opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_template_categories.rb.html) to see an example of how to use list_template_categories API.
Lists template categories.
2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2412 def list_template_categories(opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_template_categories.' if logger path = '/templateCategories' 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: 'ResourceManagerClient#list_template_categories') 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::ResourceManager::Models::TemplateCategorySummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_templates(opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_templates.rb.html) to see an example of how to use list_templates API.
Lists templates according to the specified filter.
2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2486 def list_templates(opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_templates.' if logger if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end path = '/templates' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:templateCategoryId] = opts[:template_category_id] if opts[:template_category_id] query_params[:templateId] = opts[:template_id] if opts[:template_id] query_params[:displayName] = opts[:display_name] if opts[:display_name] 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: 'ResourceManagerClient#list_templates') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::ResourceManager::Models::TemplateSummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_terraform_versions(opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_terraform_versions.rb.html) to see an example of how to use list_terraform_versions API.
Returns a list of supported Terraform versions for use with stacks.
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 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2558 def list_terraform_versions(opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_terraform_versions.' if logger path = '/terraformVersions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_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: 'ResourceManagerClient#list_terraform_versions') 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::ResourceManager::Models::TerraformVersionCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.
Return a (paginated) list of errors for a given work request.
2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 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 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2625 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#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] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' 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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # 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: 'ResourceManagerClient#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: 'Array<OCI::ResourceManager::Models::WorkRequestError>' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.
Return a (paginated) list of logs for a given work request.
2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2701 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#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] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' 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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # 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: 'ResourceManagerClient#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: 'Array<OCI::ResourceManager::Models::WorkRequestLogEntry>' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/list_work_requests.rb.html) to see an example of how to use list_work_requests API.
Lists the work requests in a given compartment or for a given resource.
2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2774 def list_work_requests(compartment_id, opts = {}) logger.debug 'Calling operation ResourceManagerClient#list_work_requests.' if logger raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil? path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:resourceId] = opts[:resource_id] if opts[:resource_id] 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: 'ResourceManagerClient#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: 'Array<OCI::ResourceManager::Models::WorkRequestSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
95 96 97 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 95 def logger @api_client.config.logger end |
#update_configuration_source_provider(configuration_source_provider_id, update_configuration_source_provider_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/update_configuration_source_provider.rb.html) to see an example of how to use update_configuration_source_provider API.
Updates the properties of the specified configuration source provider. For more information, see [To update a configuration source provider](docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#UpdateConfigurationSourceProvider).
2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2843 def update_configuration_source_provider(configuration_source_provider_id, update_configuration_source_provider_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#update_configuration_source_provider.' if logger raise "Missing the required parameter 'configuration_source_provider_id' when calling update_configuration_source_provider." if configuration_source_provider_id.nil? raise "Missing the required parameter 'update_configuration_source_provider_details' when calling update_configuration_source_provider." if update_configuration_source_provider_details.nil? raise "Parameter value for 'configuration_source_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(configuration_source_provider_id) path = '/configurationSourceProviders/{configurationSourceProviderId}'.sub('{configurationSourceProviderId}', configuration_source_provider_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_configuration_source_provider_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#update_configuration_source_provider') 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::ResourceManager::Models::ConfigurationSourceProvider' ) end # rubocop:enable Metrics/BlockLength end |
#update_job(job_id, update_job_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/update_job.rb.html) to see an example of how to use update_job API.
Updates the specified job.
2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2906 def update_job(job_id, update_job_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#update_job.' if logger raise "Missing the required parameter 'job_id' when calling update_job." if job_id.nil? raise "Missing the required parameter 'update_job_details' when calling update_job." if update_job_details.nil? raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id) path = '/jobs/{jobId}'.sub('{jobId}', 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] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_job_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#update_job') 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::ResourceManager::Models::Job' ) end # rubocop:enable Metrics/BlockLength end |
#update_stack(stack_id, update_stack_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/update_stack.rb.html) to see an example of how to use update_stack API.
Updates the specified stack object. Use UpdateStack when you update your Terraform configuration and want your changes to be reflected in the execution plan. For more information, see [To update a stack](docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#UpdateStack) and [To edit a stack](docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#EditStack).
2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 2976 def update_stack(stack_id, update_stack_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#update_stack.' if logger raise "Missing the required parameter 'stack_id' when calling update_stack." if stack_id.nil? raise "Missing the required parameter 'update_stack_details' when calling update_stack." if update_stack_details.nil? raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id) path = '/stacks/{stackId}'.sub('{stackId}', stack_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_stack_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#update_stack') 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::ResourceManager::Models::Stack' ) end # rubocop:enable Metrics/BlockLength end |
#update_template(template_id, update_template_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcemanager/update_template.rb.html) to see an example of how to use update_template API.
Updates the specified template.
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 |
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 3041 def update_template(template_id, update_template_details, opts = {}) logger.debug 'Calling operation ResourceManagerClient#update_template.' if logger raise "Missing the required parameter 'template_id' when calling update_template." if template_id.nil? raise "Missing the required parameter 'update_template_details' when calling update_template." if update_template_details.nil? raise "Parameter value for 'template_id' must not be blank" if OCI::Internal::Util.blank_string?(template_id) path = '/templates/{templateId}'.sub('{templateId}', template_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_template_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ResourceManagerClient#update_template') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::ResourceManager::Models::Template' ) end # rubocop:enable Metrics/BlockLength end |