class OCI::Core::ComputeClient
API covering the [Networking](/iaas/Content/Network/Concepts/overview.htm), [Compute](/iaas/Content/Compute/Concepts/computeoverview.htm), and [Block Volume](/iaas/Content/Block/Concepts/overview.htm) services. Use this API to manage resources such as virtual cloud networks (VCNs), compute instances, and block storage volumes.
Attributes
Client used to make HTTP requests. @return [OCI::ApiClient]
Fully qualified endpoint URL @return [String]
The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]
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 @return [OCI::Retry::RetryConfig]
Public Class Methods
Creates a new ComputeClient
. 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.
@param [Config] config A Config
object. @param [String] region A region used to determine the service endpoint. This will usually
correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer 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
@param [OCI::ApiClientProxySettings] proxy_settings 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
@param [OCI::Retry::RetryConfig] retry_config
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
# File lib/oci/core/compute_client.rb, line 57 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 "ComputeClient endpoint set to '#{@endpoint}'." if logger end
Public Instance Methods
Adds a shape to the compatible shapes list for the image. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [String] shape_name Shape name. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [OCI::Core::Models::AddImageShapeCompatibilityEntryDetails] :add_image_shape_compatibility_entry_details Image shape compatibility details @return [Response] A Response
object with data of type {OCI::Core::Models::ImageShapeCompatibilityEntry ImageShapeCompatibilityEntry} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/add_image_shape_compatibility_entry.rb.html) to see an example of how to use add_image_shape_compatibility_entry
API.
# File lib/oci/core/compute_client.rb, line 114 def add_image_shape_compatibility_entry(image_id, shape_name, opts = {}) logger.debug 'Calling operation ComputeClient#add_image_shape_compatibility_entry.' if logger raise "Missing the required parameter 'image_id' when calling add_image_shape_compatibility_entry." if image_id.nil? raise "Missing the required parameter 'shape_name' when calling add_image_shape_compatibility_entry." if shape_name.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) raise "Parameter value for 'shape_name' must not be blank" if OCI::Internal::Util.blank_string?(shape_name) path = '/images/{imageId}/shapes/{shapeName}'.sub('{imageId}', image_id.to_s).sub('{shapeName}', shape_name.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 = @api_client.object_to_http_body(opts[:add_image_shape_compatibility_entry_details]) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#add_image_shape_compatibility_entry') 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::ImageShapeCompatibilityEntry' ) end # rubocop:enable Metrics/BlockLength end
Attaches the specified boot volume to the specified instance.
@param [OCI::Core::Models::AttachBootVolumeDetails] attach_boot_volume_details Attach boot volume request @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::BootVolumeAttachment BootVolumeAttachment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/attach_boot_volume.rb.html) to see an example of how to use attach_boot_volume
API.
# File lib/oci/core/compute_client.rb, line 175 def attach_boot_volume(attach_boot_volume_details, opts = {}) logger.debug 'Calling operation ComputeClient#attach_boot_volume.' if logger raise "Missing the required parameter 'attach_boot_volume_details' when calling attach_boot_volume." if attach_boot_volume_details.nil? path = '/bootVolumeAttachments/' 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_boot_volume_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#attach_boot_volume') 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::BootVolumeAttachment' ) end # rubocop:enable Metrics/BlockLength end
Creates a secondary VNIC and attaches it to the specified instance. For more information about secondary VNICs, see [Virtual Network Interface Cards (VNICs)](docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm).
@param [OCI::Core::Models::AttachVnicDetails] attach_vnic_details Attach VNIC details. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::VnicAttachment VnicAttachment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/attach_vnic.rb.html) to see an example of how to use attach_vnic
API.
# File lib/oci/core/compute_client.rb, line 237 def attach_vnic(attach_vnic_details, opts = {}) logger.debug 'Calling operation ComputeClient#attach_vnic.' if logger raise "Missing the required parameter 'attach_vnic_details' when calling attach_vnic." if attach_vnic_details.nil? path = '/vnicAttachments/' 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_vnic_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#attach_vnic') 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::VnicAttachment' ) end # rubocop:enable Metrics/BlockLength end
Attaches the specified storage volume to the specified instance.
@param [OCI::Core::Models::AttachVolumeDetails] attach_volume_details Attach volume request @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::VolumeAttachment VolumeAttachment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/attach_volume.rb.html) to see an example of how to use attach_volume
API.
# File lib/oci/core/compute_client.rb, line 297 def attach_volume(attach_volume_details, opts = {}) logger.debug 'Calling operation ComputeClient#attach_volume.' if logger raise "Missing the required parameter 'attach_volume_details' when calling attach_volume." if attach_volume_details.nil? path = '/volumeAttachments/' 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_volume_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#attach_volume') 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::VolumeAttachment' ) end # rubocop:enable Metrics/BlockLength end
Captures the most recent serial console data (up to a megabyte) for the specified instance.
The `CaptureConsoleHistory` operation works with the other console history operations as described below.
-
Use `CaptureConsoleHistory` to request the capture of up to a megabyte of the
most recent console history. This call returns a `ConsoleHistory` object. The object will have a state of REQUESTED.
-
Wait for the capture operation to succeed by polling `GetConsoleHistory` with
the identifier of the console history metadata. The state of the `ConsoleHistory` object will go from REQUESTED to GETTING-HISTORY and then SUCCEEDED (or FAILED).
-
Use `GetConsoleHistoryContent` to get the actual console history data (not the
metadata).
-
Optionally, use `DeleteConsoleHistory` to delete the console history metadata
and the console history data.
@param [OCI::Core::Models::CaptureConsoleHistoryDetails] capture_console_history_details Console history details @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::ConsoleHistory ConsoleHistory} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/capture_console_history.rb.html) to see an example of how to use capture_console_history
API.
# File lib/oci/core/compute_client.rb, line 373 def capture_console_history(capture_console_history_details, opts = {}) logger.debug 'Calling operation ComputeClient#capture_console_history.' if logger raise "Missing the required parameter 'capture_console_history_details' when calling capture_console_history." if capture_console_history_details.nil? path = '/instanceConsoleHistories/' 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(capture_console_history_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#capture_console_history') 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::ConsoleHistory' ) end # rubocop:enable Metrics/BlockLength end
Moves a compute capacity reservation into a different compartment. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
@param [String] capacity_reservation_id The OCID of the compute capacity reservation. @param [OCI::Core::Models::ChangeComputeCapacityReservationCompartmentDetails] change_compute_capacity_reservation_compartment_details The configuration details for the move operation. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/change_compute_capacity_reservation_compartment.rb.html) to see an example of how to use change_compute_capacity_reservation_compartment
API.
# File lib/oci/core/compute_client.rb, line 443 def change_compute_capacity_reservation_compartment(capacity_reservation_id, change_compute_capacity_reservation_compartment_details, opts = {}) logger.debug 'Calling operation ComputeClient#change_compute_capacity_reservation_compartment.' if logger raise "Missing the required parameter 'capacity_reservation_id' when calling change_compute_capacity_reservation_compartment." if capacity_reservation_id.nil? raise "Missing the required parameter 'change_compute_capacity_reservation_compartment_details' when calling change_compute_capacity_reservation_compartment." if change_compute_capacity_reservation_compartment_details.nil? raise "Parameter value for 'capacity_reservation_id' must not be blank" if OCI::Internal::Util.blank_string?(capacity_reservation_id) path = '/computeCapacityReservations/{capacityReservationId}/actions/changeCompartment'.sub('{capacityReservationId}', capacity_reservation_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_compute_capacity_reservation_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#change_compute_capacity_reservation_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
Moves a compute image capability schema into a different compartment within the same tenancy. For information about moving resources between compartments, see
[Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
@param [String] compute_image_capability_schema_id The id of the compute image capability schema or the image ocid @param [OCI::Core::Models::ChangeComputeImageCapabilitySchemaCompartmentDetails] change_compute_image_capability_schema_compartment_details Compute Image Capability Schema change compartment details @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/change_compute_image_capability_schema_compartment.rb.html) to see an example of how to use change_compute_image_capability_schema_compartment
API.
# File lib/oci/core/compute_client.rb, line 516 def change_compute_image_capability_schema_compartment(compute_image_capability_schema_id, change_compute_image_capability_schema_compartment_details, opts = {}) logger.debug 'Calling operation ComputeClient#change_compute_image_capability_schema_compartment.' if logger raise "Missing the required parameter 'compute_image_capability_schema_id' when calling change_compute_image_capability_schema_compartment." if compute_image_capability_schema_id.nil? raise "Missing the required parameter 'change_compute_image_capability_schema_compartment_details' when calling change_compute_image_capability_schema_compartment." if change_compute_image_capability_schema_compartment_details.nil? raise "Parameter value for 'compute_image_capability_schema_id' must not be blank" if OCI::Internal::Util.blank_string?(compute_image_capability_schema_id) path = '/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}/actions/changeCompartment'.sub('{computeImageCapabilitySchemaId}', compute_image_capability_schema_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_compute_image_capability_schema_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#change_compute_image_capability_schema_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
Moves a dedicated virtual machine host from one compartment to another. @param [String] dedicated_vm_host_id The OCID of the dedicated VM host. @param [OCI::Core::Models::ChangeDedicatedVmHostCompartmentDetails] change_dedicated_vm_host_compartment_details The request to move the dedicated virtual machine host to a different compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/change_dedicated_vm_host_compartment.rb.html) to see an example of how to use change_dedicated_vm_host_compartment
API.
# File lib/oci/core/compute_client.rb, line 586 def change_dedicated_vm_host_compartment(dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, opts = {}) logger.debug 'Calling operation ComputeClient#change_dedicated_vm_host_compartment.' if logger raise "Missing the required parameter 'dedicated_vm_host_id' when calling change_dedicated_vm_host_compartment." if dedicated_vm_host_id.nil? raise "Missing the required parameter 'change_dedicated_vm_host_compartment_details' when calling change_dedicated_vm_host_compartment." if change_dedicated_vm_host_compartment_details.nil? raise "Parameter value for 'dedicated_vm_host_id' must not be blank" if OCI::Internal::Util.blank_string?(dedicated_vm_host_id) path = '/dedicatedVmHosts/{dedicatedVmHostId}/actions/changeCompartment'.sub('{dedicatedVmHostId}', dedicated_vm_host_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_dedicated_vm_host_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#change_dedicated_vm_host_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
Moves an image into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
@param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [OCI::Core::Models::ChangeImageCompartmentDetails] change_image_compartment_details Request to change the compartment of a given image. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/change_image_compartment.rb.html) to see an example of how to use change_image_compartment
API.
# File lib/oci/core/compute_client.rb, line 659 def change_image_compartment(image_id, change_image_compartment_details, opts = {}) logger.debug 'Calling operation ComputeClient#change_image_compartment.' if logger raise "Missing the required parameter 'image_id' when calling change_image_compartment." if image_id.nil? raise "Missing the required parameter 'change_image_compartment_details' when calling change_image_compartment." if change_image_compartment_details.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) path = '/images/{imageId}/actions/changeCompartment'.sub('{imageId}', image_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_image_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#change_image_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
Moves an instance into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
When you move an instance to a different compartment, associated resources such as boot volumes and VNICs are not moved.
@param [String] instance_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. @param [OCI::Core::Models::ChangeInstanceCompartmentDetails] change_instance_compartment_details Request to change the compartment of a given instance. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/change_instance_compartment.rb.html) to see an example of how to use change_instance_compartment
API.
# File lib/oci/core/compute_client.rb, line 735 def change_instance_compartment(instance_id, change_instance_compartment_details, opts = {}) logger.debug 'Calling operation ComputeClient#change_instance_compartment.' if logger raise "Missing the required parameter 'instance_id' when calling change_instance_compartment." if instance_id.nil? raise "Missing the required parameter 'change_instance_compartment_details' when calling change_instance_compartment." if change_instance_compartment_details.nil? raise "Parameter value for 'instance_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_id) path = '/instances/{instanceId}/actions/changeCompartment'.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' 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_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#change_instance_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 a subscription for listing resource version for a compartment. It will take some time to propagate to all regions.
@param [OCI::Core::Models::CreateAppCatalogSubscriptionDetails] create_app_catalog_subscription_details Request for the creation of a subscription for listing resource version for a compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::AppCatalogSubscription AppCatalogSubscription} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/create_app_catalog_subscription.rb.html) to see an example of how to use create_app_catalog_subscription
API.
# File lib/oci/core/compute_client.rb, line 798 def create_app_catalog_subscription(create_app_catalog_subscription_details, opts = {}) logger.debug 'Calling operation ComputeClient#create_app_catalog_subscription.' if logger raise "Missing the required parameter 'create_app_catalog_subscription_details' when calling create_app_catalog_subscription." if create_app_catalog_subscription_details.nil? path = '/appCatalogSubscriptions' 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_app_catalog_subscription_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#create_app_catalog_subscription') 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::AppCatalogSubscription' ) end # rubocop:enable Metrics/BlockLength end
Creates a new compute capacity reservation in the specified compartment and availability domain. Compute capacity reservations let you reserve instances in a compartment. When you launch an instance using this reservation, you are assured that you have enough space for your instance, and you won't get out of capacity errors. For more information, see [Reserved Capacity](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm).
@param [OCI::Core::Models::CreateComputeCapacityReservationDetails] create_compute_capacity_reservation_details Details for creating a new compute capacity reservation.
**Caution:** Avoid using any confidential information when you use the API to supply string values.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::ComputeCapacityReservation ComputeCapacityReservation} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/create_compute_capacity_reservation.rb.html) to see an example of how to use create_compute_capacity_reservation
API.
# File lib/oci/core/compute_client.rb, line 868 def create_compute_capacity_reservation(create_compute_capacity_reservation_details, opts = {}) logger.debug 'Calling operation ComputeClient#create_compute_capacity_reservation.' if logger raise "Missing the required parameter 'create_compute_capacity_reservation_details' when calling create_compute_capacity_reservation." if create_compute_capacity_reservation_details.nil? path = '/computeCapacityReservations' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_compute_capacity_reservation_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#create_compute_capacity_reservation') 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::ComputeCapacityReservation' ) end # rubocop:enable Metrics/BlockLength end
Creates compute image capability schema.
@param [OCI::Core::Models::CreateComputeImageCapabilitySchemaDetails] create_compute_image_capability_schema_details Compute Image Capability Schema creation details @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::ComputeImageCapabilitySchema ComputeImageCapabilitySchema} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/create_compute_image_capability_schema.rb.html) to see an example of how to use create_compute_image_capability_schema
API.
# File lib/oci/core/compute_client.rb, line 929 def create_compute_image_capability_schema(create_compute_image_capability_schema_details, opts = {}) logger.debug 'Calling operation ComputeClient#create_compute_image_capability_schema.' if logger raise "Missing the required parameter 'create_compute_image_capability_schema_details' when calling create_compute_image_capability_schema." if create_compute_image_capability_schema_details.nil? path = '/computeImageCapabilitySchemas' 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_compute_image_capability_schema_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#create_compute_image_capability_schema') 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::ComputeImageCapabilitySchema' ) end # rubocop:enable Metrics/BlockLength end
Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain. Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers that are a single tenant and not shared with other customers. For more information, see [Dedicated Virtual Machine Hosts](docs.cloud.oracle.com/iaas/Content/Compute/Concepts/dedicatedvmhosts.htm).
@param [OCI::Core::Models::CreateDedicatedVmHostDetails] create_dedicated_vm_host_details The details for creating a new dedicated virtual machine host. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::DedicatedVmHost DedicatedVmHost} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/create_dedicated_vm_host.rb.html) to see an example of how to use create_dedicated_vm_host
API.
# File lib/oci/core/compute_client.rb, line 995 def create_dedicated_vm_host(create_dedicated_vm_host_details, opts = {}) logger.debug 'Calling operation ComputeClient#create_dedicated_vm_host.' if logger raise "Missing the required parameter 'create_dedicated_vm_host_details' when calling create_dedicated_vm_host." if create_dedicated_vm_host_details.nil? path = '/dedicatedVmHosts' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_dedicated_vm_host_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#create_dedicated_vm_host') 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::DedicatedVmHost' ) end # rubocop:enable Metrics/BlockLength end
Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object
Storage service.
When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and the OCID of the compartment containing that instance. For more information about images, see [Managing Custom Images](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm).
When importing an exported image from Object
Storage, you specify the source information in {#image_source_details image_source_details}.
When importing an image based on the namespace, bucket name, and object name, use {#image_source_via_object_storage_tuple_details image_source_via_object_storage_tuple_details}.
When importing an image based on the Object
Storage URL, use image_source_via_object_storage_uri_details. See [Object Storage URLs](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs) and [Using Pre-Authenticated Requests](docs.cloud.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm) for constructing URLs for image import/export.
For more information about importing exported images, see [Image Import/Export](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm).
You may optionally specify a *display name* for the image, which is simply a friendly name or description. It does not have to be unique, and you can change it. See {#update_image update_image
}. Avoid entering confidential information.
@param [OCI::Core::Models::CreateImageDetails] create_image_details Image creation details @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::Image Image} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/create_image.rb.html) to see an example of how to use create_image
API.
# File lib/oci/core/compute_client.rb, line 1078 def create_image(create_image_details, opts = {}) logger.debug 'Calling operation ComputeClient#create_image.' if logger raise "Missing the required parameter 'create_image_details' when calling create_image." if create_image_details.nil? path = '/images' 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_image_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#create_image') 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::Image' ) end # rubocop:enable Metrics/BlockLength end
Creates a new console connection to the specified instance. After the console connection has been created and is available, you connect to the console using SSH.
For more information about instance console connections, see [Troubleshooting Instances Using Instance Console Connections](docs.cloud.oracle.com/iaas/Content/Compute/References/serialconsole.htm).
@param [OCI::Core::Models::CreateInstanceConsoleConnectionDetails] create_instance_console_connection_details Request object for creating an InstanceConsoleConnection @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::InstanceConsoleConnection InstanceConsoleConnection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/create_instance_console_connection.rb.html) to see an example of how to use create_instance_console_connection
API.
# File lib/oci/core/compute_client.rb, line 1142 def create_instance_console_connection(create_instance_console_connection_details, opts = {}) logger.debug 'Calling operation ComputeClient#create_instance_console_connection.' if logger raise "Missing the required parameter 'create_instance_console_connection_details' when calling create_instance_console_connection." if create_instance_console_connection_details.nil? path = '/instanceConsoleConnections' 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_console_connection_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#create_instance_console_connection') 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::InstanceConsoleConnection' ) end # rubocop:enable Metrics/BlockLength end
Delete a subscription for a listing resource version for a compartment. @param [String] listing_id The OCID of the listing. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [String] resource_version Listing Resource Version. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/delete_app_catalog_subscription.rb.html) to see an example of how to use delete_app_catalog_subscription
API.
# File lib/oci/core/compute_client.rb, line 1198 def delete_app_catalog_subscription(listing_id, compartment_id, resource_version, opts = {}) logger.debug 'Calling operation ComputeClient#delete_app_catalog_subscription.' if logger raise "Missing the required parameter 'listing_id' when calling delete_app_catalog_subscription." if listing_id.nil? raise "Missing the required parameter 'compartment_id' when calling delete_app_catalog_subscription." if compartment_id.nil? raise "Missing the required parameter 'resource_version' when calling delete_app_catalog_subscription." if resource_version.nil? path = '/appCatalogSubscriptions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:listingId] = listing_id query_params[:compartmentId] = compartment_id query_params[:resourceVersion] = resource_version # 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: 'ComputeClient#delete_app_catalog_subscription') 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
Deletes the specified compute capacity reservation. @param [String] capacity_reservation_id The OCID of the compute capacity reservation. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/delete_compute_capacity_reservation.rb.html) to see an example of how to use delete_compute_capacity_reservation
API.
# File lib/oci/core/compute_client.rb, line 1261 def delete_compute_capacity_reservation(capacity_reservation_id, opts = {}) logger.debug 'Calling operation ComputeClient#delete_compute_capacity_reservation.' if logger raise "Missing the required parameter 'capacity_reservation_id' when calling delete_compute_capacity_reservation." if capacity_reservation_id.nil? raise "Parameter value for 'capacity_reservation_id' must not be blank" if OCI::Internal::Util.blank_string?(capacity_reservation_id) path = '/computeCapacityReservations/{capacityReservationId}'.sub('{capacityReservationId}', capacity_reservation_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#delete_compute_capacity_reservation') 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
Deletes the specified Compute Image Capability Schema
@param [String] compute_image_capability_schema_id The id of the compute image capability schema or the image ocid @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/delete_compute_image_capability_schema.rb.html) to see an example of how to use delete_compute_image_capability_schema
API.
# File lib/oci/core/compute_client.rb, line 1319 def delete_compute_image_capability_schema(compute_image_capability_schema_id, opts = {}) logger.debug 'Calling operation ComputeClient#delete_compute_image_capability_schema.' if logger raise "Missing the required parameter 'compute_image_capability_schema_id' when calling delete_compute_image_capability_schema." if compute_image_capability_schema_id.nil? raise "Parameter value for 'compute_image_capability_schema_id' must not be blank" if OCI::Internal::Util.blank_string?(compute_image_capability_schema_id) path = '/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}'.sub('{computeImageCapabilitySchemaId}', compute_image_capability_schema_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: 'ComputeClient#delete_compute_image_capability_schema') 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
Deletes the specified console history metadata and the console history data.
@param [String] instance_console_history_id The OCID of the console history. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/delete_console_history.rb.html) to see an example of how to use delete_console_history
API.
# File lib/oci/core/compute_client.rb, line 1376 def delete_console_history(instance_console_history_id, opts = {}) logger.debug 'Calling operation ComputeClient#delete_console_history.' if logger raise "Missing the required parameter 'instance_console_history_id' when calling delete_console_history." if instance_console_history_id.nil? raise "Parameter value for 'instance_console_history_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_console_history_id) path = '/instanceConsoleHistories/{instanceConsoleHistoryId}'.sub('{instanceConsoleHistoryId}', instance_console_history_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: 'ComputeClient#delete_console_history') 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
Deletes the specified dedicated virtual machine host.
If any VM instances are assigned to the dedicated virtual machine host, the delete operation will fail and the service will return a 409 response code.
@param [String] dedicated_vm_host_id The OCID of the dedicated VM host. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/delete_dedicated_vm_host.rb.html) to see an example of how to use delete_dedicated_vm_host
API.
# File lib/oci/core/compute_client.rb, line 1435 def delete_dedicated_vm_host(dedicated_vm_host_id, opts = {}) logger.debug 'Calling operation ComputeClient#delete_dedicated_vm_host.' if logger raise "Missing the required parameter 'dedicated_vm_host_id' when calling delete_dedicated_vm_host." if dedicated_vm_host_id.nil? raise "Parameter value for 'dedicated_vm_host_id' must not be blank" if OCI::Internal::Util.blank_string?(dedicated_vm_host_id) path = '/dedicatedVmHosts/{dedicatedVmHostId}'.sub('{dedicatedVmHostId}', dedicated_vm_host_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#delete_dedicated_vm_host') 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
Deletes an image. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/delete_image.rb.html) to see an example of how to use delete_image
API.
# File lib/oci/core/compute_client.rb, line 1491 def delete_image(image_id, opts = {}) logger.debug 'Calling operation ComputeClient#delete_image.' if logger raise "Missing the required parameter 'image_id' when calling delete_image." if image_id.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) path = '/images/{imageId}'.sub('{imageId}', image_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: 'ComputeClient#delete_image') 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
Deletes the specified instance console connection. @param [String] instance_console_connection_id The OCID of the instance console connection. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/delete_instance_console_connection.rb.html) to see an example of how to use delete_instance_console_connection
API.
# File lib/oci/core/compute_client.rb, line 1547 def delete_instance_console_connection(instance_console_connection_id, opts = {}) logger.debug 'Calling operation ComputeClient#delete_instance_console_connection.' if logger raise "Missing the required parameter 'instance_console_connection_id' when calling delete_instance_console_connection." if instance_console_connection_id.nil? raise "Parameter value for 'instance_console_connection_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_console_connection_id) path = '/instanceConsoleConnections/{instanceConsoleConnectionId}'.sub('{instanceConsoleConnectionId}', instance_console_connection_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: 'ComputeClient#delete_instance_console_connection') 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
Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment.
This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily until the attachment is completely removed.
@param [String] boot_volume_attachment_id The OCID of the boot volume attachment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/detach_boot_volume.rb.html) to see an example of how to use detach_boot_volume
API.
# File lib/oci/core/compute_client.rb, line 1607 def detach_boot_volume(boot_volume_attachment_id, opts = {}) logger.debug 'Calling operation ComputeClient#detach_boot_volume.' if logger raise "Missing the required parameter 'boot_volume_attachment_id' when calling detach_boot_volume." if boot_volume_attachment_id.nil? raise "Parameter value for 'boot_volume_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(boot_volume_attachment_id) path = '/bootVolumeAttachments/{bootVolumeAttachmentId}'.sub('{bootVolumeAttachmentId}', boot_volume_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' 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: 'ComputeClient#detach_boot_volume') 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
Detaches and deletes the specified secondary VNIC. This operation cannot be used on the instance's primary VNIC. When you terminate an instance, all attached VNICs (primary and secondary) are automatically detached and deleted.
Important: If the VNIC has a {PrivateIp} that is the [target of a route rule](docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#privateip), deleting the VNIC causes that route rule to blackhole and the traffic will be dropped.
@param [String] vnic_attachment_id The OCID of the VNIC attachment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/detach_vnic.rb.html) to see an example of how to use detach_vnic
API.
# File lib/oci/core/compute_client.rb, line 1673 def detach_vnic(vnic_attachment_id, opts = {}) logger.debug 'Calling operation ComputeClient#detach_vnic.' if logger raise "Missing the required parameter 'vnic_attachment_id' when calling detach_vnic." if vnic_attachment_id.nil? raise "Parameter value for 'vnic_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(vnic_attachment_id) path = '/vnicAttachments/{vnicAttachmentId}'.sub('{vnicAttachmentId}', vnic_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' 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: 'ComputeClient#detach_vnic') 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
Detaches a storage volume from an instance. You must specify the OCID of the volume attachment.
This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily until the attachment is completely removed.
@param [String] volume_attachment_id The OCID of the volume attachment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/detach_volume.rb.html) to see an example of how to use detach_volume
API.
# File lib/oci/core/compute_client.rb, line 1733 def detach_volume(volume_attachment_id, opts = {}) logger.debug 'Calling operation ComputeClient#detach_volume.' if logger raise "Missing the required parameter 'volume_attachment_id' when calling detach_volume." if volume_attachment_id.nil? raise "Parameter value for 'volume_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_attachment_id) path = '/volumeAttachments/{volumeAttachmentId}'.sub('{volumeAttachmentId}', volume_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' 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: 'ComputeClient#detach_volume') 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
Exports the specified image to the Oracle Cloud Infrastructure Object
Storage service. You can use the Object
Storage URL, or the namespace, bucket name, and object name when specifying the location to export to.
For more information about exporting images, see [Image Import/Export](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm).
To perform an image export, you need write access to the Object
Storage bucket for the image, see [Let Users Write Objects to Object
Storage Buckets](docs.cloud.oracle.com/iaas/Content/Identity/Concepts/commonpolicies.htm#Let4).
See [Object Storage URLs](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs) and [Using Pre-Authenticated Requests](docs.cloud.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm) for constructing URLs for image import/export.
@param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [OCI::Core::Models::ExportImageDetails] export_image_details Details for the image export. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type {OCI::Core::Models::Image Image} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/export_image.rb.html) to see an example of how to use export_image
API.
# File lib/oci/core/compute_client.rb, line 1806 def export_image(image_id, export_image_details, opts = {}) logger.debug 'Calling operation ComputeClient#export_image.' if logger raise "Missing the required parameter 'image_id' when calling export_image." if image_id.nil? raise "Missing the required parameter 'export_image_details' when calling export_image." if export_image_details.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) path = '/images/{imageId}/actions/export'.sub('{imageId}', image_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(export_image_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#export_image') 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::Image' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified listing. @param [String] listing_id The OCID of the listing. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::AppCatalogListing AppCatalogListing} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_app_catalog_listing.rb.html) to see an example of how to use get_app_catalog_listing
API.
# File lib/oci/core/compute_client.rb, line 1863 def get_app_catalog_listing(listing_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_app_catalog_listing.' if logger raise "Missing the required parameter 'listing_id' when calling get_app_catalog_listing." if listing_id.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) path = '/appCatalogListings/{listingId}'.sub('{listingId}', listing_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: 'ComputeClient#get_app_catalog_listing') 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::AppCatalogListing' ) end # rubocop:enable Metrics/BlockLength end
Retrieves the agreements for a particular resource version of a listing. @param [String] listing_id The OCID of the listing. @param [String] resource_version Listing Resource Version. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::AppCatalogListingResourceVersionAgreements AppCatalogListingResourceVersionAgreements} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_app_catalog_listing_agreements.rb.html) to see an example of how to use get_app_catalog_listing_agreements
API.
# File lib/oci/core/compute_client.rb, line 1918 def get_app_catalog_listing_agreements(listing_id, resource_version, opts = {}) logger.debug 'Calling operation ComputeClient#get_app_catalog_listing_agreements.' if logger raise "Missing the required parameter 'listing_id' when calling get_app_catalog_listing_agreements." if listing_id.nil? raise "Missing the required parameter 'resource_version' when calling get_app_catalog_listing_agreements." if resource_version.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) raise "Parameter value for 'resource_version' must not be blank" if OCI::Internal::Util.blank_string?(resource_version) path = '/appCatalogListings/{listingId}/resourceVersions/{resourceVersion}/agreements'.sub('{listingId}', listing_id.to_s).sub('{resourceVersion}', resource_version.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: 'ComputeClient#get_app_catalog_listing_agreements') 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::AppCatalogListingResourceVersionAgreements' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified listing resource version. @param [String] listing_id The OCID of the listing. @param [String] resource_version Listing Resource Version. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::AppCatalogListingResourceVersion AppCatalogListingResourceVersion} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_app_catalog_listing_resource_version.rb.html) to see an example of how to use get_app_catalog_listing_resource_version
API.
# File lib/oci/core/compute_client.rb, line 1975 def get_app_catalog_listing_resource_version(listing_id, resource_version, opts = {}) logger.debug 'Calling operation ComputeClient#get_app_catalog_listing_resource_version.' if logger raise "Missing the required parameter 'listing_id' when calling get_app_catalog_listing_resource_version." if listing_id.nil? raise "Missing the required parameter 'resource_version' when calling get_app_catalog_listing_resource_version." if resource_version.nil? raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) raise "Parameter value for 'resource_version' must not be blank" if OCI::Internal::Util.blank_string?(resource_version) path = '/appCatalogListings/{listingId}/resourceVersions/{resourceVersion}'.sub('{listingId}', listing_id.to_s).sub('{resourceVersion}', resource_version.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: 'ComputeClient#get_app_catalog_listing_resource_version') 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::AppCatalogListingResourceVersion' ) end # rubocop:enable Metrics/BlockLength end
Gets information about the specified boot volume attachment. @param [String] boot_volume_attachment_id The OCID of the boot volume attachment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::BootVolumeAttachment BootVolumeAttachment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_boot_volume_attachment.rb.html) to see an example of how to use get_boot_volume_attachment
API.
# File lib/oci/core/compute_client.rb, line 2031 def get_boot_volume_attachment(boot_volume_attachment_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_boot_volume_attachment.' if logger raise "Missing the required parameter 'boot_volume_attachment_id' when calling get_boot_volume_attachment." if boot_volume_attachment_id.nil? raise "Parameter value for 'boot_volume_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(boot_volume_attachment_id) path = '/bootVolumeAttachments/{bootVolumeAttachmentId}'.sub('{bootVolumeAttachmentId}', boot_volume_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: 'ComputeClient#get_boot_volume_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::BootVolumeAttachment' ) end # rubocop:enable Metrics/BlockLength end
Gets information about the specified compute capacity reservation. @param [String] capacity_reservation_id The OCID of the compute capacity reservation. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@return [Response] A Response
object with data of type {OCI::Core::Models::ComputeCapacityReservation ComputeCapacityReservation} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_compute_capacity_reservation.rb.html) to see an example of how to use get_compute_capacity_reservation
API.
# File lib/oci/core/compute_client.rb, line 2087 def get_compute_capacity_reservation(capacity_reservation_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_compute_capacity_reservation.' if logger raise "Missing the required parameter 'capacity_reservation_id' when calling get_compute_capacity_reservation." if capacity_reservation_id.nil? raise "Parameter value for 'capacity_reservation_id' must not be blank" if OCI::Internal::Util.blank_string?(capacity_reservation_id) path = '/computeCapacityReservations/{capacityReservationId}'.sub('{capacityReservationId}', capacity_reservation_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_compute_capacity_reservation') 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::ComputeCapacityReservation' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified Compute Global Image Capability Schema @param [String] compute_global_image_capability_schema_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute global image capability schema @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::ComputeGlobalImageCapabilitySchema ComputeGlobalImageCapabilitySchema} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_compute_global_image_capability_schema.rb.html) to see an example of how to use get_compute_global_image_capability_schema
API.
# File lib/oci/core/compute_client.rb, line 2141 def get_compute_global_image_capability_schema(compute_global_image_capability_schema_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_compute_global_image_capability_schema.' if logger raise "Missing the required parameter 'compute_global_image_capability_schema_id' when calling get_compute_global_image_capability_schema." if compute_global_image_capability_schema_id.nil? raise "Parameter value for 'compute_global_image_capability_schema_id' must not be blank" if OCI::Internal::Util.blank_string?(compute_global_image_capability_schema_id) path = '/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}'.sub('{computeGlobalImageCapabilitySchemaId}', compute_global_image_capability_schema_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: 'ComputeClient#get_compute_global_image_capability_schema') 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::ComputeGlobalImageCapabilitySchema' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified Compute Global Image Capability Schema Version @param [String] compute_global_image_capability_schema_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute global image capability schema @param [String] compute_global_image_capability_schema_version_name The name of the compute global image capability schema version @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::ComputeGlobalImageCapabilitySchemaVersion ComputeGlobalImageCapabilitySchemaVersion} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_compute_global_image_capability_schema_version.rb.html) to see an example of how to use get_compute_global_image_capability_schema_version
API.
# File lib/oci/core/compute_client.rb, line 2196 def get_compute_global_image_capability_schema_version(compute_global_image_capability_schema_id, compute_global_image_capability_schema_version_name, opts = {}) logger.debug 'Calling operation ComputeClient#get_compute_global_image_capability_schema_version.' if logger raise "Missing the required parameter 'compute_global_image_capability_schema_id' when calling get_compute_global_image_capability_schema_version." if compute_global_image_capability_schema_id.nil? raise "Missing the required parameter 'compute_global_image_capability_schema_version_name' when calling get_compute_global_image_capability_schema_version." if compute_global_image_capability_schema_version_name.nil? raise "Parameter value for 'compute_global_image_capability_schema_id' must not be blank" if OCI::Internal::Util.blank_string?(compute_global_image_capability_schema_id) raise "Parameter value for 'compute_global_image_capability_schema_version_name' must not be blank" if OCI::Internal::Util.blank_string?(compute_global_image_capability_schema_version_name) path = '/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}/versions/{computeGlobalImageCapabilitySchemaVersionName}'.sub('{computeGlobalImageCapabilitySchemaId}', compute_global_image_capability_schema_id.to_s).sub('{computeGlobalImageCapabilitySchemaVersionName}', compute_global_image_capability_schema_version_name.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: 'ComputeClient#get_compute_global_image_capability_schema_version') 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::ComputeGlobalImageCapabilitySchemaVersion' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified Compute Image Capability Schema
@param [String] compute_image_capability_schema_id The id of the compute image capability schema or the image ocid @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [BOOLEAN] :is_merge_enabled Merge the image capability schema with the global image capability schema
(default to false)
@return [Response] A Response
object with data of type {OCI::Core::Models::ComputeImageCapabilitySchema ComputeImageCapabilitySchema} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_compute_image_capability_schema.rb.html) to see an example of how to use get_compute_image_capability_schema
API.
# File lib/oci/core/compute_client.rb, line 2254 def get_compute_image_capability_schema(compute_image_capability_schema_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_compute_image_capability_schema.' if logger raise "Missing the required parameter 'compute_image_capability_schema_id' when calling get_compute_image_capability_schema." if compute_image_capability_schema_id.nil? raise "Parameter value for 'compute_image_capability_schema_id' must not be blank" if OCI::Internal::Util.blank_string?(compute_image_capability_schema_id) path = '/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}'.sub('{computeImageCapabilitySchemaId}', compute_image_capability_schema_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:isMergeEnabled] = opts[:is_merge_enabled] if !opts[:is_merge_enabled].nil? # 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: 'ComputeClient#get_compute_image_capability_schema') 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::ComputeImageCapabilitySchema' ) end # rubocop:enable Metrics/BlockLength end
Shows the metadata for the specified console history. See {#capture_console_history capture_console_history
} for details about using the console history operations.
@param [String] instance_console_history_id The OCID of the console history. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::ConsoleHistory ConsoleHistory} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_console_history.rb.html) to see an example of how to use get_console_history
API.
# File lib/oci/core/compute_client.rb, line 2311 def get_console_history(instance_console_history_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_console_history.' if logger raise "Missing the required parameter 'instance_console_history_id' when calling get_console_history." if instance_console_history_id.nil? raise "Parameter value for 'instance_console_history_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_console_history_id) path = '/instanceConsoleHistories/{instanceConsoleHistoryId}'.sub('{instanceConsoleHistoryId}', instance_console_history_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: 'ComputeClient#get_console_history') 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::ConsoleHistory' ) end # rubocop:enable Metrics/BlockLength end
Gets the actual console history data (not the metadata). See {#capture_console_history capture_console_history
} for details about using the console history operations.
@param [String] instance_console_history_id The OCID of the console history. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [Integer] :offset Offset of the snapshot data to retrieve. @option opts [Integer] :length Length of the snapshot data to retrieve. @return [Response] A Response
object with data of type String @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_console_history_content.rb.html) to see an example of how to use get_console_history_content
API.
# File lib/oci/core/compute_client.rb, line 2369 def get_console_history_content(instance_console_history_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_console_history_content.' if logger raise "Missing the required parameter 'instance_console_history_id' when calling get_console_history_content." if instance_console_history_id.nil? raise "Parameter value for 'instance_console_history_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_console_history_id) path = '/instanceConsoleHistories/{instanceConsoleHistoryId}/data'.sub('{instanceConsoleHistoryId}', instance_console_history_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:offset] = opts[:offset] if opts[:offset] query_params[:length] = opts[:length] if opts[:length] # 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: 'ComputeClient#get_console_history_content') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end # rubocop:enable Metrics/BlockLength end
Gets information about the specified dedicated virtual machine host. @param [String] dedicated_vm_host_id The OCID of the dedicated VM host. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@return [Response] A Response
object with data of type {OCI::Core::Models::DedicatedVmHost DedicatedVmHost} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_dedicated_vm_host.rb.html) to see an example of how to use get_dedicated_vm_host
API.
# File lib/oci/core/compute_client.rb, line 2426 def get_dedicated_vm_host(dedicated_vm_host_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_dedicated_vm_host.' if logger raise "Missing the required parameter 'dedicated_vm_host_id' when calling get_dedicated_vm_host." if dedicated_vm_host_id.nil? raise "Parameter value for 'dedicated_vm_host_id' must not be blank" if OCI::Internal::Util.blank_string?(dedicated_vm_host_id) path = '/dedicatedVmHosts/{dedicatedVmHostId}'.sub('{dedicatedVmHostId}', dedicated_vm_host_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_dedicated_vm_host') 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::DedicatedVmHost' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified image. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::Image Image} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_image.rb.html) to see an example of how to use get_image
API.
# File lib/oci/core/compute_client.rb, line 2480 def get_image(image_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_image.' if logger raise "Missing the required parameter 'image_id' when calling get_image." if image_id.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) path = '/images/{imageId}'.sub('{imageId}', image_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: 'ComputeClient#get_image') 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::Image' ) end # rubocop:enable Metrics/BlockLength end
Retrieves an image shape compatibility entry. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [String] shape_name Shape name. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@return [Response] A Response
object with data of type {OCI::Core::Models::ImageShapeCompatibilityEntry ImageShapeCompatibilityEntry} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_image_shape_compatibility_entry.rb.html) to see an example of how to use get_image_shape_compatibility_entry
API.
# File lib/oci/core/compute_client.rb, line 2537 def get_image_shape_compatibility_entry(image_id, shape_name, opts = {}) logger.debug 'Calling operation ComputeClient#get_image_shape_compatibility_entry.' if logger raise "Missing the required parameter 'image_id' when calling get_image_shape_compatibility_entry." if image_id.nil? raise "Missing the required parameter 'shape_name' when calling get_image_shape_compatibility_entry." if shape_name.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) raise "Parameter value for 'shape_name' must not be blank" if OCI::Internal::Util.blank_string?(shape_name) path = '/images/{imageId}/shapes/{shapeName}'.sub('{imageId}', image_id.to_s).sub('{shapeName}', shape_name.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_image_shape_compatibility_entry') 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::ImageShapeCompatibilityEntry' ) end # rubocop:enable Metrics/BlockLength end
Gets information about the specified instance. @param [String] instance_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::Instance Instance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_instance.rb.html) to see an example of how to use get_instance
API.
# File lib/oci/core/compute_client.rb, line 2593 def get_instance(instance_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_instance.' if logger raise "Missing the required parameter 'instance_id' when calling get_instance." if instance_id.nil? raise "Parameter value for 'instance_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_id) path = '/instances/{instanceId}'.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: 'ComputeClient#get_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::Instance' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified instance console connection's information. @param [String] instance_console_connection_id The OCID of the instance console connection. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::InstanceConsoleConnection InstanceConsoleConnection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_instance_console_connection.rb.html) to see an example of how to use get_instance_console_connection
API.
# File lib/oci/core/compute_client.rb, line 2647 def get_instance_console_connection(instance_console_connection_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_instance_console_connection.' if logger raise "Missing the required parameter 'instance_console_connection_id' when calling get_instance_console_connection." if instance_console_connection_id.nil? raise "Parameter value for 'instance_console_connection_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_console_connection_id) path = '/instanceConsoleConnections/{instanceConsoleConnectionId}'.sub('{instanceConsoleConnectionId}', instance_console_connection_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: 'ComputeClient#get_instance_console_connection') 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::InstanceConsoleConnection' ) end # rubocop:enable Metrics/BlockLength end
Gets the information for the specified VNIC attachment.
@param [String] vnic_attachment_id The OCID of the VNIC attachment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::VnicAttachment VnicAttachment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_vnic_attachment.rb.html) to see an example of how to use get_vnic_attachment
API.
# File lib/oci/core/compute_client.rb, line 2702 def get_vnic_attachment(vnic_attachment_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_vnic_attachment.' if logger raise "Missing the required parameter 'vnic_attachment_id' when calling get_vnic_attachment." if vnic_attachment_id.nil? raise "Parameter value for 'vnic_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(vnic_attachment_id) path = '/vnicAttachments/{vnicAttachmentId}'.sub('{vnicAttachmentId}', vnic_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: 'ComputeClient#get_vnic_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::VnicAttachment' ) end # rubocop:enable Metrics/BlockLength end
Gets information about the specified volume attachment. @param [String] volume_attachment_id The OCID of the volume attachment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::VolumeAttachment VolumeAttachment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_volume_attachment.rb.html) to see an example of how to use get_volume_attachment
API.
# File lib/oci/core/compute_client.rb, line 2756 def get_volume_attachment(volume_attachment_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_volume_attachment.' if logger raise "Missing the required parameter 'volume_attachment_id' when calling get_volume_attachment." if volume_attachment_id.nil? raise "Parameter value for 'volume_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_attachment_id) path = '/volumeAttachments/{volumeAttachmentId}'.sub('{volumeAttachmentId}', volume_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: 'ComputeClient#get_volume_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::VolumeAttachment' ) end # rubocop:enable Metrics/BlockLength end
Gets the generated credentials for the instance. Only works for instances that require a password to log in, such as Windows. For certain operating systems, users will be forced to change the initial credentials.
@param [String] instance_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type {OCI::Core::Models::InstanceCredentials InstanceCredentials} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/get_windows_instance_initial_credentials.rb.html) to see an example of how to use get_windows_instance_initial_credentials
API.
# File lib/oci/core/compute_client.rb, line 2812 def get_windows_instance_initial_credentials(instance_id, opts = {}) logger.debug 'Calling operation ComputeClient#get_windows_instance_initial_credentials.' if logger raise "Missing the required parameter 'instance_id' when calling get_windows_instance_initial_credentials." if instance_id.nil? raise "Parameter value for 'instance_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_id) path = '/instances/{instanceId}/initialCredentials'.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: 'ComputeClient#get_windows_instance_initial_credentials') 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::InstanceCredentials' ) end # rubocop:enable Metrics/BlockLength end
Performs one of the following power actions on the specified instance:
-
START - Powers on the instance.
-
STOP - Powers off the instance.
-
RESET - Powers off the instance and then powers it back on.
-
SOFTSTOP - Gracefully shuts down the instance by sending a shutdown command to the operating system.
After waiting 15 minutes for the OS to shut down, the instance is powered off. If the applications that run on the instance take more than 15 minutes to shut down, they could be improperly stopped, resulting in data corruption. To avoid this, manually shut down the instance using the commands available in the OS before you softstop the instance.
-
SOFTRESET - Gracefully reboots the instance by sending a shutdown command to the operating system.
After waiting 15 minutes for the OS to shut down, the instance is powered off and then powered back on.
-
SENDDIAGNOSTICINTERRUPT - For advanced users. **Warning: Sending a diagnostic interrupt to a live system can
cause data corruption or system failure.** Sends a diagnostic interrupt that causes the instance's OS to crash and then reboot. Before you send a diagnostic interrupt, you must configure the instance to generate a crash dump file when it crashes. The crash dump captures information about the state of the OS at the time of the crash. After the OS restarts, you can analyze the crash dump to diagnose the issue. For more information, see [Sending a Diagnostic Interrupt](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/sendingdiagnosticinterrupt.htm).
For more information about managing instance lifecycle states, see [Stopping and Starting an Instance](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/restartinginstance.htm).
@param [String] instance_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. @param [String] action The action to perform on the instance.
Allowed values are: STOP, START, SOFTRESET, RESET, SOFTSTOP, SENDDIAGNOSTICINTERRUPT
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type {OCI::Core::Models::Instance Instance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/instance_action.rb.html) to see an example of how to use instance_action
API.
# File lib/oci/core/compute_client.rb, line 2905 def instance_action(instance_id, action, opts = {}) logger.debug 'Calling operation ComputeClient#instance_action.' if logger raise "Missing the required parameter 'instance_id' when calling instance_action." if instance_id.nil? raise "Missing the required parameter 'action' when calling instance_action." if action.nil? unless %w[STOP START SOFTRESET RESET SOFTSTOP SENDDIAGNOSTICINTERRUPT].include?(action) raise "Invalid value for 'action', must be one of STOP, START, SOFTRESET, RESET, SOFTSTOP, SENDDIAGNOSTICINTERRUPT." end raise "Parameter value for 'instance_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_id) path = '/instances/{instanceId}'.sub('{instanceId}', instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:action] = action # 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: 'ComputeClient#instance_action') 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
Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see [Overview of the Compute Service](docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm).
For information about access control and compartments, see [Overview of the IAM Service](docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm).
For information about availability domains, see [Regions and Availability Domains](docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm). To get a list of availability domains, use the `ListAvailabilityDomains` operation in the Identity
and Access Management Service API.
All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the resource in the Console.
To launch an instance using an image or a boot volume use the `sourceDetails` parameter in {LaunchInstanceDetails}.
When you launch an instance, it is automatically attached to a virtual network interface card (VNIC), called the *primary VNIC*. The VNIC has a private IP address from the subnet's CIDR. You can either assign a private IP address of your choice or let Oracle automatically assign one. You can choose whether the instance has a public IP address. To retrieve the addresses, use the {#list_vnic_attachments list_vnic_attachments
} operation to get the VNIC ID for the instance, and then call {#get_vnic get_vnic} with the VNIC ID.
You can later add secondary VNICs to an instance. For more information, see [Virtual Network Interface Cards (VNICs)](docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm).
To launch an instance from a Marketplace
image listing, you must provide the image ID of the listing resource version that you want, but you also must subscribe to the listing before you try to launch the instance. To subscribe to the listing, use the {#get_app_catalog_listing_agreements get_app_catalog_listing_agreements
} operation to get the signature for the terms of use agreement for the desired listing resource version. Then, call {#create_app_catalog_subscription create_app_catalog_subscription
} with the signature. To get the image ID for the LaunchInstance operation, call {#get_app_catalog_listing_resource_version get_app_catalog_listing_resource_version
}.
@param [OCI::Core::Models::LaunchInstanceDetails] launch_instance_details Instance details @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::Instance Instance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/launch_instance.rb.html) to see an example of how to use launch_instance
API.
# File lib/oci/core/compute_client.rb, line 3010 def launch_instance(launch_instance_details, opts = {}) logger.debug 'Calling operation ComputeClient#launch_instance.' if logger raise "Missing the required parameter 'launch_instance_details' when calling launch_instance." if launch_instance_details.nil? path = '/instances/' 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(launch_instance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#launch_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::Instance' ) end # rubocop:enable Metrics/BlockLength end
Gets all resource versions for a particular listing. @param [String] listing_id The OCID of the listing. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::AppCatalogListingResourceVersionSummary AppCatalogListingResourceVersionSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_app_catalog_listing_resource_versions.rb.html) to see an example of how to use list_app_catalog_listing_resource_versions
API.
# File lib/oci/core/compute_client.rb, line 3077 def list_app_catalog_listing_resource_versions(listing_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_app_catalog_listing_resource_versions.' if logger raise "Missing the required parameter 'listing_id' when calling list_app_catalog_listing_resource_versions." if listing_id.nil? if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end raise "Parameter value for 'listing_id' must not be blank" if OCI::Internal::Util.blank_string?(listing_id) path = '/appCatalogListings/{listingId}/resourceVersions'.sub('{listingId}', listing_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[: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: 'ComputeClient#list_app_catalog_listing_resource_versions') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::Core::Models::AppCatalogListingResourceVersionSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the published listings. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@option opts [String] :publisher_name A filter to return only the publisher that matches the given publisher name exactly.
@option opts [String] :publisher_type A filter to return only publishers that match the given publisher type exactly. Valid types are OCI
, ORACLE, TRUSTED, STANDARD.
@option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::AppCatalogListingSummary AppCatalogListingSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_app_catalog_listings.rb.html) to see an example of how to use list_app_catalog_listings
API.
# File lib/oci/core/compute_client.rb, line 3155 def list_app_catalog_listings(opts = {}) logger.debug 'Calling operation ComputeClient#list_app_catalog_listings.' if logger 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 = '/appCatalogListings' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:publisherName] = opts[:publisher_name] if opts[:publisher_name] query_params[:publisherType] = opts[:publisher_type] if opts[:publisher_type] query_params[:displayName] = opts[:display_name] if opts[:display_name] # 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: 'ComputeClient#list_app_catalog_listings') 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::AppCatalogListingSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists subscriptions for a compartment. @param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@option opts [String] :listing_id A filter to return only the listings that matches the given listing id.
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::AppCatalogSubscriptionSummary AppCatalogSubscriptionSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_app_catalog_subscriptions.rb.html) to see an example of how to use list_app_catalog_subscriptions
API.
# File lib/oci/core/compute_client.rb, line 3241 def list_app_catalog_subscriptions(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_app_catalog_subscriptions.' if logger raise "Missing the required parameter 'compartment_id' when calling list_app_catalog_subscriptions." 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 = '/appCatalogSubscriptions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:listingId] = opts[:listing_id] if opts[:listing_id] # 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: 'ComputeClient#list_app_catalog_subscriptions') 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::AppCatalogSubscriptionSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the boot volume attachments in the specified compartment. You can filter the list by specifying an instance OCID, boot volume OCID, or both.
@param [String] availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :instance_id The OCID of the instance. @option opts [String] :boot_volume_id The OCID of the boot volume. @return [Response] A Response
object with data of type Array<{OCI::Core::Models::BootVolumeAttachment BootVolumeAttachment}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_boot_volume_attachments.rb.html) to see an example of how to use list_boot_volume_attachments
API.
# File lib/oci/core/compute_client.rb, line 3324 def list_boot_volume_attachments(availability_domain, compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_boot_volume_attachments.' if logger raise "Missing the required parameter 'availability_domain' when calling list_boot_volume_attachments." if availability_domain.nil? raise "Missing the required parameter 'compartment_id' when calling list_boot_volume_attachments." if compartment_id.nil? path = '/bootVolumeAttachments/' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:availabilityDomain] = availability_domain query_params[:compartmentId] = compartment_id query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:instanceId] = opts[:instance_id] if opts[:instance_id] query_params[:bootVolumeId] = opts[:boot_volume_id] if opts[:boot_volume_id] # Header Params header_params = {} header_params[:accept] = 'application/json, application/x-json-stream' 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: 'ComputeClient#list_boot_volume_attachments') 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::BootVolumeAttachment>' ) end # rubocop:enable Metrics/BlockLength end
Lists the shapes that can be reserved within the specified compartment.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::ComputeCapacityReservationInstanceShapeSummary ComputeCapacityReservationInstanceShapeSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_compute_capacity_reservation_instance_shapes.rb.html) to see an example of how to use list_compute_capacity_reservation_instance_shapes
API.
# File lib/oci/core/compute_client.rb, line 3416 def list_compute_capacity_reservation_instance_shapes(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_compute_capacity_reservation_instance_shapes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_compute_capacity_reservation_instance_shapes." 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 = '/computeCapacityReservationInstanceShapes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_compute_capacity_reservation_instance_shapes') 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::ComputeCapacityReservationInstanceShapeSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the instances launched under a capacity reservation. You can filter results by specifying criteria.
@param [String] capacity_reservation_id The OCID of the compute capacity reservation. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [String] :compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::CapacityReservationInstanceSummary CapacityReservationInstanceSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_compute_capacity_reservation_instances.rb.html) to see an example of how to use list_compute_capacity_reservation_instances
API.
# File lib/oci/core/compute_client.rb, line 3516 def list_compute_capacity_reservation_instances(capacity_reservation_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_compute_capacity_reservation_instances.' if logger raise "Missing the required parameter 'capacity_reservation_id' when calling list_compute_capacity_reservation_instances." if capacity_reservation_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 'capacity_reservation_id' must not be blank" if OCI::Internal::Util.blank_string?(capacity_reservation_id) path = '/computeCapacityReservations/{capacityReservationId}/instances'.sub('{capacityReservationId}', capacity_reservation_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[: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, application/x-json-stream' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_compute_capacity_reservation_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::CapacityReservationInstanceSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the compute capacity reservations that match the specified criteria and compartment.
You can limit the list by specifying a compute capacity reservation display name (the list will include all the identically-named compute capacity reservations in the compartment).
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::ComputeCapacityReservationSummary ComputeCapacityReservationSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_compute_capacity_reservations.rb.html) to see an example of how to use list_compute_capacity_reservations
API.
# File lib/oci/core/compute_client.rb, line 3621 def list_compute_capacity_reservations(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_compute_capacity_reservations.' if logger raise "Missing the required parameter 'compartment_id' when calling list_compute_capacity_reservations." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::Core::Models::ComputeCapacityReservation::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::ComputeCapacityReservation::LIFECYCLE_STATE_ENUM.' end if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end path = '/computeCapacityReservations' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] 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, application/x-json-stream' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_compute_capacity_reservations') 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::ComputeCapacityReservationSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists Compute Global Image Capability Schema versions in the specified compartment.
@param [String] compute_global_image_capability_schema_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute global image capability schema @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::ComputeGlobalImageCapabilitySchemaVersionSummary ComputeGlobalImageCapabilitySchemaVersionSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_compute_global_image_capability_schema_versions.rb.html) to see an example of how to use list_compute_global_image_capability_schema_versions
API.
# File lib/oci/core/compute_client.rb, line 3720 def list_compute_global_image_capability_schema_versions(compute_global_image_capability_schema_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_compute_global_image_capability_schema_versions.' if logger raise "Missing the required parameter 'compute_global_image_capability_schema_id' when calling list_compute_global_image_capability_schema_versions." if compute_global_image_capability_schema_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 'compute_global_image_capability_schema_id' must not be blank" if OCI::Internal::Util.blank_string?(compute_global_image_capability_schema_id) path = '/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}/versions'.sub('{computeGlobalImageCapabilitySchemaId}', compute_global_image_capability_schema_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} 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: 'ComputeClient#list_compute_global_image_capability_schema_versions') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::Core::Models::ComputeGlobalImageCapabilitySchemaVersionSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists Compute Global Image Capability Schema in the specified compartment.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :compartment_id A filter to return only resources that match the given compartment OCID exactly.
@option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::ComputeGlobalImageCapabilitySchemaSummary ComputeGlobalImageCapabilitySchemaSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_compute_global_image_capability_schemas.rb.html) to see an example of how to use list_compute_global_image_capability_schemas
API.
# File lib/oci/core/compute_client.rb, line 3813 def list_compute_global_image_capability_schemas(opts = {}) logger.debug 'Calling operation ComputeClient#list_compute_global_image_capability_schemas.' if logger if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end path = '/computeGlobalImageCapabilitySchemas' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'ComputeClient#list_compute_global_image_capability_schemas') 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::ComputeGlobalImageCapabilitySchemaSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists Compute Image Capability Schema in the specified compartment. You can also query by a specific imageId.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :compartment_id A filter to return only resources that match the given compartment OCID exactly.
@option opts [String] :image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an image. @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::ComputeImageCapabilitySchemaSummary ComputeImageCapabilitySchemaSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_compute_image_capability_schemas.rb.html) to see an example of how to use list_compute_image_capability_schemas
API.
# File lib/oci/core/compute_client.rb, line 3906 def list_compute_image_capability_schemas(opts = {}) logger.debug 'Calling operation ComputeClient#list_compute_image_capability_schemas.' if logger if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end path = '/computeImageCapabilitySchemas' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:imageId] = opts[:image_id] if opts[:image_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: 'ComputeClient#list_compute_image_capability_schemas') 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::ComputeImageCapabilitySchemaSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the console history metadata for the specified compartment or instance.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :instance_id The OCID of the instance. @option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state
value is case-insensitive.
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::ConsoleHistory ConsoleHistory}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_console_histories.rb.html) to see an example of how to use list_console_histories
API.
# File lib/oci/core/compute_client.rb, line 4004 def list_console_histories(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_console_histories.' if logger raise "Missing the required parameter 'compartment_id' when calling list_console_histories." 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::ConsoleHistory::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::ConsoleHistory::LIFECYCLE_STATE_ENUM.' end path = '/instanceConsoleHistories/' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:instanceId] = opts[:instance_id] if opts[:instance_id] 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: 'ComputeClient#list_console_histories') 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::ConsoleHistory>' ) end # rubocop:enable Metrics/BlockLength end
Lists the shapes that can be used to launch a virtual machine instance on a dedicated virtual machine host within the specified compartment. You can filter the list by compatibility with a specific dedicated virtual machine host shape.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [String] :dedicated_vm_host_shape Dedicated VM host shape name
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::DedicatedVmHostInstanceShapeSummary DedicatedVmHostInstanceShapeSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_dedicated_vm_host_instance_shapes.rb.html) to see an example of how to use list_dedicated_vm_host_instance_shapes
API.
# File lib/oci/core/compute_client.rb, line 4096 def list_dedicated_vm_host_instance_shapes(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_dedicated_vm_host_instance_shapes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_dedicated_vm_host_instance_shapes." if compartment_id.nil? path = '/dedicatedVmHostInstanceShapes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:dedicatedVmHostShape] = opts[:dedicated_vm_host_shape] if opts[:dedicated_vm_host_shape] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_dedicated_vm_host_instance_shapes') 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::DedicatedVmHostInstanceShapeSummary>' ) end # rubocop:enable Metrics/BlockLength end
Returns the list of instances on the dedicated virtual machine hosts that match the specified criteria.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [String] dedicated_vm_host_id The OCID of the dedicated VM host. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::DedicatedVmHostInstanceSummary DedicatedVmHostInstanceSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_dedicated_vm_host_instances.rb.html) to see an example of how to use list_dedicated_vm_host_instances
API.
# File lib/oci/core/compute_client.rb, line 4186 def list_dedicated_vm_host_instances(compartment_id, dedicated_vm_host_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_dedicated_vm_host_instances.' if logger raise "Missing the required parameter 'compartment_id' when calling list_dedicated_vm_host_instances." if compartment_id.nil? raise "Missing the required parameter 'dedicated_vm_host_id' when calling list_dedicated_vm_host_instances." if dedicated_vm_host_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 'dedicated_vm_host_id' must not be blank" if OCI::Internal::Util.blank_string?(dedicated_vm_host_id) path = '/dedicatedVmHosts/{dedicatedVmHostId}/instances'.sub('{dedicatedVmHostId}', dedicated_vm_host_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] 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, application/x-json-stream' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_dedicated_vm_host_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::DedicatedVmHostInstanceSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the shapes that can be used to launch a dedicated virtual machine host within the specified compartment.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [String] :instance_shape_name The name for the instance's shape.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::DedicatedVmHostShapeSummary DedicatedVmHostShapeSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_dedicated_vm_host_shapes.rb.html) to see an example of how to use list_dedicated_vm_host_shapes
API.
# File lib/oci/core/compute_client.rb, line 4274 def list_dedicated_vm_host_shapes(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_dedicated_vm_host_shapes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_dedicated_vm_host_shapes." if compartment_id.nil? path = '/dedicatedVmHostShapes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:instanceShapeName] = opts[:instance_shape_name] if opts[:instance_shape_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_dedicated_vm_host_shapes') 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::DedicatedVmHostShapeSummary>' ) end # rubocop:enable Metrics/BlockLength end
Returns the list of dedicated virtual machine hosts that match the specified criteria in the specified compartment.
You can limit the list by specifying a dedicated virtual machine host display name. The list will include all the identically-named dedicated virtual machine hosts in the compartment.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state.
Allowed values are: CREATING, ACTIVE, UPDATING, DELETING, DELETED, FAILED
@option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@option opts [String] :instance_shape_name The name for the instance's shape.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@option opts [Float] :remaining_memory_in_gbs_greater_than_or_equal_to The remaining memory of the dedicated VM host, in GBs. @option opts [Float] :remaining_ocpus_greater_than_or_equal_to The available OCPUs of the dedicated VM host. @return [Response] A Response
object with data of type Array<{OCI::Core::Models::DedicatedVmHostSummary DedicatedVmHostSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_dedicated_vm_hosts.rb.html) to see an example of how to use list_dedicated_vm_hosts
API.
# File lib/oci/core/compute_client.rb, line 4374 def list_dedicated_vm_hosts(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_dedicated_vm_hosts.' if logger raise "Missing the required parameter 'compartment_id' when calling list_dedicated_vm_hosts." if compartment_id.nil? if opts[:lifecycle_state] && !%w[CREATING ACTIVE UPDATING DELETING DELETED FAILED].include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, UPDATING, DELETING, DELETED, FAILED.' end if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end path = '/dedicatedVmHosts' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:instanceShapeName] = opts[:instance_shape_name] if opts[:instance_shape_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[:remainingMemoryInGBsGreaterThanOrEqualTo] = opts[:remaining_memory_in_gbs_greater_than_or_equal_to] if opts[:remaining_memory_in_gbs_greater_than_or_equal_to] query_params[:remainingOcpusGreaterThanOrEqualTo] = opts[:remaining_ocpus_greater_than_or_equal_to] if opts[:remaining_ocpus_greater_than_or_equal_to] # Header Params header_params = {} header_params[:accept] = 'application/json, application/x-json-stream' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_dedicated_vm_hosts') 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::DedicatedVmHostSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the compatible shapes for the specified image. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::ImageShapeCompatibilitySummary ImageShapeCompatibilitySummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_image_shape_compatibility_entries.rb.html) to see an example of how to use list_image_shape_compatibility_entries
API.
# File lib/oci/core/compute_client.rb, line 4462 def list_image_shape_compatibility_entries(image_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_image_shape_compatibility_entries.' if logger raise "Missing the required parameter 'image_id' when calling list_image_shape_compatibility_entries." if image_id.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) path = '/images/{imageId}/shapes'.sub('{imageId}', image_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_image_shape_compatibility_entries') 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::ImageShapeCompatibilitySummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the available images in the specified compartment, including [platform images](docs.cloud.oracle.com/iaas/Content/Compute/References/images.htm) and [custom images](docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm) that have been created.
The list of images that's returned is ordered to first show all platform images, then all custom images. The order of images might change when new images are released.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@option opts [String] :operating_system The image's operating system.
Example: `Oracle Linux`
@option opts [String] :operating_system_version The image's operating system version.
Example: `7.2`
@option opts [String] :shape Shape name. @option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state
value is case-insensitive.
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::Image Image}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_images.rb.html) to see an example of how to use list_images
API.
# File lib/oci/core/compute_client.rb, line 4563 def list_images(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_images.' if logger raise "Missing the required parameter 'compartment_id' when calling list_images." 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::Image::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Image::LIFECYCLE_STATE_ENUM.' end path = '/images' 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[:operatingSystem] = opts[:operating_system] if opts[:operating_system] query_params[:operatingSystemVersion] = opts[:operating_system_version] if opts[:operating_system_version] query_params[:shape] = opts[:shape] if opts[:shape] 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: 'ComputeClient#list_images') 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::Image>' ) end # rubocop:enable Metrics/BlockLength end
Lists the console connections for the specified compartment or instance.
For more information about instance console connections, see [Troubleshooting Instances Using Instance Console Connections](docs.cloud.oracle.com/iaas/Content/Compute/References/serialconsole.htm).
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :instance_id The OCID of the instance. @option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::InstanceConsoleConnection InstanceConsoleConnection}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_instance_console_connections.rb.html) to see an example of how to use list_instance_console_connections
API.
# File lib/oci/core/compute_client.rb, line 4650 def list_instance_console_connections(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_instance_console_connections.' if logger raise "Missing the required parameter 'compartment_id' when calling list_instance_console_connections." if compartment_id.nil? path = '/instanceConsoleConnections' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:instanceId] = opts[:instance_id] if opts[:instance_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_instance_console_connections') 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::InstanceConsoleConnection>' ) end # rubocop:enable Metrics/BlockLength end
Gets a list of all the devices for given instance. You can optionally filter results by device availability. @param [String] instance_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [BOOLEAN] :is_available A filter to return only available devices or only used devices.
@option opts [String] :name A filter to return only devices that match the given name exactly.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::Device Device}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_instance_devices.rb.html) to see an example of how to use list_instance_devices
API.
# File lib/oci/core/compute_client.rb, line 4736 def list_instance_devices(instance_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_instance_devices.' if logger raise "Missing the required parameter 'instance_id' when calling list_instance_devices." if instance_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_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_id) path = '/instances/{instanceId}/devices'.sub('{instanceId}', instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:isAvailable] = opts[:is_available] if !opts[:is_available].nil? query_params[:name] = opts[:name] if opts[:name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[: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' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_instance_devices') 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::Device>' ) end # rubocop:enable Metrics/BlockLength end
Lists the instances in the specified compartment and the specified availability domain. You can filter the results by specifying an instance name (the list will include all the identically-named instances in the compartment).
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [String] :capacity_reservation_id The OCID of the compute capacity reservation. @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :sort_by 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
@option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
is case sensitive. Allowed values are: ASC, DESC
@option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state
value is case-insensitive.
@return [Response] A Response
object with data of type Array<{OCI::Core::Models::Instance Instance}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_instances.rb.html) to see an example of how to use list_instances
API.
# File lib/oci/core/compute_client.rb, line 4840 def list_instances(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_instances.' if logger raise "Missing the required parameter 'compartment_id' when calling list_instances." 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::Instance::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Instance::LIFECYCLE_STATE_ENUM.' end path = '/instances/' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:capacityReservationId] = opts[:capacity_reservation_id] if opts[:capacity_reservation_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, application/x-json-stream' 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: 'ComputeClient#list_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::Instance>' ) end # rubocop:enable Metrics/BlockLength end
Lists the shapes that can be used to launch an instance within the specified compartment. You can filter the list by compatibility with a specific image.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an image. @return [Response] A Response
object with data of type Array<{OCI::Core::Models::Shape Shape}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_shapes.rb.html) to see an example of how to use list_shapes
API.
# File lib/oci/core/compute_client.rb, line 4929 def list_shapes(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_shapes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_shapes." if compartment_id.nil? path = '/shapes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:imageId] = opts[:image_id] if opts[:image_id] # 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: 'ComputeClient#list_shapes') 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::Shape>' ) end # rubocop:enable Metrics/BlockLength end
Lists the VNIC attachments in the specified compartment. A VNIC attachment resides in the same compartment as the attached instance. The list can be filtered by instance, VNIC, or availability domain.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [String] :instance_id The OCID of the instance. @option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :vnic_id The OCID of the VNIC. @return [Response] A Response
object with data of type Array<{OCI::Core::Models::VnicAttachment VnicAttachment}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_vnic_attachments.rb.html) to see an example of how to use list_vnic_attachments
API.
# File lib/oci/core/compute_client.rb, line 5004 def list_vnic_attachments(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_vnic_attachments.' if logger raise "Missing the required parameter 'compartment_id' when calling list_vnic_attachments." if compartment_id.nil? path = '/vnicAttachments/' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:instanceId] = opts[:instance_id] if opts[:instance_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:vnicId] = opts[:vnic_id] if opts[:vnic_id] # Header Params header_params = {} header_params[:accept] = 'application/json, application/x-json-stream' 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: 'ComputeClient#list_vnic_attachments') 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::VnicAttachment>' ) end # rubocop:enable Metrics/BlockLength end
Lists the volume attachments in the specified compartment. You can filter the list by specifying an instance OCID, volume OCID, or both.
Currently, the only supported volume attachment type are {IScsiVolumeAttachment} and {ParavirtualizedVolumeAttachment}.
@param [String] compartment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :availability_domain The name of the availability domain.
Example: `Uocm:PHX-AD-1`
@option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). Example: `50`
@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
@option opts [String] :instance_id The OCID of the instance. @option opts [String] :volume_id The OCID of the volume. @return [Response] A Response
object with data of type Array<{OCI::Core::Models::VolumeAttachment VolumeAttachment}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/list_volume_attachments.rb.html) to see an example of how to use list_volume_attachments
API.
# File lib/oci/core/compute_client.rb, line 5082 def list_volume_attachments(compartment_id, opts = {}) logger.debug 'Calling operation ComputeClient#list_volume_attachments.' if logger raise "Missing the required parameter 'compartment_id' when calling list_volume_attachments." if compartment_id.nil? path = '/volumeAttachments/' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:instanceId] = opts[:instance_id] if opts[:instance_id] query_params[:volumeId] = opts[:volume_id] if opts[:volume_id] # Header Params header_params = {} header_params[:accept] = 'application/json, application/x-json-stream' 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: 'ComputeClient#list_volume_attachments') 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::VolumeAttachment>' ) end # rubocop:enable Metrics/BlockLength end
@return [Logger] The logger for this client. May be nil.
# File lib/oci/core/compute_client.rb, line 96 def logger @api_client.config.logger end
Set the region that will be used to determine the service endpoint. This will usually correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
# File lib/oci/core/compute_client.rb, line 86 def region=(new_region) @region = new_region raise 'A region must be specified.' unless @region @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://iaas.{region}.{secondLevelDomain}') + '/20160918' logger.info "ComputeClient endpoint set to '#{@endpoint} from region #{@region}'." if logger end
Removes a shape from the compatible shapes list for the image. @param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [String] shape_name Shape name. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/remove_image_shape_compatibility_entry.rb.html) to see an example of how to use remove_image_shape_compatibility_entry
API.
# File lib/oci/core/compute_client.rb, line 5141 def remove_image_shape_compatibility_entry(image_id, shape_name, opts = {}) logger.debug 'Calling operation ComputeClient#remove_image_shape_compatibility_entry.' if logger raise "Missing the required parameter 'image_id' when calling remove_image_shape_compatibility_entry." if image_id.nil? raise "Missing the required parameter 'shape_name' when calling remove_image_shape_compatibility_entry." if shape_name.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) raise "Parameter value for 'shape_name' must not be blank" if OCI::Internal::Util.blank_string?(shape_name) path = '/images/{imageId}/shapes/{shapeName}'.sub('{imageId}', image_id.to_s).sub('{shapeName}', shape_name.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: 'ComputeClient#remove_image_shape_compatibility_entry') 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
Terminates the specified instance. Any attached VNICs and volumes are automatically detached when the instance terminates.
To preserve the boot volume associated with the instance, specify `true` for `PreserveBootVolumeQueryParam`. To delete the boot volume when the instance is deleted, specify `false` or do not specify a value for `PreserveBootVolumeQueryParam`.
This is an asynchronous operation. The instance's `lifecycleState` will change to TERMINATING temporarily until the instance is completely removed.
@param [String] instance_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@option opts [BOOLEAN] :preserve_boot_volume Specifies whether to delete or preserve the boot volume when terminating an instance.
The default value is false.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/terminate_instance.rb.html) to see an example of how to use terminate_instance
API.
# File lib/oci/core/compute_client.rb, line 5210 def terminate_instance(instance_id, opts = {}) logger.debug 'Calling operation ComputeClient#terminate_instance.' if logger raise "Missing the required parameter 'instance_id' when calling terminate_instance." if instance_id.nil? raise "Parameter value for 'instance_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_id) path = '/instances/{instanceId}'.sub('{instanceId}', instance_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:preserveBootVolume] = opts[:preserve_boot_volume] if !opts[:preserve_boot_volume].nil? # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#terminate_instance') 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
Updates the display name, defined tag, and freeform tag fields for the specified compute capacity reservation. Fields that are not provided in the request will not be updated. Avoid entering confidential information.
The update also modifies the reservation configurations of the specified compute capacity reservation.
@param [String] capacity_reservation_id The OCID of the compute capacity reservation. @param [OCI::Core::Models::UpdateComputeCapacityReservationDetails] update_compute_capacity_reservation_details Update compute capacity reservation details. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/update_compute_capacity_reservation.rb.html) to see an example of how to use update_compute_capacity_reservation
API.
# File lib/oci/core/compute_client.rb, line 5275 def update_compute_capacity_reservation(capacity_reservation_id, update_compute_capacity_reservation_details, opts = {}) logger.debug 'Calling operation ComputeClient#update_compute_capacity_reservation.' if logger raise "Missing the required parameter 'capacity_reservation_id' when calling update_compute_capacity_reservation." if capacity_reservation_id.nil? raise "Missing the required parameter 'update_compute_capacity_reservation_details' when calling update_compute_capacity_reservation." if update_compute_capacity_reservation_details.nil? raise "Parameter value for 'capacity_reservation_id' must not be blank" if OCI::Internal::Util.blank_string?(capacity_reservation_id) path = '/computeCapacityReservations/{capacityReservationId}'.sub('{capacityReservationId}', capacity_reservation_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_compute_capacity_reservation_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_compute_capacity_reservation') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Updates the specified Compute Image Capability Schema
@param [String] compute_image_capability_schema_id The id of the compute image capability schema or the image ocid @param [OCI::Core::Models::UpdateComputeImageCapabilitySchemaDetails] update_compute_image_capability_schema_details Updates the freeFormTags, definedTags, and display name of the image capability schema @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type {OCI::Core::Models::ComputeImageCapabilitySchema ComputeImageCapabilitySchema} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/update_compute_image_capability_schema.rb.html) to see an example of how to use update_compute_image_capability_schema
API.
# File lib/oci/core/compute_client.rb, line 5335 def update_compute_image_capability_schema(compute_image_capability_schema_id, update_compute_image_capability_schema_details, opts = {}) logger.debug 'Calling operation ComputeClient#update_compute_image_capability_schema.' if logger raise "Missing the required parameter 'compute_image_capability_schema_id' when calling update_compute_image_capability_schema." if compute_image_capability_schema_id.nil? raise "Missing the required parameter 'update_compute_image_capability_schema_details' when calling update_compute_image_capability_schema." if update_compute_image_capability_schema_details.nil? raise "Parameter value for 'compute_image_capability_schema_id' must not be blank" if OCI::Internal::Util.blank_string?(compute_image_capability_schema_id) path = '/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}'.sub('{computeImageCapabilitySchemaId}', compute_image_capability_schema_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 = @api_client.object_to_http_body(update_compute_image_capability_schema_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_compute_image_capability_schema') 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::ComputeImageCapabilitySchema' ) end # rubocop:enable Metrics/BlockLength end
Updates the specified console history metadata. @param [String] instance_console_history_id The OCID of the console history. @param [OCI::Core::Models::UpdateConsoleHistoryDetails] update_console_history_details Update instance fields @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type {OCI::Core::Models::ConsoleHistory ConsoleHistory} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/update_console_history.rb.html) to see an example of how to use update_console_history
API.
# File lib/oci/core/compute_client.rb, line 5394 def update_console_history(instance_console_history_id, update_console_history_details, opts = {}) logger.debug 'Calling operation ComputeClient#update_console_history.' if logger raise "Missing the required parameter 'instance_console_history_id' when calling update_console_history." if instance_console_history_id.nil? raise "Missing the required parameter 'update_console_history_details' when calling update_console_history." if update_console_history_details.nil? raise "Parameter value for 'instance_console_history_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_console_history_id) path = '/instanceConsoleHistories/{instanceConsoleHistoryId}'.sub('{instanceConsoleHistoryId}', instance_console_history_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 = @api_client.object_to_http_body(update_console_history_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_console_history') 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::ConsoleHistory' ) end # rubocop:enable Metrics/BlockLength end
Updates the displayName, freeformTags, and definedTags attributes for the specified dedicated virtual machine host. If an attribute value is not included, it will not be updated.
@param [String] dedicated_vm_host_id The OCID of the dedicated VM host. @param [OCI::Core::Models::UpdateDedicatedVmHostDetails] update_dedicated_vm_host_details Update dedicated VM host details @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :if_match 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.
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :opc_retry_token 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).
@return [Response] A Response
object with data of type {OCI::Core::Models::DedicatedVmHost DedicatedVmHost} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/update_dedicated_vm_host.rb.html) to see an example of how to use update_dedicated_vm_host
API.
# File lib/oci/core/compute_client.rb, line 5464 def update_dedicated_vm_host(dedicated_vm_host_id, update_dedicated_vm_host_details, opts = {}) logger.debug 'Calling operation ComputeClient#update_dedicated_vm_host.' if logger raise "Missing the required parameter 'dedicated_vm_host_id' when calling update_dedicated_vm_host." if dedicated_vm_host_id.nil? raise "Missing the required parameter 'update_dedicated_vm_host_details' when calling update_dedicated_vm_host." if update_dedicated_vm_host_details.nil? raise "Parameter value for 'dedicated_vm_host_id' must not be blank" if OCI::Internal::Util.blank_string?(dedicated_vm_host_id) path = '/dedicatedVmHosts/{dedicatedVmHostId}'.sub('{dedicatedVmHostId}', dedicated_vm_host_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(update_dedicated_vm_host_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_dedicated_vm_host') 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::DedicatedVmHost' ) end # rubocop:enable Metrics/BlockLength end
Updates the display name of the image. Avoid entering confidential information.
@param [String] image_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. @param [OCI::Core::Models::UpdateImageDetails] update_image_details Updates the image display name field. Avoid entering confidential information.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type {OCI::Core::Models::Image Image} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/update_image.rb.html) to see an example of how to use update_image
API.
# File lib/oci/core/compute_client.rb, line 5534 def update_image(image_id, update_image_details, opts = {}) logger.debug 'Calling operation ComputeClient#update_image.' if logger raise "Missing the required parameter 'image_id' when calling update_image." if image_id.nil? raise "Missing the required parameter 'update_image_details' when calling update_image." if update_image_details.nil? raise "Parameter value for 'image_id' must not be blank" if OCI::Internal::Util.blank_string?(image_id) path = '/images/{imageId}'.sub('{imageId}', image_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_image_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_image') 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::Image' ) end # rubocop:enable Metrics/BlockLength end
Updates certain fields on the specified instance. Fields that are not provided in the request will not be updated. Avoid entering confidential information.
The OCID of the instance remains the same.
@param [String] instance_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. @param [OCI::Core::Models::UpdateInstanceDetails] update_instance_details Update instance fields @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_retry_token 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).
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type {OCI::Core::Models::Instance Instance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/update_instance.rb.html) to see an example of how to use update_instance
API.
# File lib/oci/core/compute_client.rb, line 5605 def update_instance(instance_id, update_instance_details, opts = {}) logger.debug 'Calling operation ComputeClient#update_instance.' if logger raise "Missing the required parameter 'instance_id' when calling update_instance." if instance_id.nil? raise "Missing the required parameter 'update_instance_details' when calling update_instance." if update_instance_details.nil? raise "Parameter value for 'instance_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_id) path = '/instances/{instanceId}'.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' 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_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_instance') 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::Instance' ) end # rubocop:enable Metrics/BlockLength end
Updates the defined tags and free-form tags for the specified instance console connection. @param [String] instance_console_connection_id The OCID of the instance console connection. @param [OCI::Core::Models::UpdateInstanceConsoleConnectionDetails] update_instance_console_connection_details Update instanceConsoleConnection tags @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type {OCI::Core::Models::InstanceConsoleConnection InstanceConsoleConnection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/update_instance_console_connection.rb.html) to see an example of how to use update_instance_console_connection
API.
# File lib/oci/core/compute_client.rb, line 5669 def update_instance_console_connection(instance_console_connection_id, update_instance_console_connection_details, opts = {}) logger.debug 'Calling operation ComputeClient#update_instance_console_connection.' if logger raise "Missing the required parameter 'instance_console_connection_id' when calling update_instance_console_connection." if instance_console_connection_id.nil? raise "Missing the required parameter 'update_instance_console_connection_details' when calling update_instance_console_connection." if update_instance_console_connection_details.nil? raise "Parameter value for 'instance_console_connection_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_console_connection_id) path = '/instanceConsoleConnections/{instanceConsoleConnectionId}'.sub('{instanceConsoleConnectionId}', instance_console_connection_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_instance_console_connection_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_instance_console_connection') 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::InstanceConsoleConnection' ) end # rubocop:enable Metrics/BlockLength end
Updates information about the specified volume attachment. @param [String] volume_attachment_id The OCID of the volume attachment. @param [OCI::Core::Models::UpdateVolumeAttachmentDetails] update_volume_attachment_details Update information about the specified volume attachment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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
@option opts [String] :opc_request_id Unique identifier for the request.
If you need to contact Oracle about a particular request, please provide the request ID.
@option opts [String] :if_match 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.
@return [Response] A Response
object with data of type {OCI::Core::Models::VolumeAttachment VolumeAttachment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/core/update_volume_attachment.rb.html) to see an example of how to use update_volume_attachment
API.
# File lib/oci/core/compute_client.rb, line 5732 def update_volume_attachment(volume_attachment_id, update_volume_attachment_details, opts = {}) logger.debug 'Calling operation ComputeClient#update_volume_attachment.' if logger raise "Missing the required parameter 'volume_attachment_id' when calling update_volume_attachment." if volume_attachment_id.nil? raise "Missing the required parameter 'update_volume_attachment_details' when calling update_volume_attachment." if update_volume_attachment_details.nil? raise "Parameter value for 'volume_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_attachment_id) path = '/volumeAttachments/{volumeAttachmentId}'.sub('{volumeAttachmentId}', volume_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' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_volume_attachment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_volume_attachment') 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::VolumeAttachment' ) end # rubocop:enable Metrics/BlockLength end
Private Instance Methods
rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines
# File lib/oci/core/compute_client.rb, line 5777 def applicable_retry_config(opts = {}) return @retry_config unless opts.key?(:retry_config) opts[:retry_config] end