Class: OCI::Core::ComputeManagementClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/core/compute_management_client.rb

Overview

Use the Core Services API to manage resources such as virtual cloud networks (VCNs), compute instances, and block storage volumes. For more information, see the console documentation for the Networking, Compute, and Block Volume services. The required permissions are documented in the Details for the Core Services article.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ 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.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/oci/core/compute_management_client.rb', line 61

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 + '/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_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



21
22
23
# File 'lib/oci/core/compute_management_client.rb', line 21

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


25
26
27
# File 'lib/oci/core/compute_management_client.rb', line 25

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


35
36
37
# File 'lib/oci/core/compute_management_client.rb', line 35

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



31
32
33
# File 'lib/oci/core/compute_management_client.rb', line 31

def retry_config
  @retry_config
end

Instance Method Details

#attach_instance_pool_instance(instance_pool_id, attach_instance_pool_instance_details, opts = {}) ⇒ Response

Note:

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

Attaches an instance to an instance pool. For information about the prerequisites that an instance must meet before you can attach it to a pool, see Attaching an Instance to an Instance Pool.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/oci/core/compute_management_client.rb', line 126

def attach_instance_pool_instance(instance_pool_id, attach_instance_pool_instance_details, opts = {})
  logger.debug 'Calling operation ComputeManagementClient#attach_instance_pool_instance.' if logger

  raise "Missing the required parameter 'instance_pool_id' when calling attach_instance_pool_instance." if instance_pool_id.nil?
  raise "Missing the required parameter 'attach_instance_pool_instance_details' when calling attach_instance_pool_instance." if attach_instance_pool_instance_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}/instances'.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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(attach_instance_pool_instance_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeManagementClient#attach_instance_pool_instance') 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::InstancePoolInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#attach_load_balancer(instance_pool_id, attach_load_balancer_details, opts = {}) ⇒ Response

Note:

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

