lib/oci/mysql/mysqlaas_client.rb
# Gets a list of the shapes you can use to create a new MySQL DB System.
# The shape determines the resources allocated to the DB System:
# CPU cores and memory for VM shapes; CPU cores, memory and
# storage for non-VM (or bare metal) shapes.
#
# @param [String] compartment_id The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
# @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 Customer-defined unique identifier for the request. If you need to
#   contact Oracle about a specific request, please provide the request
#   ID that you supplied in this header with the request.
#
# @option opts [Array<String>] :is_supported_for Return shapes that are supported by the service feature.
#    (default to [DBSYSTEM])
#   Allowed values are: DBSYSTEM, ANALYTICSCLUSTER, HEATWAVECLUSTER
# @option opts [String] :availability_domain The name of the Availability Domain.
# @option opts [String] :name Name
# @return [Response] A Response object with data of type Array<{OCI::Mysql::Models::ShapeSummary ShapeSummary}>
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/mysql/list_shapes.rb.html) to see an example of how to use list_shapes API.
Gets a list of the shapes you can use to create a new MySQL DB System.
The shape determines the resources allocated to the DB System:
CPU cores and memory for VM shapes; CPU cores, memory and
storage for non-VM (or bare metal) shapes.
Gets a list of the shapes you can use to create a new MySQL DB System . The shape determines the resources allocated to the DB System : CPU cores and memory for VM shapes ; CPU cores memory and storage for non - VM ( or bare metal ) shapes .
def list_shapes(compartment_id, opts = {})
      logger.debug 'Calling operation MysqlaasClient#list_shapes.' if logger
      raise "Missing the required parameter 'compartment_id' when calling list_shapes." if compartment_id.nil?
      is_supported_for_allowable_values = %w[DBSYSTEM ANALYTICSCLUSTER HEATWAVECLUSTER]
      if opts[:is_supported_for] && !opts[:is_supported_for].empty?
        opts[:is_supported_for].each do |val_to_check|
          unless is_supported_for_allowable_values.include?(val_to_check)
            raise 'Invalid value for "is_supported_for", must be one of DBSYSTEM, ANALYTICSCLUSTER, HEATWAVECLUSTER.'
          end
        end
      end
      path = '/shapes'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:isSupportedFor] = OCI::ApiClient.build_collection_params(opts[:is_supported_for], :multi) if opts[:is_supported_for] && !opts[:is_supported_for].empty?
      query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain]
      query_params[:name] = opts[:name] if opts[:name]
      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]
      post_body = nil
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'MysqlaasClient#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::Mysql::Models::ShapeSummary>'
        )
      end
    end
def list_shapes ( compartment_id , opts = { } ) logger . debug 'Calling operation MysqlaasClient#list_shapes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_shapes." if compartment_id . nil? is_supported_for_allowable_values = %w[ DBSYSTEM ANALYTICSCLUSTER HEATWAVECLUSTER ] if opts [ :is_supported_for ] && ! opts [ :is_supported_for ] . empty? opts [ :is_supported_for ] . each do | val_to_check | unless is_supported_for_allowable_values . include? ( val_to_check ) raise 'Invalid value for "is_supported_for", must be one of DBSYSTEM, ANALYTICSCLUSTER, HEATWAVECLUSTER.' end end end path = '/shapes' operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = compartment_id query_params [ :isSupportedFor ] = OCI :: ApiClient . build_collection_params ( opts [ :is_supported_for ] , :multi ) if opts [ :is_supported_for ] && ! opts [ :is_supported_for ] . empty? query_params [ :availabilityDomain ] = opts [ :availability_domain ] if opts [ :availability_domain ] query_params [ :name ] = opts [ :name ] if opts [ :name ] 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 ] post_body = nil OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'MysqlaasClient#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::Mysql::Models::ShapeSummary>' ) end end
Gets a list of the shapes you can use to create a new MySQL DB System.
Gets a list of the shapes you can use to create a new MySQL DB System .
# 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 Array<{OCI::Mysql::Models::ShapeSummary ShapeSummary}>
A Response object with data of type Array< { OCI :: Mysql :: Models :: ShapeSummary ShapeSummary } >
Response
compartment_id
opts
None
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_shapes API.
Click [ here ] to see an example of how to use list_shapes API .