cloudcheckr 0.0.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34b30e8a8bdde0cc99dc92f685533bda3c4153e4
4
- data.tar.gz: 76adc2d38a7fe2afff6d1782d07939b710a31a8e
3
+ metadata.gz: dec582152815019c9671a80a39292bb06e20a3aa
4
+ data.tar.gz: 91019358515155970f75a17af21282dd3f0a2743
5
5
  SHA512:
6
- metadata.gz: d6289c4350798ebe152b91fb08888a7d517fbbf9edf642e0883e86d9edb86d79809f52bd7bf6fb5a7bd90992602acf19f8ad48384eeb3811cdf7215d063b989c
7
- data.tar.gz: 7d970ac7fbd8425a0c042e75d5f440417370ce8137f4447874de530646de6ca9717aada16f7173f63af4cec0ac1a09f85f695b588492e61bc98ca197bd85fb4d
6
+ metadata.gz: d23ddc22acb2a9a37ec7e0aa5de661abe3b16416e9e1bb69c032126d06316b7abdb5b22ab514f7dcf0ffdc7a2e8078fcc13a4510cdfcebd8ecda3282849b0902
7
+ data.tar.gz: 7f817f70d6d89f74321cfb83d53b9ad2d1380b889a033efa09c66fc7f76c08ca2fd3c5e2e59efbabba23d04cdfb10410d666240bd4793057a1dc8583790af134
data/.gitignore CHANGED
@@ -20,3 +20,4 @@ tmp
20
20
  *.o
21
21
  *.a
22
22
  mkmf.log
23
+ .env
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Cloudcheckr
1
+ # CloudCheckr
2
2
 
