aws-sdk-computeoptimizer 1.0.0 → 1.5.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 +5 -5
- data/lib/aws-sdk-computeoptimizer.rb +9 -4
- data/lib/aws-sdk-computeoptimizer/client.rb +406 -31
- data/lib/aws-sdk-computeoptimizer/client_api.rb +153 -0
- data/lib/aws-sdk-computeoptimizer/errors.rb +47 -7
- data/lib/aws-sdk-computeoptimizer/resource.rb +3 -0
- data/lib/aws-sdk-computeoptimizer/types.rb +587 -24
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ee197b282d0fd73c3170b8d200344661e34cbda4221fd47832975f86cd72e182
|
4
|
+
data.tar.gz: 9a340d589d0726c77c3c7b3bdd8c326db9caae1fe3b6fb512027df55ce0173e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9867b22bd192b10973679b58fd3834bd790ee4aaee59898f02475a154da78a7ed26b65dbc6c3b1874e19ba99049ca9484995125d872ada9a1b72d96ffc3f365
|
7
|
+
data.tar.gz: c6dd53f46727ccd67be54fccf12227987bd161620e9d66046bb3661b11f34637df57dbdab1d8098bbdb5cdb1c3880e5dc3f699605100db2e68084857c76903bf
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -24,17 +26,20 @@ require_relative 'aws-sdk-computeoptimizer/customizations'
|
|
24
26
|
# methods each accept a hash of request parameters and return a response
|
25
27
|
# structure.
|
26
28
|
#
|
29
|
+
# compute_optimizer = Aws::ComputeOptimizer::Client.new
|
30
|
+
# resp = compute_optimizer.describe_recommendation_export_jobs(params)
|
31
|
+
#
|
27
32
|
# See {Client} for more information.
|
28
33
|
#
|
29
34
|
# # Errors
|
30
35
|
#
|
31
|
-
# Errors returned from AWS Compute Optimizer
|
32
|
-
# extend {Errors::ServiceError}.
|
36
|
+
# Errors returned from AWS Compute Optimizer are defined in the
|
37
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
33
38
|
#
|
34
39
|
# begin
|
35
40
|
# # do stuff
|
36
41
|
# rescue Aws::ComputeOptimizer::Errors::ServiceError
|
37
|
-
# # rescues all
|
42
|
+
# # rescues all AWS Compute Optimizer API errors
|
38
43
|
# end
|
39
44
|
#
|
40
45
|
# See {Errors} for more information.
|
@@ -42,6 +47,6 @@ require_relative 'aws-sdk-computeoptimizer/customizations'
|
|
42
47
|
# @service
|
43
48
|
module Aws::ComputeOptimizer
|
44
49
|
|
45
|
-
GEM_VERSION = '1.
|
50
|
+
GEM_VERSION = '1.5.0'
|
46
51
|
|
47
52
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -24,12 +26,25 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
24
26
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
|
+
require 'aws-sdk-core/plugins/http_checksum.rb'
|
27
30
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
31
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
29
32
|
|
30
33
|
Aws::Plugins::GlobalConfiguration.add_identifier(:computeoptimizer)
|
31
34
|
|
32
35
|
module Aws::ComputeOptimizer
|
36
|
+
# An API client for ComputeOptimizer. To construct a client, you need to configure a `:region` and `:credentials`.
|
37
|
+
#
|
38
|
+
# client = Aws::ComputeOptimizer::Client.new(
|
39
|
+
# region: region_name,
|
40
|
+
# credentials: credentials,
|
41
|
+
# # ...
|
42
|
+
# )
|
43
|
+
#
|
44
|
+
# For details on configuring region and credentials see
|
45
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
46
|
+
#
|
47
|
+
# See {#initialize} for a full list of supported configuration options.
|
33
48
|
class Client < Seahorse::Client::Base
|
34
49
|
|
35
50
|
include Aws::ClientStubs
|
@@ -57,6 +72,7 @@ module Aws::ComputeOptimizer
|
|
57
72
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
58
73
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
59
74
|
add_plugin(Aws::Plugins::TransferEncoding)
|
75
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
60
76
|
add_plugin(Aws::Plugins::SignatureV4)
|
61
77
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
62
78
|
|
@@ -93,7 +109,7 @@ module Aws::ComputeOptimizer
|
|
93
109
|
# @option options [required, String] :region
|
94
110
|
# The AWS region to connect to. The configured `:region` is
|
95
111
|
# used to determine the service `:endpoint`. When not passed,
|
96
|
-
# a default `:region` is
|
112
|
+
# a default `:region` is searched for in the following locations:
|
97
113
|
#
|
98
114
|
# * `Aws.config[:region]`
|
99
115
|
# * `ENV['AWS_REGION']`
|
@@ -108,6 +124,12 @@ module Aws::ComputeOptimizer
|
|
108
124
|
# When set to `true`, a thread polling for endpoints will be running in
|
109
125
|
# the background every 60 secs (default). Defaults to `false`.
|
110
126
|
#
|
127
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
128
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
129
|
+
# until there is sufficent client side capacity to retry the request.
|
130
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
131
|
+
# not retry instead of sleeping.
|
132
|
+
#
|
111
133
|
# @option options [Boolean] :client_side_monitoring (false)
|
112
134
|
# When `true`, client-side metrics will be collected for all API requests from
|
113
135
|
# this client.
|
@@ -132,6 +154,10 @@ module Aws::ComputeOptimizer
|
|
132
154
|
# When `true`, an attempt is made to coerce request parameters into
|
133
155
|
# the required types.
|
134
156
|
#
|
157
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
158
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
159
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
160
|
+
#
|
135
161
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
136
162
|
# Set to true to disable SDK automatically adding host prefix
|
137
163
|
# to default service endpoint when available.
|
@@ -139,7 +165,7 @@ module Aws::ComputeOptimizer
|
|
139
165
|
# @option options [String] :endpoint
|
140
166
|
# The client endpoint is normally constructed from the `:region`
|
141
167
|
# option. You should only configure an `:endpoint` when connecting
|
142
|
-
# to test endpoints. This should be
|
168
|
+
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
143
169
|
#
|
144
170
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
145
171
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -154,7 +180,7 @@ module Aws::ComputeOptimizer
|
|
154
180
|
# requests fetching endpoints information. Defaults to 60 sec.
|
155
181
|
#
|
156
182
|
# @option options [Boolean] :endpoint_discovery (false)
|
157
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
183
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
158
184
|
#
|
159
185
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
160
186
|
# The log formatter.
|
@@ -166,15 +192,29 @@ module Aws::ComputeOptimizer
|
|
166
192
|
# The Logger instance to send log messages to. If this option
|
167
193
|
# is not set, logging will be disabled.
|
168
194
|
#
|
195
|
+
# @option options [Integer] :max_attempts (3)
|
196
|
+
# An integer representing the maximum number attempts that will be made for
|
197
|
+
# a single request, including the initial attempt. For example,
|
198
|
+
# setting this value to 5 will result in a request being retried up to
|
199
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
200
|
+
#
|
169
201
|
# @option options [String] :profile ("default")
|
170
202
|
# Used when loading credentials from the shared credentials file
|
171
203
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
172
204
|
#
|
205
|
+
# @option options [Proc] :retry_backoff
|
206
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
207
|
+
# This option is only used in the `legacy` retry mode.
|
208
|
+
#
|
173
209
|
# @option options [Float] :retry_base_delay (0.3)
|
174
|
-
# The base delay in seconds used by the default backoff function.
|
210
|
+
# The base delay in seconds used by the default backoff function. This option
|
211
|
+
# is only used in the `legacy` retry mode.
|
175
212
|
#
|
176
213
|
# @option options [Symbol] :retry_jitter (:none)
|
177
|
-
# A delay randomiser function used by the default backoff function.
|
214
|
+
# A delay randomiser function used by the default backoff function.
|
215
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
216
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
217
|
+
# in the `legacy` retry mode.
|
178
218
|
#
|
179
219
|
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
180
220
|
#
|
@@ -182,11 +222,30 @@ module Aws::ComputeOptimizer
|
|
182
222
|
# The maximum number of times to retry failed requests. Only
|
183
223
|
# ~ 500 level server errors and certain ~ 400 level client errors
|
184
224
|
# are retried. Generally, these are throttling errors, data
|
185
|
-
# checksum errors, networking errors, timeout errors
|
186
|
-
# errors from expired credentials.
|
225
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
226
|
+
# endpoint discovery, and errors from expired credentials.
|
227
|
+
# This option is only used in the `legacy` retry mode.
|
187
228
|
#
|
188
229
|
# @option options [Integer] :retry_max_delay (0)
|
189
|
-
# The maximum number of seconds to delay between retries (0 for no limit)
|
230
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
231
|
+
# used by the default backoff function. This option is only used in the
|
232
|
+
# `legacy` retry mode.
|
233
|
+
#
|
234
|
+
# @option options [String] :retry_mode ("legacy")
|
235
|
+
# Specifies which retry algorithm to use. Values are:
|
236
|
+
#
|
237
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
238
|
+
# no retry mode is provided.
|
239
|
+
#
|
240
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
241
|
+
# This includes support for retry quotas, which limit the number of
|
242
|
+
# unsuccessful retries a client can make.
|
243
|
+
#
|
244
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
245
|
+
# functionality of `standard` mode along with automatic client side
|
246
|
+
# throttling. This is a provisional mode that may change behavior
|
247
|
+
# in the future.
|
248
|
+
#
|
190
249
|
#
|
191
250
|
# @option options [String] :secret_access_key
|
192
251
|
#
|
@@ -219,16 +278,15 @@ module Aws::ComputeOptimizer
|
|
219
278
|
# requests through. Formatted like 'http://proxy.com:123'.
|
220
279
|
#
|
221
280
|
# @option options [Float] :http_open_timeout (15) The number of
|
222
|
-
# seconds to wait when opening a HTTP session before
|
281
|
+
# seconds to wait when opening a HTTP session before raising a
|
223
282
|
# `Timeout::Error`.
|
224
283
|
#
|
225
284
|
# @option options [Integer] :http_read_timeout (60) The default
|
226
285
|
# 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}.
|
286
|
+
# safely be set per-request on the session.
|
229
287
|
#
|
230
288
|
# @option options [Float] :http_idle_timeout (5) The number of
|
231
|
-
# seconds a connection is allowed to sit
|
289
|
+
# seconds a connection is allowed to sit idle before it is
|
232
290
|
# considered stale. Stale connections are closed and removed
|
233
291
|
# from the pool before making a request.
|
234
292
|
#
|
@@ -237,7 +295,7 @@ module Aws::ComputeOptimizer
|
|
237
295
|
# request body. This option has no effect unless the request has
|
238
296
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
239
297
|
# disables this behaviour. This value can safely be set per
|
240
|
-
# request on the session
|
298
|
+
# request on the session.
|
241
299
|
#
|
242
300
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
243
301
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -264,6 +322,309 @@ module Aws::ComputeOptimizer
|
|
264
322
|
|
265
323
|
# @!group API Operations
|
266
324
|
|
325
|
+
# Describes recommendation export jobs created in the last seven days.
|
326
|
+
#
|
327
|
+
# Use the `ExportAutoScalingGroupRecommendations` or
|
328
|
+
# `ExportEC2InstanceRecommendations` actions to request an export of
|
329
|
+
# your recommendations. Then use the `DescribeRecommendationExportJobs`
|
330
|
+
# action to view your export jobs.
|
331
|
+
#
|
332
|
+
# @option params [Array<String>] :job_ids
|
333
|
+
# The identification numbers of the export jobs to return.
|
334
|
+
#
|
335
|
+
# An export job ID is returned when you create an export using the
|
336
|
+
# `ExportAutoScalingGroupRecommendations` or
|
337
|
+
# `ExportEC2InstanceRecommendations` actions.
|
338
|
+
#
|
339
|
+
# All export jobs created in the last seven days are returned if this
|
340
|
+
# parameter is omitted.
|
341
|
+
#
|
342
|
+
# @option params [Array<Types::JobFilter>] :filters
|
343
|
+
# An array of objects that describe a filter to return a more specific
|
344
|
+
# list of export jobs.
|
345
|
+
#
|
346
|
+
# @option params [String] :next_token
|
347
|
+
# The token to advance to the next page of export jobs.
|
348
|
+
#
|
349
|
+
# @option params [Integer] :max_results
|
350
|
+
# The maximum number of export jobs to return with a single request.
|
351
|
+
#
|
352
|
+
# To retrieve the remaining results, make another request with the
|
353
|
+
# returned `NextToken` value.
|
354
|
+
#
|
355
|
+
# @return [Types::DescribeRecommendationExportJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
356
|
+
#
|
357
|
+
# * {Types::DescribeRecommendationExportJobsResponse#recommendation_export_jobs #recommendation_export_jobs} => Array<Types::RecommendationExportJob>
|
358
|
+
# * {Types::DescribeRecommendationExportJobsResponse#next_token #next_token} => String
|
359
|
+
#
|
360
|
+
# @example Request syntax with placeholder values
|
361
|
+
#
|
362
|
+
# resp = client.describe_recommendation_export_jobs({
|
363
|
+
# job_ids: ["JobId"],
|
364
|
+
# filters: [
|
365
|
+
# {
|
366
|
+
# name: "ResourceType", # accepts ResourceType, JobStatus
|
367
|
+
# values: ["FilterValue"],
|
368
|
+
# },
|
369
|
+
# ],
|
370
|
+
# next_token: "NextToken",
|
371
|
+
# max_results: 1,
|
372
|
+
# })
|
373
|
+
#
|
374
|
+
# @example Response structure
|
375
|
+
#
|
376
|
+
# resp.recommendation_export_jobs #=> Array
|
377
|
+
# resp.recommendation_export_jobs[0].job_id #=> String
|
378
|
+
# resp.recommendation_export_jobs[0].destination.s3.bucket #=> String
|
379
|
+
# resp.recommendation_export_jobs[0].destination.s3.key #=> String
|
380
|
+
# resp.recommendation_export_jobs[0].destination.s3.metadata_key #=> String
|
381
|
+
# resp.recommendation_export_jobs[0].resource_type #=> String, one of "Ec2Instance", "AutoScalingGroup"
|
382
|
+
# resp.recommendation_export_jobs[0].status #=> String, one of "Queued", "InProgress", "Complete", "Failed"
|
383
|
+
# resp.recommendation_export_jobs[0].creation_timestamp #=> Time
|
384
|
+
# resp.recommendation_export_jobs[0].last_updated_timestamp #=> Time
|
385
|
+
# resp.recommendation_export_jobs[0].failure_reason #=> String
|
386
|
+
# resp.next_token #=> String
|
387
|
+
#
|
388
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/DescribeRecommendationExportJobs AWS API Documentation
|
389
|
+
#
|
390
|
+
# @overload describe_recommendation_export_jobs(params = {})
|
391
|
+
# @param [Hash] params ({})
|
392
|
+
def describe_recommendation_export_jobs(params = {}, options = {})
|
393
|
+
req = build_request(:describe_recommendation_export_jobs, params)
|
394
|
+
req.send_request(options)
|
395
|
+
end
|
396
|
+
|
397
|
+
# Exports optimization recommendations for Auto Scaling groups.
|
398
|
+
#
|
399
|
+
# Recommendations are exported in a comma-separated values (.csv) file,
|
400
|
+
# and its metadata in a JavaScript Object Notation (.json) file, to an
|
401
|
+
# existing Amazon Simple Storage Service (Amazon S3) bucket that you
|
402
|
+
# specify. For more information, see [Exporting Recommendations][1] in
|
403
|
+
# the *Compute Optimizer User Guide*.
|
404
|
+
#
|
405
|
+
# You can have only one Auto Scaling group export job in progress per
|
406
|
+
# AWS Region.
|
407
|
+
#
|
408
|
+
#
|
409
|
+
#
|
410
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html
|
411
|
+
#
|
412
|
+
# @option params [Array<String>] :account_ids
|
413
|
+
# The IDs of the AWS accounts for which to export Auto Scaling group
|
414
|
+
# recommendations.
|
415
|
+
#
|
416
|
+
# If your account is the master account of an organization, use this
|
417
|
+
# parameter to specify the member accounts for which you want to export
|
418
|
+
# recommendations.
|
419
|
+
#
|
420
|
+
# This parameter cannot be specified together with the include member
|
421
|
+
# accounts parameter. The parameters are mutually exclusive.
|
422
|
+
#
|
423
|
+
# Recommendations for member accounts are not included in the export if
|
424
|
+
# this parameter, or the include member accounts parameter, is omitted.
|
425
|
+
#
|
426
|
+
# You can specify multiple account IDs per request.
|
427
|
+
#
|
428
|
+
# @option params [Array<Types::Filter>] :filters
|
429
|
+
# An array of objects that describe a filter to export a more specific
|
430
|
+
# set of Auto Scaling group recommendations.
|
431
|
+
#
|
432
|
+
# @option params [Array<String>] :fields_to_export
|
433
|
+
# The recommendations data to include in the export file.
|
434
|
+
#
|
435
|
+
# @option params [required, Types::S3DestinationConfig] :s3_destination_config
|
436
|
+
# An object to specify the destination Amazon Simple Storage Service
|
437
|
+
# (Amazon S3) bucket name and key prefix for the export job.
|
438
|
+
#
|
439
|
+
# You must create the destination Amazon S3 bucket for your
|
440
|
+
# recommendations export before you create the export job. Compute
|
441
|
+
# Optimizer does not create the S3 bucket for you. After you create the
|
442
|
+
# S3 bucket, ensure that it has the required permission policy to allow
|
443
|
+
# Compute Optimizer to write the export file to it. If you plan to
|
444
|
+
# specify an object prefix when you create the export job, you must
|
445
|
+
# include the object prefix in the policy that you add to the S3 bucket.
|
446
|
+
# For more information, see [Amazon S3 Bucket Policy for Compute
|
447
|
+
# Optimizer][1] in the *Compute Optimizer user guide*.
|
448
|
+
#
|
449
|
+
#
|
450
|
+
#
|
451
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html
|
452
|
+
#
|
453
|
+
# @option params [String] :file_format
|
454
|
+
# The format of the export file.
|
455
|
+
#
|
456
|
+
# The only export file format currently supported is `Csv`.
|
457
|
+
#
|
458
|
+
# @option params [Boolean] :include_member_accounts
|
459
|
+
# Indicates whether to include recommendations for resources in all
|
460
|
+
# member accounts of the organization if your account is the master
|
461
|
+
# account of an organization.
|
462
|
+
#
|
463
|
+
# The member accounts must also be opted in to Compute Optimizer.
|
464
|
+
#
|
465
|
+
# Recommendations for member accounts of the organization are not
|
466
|
+
# included in the export file if this parameter is omitted.
|
467
|
+
#
|
468
|
+
# This parameter cannot be specified together with the account IDs
|
469
|
+
# parameter. The parameters are mutually exclusive.
|
470
|
+
#
|
471
|
+
# Recommendations for member accounts are not included in the export if
|
472
|
+
# this parameter, or the account IDs parameter, is omitted.
|
473
|
+
#
|
474
|
+
# @return [Types::ExportAutoScalingGroupRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
475
|
+
#
|
476
|
+
# * {Types::ExportAutoScalingGroupRecommendationsResponse#job_id #job_id} => String
|
477
|
+
# * {Types::ExportAutoScalingGroupRecommendationsResponse#s3_destination #s3_destination} => Types::S3Destination
|
478
|
+
#
|
479
|
+
# @example Request syntax with placeholder values
|
480
|
+
#
|
481
|
+
# resp = client.export_auto_scaling_group_recommendations({
|
482
|
+
# account_ids: ["AccountId"],
|
483
|
+
# filters: [
|
484
|
+
# {
|
485
|
+
# name: "Finding", # accepts Finding, RecommendationSourceType
|
486
|
+
# values: ["FilterValue"],
|
487
|
+
# },
|
488
|
+
# ],
|
489
|
+
# fields_to_export: ["AccountId"], # accepts AccountId, AutoScalingGroupArn, AutoScalingGroupName, Finding, UtilizationMetricsCpuMaximum, UtilizationMetricsMemoryMaximum, LookbackPeriodInDays, CurrentConfigurationInstanceType, CurrentConfigurationDesiredCapacity, CurrentConfigurationMinSize, CurrentConfigurationMaxSize, CurrentOnDemandPrice, CurrentStandardOneYearNoUpfrontReservedPrice, CurrentStandardThreeYearNoUpfrontReservedPrice, CurrentVCpus, CurrentMemory, CurrentStorage, CurrentNetwork, RecommendationOptionsConfigurationInstanceType, RecommendationOptionsConfigurationDesiredCapacity, RecommendationOptionsConfigurationMinSize, RecommendationOptionsConfigurationMaxSize, RecommendationOptionsProjectedUtilizationMetricsCpuMaximum, RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum, RecommendationOptionsPerformanceRisk, RecommendationOptionsOnDemandPrice, RecommendationOptionsStandardOneYearNoUpfrontReservedPrice, RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice, RecommendationOptionsVcpus, RecommendationOptionsMemory, RecommendationOptionsStorage, RecommendationOptionsNetwork, LastRefreshTimestamp
|
490
|
+
# s3_destination_config: { # required
|
491
|
+
# bucket: "DestinationBucket",
|
492
|
+
# key_prefix: "DestinationKeyPrefix",
|
493
|
+
# },
|
494
|
+
# file_format: "Csv", # accepts Csv
|
495
|
+
# include_member_accounts: false,
|
496
|
+
# })
|
497
|
+
#
|
498
|
+
# @example Response structure
|
499
|
+
#
|
500
|
+
# resp.job_id #=> String
|
501
|
+
# resp.s3_destination.bucket #=> String
|
502
|
+
# resp.s3_destination.key #=> String
|
503
|
+
# resp.s3_destination.metadata_key #=> String
|
504
|
+
#
|
505
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/ExportAutoScalingGroupRecommendations AWS API Documentation
|
506
|
+
#
|
507
|
+
# @overload export_auto_scaling_group_recommendations(params = {})
|
508
|
+
# @param [Hash] params ({})
|
509
|
+
def export_auto_scaling_group_recommendations(params = {}, options = {})
|
510
|
+
req = build_request(:export_auto_scaling_group_recommendations, params)
|
511
|
+
req.send_request(options)
|
512
|
+
end
|
513
|
+
|
514
|
+
# Exports optimization recommendations for Amazon EC2 instances.
|
515
|
+
#
|
516
|
+
# Recommendations are exported in a comma-separated values (.csv) file,
|
517
|
+
# and its metadata in a JavaScript Object Notation (.json) file, to an
|
518
|
+
# existing Amazon Simple Storage Service (Amazon S3) bucket that you
|
519
|
+
# specify. For more information, see [Exporting Recommendations][1] in
|
520
|
+
# the *Compute Optimizer User Guide*.
|
521
|
+
#
|
522
|
+
# You can have only one Amazon EC2 instance export job in progress per
|
523
|
+
# AWS Region.
|
524
|
+
#
|
525
|
+
#
|
526
|
+
#
|
527
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html
|
528
|
+
#
|
529
|
+
# @option params [Array<String>] :account_ids
|
530
|
+
# The IDs of the AWS accounts for which to export instance
|
531
|
+
# recommendations.
|
532
|
+
#
|
533
|
+
# If your account is the master account of an organization, use this
|
534
|
+
# parameter to specify the member accounts for which you want to export
|
535
|
+
# recommendations.
|
536
|
+
#
|
537
|
+
# This parameter cannot be specified together with the include member
|
538
|
+
# accounts parameter. The parameters are mutually exclusive.
|
539
|
+
#
|
540
|
+
# Recommendations for member accounts are not included in the export if
|
541
|
+
# this parameter, or the include member accounts parameter, is omitted.
|
542
|
+
#
|
543
|
+
# You can specify multiple account IDs per request.
|
544
|
+
#
|
545
|
+
# @option params [Array<Types::Filter>] :filters
|
546
|
+
# An array of objects that describe a filter to export a more specific
|
547
|
+
# set of instance recommendations.
|
548
|
+
#
|
549
|
+
# @option params [Array<String>] :fields_to_export
|
550
|
+
# The recommendations data to include in the export file.
|
551
|
+
#
|
552
|
+
# @option params [required, Types::S3DestinationConfig] :s3_destination_config
|
553
|
+
# An object to specify the destination Amazon Simple Storage Service
|
554
|
+
# (Amazon S3) bucket name and key prefix for the export job.
|
555
|
+
#
|
556
|
+
# You must create the destination Amazon S3 bucket for your
|
557
|
+
# recommendations export before you create the export job. Compute
|
558
|
+
# Optimizer does not create the S3 bucket for you. After you create the
|
559
|
+
# S3 bucket, ensure that it has the required permission policy to allow
|
560
|
+
# Compute Optimizer to write the export file to it. If you plan to
|
561
|
+
# specify an object prefix when you create the export job, you must
|
562
|
+
# include the object prefix in the policy that you add to the S3 bucket.
|
563
|
+
# For more information, see [Amazon S3 Bucket Policy for Compute
|
564
|
+
# Optimizer][1] in the *Compute Optimizer user guide*.
|
565
|
+
#
|
566
|
+
#
|
567
|
+
#
|
568
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html
|
569
|
+
#
|
570
|
+
# @option params [String] :file_format
|
571
|
+
# The format of the export file.
|
572
|
+
#
|
573
|
+
# The only export file format currently supported is `Csv`.
|
574
|
+
#
|
575
|
+
# @option params [Boolean] :include_member_accounts
|
576
|
+
# Indicates whether to include recommendations for resources in all
|
577
|
+
# member accounts of the organization if your account is the master
|
578
|
+
# account of an organization.
|
579
|
+
#
|
580
|
+
# The member accounts must also be opted in to Compute Optimizer.
|
581
|
+
#
|
582
|
+
# Recommendations for member accounts of the organization are not
|
583
|
+
# included in the export file if this parameter is omitted.
|
584
|
+
#
|
585
|
+
# Recommendations for member accounts are not included in the export if
|
586
|
+
# this parameter, or the account IDs parameter, is omitted.
|
587
|
+
#
|
588
|
+
# @return [Types::ExportEC2InstanceRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
589
|
+
#
|
590
|
+
# * {Types::ExportEC2InstanceRecommendationsResponse#job_id #job_id} => String
|
591
|
+
# * {Types::ExportEC2InstanceRecommendationsResponse#s3_destination #s3_destination} => Types::S3Destination
|
592
|
+
#
|
593
|
+
# @example Request syntax with placeholder values
|
594
|
+
#
|
595
|
+
# resp = client.export_ec2_instance_recommendations({
|
596
|
+
# account_ids: ["AccountId"],
|
597
|
+
# filters: [
|
598
|
+
# {
|
599
|
+
# name: "Finding", # accepts Finding, RecommendationSourceType
|
600
|
+
# values: ["FilterValue"],
|
601
|
+
# },
|
602
|
+
# ],
|
603
|
+
# fields_to_export: ["AccountId"], # accepts AccountId, InstanceArn, InstanceName, Finding, LookbackPeriodInDays, CurrentInstanceType, UtilizationMetricsCpuMaximum, UtilizationMetricsMemoryMaximum, CurrentOnDemandPrice, CurrentStandardOneYearNoUpfrontReservedPrice, CurrentStandardThreeYearNoUpfrontReservedPrice, CurrentVCpus, CurrentMemory, CurrentStorage, CurrentNetwork, RecommendationOptionsInstanceType, RecommendationOptionsProjectedUtilizationMetricsCpuMaximum, RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum, RecommendationOptionsPerformanceRisk, RecommendationOptionsVcpus, RecommendationOptionsMemory, RecommendationOptionsStorage, RecommendationOptionsNetwork, RecommendationOptionsOnDemandPrice, RecommendationOptionsStandardOneYearNoUpfrontReservedPrice, RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice, RecommendationsSourcesRecommendationSourceArn, RecommendationsSourcesRecommendationSourceType, LastRefreshTimestamp
|
604
|
+
# s3_destination_config: { # required
|
605
|
+
# bucket: "DestinationBucket",
|
606
|
+
# key_prefix: "DestinationKeyPrefix",
|
607
|
+
# },
|
608
|
+
# file_format: "Csv", # accepts Csv
|
609
|
+
# include_member_accounts: false,
|
610
|
+
# })
|
611
|
+
#
|
612
|
+
# @example Response structure
|
613
|
+
#
|
614
|
+
# resp.job_id #=> String
|
615
|
+
# resp.s3_destination.bucket #=> String
|
616
|
+
# resp.s3_destination.key #=> String
|
617
|
+
# resp.s3_destination.metadata_key #=> String
|
618
|
+
#
|
619
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/ExportEC2InstanceRecommendations AWS API Documentation
|
620
|
+
#
|
621
|
+
# @overload export_ec2_instance_recommendations(params = {})
|
622
|
+
# @param [Hash] params ({})
|
623
|
+
def export_ec2_instance_recommendations(params = {}, options = {})
|
624
|
+
req = build_request(:export_ec2_instance_recommendations, params)
|
625
|
+
req.send_request(options)
|
626
|
+
end
|
627
|
+
|
267
628
|
# Returns Auto Scaling group recommendations.
|
268
629
|
#
|
269
630
|
# AWS Compute Optimizer currently generates recommendations for Auto
|
@@ -280,9 +641,13 @@ module Aws::ComputeOptimizer
|
|
280
641
|
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/what-is.html
|
281
642
|
#
|
282
643
|
# @option params [Array<String>] :account_ids
|
283
|
-
# The AWS
|
644
|
+
# The IDs of the AWS accounts for which to return Auto Scaling group
|
284
645
|
# recommendations.
|
285
646
|
#
|
647
|
+
# If your account is the master account of an organization, use this
|
648
|
+
# parameter to specify the member accounts for which you want to return
|
649
|
+
# Auto Scaling group recommendations.
|
650
|
+
#
|
286
651
|
# Only one account ID can be specified per request.
|
287
652
|
#
|
288
653
|
# @option params [Array<String>] :auto_scaling_group_arns
|
@@ -295,10 +660,10 @@ module Aws::ComputeOptimizer
|
|
295
660
|
#
|
296
661
|
# @option params [Integer] :max_results
|
297
662
|
# The maximum number of Auto Scaling group recommendations to return
|
298
|
-
# with a single
|
663
|
+
# with a single request.
|
299
664
|
#
|
300
|
-
# To retrieve the remaining results, make another
|
301
|
-
# `NextToken` value.
|
665
|
+
# To retrieve the remaining results, make another request with the
|
666
|
+
# returned `NextToken` value.
|
302
667
|
#
|
303
668
|
# @option params [Array<Types::Filter>] :filters
|
304
669
|
# An array of objects that describe a filter that returns a more
|
@@ -388,17 +753,22 @@ module Aws::ComputeOptimizer
|
|
388
753
|
#
|
389
754
|
# @option params [Integer] :max_results
|
390
755
|
# The maximum number of instance recommendations to return with a single
|
391
|
-
#
|
756
|
+
# request.
|
392
757
|
#
|
393
|
-
# To retrieve the remaining results, make another
|
394
|
-
# `NextToken` value.
|
758
|
+
# To retrieve the remaining results, make another request with the
|
759
|
+
# returned `NextToken` value.
|
395
760
|
#
|
396
761
|
# @option params [Array<Types::Filter>] :filters
|
397
762
|
# An array of objects that describe a filter that returns a more
|
398
763
|
# specific list of instance recommendations.
|
399
764
|
#
|
400
765
|
# @option params [Array<String>] :account_ids
|
401
|
-
# The AWS
|
766
|
+
# The IDs of the AWS accounts for which to return instance
|
767
|
+
# recommendations.
|
768
|
+
#
|
769
|
+
# If your account is the master account of an organization, use this
|
770
|
+
# parameter to specify the member accounts for which you want to return
|
771
|
+
# instance recommendations.
|
402
772
|
#
|
403
773
|
# Only one account ID can be specified per request.
|
404
774
|
#
|
@@ -520,7 +890,7 @@ module Aws::ComputeOptimizer
|
|
520
890
|
# Returns the enrollment (opt in) status of an account to the AWS
|
521
891
|
# Compute Optimizer service.
|
522
892
|
#
|
523
|
-
# If the account is
|
893
|
+
# If the account is the master account of an organization, this action
|
524
894
|
# also confirms the enrollment status of member accounts within the
|
525
895
|
# organization.
|
526
896
|
#
|
@@ -553,7 +923,12 @@ module Aws::ComputeOptimizer
|
|
553
923
|
# not optimized, or optimized.
|
554
924
|
#
|
555
925
|
# @option params [Array<String>] :account_ids
|
556
|
-
# The AWS
|
926
|
+
# The IDs of the AWS accounts for which to return recommendation
|
927
|
+
# summaries.
|
928
|
+
#
|
929
|
+
# If your account is the master account of an organization, use this
|
930
|
+
# parameter to specify the member accounts for which you want to return
|
931
|
+
# recommendation summaries.
|
557
932
|
#
|
558
933
|
# Only one account ID can be specified per request.
|
559
934
|
#
|
@@ -562,10 +937,10 @@ module Aws::ComputeOptimizer
|
|
562
937
|
#
|
563
938
|
# @option params [Integer] :max_results
|
564
939
|
# The maximum number of recommendation summaries to return with a single
|
565
|
-
#
|
940
|
+
# request.
|
566
941
|
#
|
567
|
-
# To retrieve the remaining results, make another
|
568
|
-
# `NextToken` value.
|
942
|
+
# To retrieve the remaining results, make another request with the
|
943
|
+
# returned `NextToken` value.
|
569
944
|
#
|
570
945
|
# @return [Types::GetRecommendationSummariesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
571
946
|
#
|
@@ -602,8 +977,8 @@ module Aws::ComputeOptimizer
|
|
602
977
|
# Updates the enrollment (opt in) status of an account to the AWS
|
603
978
|
# Compute Optimizer service.
|
604
979
|
#
|
605
|
-
# If the account is a master account of an organization, this
|
606
|
-
#
|
980
|
+
# If the account is a master account of an organization, this action can
|
981
|
+
# also be used to enroll member accounts within the organization.
|
607
982
|
#
|
608
983
|
# @option params [required, String] :status
|
609
984
|
# The new enrollment status of the account.
|
@@ -612,8 +987,8 @@ module Aws::ComputeOptimizer
|
|
612
987
|
# `Pending` or `Failed` are specified.
|
613
988
|
#
|
614
989
|
# @option params [Boolean] :include_member_accounts
|
615
|
-
# Indicates whether to enroll member accounts
|
616
|
-
#
|
990
|
+
# Indicates whether to enroll member accounts of the organization if the
|
991
|
+
# your account is the master account of an organization.
|
617
992
|
#
|
618
993
|
# @return [Types::UpdateEnrollmentStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
619
994
|
#
|
@@ -654,7 +1029,7 @@ module Aws::ComputeOptimizer
|
|
654
1029
|
params: params,
|
655
1030
|
config: config)
|
656
1031
|
context[:gem_name] = 'aws-sdk-computeoptimizer'
|
657
|
-
context[:gem_version] = '1.
|
1032
|
+
context[:gem_version] = '1.5.0'
|
658
1033
|
Seahorse::Client::Request.new(handlers, context)
|
659
1034
|
end
|
660
1035
|
|