Attach a load balancer to the instance pool.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
232
# File 'lib/oci/core/compute_management_client.rb', line 193

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.make_retrying_call(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

Note:

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

Moves a cluster network with instance pools into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

When you move a cluster network to a different compartment, associated resources such as the instances in the cluster network, boot volumes, and VNICs are not moved.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
302
303
304
305
306
307
308
309
# File 'lib/oci/core/compute_management_client.rb', line 270

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.make_retrying_call(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

Note:

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

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.

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.

Parameters:

  • instance_configuration_id (String)

    The OCID of the instance configuration.

  • change_instance_configuration_compartment_details (OCI::Core::Models::ChangeInstanceConfigurationCompartmentDetails)

    Request to change the compartment of given instance configuration.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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

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.make_retrying_call(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

Note:

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

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.

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.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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

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.make_retrying_call(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

Note:

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

Creates a cluster network with instance pools. A cluster network is a group of high performance computing (HPC), GPU, or optimized bare metal instances that are connected with an ultra low-latency remote direct memory access (RDMA) network. Cluster networks with instance pools use instance pools to manage groups of identical instances.

Use cluster networks with instance pools when you want predictable capacity for a specific number of identical instances that are managed as a group.

If you want to manage instances in the RDMA network independently of each other or use different types of instances in the network group, create a compute cluster by using the create_compute_cluster operation.

To determine whether capacity is available for a specific shape before you create a cluster network, use the create_compute_capacity_report operation.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



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

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.make_retrying_call(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

Note:

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

Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
# File 'lib/oci/core/compute_management_client.rb', line 567

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.make_retrying_call(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

Note:

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

Creates an instance pool.

To determine whether capacity is available for a specific shape before you create an instance pool, use the create_compute_capacity_report operation.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
# File 'lib/oci/core/compute_management_client.rb', line 631

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.make_retrying_call(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

Note:

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

Deletes an instance configuration.

Parameters:

  • instance_configuration_id (String)

    The OCID of the instance configuration.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
# File 'lib/oci/core/compute_management_client.rb', line 688

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.make_retrying_call(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_instance_pool_instance(instance_pool_id, detach_instance_pool_instance_details, opts = {}) ⇒ Response

Note:

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

Detaches an instance from an instance pool.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/oci/core/compute_management_client.rb', line 748

def detach_instance_pool_instance(instance_pool_id, detach_instance_pool_instance_details, opts = {})
  logger.debug 'Calling operation ComputeManagementClient#detach_instance_pool_instance.' if logger

  raise "Missing the required parameter 'instance_pool_id' when calling detach_instance_pool_instance." if instance_pool_id.nil?
  raise "Missing the required parameter 'detach_instance_pool_instance_details' when calling detach_instance_pool_instance." if detach_instance_pool_instance_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/detachInstance'.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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(detach_instance_pool_instance_details)

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

#detach_load_balancer(instance_pool_id, detach_load_balancer_details, opts = {}) ⇒ Response

Note:

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

Detach a load balancer from the instance pool.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



814
815
816
817
818
819
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
# File 'lib/oci/core/compute_management_client.rb', line 814

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.make_retrying_call(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

Note:

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

Gets information about a cluster network with instance pools.

Parameters:

  • cluster_network_id (String)

    The OCID of the cluster network.

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

    the optional parameters

Options Hash (opts):

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

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

Returns:



872
873
874
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
# File 'lib/oci/core/compute_management_client.rb', line 872

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.make_retrying_call(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

Note:

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

Gets the specified instance configuration

Parameters:

  • instance_configuration_id (String)

    The OCID of the instance configuration.

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

    the optional parameters

Options Hash (opts):

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

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

Returns:



926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
# File 'lib/oci/core/compute_management_client.rb', line 926

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.make_retrying_call(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

Note:

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

Gets the specified instance pool

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

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

    the optional parameters

Options Hash (opts):

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

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

Returns:



980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
# File 'lib/oci/core/compute_management_client.rb', line 980

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.make_retrying_call(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_instance(instance_pool_id, instance_id, opts = {}) ⇒ Response

Note:

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

Gets information about an instance that belongs to an instance pool.

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

  • instance_id (String)

    The OCID of the instance.

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

    the optional parameters

Options Hash (opts):

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

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

Returns:



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
# File 'lib/oci/core/compute_management_client.rb', line 1035

def get_instance_pool_instance(instance_pool_id, instance_id, opts = {})
  logger.debug 'Calling operation ComputeManagementClient#get_instance_pool_instance.' if logger

  raise "Missing the required parameter 'instance_pool_id' when calling get_instance_pool_instance." if instance_pool_id.nil?
  raise "Missing the required parameter 'instance_id' when calling get_instance_pool_instance." if instance_id.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_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_id)

  path = '/instancePools/{instancePoolId}/instances/{instanceId}'.sub('{instancePoolId}', instance_pool_id.to_s).sub('{instanceId}', instance_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.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeManagementClient#get_instance_pool_instance') 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::InstancePoolInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_instance_pool_load_balancer_attachment(instance_pool_id, instance_pool_load_balancer_attachment_id, opts = {}) ⇒ Response

Note:

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

Gets information about a load balancer that is attached to the specified instance pool.

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

  • instance_pool_load_balancer_attachment_id (String)

    The OCID of the load balancer attachment.

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

    the optional parameters

Options Hash (opts):

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

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

Returns:



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
# File 'lib/oci/core/compute_management_client.rb', line 1093

def get_instance_pool_load_balancer_attachment(instance_pool_id, instance_pool_load_balancer_attachment_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 instance_pool_load_balancer_attachment_id.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?(instance_pool_load_balancer_attachment_id)

  path = '/instancePools/{instancePoolId}/loadBalancerAttachments/{instancePoolLoadBalancerAttachmentId}'.sub('{instancePoolId}', instance_pool_id.to_s).sub('{instancePoolLoadBalancerAttachmentId}', instance_pool_load_balancer_attachment_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.make_retrying_call(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

Note:

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

Creates an instance from an instance configuration.

If the instance configuration does not include all of the parameters that are required to create an instance, such as the availability domain and subnet ID, you must provide these parameters when you create an instance from the instance configuration. For more information, see the InstanceConfiguration resource.

To determine whether capacity is available for a specific shape before you create an instance, use the create_compute_capacity_report operation.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

Returns:



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

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.make_retrying_call(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

Note:

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

Lists the instances in a cluster network with instance pools.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • cluster_network_id (String)

    The OCID of the cluster network.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :limit (Integer)

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

    Example: 50

  • :page (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

Returns:



1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
# File 'lib/oci/core/compute_management_client.rb', line 1249

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.make_retrying_call(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

Note:

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

Lists the cluster networks with instance pools in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :limit (Integer)

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

    Example: 50

  • :page (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
# File 'lib/oci/core/compute_management_client.rb', line 1347

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.make_retrying_call(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

Note:

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

Lists the instance configurations in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

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

    Example: 50

  • :page (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

Returns:



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
# File 'lib/oci/core/compute_management_client.rb', line 1442

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.make_retrying_call(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

Note:

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

List the instances in the specified instance pool.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • instance_pool_id (String)

    The OCID of the instance pool.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :limit (Integer)

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

    Example: 50

  • :page (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

Returns:



1533
1534
1535
1536
1537
1538
1539
1540
1541
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
# File 'lib/oci/core/compute_management_client.rb', line 1533

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.make_retrying_call(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

Note:

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

Lists the instance pools in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :limit (Integer)

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

    Example: 50

  • :page (String)

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

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. (default to ASC) Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
# File 'lib/oci/core/compute_management_client.rb', line 1629

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.make_retrying_call(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

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



100
101
102
# File 'lib/oci/core/compute_management_client.rb', line 100

def logger
  @api_client.config.logger
end

#reset_instance_pool(instance_pool_id, opts = {}) ⇒ Response

Note:

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

Performs the reset (immediate power off and power on) action on the specified instance pool, which performs the action on all the instances in the pool.

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
# File 'lib/oci/core/compute_management_client.rb', line 1711

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.make_retrying_call(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

Note:

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

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.

Softreset gracefully reboots the instances by sending a shutdown command to the operating systems. After waiting 15 minutes for the OS to shut down, the instances are powered off and then powered back on.

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



1781
1782
1783
1784
1785
1786
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
# File 'lib/oci/core/compute_management_client.rb', line 1781

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.make_retrying_call(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

#softstop_instance_pool(instance_pool_id, opts = {}) ⇒ Response

Note:

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

Performs the softstop (ACPI shutdown and power on) action on the specified instance pool, which performs the action on all the instances in the pool.

Softstop gracefully reboots the instances by sending a shutdown command to the operating systems. After waiting 15 minutes for the OS to shutdown, the instances are powered off and then powered back on.

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
# File 'lib/oci/core/compute_management_client.rb', line 1851

def softstop_instance_pool(instance_pool_id, opts = {})
  logger.debug 'Calling operation ComputeManagementClient#softstop_instance_pool.' if logger

  raise "Missing the required parameter 'instance_pool_id' when calling softstop_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/softstop'.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.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeManagementClient#softstop_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

Note:

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

Performs the start (power on) action on the specified instance pool, which performs the action on all the instances in the pool.

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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 1918

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.make_retrying_call(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

Note:

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

Performs the stop (immediate power off) action on the specified instance pool, which performs the action on all the instances in the pool.

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
# File 'lib/oci/core/compute_management_client.rb', line 1985

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.make_retrying_call(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

Note:

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

Deletes (terminates) a cluster network with instance pools.

When you delete a cluster network, all of its resources are permanently deleted, including associated instances and instance pools.

Parameters:

  • cluster_network_id (String)

    The OCID of the cluster network.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
# File 'lib/oci/core/compute_management_client.rb', line 2048

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.make_retrying_call(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

Note:

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

Terminate the specified instance pool.

Warning: When you delete an instance pool, the resources that were created by the pool are permanently deleted, including associated instances, attached boot volumes, and block volumes.

If an autoscaling configuration applies to the instance pool, the autoscaling configuration will be deleted asynchronously after the pool is deleted. You can also manually delete the autoscaling configuration using the DeleteAutoScalingConfiguration operation in the Autoscaling API.

Parameters:

  • instance_pool_id (String)

    The OCID of the instance pool.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/core/compute_management_client.rb', line 2112

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.make_retrying_call(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

Note:

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

Updates a cluster network with instance pools. The OCID of the cluster network remains the same.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
# File 'lib/oci/core/compute_management_client.rb', line 2177

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.make_retrying_call(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

Note:

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

Updates the free-form tags, defined tags, and display name of an instance configuration.

Parameters:

  • instance_configuration_id (String)

    The OCID of the instance configuration.

  • update_instance_configuration_details (OCI::Core::Models::UpdateInstanceConfigurationDetails)

    Updates the freeFormTags, definedTags, and display name of an instance configuration.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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
# File 'lib/oci/core/compute_management_client.rb', line 2244

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.make_retrying_call(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

Note:

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

Update the specified instance pool.

The OCID of the instance pool remains the same.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
# File 'lib/oci/core/compute_management_client.rb', line 2314

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.make_retrying_call(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