3
- TODO: Write a gem description
3
+ This is the Ruby client for the CloudCheckr API.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,133 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ The API client uses JSON by default. Here's how to instantiate an API client.
22
+
23
+ ```ruby
24
+ # The only thing you need is an API key
25
+ client = CloudCheckr::API::Client.new(access_key: "146D0Y8R...W6U0463K")
26
+
27
+ # Another option is to set the API key globally
28
+ CloudCheckr::API.access_key("146D0Y8R...W6U0463K")
29
+ client = CloudCheckr::API::Client.new
30
+
31
+ # Alternatively, keep the API key in an environment variable
32
+ ENV['CLOUDCHECKR_ACCESS_KEY'] = "146D0Y8R...W6U0463K"
33
+ client = CloudCheckr::API::Client.new
34
+
35
+ # Use XML instead (not fully implemented)
36
+ client = CloudCheckr::API::Client.new(format: :xml)
37
+ ```
38
+
39
+ Each endpoint (or "API call") is grouped into a "controller". The API client has a method representing each controller, and each controller has a method for each API call.
40
+
41
+ ```ruby
42
+ client = CloudCheckr::API::Client.new
43
+
44
+ # The API client is pre-configured with a list of controllers, for which you can get a listing
45
+ # Call any of these as a method on the `client`
46
+ controller_names = client.controller_names
47
+ # => [:account, :alert, :best_practice, :billing, :change_monitoring, :cloudwatch, :cloudwatchevent, :help, :inventory, :security]
48
+
49
+ # Each controller is pre-configured with a list of API calls, for which you can also get a listing
50
+ # Call any of these as a method on a controller
51
+ api_calls = client.help.api_calls
52
+ # => [:get_all_api_endpoints]
53
+
54
+ # Let's get a list of all endpoints available to you based on your API access key
55
+ # NOTE: The API client is pre-configured with a cached list of endpoints
56
+ # and does not use the results of this call, specific to your API access key
57
+ # https://api.cloudcheckr.com/api/help.json/get_all_api_endpoints?access_key=[access_key]
58
+ endpoints = client.help.get_all_api_endpoints
59
+ # => [{"controller_name"=>"account", "api_calls"=>[{"method_name"=>"get_users"...
60
+
61
+ # As an example, we'll call the first endpoint listed in the above response
62
+ # https://api.cloudcheckr.com/api/account.json/get_users?access_key=[access_key]
63
+ users = client.account.get_users
64
+ # => {"users_and_accounts"=>[{"username"=>"user@example.com", "account_names"=>["Example"]}]}
65
+
66
+ # Pass parameters to an API call
67
+ client.account.remove_user(email: "user@example.com")
68
+
69
+ # Pass headers to an API call
70
+ client.account.remove_user({email: "user@example.com"}, {'Content-Type': 'application/json'})
71
+ ```
72
+
73
+ _NOTE: The controllers and API calls are defined in [endpoints.yml](./lib/cloud_checkr/api/endpoints.yml) (which is a cached listing retrieved from [get_all_api_endpoints](http://support.cloudcheckr.com/cloudcheckr-api-userguide/cloudcheckr-api-reference-guide/#get_all_api_endpoints))._
74
+
75
+ Here's more information about the [API Reference](http://support.cloudcheckr.com/cloudcheckr-api-userguide/cloudcheckr-api-reference-guide/).
76
+
77
+ ### Admin API
78
+
79
+ Some endpoints are admin-level and require an account name.
80
+
81
+ ```ruby
82
+ access_key = "146D0Y8R...W6U0463K"
83
+ account = "Account Name"
84
+
85
+ # Create an API client for with a default account specified
86
+ client = CloudCheckr::API::Client.new(access_key: access_key, use_account: account)
87
+
88
+ # Another option is to set the default account globally
89
+ CloudCheckr::API.use_account(account)
90
+ client = CloudCheckr::API::Client.new
91
+
92
+ # Alternatively, keep the API key in an environment variable
93
+ ENV['CLOUDCHECKR_USE_ACCOUNT'] = account
94
+ client = CloudCheckr::API::Client.new
95
+ ```
96
+
97
+ Here's more information about the [Admin API](http://support.cloudcheckr.com/cloudcheckr-api-userguide/cloudcheckr-admin-api-reference-guide/).
98
+
99
+ Here's the [Admin API User Guide](http://support.cloudcheckr.com/cloudcheckr-api-userguide/).
100
+
101
+ ### Faraday
102
+
103
+ The API client uses [Faraday](https://github.com/lostisland/faraday) under the hood. [Faraday Middleware](https://github.com/lostisland/faraday_middleware) is utilized to parse JSON and XML responses. JSON responses are wrapped in [Hashie::Mash](https://github.com/intridea/hashie) for easy access to data.
104
+
105
+ It's easy to customize Faraday to your liking.
106
+
107
+ ```ruby
108
+ # Globally apply Faraday settings
109
+ CloudCheckr::API.connection_builder do |faraday|
110
+ faraday.request :url_encoded
111
+
112
+ faraday.response :xml, content_type: /\bxml$/
113
+ faraday.response :json, content_type: /\bjson$/
114
+ faraday.response :mashify, content_type: /\bjson$/
115
+ faraday.response :logger, nil, bodies: true
116
+
117
+ faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
118
+ end
119
+
120
+ # Alternatively, apply Faraday settings per client
121
+ client = CloudCheckr::API::Client.new do
122
+ faraday.request :url_encoded
123
+
124
+ faraday.response :xml, content_type: /\bxml$/
125
+ faraday.response :json, content_type: /\bjson$/
126
+ faraday.response :mashify, content_type: /\bjson$/
127
+ faraday.response :logger, nil, bodies: true
128
+
129
+ faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
130
+ end
131
+ ```
132
+
133
+ You may also want to configure individual Faraday requests. This can be accomplished with any API call (see [Faraday examples](https://github.com/lostisland/faraday) for specifics).
134
+
135
+ ```ruby
136
+ client = CloudCheckr::API::Client.new
137
+
138
+ # Let's get a list of all endpoints available to you based on your API access key
139
+ endpoints = client.help.get_all_api_endpoints do |request|
140
+ req.url '/search', page: 2
141
+ req.params['limit'] = 100
142
+ req.headers['Content-Type'] = 'application/json'
143
+ req.body = '{ "name": "value" }'
144
+ req.options.timeout = 5 # open/read timeout in seconds
145
+ req.options.open_timeout = 2 # connection open timeout in seconds
146
+ end
147
+ ```
22
148
 
23
149
  ## Contributing
24
150
 
@@ -27,3 +153,10 @@ TODO: Write usage instructions here
27
153
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
154
  4. Push to the branch (`git push origin my-new-feature`)
29
155
  5. Create a new Pull Request
156
+
157
+ ### TODO
158
+
159
+ * Determine if there is a use case for XML format
160
+ * RSpec tests
161
+
162
+
@@ -18,7 +18,11 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.add_dependency "faraday"
22
+ spec.add_dependency "faraday_middleware"
23
+
21
24
  spec.add_development_dependency "bundler", "~> 1.6"
22
25
  spec.add_development_dependency "rake"
23
26
  spec.add_development_dependency "rspec"
27
+ spec.add_development_dependency "faraday-detailed_logger"
24
28
  end
@@ -0,0 +1,4 @@
1
+ module CloudCheckr
2
+ end
3
+
4
+ require_relative "./cloud_checkr/api"
@@ -0,0 +1,43 @@
1
+ require_relative "./api/controller"
2
+ require_relative "./api/controllers"
3
+ require_relative "./api/client"
4
+ require_relative "./api/response_error"
5
+
6
+ module CloudCheckr
7
+ module API
8
+ CONTROLLERS = CloudCheckr::API::Controllers.build_controller_classes!
9
+
10
+ def self.access_key(new_access_key = nil)
11
+ if new_access_key.nil?
12
+ @@access_key ||= ENV['CLOUDCHECKR_ACCESS_KEY']
13
+ else
14
+ @@access_key = new_access_key
15
+ end
16
+ end
17
+
18
+ def self.use_account(new_use_account = nil)
19
+ if new_use_account.nil?
20
+ @@use_account ||= ENV['CLOUDCHECKR_USE_ACCOUNT']
21
+ else
22
+ @@use_account = new_use_account
23
+ end
24
+ end
25
+
26
+ def self.connection_builder(&builder)
27
+ @@connection_builder = builder || @@connection_builder
28
+ end
29
+ end
30
+ end
31
+
32
+ # Dynamically create methods on the Client class for each controller
33
+
34
+ CloudCheckr::API::CONTROLLERS.each do |controller_name, controller_class|
35
+ CloudCheckr::API::Client.send(:define_method, controller_name) do
36
+ instance_variable_get(:"@#{controller_name}") || instance_variable_set(:"@#{controller_name}", controller_class.new(self))
37
+ end
38
+ end
39
+
40
+ # Dynamically expose list of controllers available
41
+
42
+ controller_names = CloudCheckr::API::CONTROLLERS.keys
43
+ CloudCheckr::API::Client.send(:define_method, :controller_names){ controller_names }
@@ -0,0 +1,107 @@
1
+ require 'logger'
2
+ require 'ostruct'
3
+ require 'faraday'
4
+ require 'faraday_middleware'
5
+ # require 'faraday/detailed_logger'
6
+
7
+ module CloudCheckr
8
+ module API
9
+ class Client
10
+ DEFAULT_URL = "https://api2.cloudcheckr.com".freeze
11
+ DEFAULT_FORMAT = :json
12
+
13
+ attr_reader :access_key, :url, :format
14
+
15
+ def initialize(options = {}, &connection_builder)
16
+ super()
17
+
18
+ @access_key = options.fetch(:access_key, API.access_key)
19
+ @use_account = options.fetch(:use_account, API.use_account)
20
+ @url = options.fetch(:url, DEFAULT_URL)
21
+ @format = options.fetch(:format, :json)
22
+ @connection_builder = connection_builder
23
+ end
24
+
25
+ # API
26
+
27
+ def get(controller_name, api_call, params = nil, headers = nil, &request_builder)
28
+ handle_response api.get(prepare_path(controller_name, api_call), prepare_params(params), headers, &request_builder)
29
+ end
30
+
31
+ def post(controller_name, api_call, params = nil, headers = nil, &request_builder)
32
+ handle_response api.post(prepare_path(controller_name, api_call), prepare_params(params), headers, &request_builder)
33
+ end
34
+
35
+ def api
36
+ @api ||= build_connection
37
+ end
38
+
39
+ def default_params
40
+ {access_key: @access_key}
41
+ end
42
+
43
+ def require_params!(required_params, params)
44
+ missing_required_params = required_params.map(&:to_sym) - prepare_params(params).keys.map(&:to_sym)
45
+
46
+ if missing_required_params.any?
47
+ raise "Missing required parameters: #{missing_required_params.join(', ')}"
48
+ else
49
+ nil
50
+ end
51
+ end
52
+
53
+ protected
54
+
55
+ def prepare_path(controller_name, api_call)
56
+ "/api/#{controller_name}.#{@format}/#{api_call}"
57
+ end
58
+
59
+ def prepare_params(params)
60
+ if params.nil?
61
+ default_params
62
+ else
63
+ default_params.merge(params)
64
+ end
65
+ end
66
+
67
+ def handle_response(response)
68
+ data = response.body
69
+
70
+ if response.status != 200
71
+ # TODO: Currently assumes JSON response
72
+ raise ::CloudCheckr::API::ResponseError.new(data)
73
+ else
74
+ data
75
+ end
76
+ end
77
+
78
+ def build_connection
79
+ Faraday.new(url: @url) do |faraday|
80
+ apply_connection_settings(faraday)
81
+
82
+ # Apply global settings, then instance settings
83
+ [::CloudCheckr::API.connection_builder, @connection_builder].each do |builder|
84
+ builder.call(faraday) if builder
85
+ end
86
+ end
87
+ end
88
+
89
+ def apply_connection_settings(faraday)
90
+ faraday.request @format
91
+ # form-encode POST params
92
+ faraday.request :url_encoded
93
+
94
+ faraday.response :xml, content_type: /\bxml$/
95
+ faraday.response :json, content_type: /\bjson$/
96
+ faraday.response :mashify, content_type: /\bjson$/
97
+ # faraday.response @format
98
+ # faraday.response :mashify if @format == :json
99
+
100
+ # faraday.response :logger, nil, bodies: true
101
+ # faraday.response :detailed_logger
102
+
103
+ faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,13 @@
1
+ module CloudCheckr
2
+ module API
3
+ class Controller
4
+
5
+ attr_reader :client
6
+
7
+ def initialize(client)
8
+ @client = client
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,55 @@
1
+ require 'yaml'
2
+
3
+ module CloudCheckr
4
+ module API
5
+ module Controllers
6
+
7
+ # Returns a [Hash] with controller name and class
8
+ def self.build_controller_classes!
9
+ endpoints_path = File.join(File.dirname(__FILE__), 'endpoints.yml')
10
+ endpoints_schemas = YAML.load_file(endpoints_path)
11
+ controllers = {}
12
+
13
+ # Define a controller class for each controller name
14
+ endpoints_schemas.each do |schema|
15
+ controller_name = schema['controller_name'].to_sym
16
+ controller_class_name = schema['controller_name'].split('_').collect(&:capitalize).join + 'Controller'
17
+
18
+ controller_class = Class.new(::CloudCheckr::API::Controller) do
19
+ method_names = []
20
+
21
+ # Define a method for each API call
22
+ schema['api_calls'].each do |api_call|
23
+ method_name = api_call['method_name'].to_sym
24
+ required_params = api_call['param_names'].lazy.select{|name| name.include?('(required)')}.map{|name| name.gsub(/\([^\)]+\)/, '').to_sym}.to_a
25
+
26
+ if api_call['method_name'].start_with?('get_')
27
+ define_method(method_name) do |params = {}, headers = nil, &request_builder|
28
+ @client.require_params!(required_params, params)
29
+ @client.get(controller_name, method_name, params, headers, &request_builder)
30
+ end
31
+ else
32
+ define_method(method_name) do |params = {}, headers = nil, &request_builder|
33
+ @client.require_params!(required_params, params)
34
+ @client.post(controller_name, method_name, params, headers, &request_builder)
35
+ end
36
+ end
37
+
38
+ method_names << method_name
39
+ end
40
+
41
+ define_method(:api_calls){ method_names }
42
+ end
43
+
44
+ # Register the class within the Controllers module
45
+ self.const_set(controller_class_name, controller_class)
46
+
47
+ controllers[controller_name] = controller_class
48
+ end
49
+
50
+ controllers
51
+ end
52
+
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,289 @@
1
+ [{
2
+ "controller_name": "account",
3
+ "api_calls": [{
4
+ "method_name": "get_users",
5
+ "param_names": ["(required)(admin level)access_key", "use_account"]
6
+ }, {
7
+ "method_name": "remove_user",
8
+ "param_names": ["(required)(admin level)access_key", "(required)email", "use_account"]
9
+ }, {
10
+ "method_name": "get_accounts",
11
+ "param_names": ["(required)(admin level)access_key", "use_account"]
12
+ }, {
13
+ "method_name": "revoke_account",
14
+ "param_names": ["(required)(admin level)access_key", "(required)email", "(required)accounts", "use_account"]
15
+ }, {
16
+ "method_name": "grant_account",
17
+ "param_names": ["(required)(admin level)access_key", "(required)email", "(required)accounts", "cost_report", "blended_cost", "unblended_cost", "list_cost", "resource_utilization_reports", "trending_reports", "change_monitoring", "best_practices", "all_access", "use_account"]
18
+ }, {
19
+ "method_name": "add_account",
20
+ "param_names": ["(required)access_key", "(required)account_name", "user_name", "aws_access_key", "aws_secret_key", "account_tag", "emails"]
21
+ }, {
22
+ "method_name": "delete_account",
23
+ "param_names": ["(required)access_key", "(required)account_name"]
24
+ }, {
25
+ "method_name": "tag_account",
26
+ "param_names": ["(required)access_key", "(required)account_name", "(required)account_tag"]
27
+ }, {
28
+ "method_name": "untag_account",
29
+ "param_names": ["(required)access_key", "(required)account_name", "(required)account_tag"]
30
+ }, {
31
+ "method_name": "edit_credential",
32
+ "param_names": ["(required)(admin level)access_key", "(required)aws_access_key", "(required)aws_secret_key", "(required)use_account"]
33
+ }, {
34
+ "method_name": "edit_account",
35
+ "param_names": ["(required)(admin level)access_key", "(required)emails", "(required)use_account", "alert_daily_billing", "alert_health_affected", "alert_health_all", "change_monitoring", "best_practices", "daily_bill_summary", "monthly_bill_summary", "daily_consolidated_bill_summary", "monthly_consolidated_bill_summary", "inventory_summary_report", "ec2_trending_report", "s3_summary_report", "ec2_resource_utilization_report"]
36
+ }, {
37
+ "method_name": "add_user",
38
+ "param_names": ["(required)access_key", "(required)email", "(required)account_access", "(required)user_role", "cost_report", "blended_cost", "unblended_cost", "list_cost", "resource_utilization_reports", "trending_reports", "change_monitoring", "best_practices", "all_access", "auth_types"]
39
+ }, {
40
+ "method_name": "add_users",
41
+ "param_names": ["(required)access_key", "(required)emails", "(required)account_access", "(required)user_role", "cost_report", "blended_cost", "unblended_cost", "list_cost", "resource_utilization_reports", "trending_reports", "change_monitoring", "best_practices", "all_access"]
42
+ }, {
43
+ "method_name": "copy_user",
44
+ "param_names": ["(required)(admin level)access_key", "(required)email_to_copy", "(required)emails", "use_account"]
45
+ }, {
46
+ "method_name": "get_account_level_tags",
47
+ "param_names": ["(required)(admin level)access_key", "account", "use_account"]
48
+ }, {
49
+ "method_name": "test_key",
50
+ "param_names": ["(required)access_key"]
51
+ }, {
52
+ "method_name": "get_improperly_tagged_resources",
53
+ "param_names": ["(required)access_key", "date_from", "date_to", "aws_account_id", "rule_name", "resource_type", "resource_state"]
54
+ }]
55
+ }, {
56
+ "controller_name": "alert",
57
+ "api_calls": [{
58
+ "method_name": "add_cost_alert",
59
+ "param_names": ["(required)(admin level)access_key", "(required)alert_name", "emails", "sns_topics", "pagerduty_service_key", "budget", "percent_of_budget", "send_every_days", "only_send_once", "budget_period", "budget_custom_start_date", "budget_custom_end_date", "saved_filter", "account_to_filter", "use_account"]
60
+ }, {
61
+ "method_name": "delete_cost_alert",
62
+ "param_names": ["(required)(admin level)access_key", "(required)alert_name", "use_account"]
63
+ }, {
64
+ "method_name": "add_cost_alert_threshold",
65
+ "param_names": ["(required)(admin level)access_key", "(required)alert_name", "emails", "sns_topics", "pagerduty_service_key", "budget", "percent_of_budget", "send_every_days", "only_send_once", "budget_period", "budget_custom_start_date", "budget_custom_end_date", "saved_filter", "account_to_filter", "use_account"]
66
+ }]
67
+ }, {
68
+ "controller_name": "best_practice",
69
+ "api_calls": [{
70
+ "method_name": "get_best_practices",
71
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "all_result", "importance", "category", "use_account"]
72
+ }]
73
+ }, {
74
+ "controller_name": "billing",
75
+ "api_calls": [{
76
+ "method_name": "get_invoice",
77
+ "param_names": ["(required)access_key", "(required)customer_names", "(required)start_date", "(required)end_date", "(required)format", "(required)cost_type", "regions", "currency_denomination", "currency_conversion", "show_credits", "tag_key", "tag_value", "product_names", "use_account"]
78
+ }, {
79
+ "method_name": "get_invoice_customers",
80
+ "param_names": ["(required)access_key", "use_account"]
81
+ }, {
82
+ "method_name": "create_customer",
83
+ "param_names": ["(required)access_key", "(required)name", "(required)email", "(required)address", "(required)aws_accounts"]
84
+ }, {
85
+ "method_name": "get_detailed_billing_analysis",
86
+ "param_names": ["(required)(admin level)access_key", "(required)saved_filter_name", "start", "end", "use_account"]
87
+ }, {
88
+ "method_name": "get_detailed_billing_with_grouping",
89
+ "param_names": ["(required)(admin level)access_key", "(required)saved_filter_name", "start", "end", "use_account"]
90
+ }, {
91
+ "method_name": "get_ri_upfront_cost_amortization",
92
+ "param_names": ["(required)access_key", "(required)start", "(required)end", "(required)service"]
93
+ }, {
94
+ "method_name": "get_detailed_billing_file",
95
+ "param_names": ["(required)access_key", "(required)start", "(required)end", "(required)cost_type"]
96
+ }]
97
+ }, {
98
+ "controller_name": "change_monitoring",
99
+ "api_calls": [{
100
+ "method_name": "get_changes",
101
+ "param_names": ["(required)(admin level)access_key", "start", "end", "resource_id", "use_account"]
102
+ }]
103
+ }, {
104
+ "controller_name": "cloudwatch",
105
+ "api_calls": [{
106
+ "method_name": "get_history",
107
+ "param_names": ["(required)(admin level)access_key", "start", "end", "service", "use_account"]
108
+ }]
109
+ }, {
110
+ "controller_name": "cloudwatchevent",
111
+ "api_calls": [{
112
+ "method_name": "get_detail",
113
+ "param_names": ["(required)access_key", "start", "end", "max_results", "use_account"]
114
+ }]
115
+ }, {
116
+ "controller_name": "help",
117
+ "api_calls": [{
118
+ "method_name": "get_all_api_endpoints",
119
+ "param_names": ["(required)access_key"]
120
+ }]
121
+ }, {
122
+ "controller_name": "inventory",
123
+ "api_calls": [{
124
+ "method_name": "get_resources_rds_snapshot_details",
125
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
126
+ }, {
127
+ "method_name": "get_resources_cloudformation_details",
128
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
129
+ }, {
130
+ "method_name": "get_resources_cloudsearch_details",
131
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
132
+ }, {
133
+ "method_name": "get_resources_dynamodb_details",
134
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
135
+ }, {
136
+ "method_name": "get_resources_elasticache_clusters_details",
137
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
138
+ }, {
139
+ "method_name": "get_resources_elasticache_nodes_details",
140
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
141
+ }, {
142
+ "method_name": "get_resources_elasticbeanstalk_details",
143
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
144
+ }, {
145
+ "method_name": "get_resources_elasticmapreduce_details",
146
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
147
+ }, {
148
+ "method_name": "get_resources_glacier_details",
149
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
150
+ }, {
151
+ "method_name": "get_resources_swf_details",
152
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
153
+ }, {
154
+ "method_name": "get_resources_vpc_details",
155
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
156
+ }, {
157
+ "method_name": "get_resources_iam_users",
158
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
159
+ }, {
160
+ "method_name": "get_resources_iam_groups",
161
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
162
+ }, {
163
+ "method_name": "get_resources_iam_roles",
164
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
165
+ }, {
166
+ "method_name": "get_resources_iam_Policies",
167
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
168
+ }, {
169
+ "method_name": "get_resources_workspaces_directories",
170
+ "param_names": ["(required)access_key", "custom_security_group", "directory_id", "directory_name", "iam_role_id", "region", "registration_code", "state", "type", "internet_access_enabled", "workdocs_enabled", "workspace_id", "user_name", "bundle_id", "error_code", "ip_address", "security_group_id", "subnet_id", "vpc_id", "date", "aws_account_ids", "max_results", "use_account"]
171
+ }, {
172
+ "method_name": "get_resources_workspaces_details",
173
+ "param_names": ["(required)access_key", "custom_security_group", "directory_id", "directory_name", "iam_role_id", "region", "registration_code", "state", "type", "internet_access_enabled", "workdocs_enabled", "workspace_id", "user_name", "bundle_id", "error_code", "ip_address", "security_group_id", "subnet_id", "vpc_id", "date", "aws_account_ids", "max_results", "use_account"]
174
+ }, {
175
+ "method_name": "get_tagged_resources",
176
+ "param_names": ["(required)(admin level)access_key", "date", "tag_key", "resource_type", "use_account"]
177
+ }, {
178
+ "method_name": "get_resources",
179
+ "param_names": ["(required)(admin level)access_key", "date", "use_account"]
180
+ }, {
181
+ "method_name": "get_resources_ec2_address_summary",
182
+ "param_names": ["(required)access_key", "date"]
183
+ }, {
184
+ "method_name": "get_resources_ec2_summary",
185
+ "param_names": ["(required)access_key", "date"]
186
+ }, {
187
+ "method_name": "get_resources_ebs_summary",
188
+ "param_names": ["(required)access_key", "date"]
189
+ }, {
190
+ "method_name": "get_resources_ami_summary",
191
+ "param_names": ["(required)access_key", "date"]
192
+ }, {
193
+ "method_name": "get_resources_ec2_security_group_summary",
194
+ "param_names": ["(required)access_key", "date"]
195
+ }, {
196
+ "method_name": "get_resources_ec2_load_balancer_summary",
197
+ "param_names": ["(required)access_key", "date"]
198
+ }, {
199
+ "method_name": "get_resources_s3_summary",
200
+ "param_names": ["(required)access_key", "date"]
201
+ }, {
202
+ "method_name": "get_resources_rds_summary",
203
+ "param_names": ["(required)access_key", "date"]
204
+ }, {
205
+ "method_name": "get_resources_rds_backup_summary",
206
+ "param_names": ["(required)access_key", "date"]
207
+ }, {
208
+ "method_name": "get_resources_rds_security_group_summary",
209
+ "param_names": ["(required)access_key", "date"]
210
+ }, {
211
+ "method_name": "get_resources_rds_parameter_group_summary",
212
+ "param_names": ["(required)access_key", "date"]
213
+ }, {
214
+ "method_name": "get_resources_rds_snapshot_summary",
215
+ "param_names": ["(required)access_key", "date"]
216
+ }, {
217
+ "method_name": "get_resources_cloudformation_summary",
218
+ "param_names": ["(required)access_key", "date"]
219
+ }, {
220
+ "method_name": "get_resources_cloudsearch_summary",
221
+ "param_names": ["(required)access_key", "date"]
222
+ }, {
223
+ "method_name": "get_resources_dynamodb_summary",
224
+ "param_names": ["(required)access_key", "date"]
225
+ }, {
226
+ "method_name": "get_resources_elasticache_summary",
227
+ "param_names": ["(required)access_key", "date"]
228
+ }, {
229
+ "method_name": "get_resources_elasticbeanstalk_summary",
230
+ "param_names": ["(required)access_key", "date"]
231
+ }, {
232
+ "method_name": "get_resources_elasticmapreduce_summary",
233
+ "param_names": ["(required)access_key", "date"]
234
+ }, {
235
+ "method_name": "get_resources_glacier_summary",
236
+ "param_names": ["(required)access_key", "date"]
237
+ }, {
238
+ "method_name": "get_resources_swf_summary",
239
+ "param_names": ["(required)access_key", "date"]
240
+ }, {
241
+ "method_name": "get_resources_vpc_summary",
242
+ "param_names": ["(required)access_key", "date"]
243
+ }, {
244
+ "method_name": "get_resources_workspaces_summary",
245
+ "param_names": ["(required)access_key", "date"]
246
+ }, {
247
+ "method_name": "get_resources_ec2_details",
248
+ "param_names": ["(required)access_key", "instance_ids", "resource_tags", "date", "aws_account_ids", "max_results", "use_account"]
249
+ }, {
250
+ "method_name": "get_resources_ec2_address_details",
251
+ "param_names": ["(required)access_key", "instance_ids", "resource_tags", "date", "aws_account_ids", "max_results", "use_account"]
252
+ }, {
253
+ "method_name": "get_resources_ebs_details",
254
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
255
+ }, {
256
+ "method_name": "get_resources_ebs_snapshots",
257
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
258
+ }, {
259
+ "method_name": "get_resources_ami_details",
260
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
261
+ }, {
262
+ "method_name": "get_resources_ec2_security_group_details",
263
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
264
+ }, {
265
+ "method_name": "get_resources_ec2_load_balancer_details",
266
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
267
+ }, {
268
+ "method_name": "get_resources_s3_details",
269
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
270
+ }, {
271
+ "method_name": "get_resources_rds_details",
272
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
273
+ }, {
274
+ "method_name": "get_resources_rds_backup_details",
275
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
276
+ }, {
277
+ "method_name": "get_resources_rds_security_group_details",
278
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
279
+ }, {
280
+ "method_name": "get_resources_rds_parameter_group_details",
281
+ "param_names": ["(required)access_key", "date", "aws_account_ids", "max_results", "use_account"]
282
+ }]
283
+ }, {
284
+ "controller_name": "security",
285
+ "api_calls": [{
286
+ "method_name": "get_publicly_accessible_resources",
287
+ "param_names": ["(required)access_key", "date"]
288
+ }]
289
+ }]