aws-sdk-computeoptimizer 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/aws-sdk-computeoptimizer.rb +47 -0
- data/lib/aws-sdk-computeoptimizer/client.rb +679 -0
- data/lib/aws-sdk-computeoptimizer/client_api.rb +413 -0
- data/lib/aws-sdk-computeoptimizer/customizations.rb +0 -0
- data/lib/aws-sdk-computeoptimizer/errors.rb +142 -0
- data/lib/aws-sdk-computeoptimizer/resource.rb +23 -0
- data/lib/aws-sdk-computeoptimizer/types.rb +971 -0
- metadata +88 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: a4120c2ac08ace7264f819de8c8cdd697f0ffd3c
|
|
4
|
+
data.tar.gz: 057777ed87f6d2bc21a48287413bdb50ab3f7f93
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 92cdf16c4326c6ce93577da80b89fb20438089fe40c4c32e3c17940cf41eca18d58904b8b7c69a86c862bc0e436f2f0e5f0245f06fdb9fedd9407c12109810c8
|
|
7
|
+
data.tar.gz: a2c57517661bb3318132676e37470ebc33c4e56bc49da8a81da1f0559242832ffd0bc1975d2119b301ad6d0a197b08553da80398b6d4c3967b1fa200f99b9011
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
|
2
|
+
#
|
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
require 'aws-sdk-core'
|
|
9
|
+
require 'aws-sigv4'
|
|
10
|
+
|
|
11
|
+
require_relative 'aws-sdk-computeoptimizer/types'
|
|
12
|
+
require_relative 'aws-sdk-computeoptimizer/client_api'
|
|
13
|
+
require_relative 'aws-sdk-computeoptimizer/client'
|
|
14
|
+
require_relative 'aws-sdk-computeoptimizer/errors'
|
|
15
|
+
require_relative 'aws-sdk-computeoptimizer/resource'
|
|
16
|
+
require_relative 'aws-sdk-computeoptimizer/customizations'
|
|
17
|
+
|
|
18
|
+
# This module provides support for AWS Compute Optimizer. This module is available in the
|
|
19
|
+
# `aws-sdk-computeoptimizer` gem.
|
|
20
|
+
#
|
|
21
|
+
# # Client
|
|
22
|
+
#
|
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
|
25
|
+
# structure.
|
|
26
|
+
#
|
|
27
|
+
# See {Client} for more information.
|
|
28
|
+
#
|
|
29
|
+
# # Errors
|
|
30
|
+
#
|
|
31
|
+
# Errors returned from AWS Compute Optimizer all
|
|
32
|
+
# extend {Errors::ServiceError}.
|
|
33
|
+
#
|
|
34
|
+
# begin
|
|
35
|
+
# # do stuff
|
|
36
|
+
# rescue Aws::ComputeOptimizer::Errors::ServiceError
|
|
37
|
+
# # rescues all service API errors
|
|
38
|
+
# end
|
|
39
|
+
#
|
|
40
|
+
# See {Errors} for more information.
|
|
41
|
+
#
|
|
42
|
+
# @service
|
|
43
|
+
module Aws::ComputeOptimizer
|
|
44
|
+
|
|
45
|
+
GEM_VERSION = '1.0.0'
|
|
46
|
+
|
|
47
|
+
end
|
|
@@ -0,0 +1,679 @@
|
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
|
2
|
+
#
|
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
|
18
|
+
require 'aws-sdk-core/plugins/endpoint_discovery.rb'
|
|
19
|
+
require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
|
20
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
|
21
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
|
22
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
|
23
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
24
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
25
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
26
|
+
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
|
27
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
|
28
|
+
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
|
29
|
+
|
|
30
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:computeoptimizer)
|
|
31
|
+
|
|
32
|
+
module Aws::ComputeOptimizer
|
|
33
|
+
class Client < Seahorse::Client::Base
|
|
34
|
+
|
|
35
|
+
include Aws::ClientStubs
|
|
36
|
+
|
|
37
|
+
@identifier = :computeoptimizer
|
|
38
|
+
|
|
39
|
+
set_api(ClientApi::API)
|
|
40
|
+
|
|
41
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
|
42
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
|
43
|
+
add_plugin(Aws::Plugins::Logging)
|
|
44
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
|
45
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
|
46
|
+
add_plugin(Aws::Plugins::UserAgent)
|
|
47
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
|
48
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
|
49
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
|
50
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
|
51
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
|
52
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
|
53
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
|
54
|
+
add_plugin(Aws::Plugins::StubResponses)
|
|
55
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
|
56
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
|
57
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
|
58
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
|
59
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
|
60
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
|
61
|
+
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
|
62
|
+
|
|
63
|
+
# @overload initialize(options)
|
|
64
|
+
# @param [Hash] options
|
|
65
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
|
66
|
+
# Your AWS credentials. This can be an instance of any one of the
|
|
67
|
+
# following classes:
|
|
68
|
+
#
|
|
69
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
|
70
|
+
# credentials.
|
|
71
|
+
#
|
|
72
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
|
73
|
+
# from an EC2 IMDS on an EC2 instance.
|
|
74
|
+
#
|
|
75
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
|
76
|
+
# shared file, such as `~/.aws/config`.
|
|
77
|
+
#
|
|
78
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
|
79
|
+
#
|
|
80
|
+
# When `:credentials` are not configured directly, the following
|
|
81
|
+
# locations will be searched for credentials:
|
|
82
|
+
#
|
|
83
|
+
# * `Aws.config[:credentials]`
|
|
84
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
|
85
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
|
86
|
+
# * `~/.aws/credentials`
|
|
87
|
+
# * `~/.aws/config`
|
|
88
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
|
89
|
+
# very aggressive. Construct and pass an instance of
|
|
90
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
|
91
|
+
# timeouts.
|
|
92
|
+
#
|
|
93
|
+
# @option options [required, String] :region
|
|
94
|
+
# The AWS region to connect to. The configured `:region` is
|
|
95
|
+
# used to determine the service `:endpoint`. When not passed,
|
|
96
|
+
# a default `:region` is search for in the following locations:
|
|
97
|
+
#
|
|
98
|
+
# * `Aws.config[:region]`
|
|
99
|
+
# * `ENV['AWS_REGION']`
|
|
100
|
+
# * `ENV['AMAZON_REGION']`
|
|
101
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
|
102
|
+
# * `~/.aws/credentials`
|
|
103
|
+
# * `~/.aws/config`
|
|
104
|
+
#
|
|
105
|
+
# @option options [String] :access_key_id
|
|
106
|
+
#
|
|
107
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
|
108
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
|
109
|
+
# the background every 60 secs (default). Defaults to `false`.
|
|
110
|
+
#
|
|
111
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
|
112
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
|
113
|
+
# this client.
|
|
114
|
+
#
|
|
115
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
|
116
|
+
# Allows you to provide an identifier for this client which will be attached to
|
|
117
|
+
# all generated client side metrics. Defaults to an empty string.
|
|
118
|
+
#
|
|
119
|
+
# @option options [String] :client_side_monitoring_host ("127.0.0.1")
|
|
120
|
+
# Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
|
|
121
|
+
# side monitoring agent is running on, where client metrics will be published via UDP.
|
|
122
|
+
#
|
|
123
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
|
124
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
|
125
|
+
# agent is running on, where client metrics will be published via UDP.
|
|
126
|
+
#
|
|
127
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
|
128
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
|
129
|
+
# will use the Client Side Monitoring Agent Publisher.
|
|
130
|
+
#
|
|
131
|
+
# @option options [Boolean] :convert_params (true)
|
|
132
|
+
# When `true`, an attempt is made to coerce request parameters into
|
|
133
|
+
# the required types.
|
|
134
|
+
#
|
|
135
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
|
136
|
+
# Set to true to disable SDK automatically adding host prefix
|
|
137
|
+
# to default service endpoint when available.
|
|
138
|
+
#
|
|
139
|
+
# @option options [String] :endpoint
|
|
140
|
+
# The client endpoint is normally constructed from the `:region`
|
|
141
|
+
# option. You should only configure an `:endpoint` when connecting
|
|
142
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
|
143
|
+
#
|
|
144
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
145
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
146
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
|
147
|
+
#
|
|
148
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
|
149
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
|
150
|
+
#
|
|
151
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
|
152
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
|
153
|
+
# Use this option to config the time interval in seconds for making
|
|
154
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
|
155
|
+
#
|
|
156
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
|
157
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
|
|
158
|
+
#
|
|
159
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
|
160
|
+
# The log formatter.
|
|
161
|
+
#
|
|
162
|
+
# @option options [Symbol] :log_level (:info)
|
|
163
|
+
# The log level to send messages to the `:logger` at.
|
|
164
|
+
#
|
|
165
|
+
# @option options [Logger] :logger
|
|
166
|
+
# The Logger instance to send log messages to. If this option
|
|
167
|
+
# is not set, logging will be disabled.
|
|
168
|
+
#
|
|
169
|
+
# @option options [String] :profile ("default")
|
|
170
|
+
# Used when loading credentials from the shared credentials file
|
|
171
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
|
172
|
+
#
|
|
173
|
+
# @option options [Float] :retry_base_delay (0.3)
|
|
174
|
+
# The base delay in seconds used by the default backoff function.
|
|
175
|
+
#
|
|
176
|
+
# @option options [Symbol] :retry_jitter (:none)
|
|
177
|
+
# A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
|
|
178
|
+
#
|
|
179
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
|
180
|
+
#
|
|
181
|
+
# @option options [Integer] :retry_limit (3)
|
|
182
|
+
# The maximum number of times to retry failed requests. Only
|
|
183
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
|
184
|
+
# are retried. Generally, these are throttling errors, data
|
|
185
|
+
# checksum errors, networking errors, timeout errors and auth
|
|
186
|
+
# errors from expired credentials.
|
|
187
|
+
#
|
|
188
|
+
# @option options [Integer] :retry_max_delay (0)
|
|
189
|
+
# The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
|
|
190
|
+
#
|
|
191
|
+
# @option options [String] :secret_access_key
|
|
192
|
+
#
|
|
193
|
+
# @option options [String] :session_token
|
|
194
|
+
#
|
|
195
|
+
# @option options [Boolean] :simple_json (false)
|
|
196
|
+
# Disables request parameter conversion, validation, and formatting.
|
|
197
|
+
# Also disable response data type conversions. This option is useful
|
|
198
|
+
# when you want to ensure the highest level of performance by
|
|
199
|
+
# avoiding overhead of walking request parameters and response data
|
|
200
|
+
# structures.
|
|
201
|
+
#
|
|
202
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
|
203
|
+
# be formatted exactly as the DynamoDB API expects.
|
|
204
|
+
#
|
|
205
|
+
# @option options [Boolean] :stub_responses (false)
|
|
206
|
+
# Causes the client to return stubbed responses. By default
|
|
207
|
+
# fake responses are generated and returned. You can specify
|
|
208
|
+
# the response data to return or errors to raise by calling
|
|
209
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
|
210
|
+
#
|
|
211
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
|
212
|
+
# requests are made, and retries are disabled.
|
|
213
|
+
#
|
|
214
|
+
# @option options [Boolean] :validate_params (true)
|
|
215
|
+
# When `true`, request parameters are validated before
|
|
216
|
+
# sending the request.
|
|
217
|
+
#
|
|
218
|
+
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
|
219
|
+
# requests through. Formatted like 'http://proxy.com:123'.
|
|
220
|
+
#
|
|
221
|
+
# @option options [Float] :http_open_timeout (15) The number of
|
|
222
|
+
# seconds to wait when opening a HTTP session before rasing a
|
|
223
|
+
# `Timeout::Error`.
|
|
224
|
+
#
|
|
225
|
+
# @option options [Integer] :http_read_timeout (60) The default
|
|
226
|
+
# number of seconds to wait for response data. This value can
|
|
227
|
+
# safely be set
|
|
228
|
+
# per-request on the session yeidled by {#session_for}.
|
|
229
|
+
#
|
|
230
|
+
# @option options [Float] :http_idle_timeout (5) The number of
|
|
231
|
+
# seconds a connection is allowed to sit idble before it is
|
|
232
|
+
# considered stale. Stale connections are closed and removed
|
|
233
|
+
# from the pool before making a request.
|
|
234
|
+
#
|
|
235
|
+
# @option options [Float] :http_continue_timeout (1) The number of
|
|
236
|
+
# seconds to wait for a 100-continue response before sending the
|
|
237
|
+
# request body. This option has no effect unless the request has
|
|
238
|
+
# "Expect" header set to "100-continue". Defaults to `nil` which
|
|
239
|
+
# disables this behaviour. This value can safely be set per
|
|
240
|
+
# request on the session yeidled by {#session_for}.
|
|
241
|
+
#
|
|
242
|
+
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
|
243
|
+
# HTTP debug output will be sent to the `:logger`.
|
|
244
|
+
#
|
|
245
|
+
# @option options [Boolean] :ssl_verify_peer (true) When `true`,
|
|
246
|
+
# SSL peer certificates are verified when establishing a
|
|
247
|
+
# connection.
|
|
248
|
+
#
|
|
249
|
+
# @option options [String] :ssl_ca_bundle Full path to the SSL
|
|
250
|
+
# certificate authority bundle file that should be used when
|
|
251
|
+
# verifying peer certificates. If you do not pass
|
|
252
|
+
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
|
253
|
+
# will be used if available.
|
|
254
|
+
#
|
|
255
|
+
# @option options [String] :ssl_ca_directory Full path of the
|
|
256
|
+
# directory that contains the unbundled SSL certificate
|
|
257
|
+
# authority files for verifying peer certificates. If you do
|
|
258
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
|
259
|
+
# system default will be used if available.
|
|
260
|
+
#
|
|
261
|
+
def initialize(*args)
|
|
262
|
+
super
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# @!group API Operations
|
|
266
|
+
|
|
267
|
+
# Returns Auto Scaling group recommendations.
|
|
268
|
+
#
|
|
269
|
+
# AWS Compute Optimizer currently generates recommendations for Auto
|
|
270
|
+
# Scaling groups that are configured to run instances of the M, C, R, T,
|
|
271
|
+
# and X instance families. The service does not generate recommendations
|
|
272
|
+
# for Auto Scaling groups that have a scaling policy attached to them,
|
|
273
|
+
# or that do not have the same values for desired, minimum, and maximum
|
|
274
|
+
# capacity. In order for Compute Optimizer to analyze your Auto Scaling
|
|
275
|
+
# groups, they must be of a fixed size. For more information, see the
|
|
276
|
+
# [AWS Compute Optimizer User Guide][1].
|
|
277
|
+
#
|
|
278
|
+
#
|
|
279
|
+
#
|
|
280
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/what-is.html
|
|
281
|
+
#
|
|
282
|
+
# @option params [Array<String>] :account_ids
|
|
283
|
+
# The AWS account IDs for which to return Auto Scaling group
|
|
284
|
+
# recommendations.
|
|
285
|
+
#
|
|
286
|
+
# Only one account ID can be specified per request.
|
|
287
|
+
#
|
|
288
|
+
# @option params [Array<String>] :auto_scaling_group_arns
|
|
289
|
+
# The Amazon Resource Name (ARN) of the Auto Scaling groups for which to
|
|
290
|
+
# return recommendations.
|
|
291
|
+
#
|
|
292
|
+
# @option params [String] :next_token
|
|
293
|
+
# The token to advance to the next page of Auto Scaling group
|
|
294
|
+
# recommendations.
|
|
295
|
+
#
|
|
296
|
+
# @option params [Integer] :max_results
|
|
297
|
+
# The maximum number of Auto Scaling group recommendations to return
|
|
298
|
+
# with a single call.
|
|
299
|
+
#
|
|
300
|
+
# To retrieve the remaining results, make another call with the returned
|
|
301
|
+
# `NextToken` value.
|
|
302
|
+
#
|
|
303
|
+
# @option params [Array<Types::Filter>] :filters
|
|
304
|
+
# An array of objects that describe a filter that returns a more
|
|
305
|
+
# specific list of Auto Scaling group recommendations.
|
|
306
|
+
#
|
|
307
|
+
# @return [Types::GetAutoScalingGroupRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
308
|
+
#
|
|
309
|
+
# * {Types::GetAutoScalingGroupRecommendationsResponse#next_token #next_token} => String
|
|
310
|
+
# * {Types::GetAutoScalingGroupRecommendationsResponse#auto_scaling_group_recommendations #auto_scaling_group_recommendations} => Array<Types::AutoScalingGroupRecommendation>
|
|
311
|
+
# * {Types::GetAutoScalingGroupRecommendationsResponse#errors #errors} => Array<Types::GetRecommendationError>
|
|
312
|
+
#
|
|
313
|
+
# @example Request syntax with placeholder values
|
|
314
|
+
#
|
|
315
|
+
# resp = client.get_auto_scaling_group_recommendations({
|
|
316
|
+
# account_ids: ["AccountId"],
|
|
317
|
+
# auto_scaling_group_arns: ["AutoScalingGroupArn"],
|
|
318
|
+
# next_token: "NextToken",
|
|
319
|
+
# max_results: 1,
|
|
320
|
+
# filters: [
|
|
321
|
+
# {
|
|
322
|
+
# name: "Finding", # accepts Finding, RecommendationSourceType
|
|
323
|
+
# values: ["FilterValue"],
|
|
324
|
+
# },
|
|
325
|
+
# ],
|
|
326
|
+
# })
|
|
327
|
+
#
|
|
328
|
+
# @example Response structure
|
|
329
|
+
#
|
|
330
|
+
# resp.next_token #=> String
|
|
331
|
+
# resp.auto_scaling_group_recommendations #=> Array
|
|
332
|
+
# resp.auto_scaling_group_recommendations[0].account_id #=> String
|
|
333
|
+
# resp.auto_scaling_group_recommendations[0].auto_scaling_group_arn #=> String
|
|
334
|
+
# resp.auto_scaling_group_recommendations[0].auto_scaling_group_name #=> String
|
|
335
|
+
# resp.auto_scaling_group_recommendations[0].finding #=> String, one of "Underprovisioned", "Overprovisioned", "Optimized", "NotOptimized"
|
|
336
|
+
# resp.auto_scaling_group_recommendations[0].utilization_metrics #=> Array
|
|
337
|
+
# resp.auto_scaling_group_recommendations[0].utilization_metrics[0].name #=> String, one of "Cpu", "Memory"
|
|
338
|
+
# resp.auto_scaling_group_recommendations[0].utilization_metrics[0].statistic #=> String, one of "Maximum", "Average"
|
|
339
|
+
# resp.auto_scaling_group_recommendations[0].utilization_metrics[0].value #=> Float
|
|
340
|
+
# resp.auto_scaling_group_recommendations[0].look_back_period_in_days #=> Float
|
|
341
|
+
# resp.auto_scaling_group_recommendations[0].current_configuration.desired_capacity #=> Integer
|
|
342
|
+
# resp.auto_scaling_group_recommendations[0].current_configuration.min_size #=> Integer
|
|
343
|
+
# resp.auto_scaling_group_recommendations[0].current_configuration.max_size #=> Integer
|
|
344
|
+
# resp.auto_scaling_group_recommendations[0].current_configuration.instance_type #=> String
|
|
345
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options #=> Array
|
|
346
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].configuration.desired_capacity #=> Integer
|
|
347
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].configuration.min_size #=> Integer
|
|
348
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].configuration.max_size #=> Integer
|
|
349
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].configuration.instance_type #=> String
|
|
350
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].projected_utilization_metrics #=> Array
|
|
351
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].projected_utilization_metrics[0].name #=> String, one of "Cpu", "Memory"
|
|
352
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].projected_utilization_metrics[0].statistic #=> String, one of "Maximum", "Average"
|
|
353
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].projected_utilization_metrics[0].value #=> Float
|
|
354
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].performance_risk #=> Float
|
|
355
|
+
# resp.auto_scaling_group_recommendations[0].recommendation_options[0].rank #=> Integer
|
|
356
|
+
# resp.auto_scaling_group_recommendations[0].last_refresh_timestamp #=> Time
|
|
357
|
+
# resp.errors #=> Array
|
|
358
|
+
# resp.errors[0].identifier #=> String
|
|
359
|
+
# resp.errors[0].code #=> String
|
|
360
|
+
# resp.errors[0].message #=> String
|
|
361
|
+
#
|
|
362
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetAutoScalingGroupRecommendations AWS API Documentation
|
|
363
|
+
#
|
|
364
|
+
# @overload get_auto_scaling_group_recommendations(params = {})
|
|
365
|
+
# @param [Hash] params ({})
|
|
366
|
+
def get_auto_scaling_group_recommendations(params = {}, options = {})
|
|
367
|
+
req = build_request(:get_auto_scaling_group_recommendations, params)
|
|
368
|
+
req.send_request(options)
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Returns Amazon EC2 instance recommendations.
|
|
372
|
+
#
|
|
373
|
+
# AWS Compute Optimizer currently generates recommendations for Amazon
|
|
374
|
+
# Elastic Compute Cloud (Amazon EC2) and Amazon EC2 Auto Scaling. It
|
|
375
|
+
# generates recommendations for M, C, R, T, and X instance families. For
|
|
376
|
+
# more information, see the [AWS Compute Optimizer User Guide][1].
|
|
377
|
+
#
|
|
378
|
+
#
|
|
379
|
+
#
|
|
380
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/what-is.html
|
|
381
|
+
#
|
|
382
|
+
# @option params [Array<String>] :instance_arns
|
|
383
|
+
# The Amazon Resource Name (ARN) of the instances for which to return
|
|
384
|
+
# recommendations.
|
|
385
|
+
#
|
|
386
|
+
# @option params [String] :next_token
|
|
387
|
+
# The token to advance to the next page of instance recommendations.
|
|
388
|
+
#
|
|
389
|
+
# @option params [Integer] :max_results
|
|
390
|
+
# The maximum number of instance recommendations to return with a single
|
|
391
|
+
# call.
|
|
392
|
+
#
|
|
393
|
+
# To retrieve the remaining results, make another call with the returned
|
|
394
|
+
# `NextToken` value.
|
|
395
|
+
#
|
|
396
|
+
# @option params [Array<Types::Filter>] :filters
|
|
397
|
+
# An array of objects that describe a filter that returns a more
|
|
398
|
+
# specific list of instance recommendations.
|
|
399
|
+
#
|
|
400
|
+
# @option params [Array<String>] :account_ids
|
|
401
|
+
# The AWS account IDs for which to return instance recommendations.
|
|
402
|
+
#
|
|
403
|
+
# Only one account ID can be specified per request.
|
|
404
|
+
#
|
|
405
|
+
# @return [Types::GetEC2InstanceRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
406
|
+
#
|
|
407
|
+
# * {Types::GetEC2InstanceRecommendationsResponse#next_token #next_token} => String
|
|
408
|
+
# * {Types::GetEC2InstanceRecommendationsResponse#instance_recommendations #instance_recommendations} => Array<Types::InstanceRecommendation>
|
|
409
|
+
# * {Types::GetEC2InstanceRecommendationsResponse#errors #errors} => Array<Types::GetRecommendationError>
|
|
410
|
+
#
|
|
411
|
+
# @example Request syntax with placeholder values
|
|
412
|
+
#
|
|
413
|
+
# resp = client.get_ec2_instance_recommendations({
|
|
414
|
+
# instance_arns: ["InstanceArn"],
|
|
415
|
+
# next_token: "NextToken",
|
|
416
|
+
# max_results: 1,
|
|
417
|
+
# filters: [
|
|
418
|
+
# {
|
|
419
|
+
# name: "Finding", # accepts Finding, RecommendationSourceType
|
|
420
|
+
# values: ["FilterValue"],
|
|
421
|
+
# },
|
|
422
|
+
# ],
|
|
423
|
+
# account_ids: ["AccountId"],
|
|
424
|
+
# })
|
|
425
|
+
#
|
|
426
|
+
# @example Response structure
|
|
427
|
+
#
|
|
428
|
+
# resp.next_token #=> String
|
|
429
|
+
# resp.instance_recommendations #=> Array
|
|
430
|
+
# resp.instance_recommendations[0].instance_arn #=> String
|
|
431
|
+
# resp.instance_recommendations[0].account_id #=> String
|
|
432
|
+
# resp.instance_recommendations[0].instance_name #=> String
|
|
433
|
+
# resp.instance_recommendations[0].current_instance_type #=> String
|
|
434
|
+
# resp.instance_recommendations[0].finding #=> String, one of "Underprovisioned", "Overprovisioned", "Optimized", "NotOptimized"
|
|
435
|
+
# resp.instance_recommendations[0].utilization_metrics #=> Array
|
|
436
|
+
# resp.instance_recommendations[0].utilization_metrics[0].name #=> String, one of "Cpu", "Memory"
|
|
437
|
+
# resp.instance_recommendations[0].utilization_metrics[0].statistic #=> String, one of "Maximum", "Average"
|
|
438
|
+
# resp.instance_recommendations[0].utilization_metrics[0].value #=> Float
|
|
439
|
+
# resp.instance_recommendations[0].look_back_period_in_days #=> Float
|
|
440
|
+
# resp.instance_recommendations[0].recommendation_options #=> Array
|
|
441
|
+
# resp.instance_recommendations[0].recommendation_options[0].instance_type #=> String
|
|
442
|
+
# resp.instance_recommendations[0].recommendation_options[0].projected_utilization_metrics #=> Array
|
|
443
|
+
# resp.instance_recommendations[0].recommendation_options[0].projected_utilization_metrics[0].name #=> String, one of "Cpu", "Memory"
|
|
444
|
+
# resp.instance_recommendations[0].recommendation_options[0].projected_utilization_metrics[0].statistic #=> String, one of "Maximum", "Average"
|
|
445
|
+
# resp.instance_recommendations[0].recommendation_options[0].projected_utilization_metrics[0].value #=> Float
|
|
446
|
+
# resp.instance_recommendations[0].recommendation_options[0].performance_risk #=> Float
|
|
447
|
+
# resp.instance_recommendations[0].recommendation_options[0].rank #=> Integer
|
|
448
|
+
# resp.instance_recommendations[0].recommendation_sources #=> Array
|
|
449
|
+
# resp.instance_recommendations[0].recommendation_sources[0].recommendation_source_arn #=> String
|
|
450
|
+
# resp.instance_recommendations[0].recommendation_sources[0].recommendation_source_type #=> String, one of "Ec2Instance", "AutoScalingGroup"
|
|
451
|
+
# resp.instance_recommendations[0].last_refresh_timestamp #=> Time
|
|
452
|
+
# resp.errors #=> Array
|
|
453
|
+
# resp.errors[0].identifier #=> String
|
|
454
|
+
# resp.errors[0].code #=> String
|
|
455
|
+
# resp.errors[0].message #=> String
|
|
456
|
+
#
|
|
457
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEC2InstanceRecommendations AWS API Documentation
|
|
458
|
+
#
|
|
459
|
+
# @overload get_ec2_instance_recommendations(params = {})
|
|
460
|
+
# @param [Hash] params ({})
|
|
461
|
+
def get_ec2_instance_recommendations(params = {}, options = {})
|
|
462
|
+
req = build_request(:get_ec2_instance_recommendations, params)
|
|
463
|
+
req.send_request(options)
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# Returns the projected utilization metrics of Amazon EC2 instance
|
|
467
|
+
# recommendations.
|
|
468
|
+
#
|
|
469
|
+
# @option params [required, String] :instance_arn
|
|
470
|
+
# The Amazon Resource Name (ARN) of the instances for which to return
|
|
471
|
+
# recommendation projected metrics.
|
|
472
|
+
#
|
|
473
|
+
# @option params [required, String] :stat
|
|
474
|
+
# The statistic of the projected metrics.
|
|
475
|
+
#
|
|
476
|
+
# @option params [required, Integer] :period
|
|
477
|
+
# The granularity, in seconds, of the projected metrics data points.
|
|
478
|
+
#
|
|
479
|
+
# @option params [required, Time,DateTime,Date,Integer,String] :start_time
|
|
480
|
+
# The time stamp of the first projected metrics data point to return.
|
|
481
|
+
#
|
|
482
|
+
# @option params [required, Time,DateTime,Date,Integer,String] :end_time
|
|
483
|
+
# The time stamp of the last projected metrics data point to return.
|
|
484
|
+
#
|
|
485
|
+
# @return [Types::GetEC2RecommendationProjectedMetricsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
486
|
+
#
|
|
487
|
+
# * {Types::GetEC2RecommendationProjectedMetricsResponse#recommended_option_projected_metrics #recommended_option_projected_metrics} => Array<Types::RecommendedOptionProjectedMetric>
|
|
488
|
+
#
|
|
489
|
+
# @example Request syntax with placeholder values
|
|
490
|
+
#
|
|
491
|
+
# resp = client.get_ec2_recommendation_projected_metrics({
|
|
492
|
+
# instance_arn: "InstanceArn", # required
|
|
493
|
+
# stat: "Maximum", # required, accepts Maximum, Average
|
|
494
|
+
# period: 1, # required
|
|
495
|
+
# start_time: Time.now, # required
|
|
496
|
+
# end_time: Time.now, # required
|
|
497
|
+
# })
|
|
498
|
+
#
|
|
499
|
+
# @example Response structure
|
|
500
|
+
#
|
|
501
|
+
# resp.recommended_option_projected_metrics #=> Array
|
|
502
|
+
# resp.recommended_option_projected_metrics[0].recommended_instance_type #=> String
|
|
503
|
+
# resp.recommended_option_projected_metrics[0].rank #=> Integer
|
|
504
|
+
# resp.recommended_option_projected_metrics[0].projected_metrics #=> Array
|
|
505
|
+
# resp.recommended_option_projected_metrics[0].projected_metrics[0].name #=> String, one of "Cpu", "Memory"
|
|
506
|
+
# resp.recommended_option_projected_metrics[0].projected_metrics[0].timestamps #=> Array
|
|
507
|
+
# resp.recommended_option_projected_metrics[0].projected_metrics[0].timestamps[0] #=> Time
|
|
508
|
+
# resp.recommended_option_projected_metrics[0].projected_metrics[0].values #=> Array
|
|
509
|
+
# resp.recommended_option_projected_metrics[0].projected_metrics[0].values[0] #=> Float
|
|
510
|
+
#
|
|
511
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEC2RecommendationProjectedMetrics AWS API Documentation
|
|
512
|
+
#
|
|
513
|
+
# @overload get_ec2_recommendation_projected_metrics(params = {})
|
|
514
|
+
# @param [Hash] params ({})
|
|
515
|
+
def get_ec2_recommendation_projected_metrics(params = {}, options = {})
|
|
516
|
+
req = build_request(:get_ec2_recommendation_projected_metrics, params)
|
|
517
|
+
req.send_request(options)
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# Returns the enrollment (opt in) status of an account to the AWS
|
|
521
|
+
# Compute Optimizer service.
|
|
522
|
+
#
|
|
523
|
+
# If the account is a master account of an organization, this operation
|
|
524
|
+
# also confirms the enrollment status of member accounts within the
|
|
525
|
+
# organization.
|
|
526
|
+
#
|
|
527
|
+
# @return [Types::GetEnrollmentStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
528
|
+
#
|
|
529
|
+
# * {Types::GetEnrollmentStatusResponse#status #status} => String
|
|
530
|
+
# * {Types::GetEnrollmentStatusResponse#status_reason #status_reason} => String
|
|
531
|
+
# * {Types::GetEnrollmentStatusResponse#member_accounts_enrolled #member_accounts_enrolled} => Boolean
|
|
532
|
+
#
|
|
533
|
+
# @example Response structure
|
|
534
|
+
#
|
|
535
|
+
# resp.status #=> String, one of "Active", "Inactive", "Pending", "Failed"
|
|
536
|
+
# resp.status_reason #=> String
|
|
537
|
+
# resp.member_accounts_enrolled #=> Boolean
|
|
538
|
+
#
|
|
539
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEnrollmentStatus AWS API Documentation
|
|
540
|
+
#
|
|
541
|
+
# @overload get_enrollment_status(params = {})
|
|
542
|
+
# @param [Hash] params ({})
|
|
543
|
+
def get_enrollment_status(params = {}, options = {})
|
|
544
|
+
req = build_request(:get_enrollment_status, params)
|
|
545
|
+
req.send_request(options)
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
# Returns the optimization findings for an account.
|
|
549
|
+
#
|
|
550
|
+
# For example, it returns the number of Amazon EC2 instances in an
|
|
551
|
+
# account that are under-provisioned, over-provisioned, or optimized. It
|
|
552
|
+
# also returns the number of Auto Scaling groups in an account that are
|
|
553
|
+
# not optimized, or optimized.
|
|
554
|
+
#
|
|
555
|
+
# @option params [Array<String>] :account_ids
|
|
556
|
+
# The AWS account IDs for which to return recommendation summaries.
|
|
557
|
+
#
|
|
558
|
+
# Only one account ID can be specified per request.
|
|
559
|
+
#
|
|
560
|
+
# @option params [String] :next_token
|
|
561
|
+
# The token to advance to the next page of recommendation summaries.
|
|
562
|
+
#
|
|
563
|
+
# @option params [Integer] :max_results
|
|
564
|
+
# The maximum number of recommendation summaries to return with a single
|
|
565
|
+
# call.
|
|
566
|
+
#
|
|
567
|
+
# To retrieve the remaining results, make another call with the returned
|
|
568
|
+
# `NextToken` value.
|
|
569
|
+
#
|
|
570
|
+
# @return [Types::GetRecommendationSummariesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
571
|
+
#
|
|
572
|
+
# * {Types::GetRecommendationSummariesResponse#next_token #next_token} => String
|
|
573
|
+
# * {Types::GetRecommendationSummariesResponse#recommendation_summaries #recommendation_summaries} => Array<Types::RecommendationSummary>
|
|
574
|
+
#
|
|
575
|
+
# @example Request syntax with placeholder values
|
|
576
|
+
#
|
|
577
|
+
# resp = client.get_recommendation_summaries({
|
|
578
|
+
# account_ids: ["AccountId"],
|
|
579
|
+
# next_token: "NextToken",
|
|
580
|
+
# max_results: 1,
|
|
581
|
+
# })
|
|
582
|
+
#
|
|
583
|
+
# @example Response structure
|
|
584
|
+
#
|
|
585
|
+
# resp.next_token #=> String
|
|
586
|
+
# resp.recommendation_summaries #=> Array
|
|
587
|
+
# resp.recommendation_summaries[0].summaries #=> Array
|
|
588
|
+
# resp.recommendation_summaries[0].summaries[0].name #=> String, one of "Underprovisioned", "Overprovisioned", "Optimized", "NotOptimized"
|
|
589
|
+
# resp.recommendation_summaries[0].summaries[0].value #=> Float
|
|
590
|
+
# resp.recommendation_summaries[0].recommendation_resource_type #=> String, one of "Ec2Instance", "AutoScalingGroup"
|
|
591
|
+
# resp.recommendation_summaries[0].account_id #=> String
|
|
592
|
+
#
|
|
593
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetRecommendationSummaries AWS API Documentation
|
|
594
|
+
#
|
|
595
|
+
# @overload get_recommendation_summaries(params = {})
|
|
596
|
+
# @param [Hash] params ({})
|
|
597
|
+
def get_recommendation_summaries(params = {}, options = {})
|
|
598
|
+
req = build_request(:get_recommendation_summaries, params)
|
|
599
|
+
req.send_request(options)
|
|
600
|
+
end
|
|
601
|
+
|
|
602
|
+
# Updates the enrollment (opt in) status of an account to the AWS
|
|
603
|
+
# Compute Optimizer service.
|
|
604
|
+
#
|
|
605
|
+
# If the account is a master account of an organization, this operation
|
|
606
|
+
# can also enroll member accounts within the organization.
|
|
607
|
+
#
|
|
608
|
+
# @option params [required, String] :status
|
|
609
|
+
# The new enrollment status of the account.
|
|
610
|
+
#
|
|
611
|
+
# Accepted options are `Active` or `Inactive`. You will get an error if
|
|
612
|
+
# `Pending` or `Failed` are specified.
|
|
613
|
+
#
|
|
614
|
+
# @option params [Boolean] :include_member_accounts
|
|
615
|
+
# Indicates whether to enroll member accounts within the organization,
|
|
616
|
+
# if the account is a master account of an organization.
|
|
617
|
+
#
|
|
618
|
+
# @return [Types::UpdateEnrollmentStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
619
|
+
#
|
|
620
|
+
# * {Types::UpdateEnrollmentStatusResponse#status #status} => String
|
|
621
|
+
# * {Types::UpdateEnrollmentStatusResponse#status_reason #status_reason} => String
|
|
622
|
+
#
|
|
623
|
+
# @example Request syntax with placeholder values
|
|
624
|
+
#
|
|
625
|
+
# resp = client.update_enrollment_status({
|
|
626
|
+
# status: "Active", # required, accepts Active, Inactive, Pending, Failed
|
|
627
|
+
# include_member_accounts: false,
|
|
628
|
+
# })
|
|
629
|
+
#
|
|
630
|
+
# @example Response structure
|
|
631
|
+
#
|
|
632
|
+
# resp.status #=> String, one of "Active", "Inactive", "Pending", "Failed"
|
|
633
|
+
# resp.status_reason #=> String
|
|
634
|
+
#
|
|
635
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/UpdateEnrollmentStatus AWS API Documentation
|
|
636
|
+
#
|
|
637
|
+
# @overload update_enrollment_status(params = {})
|
|
638
|
+
# @param [Hash] params ({})
|
|
639
|
+
def update_enrollment_status(params = {}, options = {})
|
|
640
|
+
req = build_request(:update_enrollment_status, params)
|
|
641
|
+
req.send_request(options)
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
# @!endgroup
|
|
645
|
+
|
|
646
|
+
# @param params ({})
|
|
647
|
+
# @api private
|
|
648
|
+
def build_request(operation_name, params = {})
|
|
649
|
+
handlers = @handlers.for(operation_name)
|
|
650
|
+
context = Seahorse::Client::RequestContext.new(
|
|
651
|
+
operation_name: operation_name,
|
|
652
|
+
operation: config.api.operation(operation_name),
|
|
653
|
+
client: self,
|
|
654
|
+
params: params,
|
|
655
|
+
config: config)
|
|
656
|
+
context[:gem_name] = 'aws-sdk-computeoptimizer'
|
|
657
|
+
context[:gem_version] = '1.0.0'
|
|
658
|
+
Seahorse::Client::Request.new(handlers, context)
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
# @api private
|
|
662
|
+
# @deprecated
|
|
663
|
+
def waiter_names
|
|
664
|
+
[]
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
class << self
|
|
668
|
+
|
|
669
|
+
# @api private
|
|
670
|
+
attr_reader :identifier
|
|
671
|
+
|
|
672
|
+
# @api private
|
|
673
|
+
def errors_module
|
|
674
|
+
Errors
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
end
|
|
678
|
+
end
|
|
679
|
+
end
|