File: describe_orderable_cluster_options.rb

package info (click to toggle)
ruby-fog-aws 3.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,140 kB
  • sloc: ruby: 73,328; javascript: 14; makefile: 9; sh: 4
file content (54 lines) | stat: -rw-r--r-- 2,343 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module Fog
  module AWS
    class Redshift
      class Real
        require 'fog/aws/parsers/redshift/describe_orderable_cluster_options'

        # ==== Parameters
        #
        # @param [Hash] options
        # * :cluster_version - (String)
        #    The version filter value. Specify this parameter to show only the available
        #    offerings matching the specified version. Default: All versions. Constraints:
        #    Must be one of the version returned from DescribeClusterVersions.
        # * :node_type - (String)
        #    The node type filter value. Specify this parameter to show only the available
        #    offerings matching the specified node type.
        # * :max_records - (Integer)
        #    The maximum number of records to include in the response. If more than the
        #    MaxRecords value is available, a marker is included in the response so that the
        #    following results can be retrieved. Constrained between [20,100]. Default is 100.
        # * :marker - (String)
        #    The marker returned from a previous request. If this parameter is specified, the
        #    response includes records beyond the marker only, up to MaxRecords.
        #
        # ==== See Also
        # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeOrderableClusterOptions.html
        def describe_orderable_cluster_options(options = {})
          cluster_version = options[:cluster_version]
          node_type       = options[:node_type]
          marker          = options[:marker]
          max_records     = options[:max_records]

          path = "/"
          params = {
            :idempotent => true,
            :headers    => {},
            :path       => path,
            :method     => :get,
            :query      => {},
            :parser     => Fog::Parsers::Redshift::AWS::DescribeOrderableClusterOptions.new
          }

          params[:query]['Action']         = 'DescribeOrderableClusterOptions'
          params[:query]['ClusterVersion'] = cluster_version if cluster_version
          params[:query]['NodeType']       = node_type if node_type
          params[:query]['Marker']         = marker if marker
          params[:query]['MaxRecords']     = max_records if max_records

          request(params)
        end
      end
    end
  end
end