Class: Awful::ApiGateway::Deployments
- Inherits:
-
Cli
- Object
- Thor
- Cli
- Awful::ApiGateway::Deployments
show all
- Defined in:
- lib/awful/api_gateway_deployments.rb
Instance Method Summary
collapse
Methods inherited from Cli
#initialize, #ll, #version
Constructor Details
This class inherits a constructor from Awful::Cli
Instance Method Details
#create(id, stage) ⇒ Object
27
28
29
30
31
32
33
34
35
|
# File 'lib/awful/api_gateway_deployments.rb', line 27
def create(id, stage)
api_gateway.create_deployment(
rest_api_id: id,
stage_name: stage,
description: options[:description]
).output do |response|
puts response.id
end
end
|
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/awful/api_gateway_deployments.rb', line 13
def ls(id)
api_gateway.get_deployments(rest_api_id: id).items.output do |items|
if options[:long]
print_table items.sort_by(&:created_date).map { |i|
[i.id, i.created_date, i.description]
}
else
puts items.map(&:id)
end
end
end
|