lib/oci/core/compute_management_client.rb
# Launches an instance from an instance configuration.
#
# If the instance configuration does not include all of the parameters that are
# required to launch an instance, such as the availability domain and subnet ID, you must
# provide these parameters when you launch an instance from the instance configuration.
# For more information, see the {InstanceConfiguration}
# resource.
#
# @param [String] instance_configuration_id The OCID of the instance configuration.
# @param [OCI::Core::Models::InstanceConfigurationInstanceDetails] instance_configuration Instance configuration 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}
Launches an instance from an instance configuration.
If the instance configuration does not include all of the parameters that are
required to launch an instance, such as the availability domain and subnet ID, you must
provide these parameters when you launch an instance from the instance configuration.
For more information, see the {InstanceConfiguration}
resource.
Launches an instance from an instance configuration . If the instance configuration does not include all of the parameters that are required to launch an instance such as the availability domain and subnet ID you must provide these parameters when you launch an instance from the instance configuration . For more information see the { InstanceConfiguration } resource .
def launch_instance_configuration(instance_configuration_id, instance_configuration, opts = {})
      logger.debug 'Calling operation ComputeManagementClient#launch_instance_configuration.' if logger
      raise "Missing the required parameter 'instance_configuration_id' when calling launch_instance_configuration." if instance_configuration_id.nil?
      raise "Missing the required parameter 'instance_configuration' when calling launch_instance_configuration." if instance_configuration.nil?
      raise "Parameter value for 'instance_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(instance_configuration_id)
      path = '/instanceConfigurations/{instanceConfigurationId}/actions/launch'.sub('{instanceConfigurationId}', instance_configuration_id.to_s)
      operation_signing_strategy = :standard
      query_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[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
      post_body = @api_client.object_to_http_body(instance_configuration)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeManagementClient#launch_instance_configuration') do
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Core::Models::Instance'
        )
      end
    end
def launch_instance_configuration ( instance_configuration_id , instance_configuration , opts = { } ) logger . debug 'Calling operation ComputeManagementClient#launch_instance_configuration.' if logger raise "Missing the required parameter 'instance_configuration_id' when calling launch_instance_configuration." if instance_configuration_id . nil? raise "Missing the required parameter 'instance_configuration' when calling launch_instance_configuration." if instance_configuration . nil? raise "Parameter value for 'instance_configuration_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( instance_configuration_id ) path = '/instanceConfigurations/{instanceConfigurationId}/actions/launch' . sub ( '{instanceConfigurationId}' , instance_configuration_id . to_s ) operation_signing_strategy = :standard query_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 [ :' opc-retry-token ' ] ||= OCI :: Retry . generate_opc_retry_token post_body = @api_client . object_to_http_body ( instance_configuration ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'ComputeManagementClient#launch_instance_configuration' ) do @api_client . call_api ( :POST , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Core::Models::Instance' ) end end
Launches an instance from an instance configuration.
Launches an instance from an instance configuration .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type {OCI::Core::Models::Instance Instance}
A Response object with data of type { OCI :: Core :: Models :: Instance Instance }
Response
instance_configuration_id
instance_configuration
opts
: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).
: 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 ) .
opts the optional parameters
opts the optional parameters