Class: AWS::EC2::ConfigTransform

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/ec2/config_transform.rb

Class Method Summary collapse

Class Method Details

.transform(api_config) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/aws/ec2/config_transform.rb', line 11

def transform(api_config)
  ["RunInstances",
   "DetachVolume",
   "AttachVolume",
   "CreateSnapshot",
   "CreateVolume",
   "DescribeImageAttribute",
   "DescribeInstanceAttribute"].each do |(op, wrapper)|
    if op_config = api_config[:operations][op]
      op_config[:output] = op_config[:output].first.values.first
    end
  end

  api_config[:operations].each do |op, op_config|
    op_config[:input] =
      capitalize_input_structure(op_config[:input])
  end

  api_config
end