Class: OCI::Core::ComputeManagementClient
- Inherits:
-
Object
- Object
- OCI::Core::ComputeManagementClient
- Defined in:
- lib/oci/core/compute_management_client.rb
Overview
API covering the [Networking](/iaas/Content/Network/Concepts/overview.htm), [Compute](/iaas/Content/Compute/Concepts/computeoverview.htm), and [Block Volume](/iaas/Content/Block/Concepts/overview.htm) services. Use this API to manage resources such as virtual cloud networks (VCNs), compute instances, and block storage volumes.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#attach_load_balancer(instance_pool_id, attach_load_balancer_details, opts = {}) ⇒ Response
Attach a load balancer to the instance pool.
-
#change_cluster_network_compartment(cluster_network_id, change_cluster_network_compartment_details, opts = {}) ⇒ Response
Change the compartment of a cluster network.
-
#change_instance_configuration_compartment(instance_configuration_id, change_instance_configuration_compartment_details, opts = {}) ⇒ Response
Moves an instance configuration into a different compartment within the same tenancy.
-
#change_instance_pool_compartment(instance_pool_id, change_instance_pool_compartment_details, opts = {}) ⇒ Response
Moves an instance pool into a different compartment within the same tenancy.
-
#create_cluster_network(create_cluster_network_details, opts = {}) ⇒ Response
Create a cluster network.
-
#create_instance_configuration(create_instance_configuration, opts = {}) ⇒ Response
Creates an instance configuration.
-
#create_instance_pool(create_instance_pool_details, opts = {}) ⇒ Response
Create an instance pool.
-
#delete_instance_configuration(instance_configuration_id, opts = {}) ⇒ Response
Deletes an instance configuration.
-
#detach_load_balancer(instance_pool_id, detach_load_balancer_details, opts = {}) ⇒ Response
Detach a load balancer from the instance pool.
-
#get_cluster_network(cluster_network_id, opts = {}) ⇒ Response
Gets the specified cluster network.
-
#get_instance_configuration(instance_configuration_id, opts = {}) ⇒ Response
Gets the specified instance configuration.
-
#get_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Gets the specified instance pool.
-
#get_instance_pool_load_balancer_attachment(instance_pool_id, instance_pool_load_balancer_attachment_id, opts = {}) ⇒ Response
Gets information about a load balancer that is attached to the specified instance pool.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ComputeManagementClient
constructor
Creates a new ComputeManagementClient.
-
#launch_instance_configuration(instance_configuration_id, instance_configuration, opts = {}) ⇒ Response
Launches an instance from an instance configuration.
-
#list_cluster_network_instances(compartment_id, cluster_network_id, opts = {}) ⇒ Response
List the instances in the specified cluster network.
-
#list_cluster_networks(compartment_id, opts = {}) ⇒ Response
Lists the cluster networks in the specified compartment.
-
#list_instance_configurations(compartment_id, opts = {}) ⇒ Response
Lists the instance configurations in the specified compartment.
-
#list_instance_pool_instances(compartment_id, instance_pool_id, opts = {}) ⇒ Response
List the instances in the specified instance pool.
-
#list_instance_pools(compartment_id, opts = {}) ⇒ Response
Lists the instance pools in the specified compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#reset_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Performs the reset (power off and power on) action on the specified instance pool, which performs the action on all the instances in the pool.
-
#softreset_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Performs the softreset (ACPI shutdown and power on) action on the specified instance pool, which performs the action on all the instances in the pool.
-
#start_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Performs the start (power on) action on the specified instance pool, which performs the action on all the instances in the pool.
-
#stop_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Performs the stop (power off) action on the specified instance pool, which performs the action on all the instances in the pool.
-
#terminate_cluster_network(cluster_network_id, opts = {}) ⇒ Response
Terminate the specified cluster network.
-
#terminate_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Terminate the specified instance pool.
-
#update_cluster_network(cluster_network_id, update_cluster_network_details, opts = {}) ⇒ Response
Update the specified cluster network.
-
#update_instance_configuration(instance_configuration_id, update_instance_configuration_details, opts = {}) ⇒ Response
Updates the free-form tags, defined tags, and display name of an instance configuration.
-
#update_instance_pool(instance_pool_id, update_instance_pool_details, opts = {}) ⇒ Response
Update the specified instance pool.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ComputeManagementClient
Creates a new ComputeManagementClient. 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 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/oci/core/compute_management_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 and no config was supplied (which is valid for instance principals) # 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 unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) if signer.nil? signer = OCI::Signer.new( config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content ) end @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20160918' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "ComputeManagementClient 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/core/compute_management_client.rb', line 16 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
20 21 22 |
# File 'lib/oci/core/compute_management_client.rb', line 20 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
30 31 32 |
# File 'lib/oci/core/compute_management_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/core/compute_management_client.rb', line 26 def retry_config @retry_config end |
Instance Method Details
#attach_load_balancer(instance_pool_id, attach_load_balancer_details, opts = {}) ⇒ Response
Attach a load balancer to the instance pool.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/core/compute_management_client.rb', line 133 def attach_load_balancer(instance_pool_id, attach_load_balancer_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#attach_load_balancer.' if logger raise "Missing the required parameter 'instance_pool_id' when calling attach_load_balancer." if instance_pool_id.nil? raise "Missing the required parameter 'attach_load_balancer_details' when calling attach_load_balancer." if attach_load_balancer_details.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}/actions/attachLoadBalancer'.sub('{instancePoolId}', instance_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(attach_load_balancer_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#attach_load_balancer') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |
#change_cluster_network_compartment(cluster_network_id, change_cluster_network_compartment_details, opts = {}) ⇒ Response
Change the compartment of a cluster network.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/core/compute_management_client.rb', line 203 def change_cluster_network_compartment(cluster_network_id, change_cluster_network_compartment_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#change_cluster_network_compartment.' if logger raise "Missing the required parameter 'cluster_network_id' when calling change_cluster_network_compartment." if cluster_network_id.nil? raise "Missing the required parameter 'change_cluster_network_compartment_details' when calling change_cluster_network_compartment." if change_cluster_network_compartment_details.nil? raise "Parameter value for 'cluster_network_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_network_id) path = '/clusterNetworks/{clusterNetworkId}/actions/changeCompartment'.sub('{clusterNetworkId}', cluster_network_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_cluster_network_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#change_cluster_network_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_instance_configuration_compartment(instance_configuration_id, change_instance_configuration_compartment_details, opts = {}) ⇒ Response
Moves an instance configuration 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).
When you move an instance configuration to a different compartment, associated resources such as instance pools are not moved.
Important: Most of the properties for an existing instance configuration, including the compartment, cannot be modified after you create the instance configuration. Although you can move an instance configuration to a different compartment, you will not be able to use the instance configuration to manage instance pools in the new compartment. If you want to update an instance configuration to point to a different compartment, you should instead create a new instance configuration in the target compartment using [CreateInstanceConfiguration](docs.cloud.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConfiguration/CreateInstanceConfiguration).
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/oci/core/compute_management_client.rb', line 285 def change_instance_configuration_compartment(instance_configuration_id, change_instance_configuration_compartment_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#change_instance_configuration_compartment.' if logger raise "Missing the required parameter 'instance_configuration_id' when calling change_instance_configuration_compartment." if instance_configuration_id.nil? raise "Missing the required parameter 'change_instance_configuration_compartment_details' when calling change_instance_configuration_compartment." if change_instance_configuration_compartment_details.nil? raise "Parameter value for 'instance_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_configuration_id) path = '/instanceConfigurations/{instanceConfigurationId}/actions/changeCompartment'.sub('{instanceConfigurationId}', instance_configuration_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_instance_configuration_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#change_instance_configuration_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_instance_pool_compartment(instance_pool_id, change_instance_pool_compartment_details, opts = {}) ⇒ Response
Moves an instance pool 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).
When you move an instance pool to a different compartment, associated resources such as the instances in the pool, boot volumes, VNICs, and autoscaling configurations are not moved.
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/oci/core/compute_management_client.rb', line 360 def change_instance_pool_compartment(instance_pool_id, change_instance_pool_compartment_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#change_instance_pool_compartment.' if logger raise "Missing the required parameter 'instance_pool_id' when calling change_instance_pool_compartment." if instance_pool_id.nil? raise "Missing the required parameter 'change_instance_pool_compartment_details' when calling change_instance_pool_compartment." if change_instance_pool_compartment_details.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}/actions/changeCompartment'.sub('{instancePoolId}', instance_pool_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_instance_pool_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#change_instance_pool_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_cluster_network(create_cluster_network_details, opts = {}) ⇒ Response
Create a cluster network.
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/oci/core/compute_management_client.rb', line 421 def create_cluster_network(create_cluster_network_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#create_cluster_network.' if logger raise "Missing the required parameter 'create_cluster_network_details' when calling create_cluster_network." if create_cluster_network_details.nil? path = '/clusterNetworks' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_cluster_network_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#create_cluster_network') 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::Core::Models::ClusterNetwork' ) end # rubocop:enable Metrics/BlockLength end |
#create_instance_configuration(create_instance_configuration, opts = {}) ⇒ Response
Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances.
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 |
# File 'lib/oci/core/compute_management_client.rb', line 481 def create_instance_configuration(create_instance_configuration, opts = {}) logger.debug 'Calling operation ComputeManagementClient#create_instance_configuration.' if logger raise "Missing the required parameter 'create_instance_configuration' when calling create_instance_configuration." if create_instance_configuration.nil? path = '/instanceConfigurations' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_instance_configuration) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#create_instance_configuration') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Core::Models::InstanceConfiguration' ) end # rubocop:enable Metrics/BlockLength end |
#create_instance_pool(create_instance_pool_details, opts = {}) ⇒ Response
Create an instance pool.
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 574 575 |
# File 'lib/oci/core/compute_management_client.rb', line 539 def create_instance_pool(create_instance_pool_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#create_instance_pool.' if logger raise "Missing the required parameter 'create_instance_pool_details' when calling create_instance_pool." if create_instance_pool_details.nil? path = '/instancePools' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_instance_pool_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#create_instance_pool') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |
#delete_instance_configuration(instance_configuration_id, opts = {}) ⇒ Response
Deletes an instance configuration.
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/oci/core/compute_management_client.rb', line 595 def delete_instance_configuration(instance_configuration_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#delete_instance_configuration.' if logger raise "Missing the required parameter 'instance_configuration_id' when calling delete_instance_configuration." if instance_configuration_id.nil? raise "Parameter value for 'instance_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_configuration_id) path = '/instanceConfigurations/{instanceConfigurationId}'.sub('{instanceConfigurationId}', instance_configuration_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] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#delete_instance_configuration') 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 |
#detach_load_balancer(instance_pool_id, detach_load_balancer_details, opts = {}) ⇒ Response
Detach a load balancer from the instance pool.
658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 |
# File 'lib/oci/core/compute_management_client.rb', line 658 def detach_load_balancer(instance_pool_id, detach_load_balancer_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#detach_load_balancer.' if logger raise "Missing the required parameter 'instance_pool_id' when calling detach_load_balancer." if instance_pool_id.nil? raise "Missing the required parameter 'detach_load_balancer_details' when calling detach_load_balancer." if detach_load_balancer_details.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}/actions/detachLoadBalancer'.sub('{instancePoolId}', instance_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(detach_load_balancer_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#detach_load_balancer') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |
#get_cluster_network(cluster_network_id, opts = {}) ⇒ Response
Gets the specified cluster network
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'lib/oci/core/compute_management_client.rb', line 714 def get_cluster_network(cluster_network_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#get_cluster_network.' if logger raise "Missing the required parameter 'cluster_network_id' when calling get_cluster_network." if cluster_network_id.nil? raise "Parameter value for 'cluster_network_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_network_id) path = '/clusterNetworks/{clusterNetworkId}'.sub('{clusterNetworkId}', cluster_network_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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#get_cluster_network') 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::Core::Models::ClusterNetwork' ) end # rubocop:enable Metrics/BlockLength end |
#get_instance_configuration(instance_configuration_id, opts = {}) ⇒ Response
Gets the specified instance configuration
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 |
# File 'lib/oci/core/compute_management_client.rb', line 767 def get_instance_configuration(instance_configuration_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#get_instance_configuration.' if logger raise "Missing the required parameter 'instance_configuration_id' when calling get_instance_configuration." if instance_configuration_id.nil? raise "Parameter value for 'instance_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_configuration_id) path = '/instanceConfigurations/{instanceConfigurationId}'.sub('{instanceConfigurationId}', instance_configuration_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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#get_instance_configuration') 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::Core::Models::InstanceConfiguration' ) end # rubocop:enable Metrics/BlockLength end |
#get_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Gets the specified instance pool
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 |
# File 'lib/oci/core/compute_management_client.rb', line 820 def get_instance_pool(instance_pool_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#get_instance_pool.' if logger raise "Missing the required parameter 'instance_pool_id' when calling get_instance_pool." if instance_pool_id.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}'.sub('{instancePoolId}', instance_pool_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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#get_instance_pool') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |
#get_instance_pool_load_balancer_attachment(instance_pool_id, instance_pool_load_balancer_attachment_id, opts = {}) ⇒ Response
Gets information about a load balancer that is attached to the specified instance pool.
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 |
# File 'lib/oci/core/compute_management_client.rb', line 875 def (instance_pool_id, , opts = {}) logger.debug 'Calling operation ComputeManagementClient#get_instance_pool_load_balancer_attachment.' if logger raise "Missing the required parameter 'instance_pool_id' when calling get_instance_pool_load_balancer_attachment." if instance_pool_id.nil? raise "Missing the required parameter 'instance_pool_load_balancer_attachment_id' when calling get_instance_pool_load_balancer_attachment." if .nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) raise "Parameter value for 'instance_pool_load_balancer_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?() path = '/instancePools/{instancePoolId}/loadBalancerAttachments/{instancePoolLoadBalancerAttachmentId}'.sub('{instancePoolId}', instance_pool_id.to_s).sub('{instancePoolLoadBalancerAttachmentId}', .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' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#get_instance_pool_load_balancer_attachment') 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::Core::Models::InstancePoolLoadBalancerAttachment' ) end # rubocop:enable Metrics/BlockLength end |
#launch_instance_configuration(instance_configuration_id, instance_configuration, opts = {}) ⇒ Response
Launches an instance from an instance configuration.
If the instance configuration does not include all of the parameters that are required to launch an instance, such as the availability domain and subnet ID, you must provide these parameters when you launch an instance from the instance configuration. For more information, see the InstanceConfiguration resource.
943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 |
# File 'lib/oci/core/compute_management_client.rb', line 943 def launch_instance_configuration(instance_configuration_id, instance_configuration, opts = {}) logger.debug 'Calling operation ComputeManagementClient#launch_instance_configuration.' if logger raise "Missing the required parameter 'instance_configuration_id' when calling launch_instance_configuration." if instance_configuration_id.nil? raise "Missing the required parameter 'instance_configuration' when calling launch_instance_configuration." if instance_configuration.nil? raise "Parameter value for 'instance_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_configuration_id) path = '/instanceConfigurations/{instanceConfigurationId}/actions/launch'.sub('{instanceConfigurationId}', instance_configuration_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(instance_configuration) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#launch_instance_configuration') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Core::Models::Instance' ) end # rubocop:enable Metrics/BlockLength end |
#list_cluster_network_instances(compartment_id, cluster_network_id, opts = {}) ⇒ Response
List the instances in the specified cluster network.
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 |
# File 'lib/oci/core/compute_management_client.rb', line 1024 def list_cluster_network_instances(compartment_id, cluster_network_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#list_cluster_network_instances.' if logger raise "Missing the required parameter 'compartment_id' when calling list_cluster_network_instances." if compartment_id.nil? raise "Missing the required parameter 'cluster_network_id' when calling list_cluster_network_instances." if cluster_network_id.nil? 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 raise "Parameter value for 'cluster_network_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_network_id) path = '/clusterNetworks/{clusterNetworkId}/instances'.sub('{clusterNetworkId}', cluster_network_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#list_cluster_network_instances') 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::Core::Models::InstanceSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_cluster_networks(compartment_id, opts = {}) ⇒ Response
Lists the cluster networks in the specified compartment.
1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
# File 'lib/oci/core/compute_management_client.rb', line 1117 def list_cluster_networks(compartment_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#list_cluster_networks.' if logger raise "Missing the required parameter 'compartment_id' when calling list_cluster_networks." if compartment_id.nil? 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 if opts[:lifecycle_state] && !OCI::Core::Models::ClusterNetworkSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::ClusterNetworkSummary::LIFECYCLE_STATE_ENUM.' end path = '/clusterNetworks' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#list_cluster_networks') 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::Core::Models::ClusterNetworkSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_instance_configurations(compartment_id, opts = {}) ⇒ Response
Lists the instance configurations in the specified compartment.
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/core/compute_management_client.rb', line 1211 def list_instance_configurations(compartment_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#list_instance_configurations.' if logger raise "Missing the required parameter 'compartment_id' when calling list_instance_configurations." if compartment_id.nil? 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 = '/instanceConfigurations' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#list_instance_configurations') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::Core::Models::InstanceConfigurationSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_instance_pool_instances(compartment_id, instance_pool_id, opts = {}) ⇒ Response
List the instances in the specified instance pool.
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 |
# File 'lib/oci/core/compute_management_client.rb', line 1301 def list_instance_pool_instances(compartment_id, instance_pool_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#list_instance_pool_instances.' if logger raise "Missing the required parameter 'compartment_id' when calling list_instance_pool_instances." if compartment_id.nil? raise "Missing the required parameter 'instance_pool_id' when calling list_instance_pool_instances." if instance_pool_id.nil? 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 raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}/instances'.sub('{instancePoolId}', instance_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#list_instance_pool_instances') 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::Core::Models::InstanceSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_instance_pools(compartment_id, opts = {}) ⇒ Response
Lists the instance pools in the specified compartment.
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 |
# File 'lib/oci/core/compute_management_client.rb', line 1395 def list_instance_pools(compartment_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#list_instance_pools.' if logger raise "Missing the required parameter 'compartment_id' when calling list_instance_pools." if compartment_id.nil? 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 if opts[:lifecycle_state] && !OCI::Core::Models::InstancePoolSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::InstancePoolSummary::LIFECYCLE_STATE_ENUM.' end path = '/instancePools' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#list_instance_pools') 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::Core::Models::InstancePoolSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
106 107 108 |
# File 'lib/oci/core/compute_management_client.rb', line 106 def logger @api_client.config.logger end |
#reset_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Performs the reset (power off and power on) action on the specified instance pool, which performs the action on all the instances in the pool.
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 |
# File 'lib/oci/core/compute_management_client.rb', line 1476 def reset_instance_pool(instance_pool_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#reset_instance_pool.' if logger raise "Missing the required parameter 'instance_pool_id' when calling reset_instance_pool." if instance_pool_id.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}/actions/reset'.sub('{instancePoolId}', instance_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#reset_instance_pool') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |
#softreset_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Performs the softreset (ACPI shutdown and power on) action on the specified instance pool, which performs the action on all the instances in the pool.
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 |
# File 'lib/oci/core/compute_management_client.rb', line 1542 def softreset_instance_pool(instance_pool_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#softreset_instance_pool.' if logger raise "Missing the required parameter 'instance_pool_id' when calling softreset_instance_pool." if instance_pool_id.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}/actions/softreset'.sub('{instancePoolId}', instance_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#softreset_instance_pool') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |
#start_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Performs the start (power on) action on the specified instance pool, which performs the action on all the instances in the pool.
1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 |
# File 'lib/oci/core/compute_management_client.rb', line 1608 def start_instance_pool(instance_pool_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#start_instance_pool.' if logger raise "Missing the required parameter 'instance_pool_id' when calling start_instance_pool." if instance_pool_id.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}/actions/start'.sub('{instancePoolId}', instance_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#start_instance_pool') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |
#stop_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Performs the stop (power off) action on the specified instance pool, which performs the action on all the instances in the pool.
1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 |
# File 'lib/oci/core/compute_management_client.rb', line 1674 def stop_instance_pool(instance_pool_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#stop_instance_pool.' if logger raise "Missing the required parameter 'instance_pool_id' when calling stop_instance_pool." if instance_pool_id.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}/actions/stop'.sub('{instancePoolId}', instance_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#stop_instance_pool') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |
#terminate_cluster_network(cluster_network_id, opts = {}) ⇒ Response
Terminate the specified cluster network.
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 |
# File 'lib/oci/core/compute_management_client.rb', line 1732 def terminate_cluster_network(cluster_network_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#terminate_cluster_network.' if logger raise "Missing the required parameter 'cluster_network_id' when calling terminate_cluster_network." if cluster_network_id.nil? raise "Parameter value for 'cluster_network_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_network_id) path = '/clusterNetworks/{clusterNetworkId}'.sub('{clusterNetworkId}', cluster_network_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] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#terminate_cluster_network') 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 |
#terminate_instance_pool(instance_pool_id, opts = {}) ⇒ Response
Terminate the specified instance pool.
1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 |
# File 'lib/oci/core/compute_management_client.rb', line 1787 def terminate_instance_pool(instance_pool_id, opts = {}) logger.debug 'Calling operation ComputeManagementClient#terminate_instance_pool.' if logger raise "Missing the required parameter 'instance_pool_id' when calling terminate_instance_pool." if instance_pool_id.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}'.sub('{instancePoolId}', instance_pool_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] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#terminate_instance_pool') 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 |
#update_cluster_network(cluster_network_id, update_cluster_network_details, opts = {}) ⇒ Response
Update the specified cluster network. The OCID of the cluster network remains the same.
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 1887 1888 1889 1890 |
# File 'lib/oci/core/compute_management_client.rb', line 1851 def update_cluster_network(cluster_network_id, update_cluster_network_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#update_cluster_network.' if logger raise "Missing the required parameter 'cluster_network_id' when calling update_cluster_network." if cluster_network_id.nil? raise "Missing the required parameter 'update_cluster_network_details' when calling update_cluster_network." if update_cluster_network_details.nil? raise "Parameter value for 'cluster_network_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_network_id) path = '/clusterNetworks/{clusterNetworkId}'.sub('{clusterNetworkId}', cluster_network_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(update_cluster_network_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#update_cluster_network') 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::Core::Models::ClusterNetwork' ) end # rubocop:enable Metrics/BlockLength end |
#update_instance_configuration(instance_configuration_id, update_instance_configuration_details, opts = {}) ⇒ Response
Updates the free-form tags, defined tags, and display name of an instance configuration.
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 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 |
# File 'lib/oci/core/compute_management_client.rb', line 1917 def update_instance_configuration(instance_configuration_id, update_instance_configuration_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#update_instance_configuration.' if logger raise "Missing the required parameter 'instance_configuration_id' when calling update_instance_configuration." if instance_configuration_id.nil? raise "Missing the required parameter 'update_instance_configuration_details' when calling update_instance_configuration." if update_instance_configuration_details.nil? raise "Parameter value for 'instance_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_configuration_id) path = '/instanceConfigurations/{instanceConfigurationId}'.sub('{instanceConfigurationId}', instance_configuration_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(update_instance_configuration_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#update_instance_configuration') 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::Core::Models::InstanceConfiguration' ) end # rubocop:enable Metrics/BlockLength end |
#update_instance_pool(instance_pool_id, update_instance_pool_details, opts = {}) ⇒ Response
Update the specified instance pool. The OCID of the instance pool remains the same.
1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
# File 'lib/oci/core/compute_management_client.rb', line 1985 def update_instance_pool(instance_pool_id, update_instance_pool_details, opts = {}) logger.debug 'Calling operation ComputeManagementClient#update_instance_pool.' if logger raise "Missing the required parameter 'instance_pool_id' when calling update_instance_pool." if instance_pool_id.nil? raise "Missing the required parameter 'update_instance_pool_details' when calling update_instance_pool." if update_instance_pool_details.nil? raise "Parameter value for 'instance_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_pool_id) path = '/instancePools/{instancePoolId}'.sub('{instancePoolId}', instance_pool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(update_instance_pool_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ComputeManagementClient#update_instance_pool') 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::Core::Models::InstancePool' ) end # rubocop:enable Metrics/BlockLength end |