aws-sdk-computeoptimizer 1.1.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-computeoptimizer.rb +5 -3
- data/lib/aws-sdk-computeoptimizer/client.rb +366 -31
- data/lib/aws-sdk-computeoptimizer/client_api.rb +153 -0
- data/lib/aws-sdk-computeoptimizer/errors.rb +18 -0
- data/lib/aws-sdk-computeoptimizer/resource.rb +3 -7
- data/lib/aws-sdk-computeoptimizer/types.rb +587 -24
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c60f4d1ef31531ba793d6b7c62c092594c6e2726730c144331efb664a232a424
|
4
|
+
data.tar.gz: b58e15eb629ea978b8bd94d08ee0081d7151e01e641e12e66a4ed00c8be3b4ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d4972093f0d057441a316f15ee83593ee493dc1765fc600ebf651e5d9a6753079a2e331cc71d5a92cbe89e7fa13dcdec179be6338f3184047d8592b0843eeb8
|
7
|
+
data.tar.gz: 9881658a1ec1294d6006af1bbc342fd8625f13f82a1e4cc3ede0525e96dd7f0adf56269a263874da0fa512a23e23223da573793b18c7640c8b8ee6e19b9b8bf9
|
@@ -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:
|
@@ -25,7 +27,7 @@ require_relative 'aws-sdk-computeoptimizer/customizations'
|
|
25
27
|
# structure.
|
26
28
|
#
|
27
29
|
# compute_optimizer = Aws::ComputeOptimizer::Client.new
|
28
|
-
# resp = compute_optimizer.
|
30
|
+
# resp = compute_optimizer.describe_recommendation_export_jobs(params)
|
29
31
|
#
|
30
32
|
# See {Client} for more information.
|
31
33
|
#
|
@@ -42,9 +44,9 @@ require_relative 'aws-sdk-computeoptimizer/customizations'
|
|
42
44
|
#
|
43
45
|
# See {Errors} for more information.
|
44
46
|
#
|
45
|
-
#
|
47
|
+
# @!group service
|
46
48
|
module Aws::ComputeOptimizer
|
47
49
|
|
48
|
-
GEM_VERSION = '1.
|
50
|
+
GEM_VERSION = '1.6.0'
|
49
51
|
|
50
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,6 +26,7 @@ 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
|
|
@@ -69,6 +72,7 @@ module Aws::ComputeOptimizer
|
|
69
72
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
70
73
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
71
74
|
add_plugin(Aws::Plugins::TransferEncoding)
|
75
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
72
76
|
add_plugin(Aws::Plugins::SignatureV4)
|
73
77
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
74
78
|
|
@@ -81,13 +85,28 @@ module Aws::ComputeOptimizer
|
|
81
85
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
82
86
|
# credentials.
|
83
87
|
#
|
88
|
+
# * `Aws::SharedCredentials` - Used for loading static credentials from a
|
89
|
+
# shared file, such as `~/.aws/config`.
|
90
|
+
#
|
91
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
92
|
+
#
|
93
|
+
# * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
|
94
|
+
# assume a role after providing credentials via the web.
|
95
|
+
#
|
96
|
+
# * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
|
97
|
+
# access token generated from `aws login`.
|
98
|
+
#
|
99
|
+
# * `Aws::ProcessCredentials` - Used for loading credentials from a
|
100
|
+
# process that outputs to stdout.
|
101
|
+
#
|
84
102
|
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
85
103
|
# from an EC2 IMDS on an EC2 instance.
|
86
104
|
#
|
87
|
-
# * `Aws::
|
88
|
-
#
|
105
|
+
# * `Aws::ECSCredentials` - Used for loading credentials from
|
106
|
+
# instances running in ECS.
|
89
107
|
#
|
90
|
-
# * `Aws::
|
108
|
+
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
109
|
+
# from the Cognito Identity service.
|
91
110
|
#
|
92
111
|
# When `:credentials` are not configured directly, the following
|
93
112
|
# locations will be searched for credentials:
|
@@ -97,15 +116,15 @@ module Aws::ComputeOptimizer
|
|
97
116
|
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
98
117
|
# * `~/.aws/credentials`
|
99
118
|
# * `~/.aws/config`
|
100
|
-
# * EC2 IMDS instance profile - When used by default, the timeouts
|
101
|
-
# very aggressive. Construct and pass an instance of
|
102
|
-
# `Aws::InstanceProfileCredentails`
|
103
|
-
# timeouts.
|
119
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
120
|
+
# are very aggressive. Construct and pass an instance of
|
121
|
+
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
122
|
+
# enable retries and extended timeouts.
|
104
123
|
#
|
105
124
|
# @option options [required, String] :region
|
106
125
|
# The AWS region to connect to. The configured `:region` is
|
107
126
|
# used to determine the service `:endpoint`. When not passed,
|
108
|
-
# a default `:region` is
|
127
|
+
# a default `:region` is searched for in the following locations:
|
109
128
|
#
|
110
129
|
# * `Aws.config[:region]`
|
111
130
|
# * `ENV['AWS_REGION']`
|
@@ -161,7 +180,7 @@ module Aws::ComputeOptimizer
|
|
161
180
|
# @option options [String] :endpoint
|
162
181
|
# The client endpoint is normally constructed from the `:region`
|
163
182
|
# option. You should only configure an `:endpoint` when connecting
|
164
|
-
# to test endpoints. This should be
|
183
|
+
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
165
184
|
#
|
166
185
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
167
186
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -176,7 +195,7 @@ module Aws::ComputeOptimizer
|
|
176
195
|
# requests fetching endpoints information. Defaults to 60 sec.
|
177
196
|
#
|
178
197
|
# @option options [Boolean] :endpoint_discovery (false)
|
179
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
198
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
180
199
|
#
|
181
200
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
182
201
|
# The log formatter.
|
@@ -279,8 +298,7 @@ module Aws::ComputeOptimizer
|
|
279
298
|
#
|
280
299
|
# @option options [Integer] :http_read_timeout (60) The default
|
281
300
|
# number of seconds to wait for response data. This value can
|
282
|
-
# safely be set
|
283
|
-
# per-request on the session yielded by {#session_for}.
|
301
|
+
# safely be set per-request on the session.
|
284
302
|
#
|
285
303
|
# @option options [Float] :http_idle_timeout (5) The number of
|
286
304
|
# seconds a connection is allowed to sit idle before it is
|
@@ -292,7 +310,7 @@ module Aws::ComputeOptimizer
|
|
292
310
|
# request body. This option has no effect unless the request has
|
293
311
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
294
312
|
# disables this behaviour. This value can safely be set per
|
295
|
-
# request on the session
|
313
|
+
# request on the session.
|
296
314
|
#
|
297
315
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
298
316
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -319,6 +337,309 @@ module Aws::ComputeOptimizer
|
|
319
337
|
|
320
338
|
# @!group API Operations
|
321
339
|
|
340
|
+
# Describes recommendation export jobs created in the last seven days.
|
341
|
+
#
|
342
|
+
# Use the `ExportAutoScalingGroupRecommendations` or
|
343
|
+
# `ExportEC2InstanceRecommendations` actions to request an export of
|
344
|
+
# your recommendations. Then use the `DescribeRecommendationExportJobs`
|
345
|
+
# action to view your export jobs.
|
346
|
+
#
|
347
|
+
# @option params [Array<String>] :job_ids
|
348
|
+
# The identification numbers of the export jobs to return.
|
349
|
+
#
|
350
|
+
# An export job ID is returned when you create an export using the
|
351
|
+
# `ExportAutoScalingGroupRecommendations` or
|
352
|
+
# `ExportEC2InstanceRecommendations` actions.
|
353
|
+
#
|
354
|
+
# All export jobs created in the last seven days are returned if this
|
355
|
+
# parameter is omitted.
|
356
|
+
#
|
357
|
+
# @option params [Array<Types::JobFilter>] :filters
|
358
|
+
# An array of objects that describe a filter to return a more specific
|
359
|
+
# list of export jobs.
|
360
|
+
#
|
361
|
+
# @option params [String] :next_token
|
362
|
+
# The token to advance to the next page of export jobs.
|
363
|
+
#
|
364
|
+
# @option params [Integer] :max_results
|
365
|
+
# The maximum number of export jobs to return with a single request.
|
366
|
+
#
|
367
|
+
# To retrieve the remaining results, make another request with the
|
368
|
+
# returned `NextToken` value.
|
369
|
+
#
|
370
|
+
# @return [Types::DescribeRecommendationExportJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
371
|
+
#
|
372
|
+
# * {Types::DescribeRecommendationExportJobsResponse#recommendation_export_jobs #recommendation_export_jobs} => Array<Types::RecommendationExportJob>
|
373
|
+
# * {Types::DescribeRecommendationExportJobsResponse#next_token #next_token} => String
|
374
|
+
#
|
375
|
+
# @example Request syntax with placeholder values
|
376
|
+
#
|
377
|
+
# resp = client.describe_recommendation_export_jobs({
|
378
|
+
# job_ids: ["JobId"],
|
379
|
+
# filters: [
|
380
|
+
# {
|
381
|
+
# name: "ResourceType", # accepts ResourceType, JobStatus
|
382
|
+
# values: ["FilterValue"],
|
383
|
+
# },
|
384
|
+
# ],
|
385
|
+
# next_token: "NextToken",
|
386
|
+
# max_results: 1,
|
387
|
+
# })
|
388
|
+
#
|
389
|
+
# @example Response structure
|
390
|
+
#
|
391
|
+
# resp.recommendation_export_jobs #=> Array
|
392
|
+
# resp.recommendation_export_jobs[0].job_id #=> String
|
393
|
+
# resp.recommendation_export_jobs[0].destination.s3.bucket #=> String
|
394
|
+
# resp.recommendation_export_jobs[0].destination.s3.key #=> String
|
395
|
+
# resp.recommendation_export_jobs[0].destination.s3.metadata_key #=> String
|
396
|
+
# resp.recommendation_export_jobs[0].resource_type #=> String, one of "Ec2Instance", "AutoScalingGroup"
|
397
|
+
# resp.recommendation_export_jobs[0].status #=> String, one of "Queued", "InProgress", "Complete", "Failed"
|
398
|
+
# resp.recommendation_export_jobs[0].creation_timestamp #=> Time
|
399
|
+
# resp.recommendation_export_jobs[0].last_updated_timestamp #=> Time
|
400
|
+
# resp.recommendation_export_jobs[0].failure_reason #=> String
|
401
|
+
# resp.next_token #=> String
|
402
|
+
#
|
403
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/DescribeRecommendationExportJobs AWS API Documentation
|
404
|
+
#
|
405
|
+
# @overload describe_recommendation_export_jobs(params = {})
|
406
|
+
# @param [Hash] params ({})
|
407
|
+
def describe_recommendation_export_jobs(params = {}, options = {})
|
408
|
+
req = build_request(:describe_recommendation_export_jobs, params)
|
409
|
+
req.send_request(options)
|
410
|
+
end
|
411
|
+
|
412
|
+
# Exports optimization recommendations for Auto Scaling groups.
|
413
|
+
#
|
414
|
+
# Recommendations are exported in a comma-separated values (.csv) file,
|
415
|
+
# and its metadata in a JavaScript Object Notation (.json) file, to an
|
416
|
+
# existing Amazon Simple Storage Service (Amazon S3) bucket that you
|
417
|
+
# specify. For more information, see [Exporting Recommendations][1] in
|
418
|
+
# the *Compute Optimizer User Guide*.
|
419
|
+
#
|
420
|
+
# You can have only one Auto Scaling group export job in progress per
|
421
|
+
# AWS Region.
|
422
|
+
#
|
423
|
+
#
|
424
|
+
#
|
425
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html
|
426
|
+
#
|
427
|
+
# @option params [Array<String>] :account_ids
|
428
|
+
# The IDs of the AWS accounts for which to export Auto Scaling group
|
429
|
+
# recommendations.
|
430
|
+
#
|
431
|
+
# If your account is the master account of an organization, use this
|
432
|
+
# parameter to specify the member accounts for which you want to export
|
433
|
+
# recommendations.
|
434
|
+
#
|
435
|
+
# This parameter cannot be specified together with the include member
|
436
|
+
# accounts parameter. The parameters are mutually exclusive.
|
437
|
+
#
|
438
|
+
# Recommendations for member accounts are not included in the export if
|
439
|
+
# this parameter, or the include member accounts parameter, is omitted.
|
440
|
+
#
|
441
|
+
# You can specify multiple account IDs per request.
|
442
|
+
#
|
443
|
+
# @option params [Array<Types::Filter>] :filters
|
444
|
+
# An array of objects that describe a filter to export a more specific
|
445
|
+
# set of Auto Scaling group recommendations.
|
446
|
+
#
|
447
|
+
# @option params [Array<String>] :fields_to_export
|
448
|
+
# The recommendations data to include in the export file.
|
449
|
+
#
|
450
|
+
# @option params [required, Types::S3DestinationConfig] :s3_destination_config
|
451
|
+
# An object to specify the destination Amazon Simple Storage Service
|
452
|
+
# (Amazon S3) bucket name and key prefix for the export job.
|
453
|
+
#
|
454
|
+
# You must create the destination Amazon S3 bucket for your
|
455
|
+
# recommendations export before you create the export job. Compute
|
456
|
+
# Optimizer does not create the S3 bucket for you. After you create the
|
457
|
+
# S3 bucket, ensure that it has the required permission policy to allow
|
458
|
+
# Compute Optimizer to write the export file to it. If you plan to
|
459
|
+
# specify an object prefix when you create the export job, you must
|
460
|
+
# include the object prefix in the policy that you add to the S3 bucket.
|
461
|
+
# For more information, see [Amazon S3 Bucket Policy for Compute
|
462
|
+
# Optimizer][1] in the *Compute Optimizer user guide*.
|
463
|
+
#
|
464
|
+
#
|
465
|
+
#
|
466
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html
|
467
|
+
#
|
468
|
+
# @option params [String] :file_format
|
469
|
+
# The format of the export file.
|
470
|
+
#
|
471
|
+
# The only export file format currently supported is `Csv`.
|
472
|
+
#
|
473
|
+
# @option params [Boolean] :include_member_accounts
|
474
|
+
# Indicates whether to include recommendations for resources in all
|
475
|
+
# member accounts of the organization if your account is the master
|
476
|
+
# account of an organization.
|
477
|
+
#
|
478
|
+
# The member accounts must also be opted in to Compute Optimizer.
|
479
|
+
#
|
480
|
+
# Recommendations for member accounts of the organization are not
|
481
|
+
# included in the export file if this parameter is omitted.
|
482
|
+
#
|
483
|
+
# This parameter cannot be specified together with the account IDs
|
484
|
+
# parameter. The parameters are mutually exclusive.
|
485
|
+
#
|
486
|
+
# Recommendations for member accounts are not included in the export if
|
487
|
+
# this parameter, or the account IDs parameter, is omitted.
|
488
|
+
#
|
489
|
+
# @return [Types::ExportAutoScalingGroupRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
490
|
+
#
|
491
|
+
# * {Types::ExportAutoScalingGroupRecommendationsResponse#job_id #job_id} => String
|
492
|
+
# * {Types::ExportAutoScalingGroupRecommendationsResponse#s3_destination #s3_destination} => Types::S3Destination
|
493
|
+
#
|
494
|
+
# @example Request syntax with placeholder values
|
495
|
+
#
|
496
|
+
# resp = client.export_auto_scaling_group_recommendations({
|
497
|
+
# account_ids: ["AccountId"],
|
498
|
+
# filters: [
|
499
|
+
# {
|
500
|
+
# name: "Finding", # accepts Finding, RecommendationSourceType
|
501
|
+
# values: ["FilterValue"],
|
502
|
+
# },
|
503
|
+
# ],
|
504
|
+
# 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
|
505
|
+
# s3_destination_config: { # required
|
506
|
+
# bucket: "DestinationBucket",
|
507
|
+
# key_prefix: "DestinationKeyPrefix",
|
508
|
+
# },
|
509
|
+
# file_format: "Csv", # accepts Csv
|
510
|
+
# include_member_accounts: false,
|
511
|
+
# })
|
512
|
+
#
|
513
|
+
# @example Response structure
|
514
|
+
#
|
515
|
+
# resp.job_id #=> String
|
516
|
+
# resp.s3_destination.bucket #=> String
|
517
|
+
# resp.s3_destination.key #=> String
|
518
|
+
# resp.s3_destination.metadata_key #=> String
|
519
|
+
#
|
520
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/ExportAutoScalingGroupRecommendations AWS API Documentation
|
521
|
+
#
|
522
|
+
# @overload export_auto_scaling_group_recommendations(params = {})
|
523
|
+
# @param [Hash] params ({})
|
524
|
+
def export_auto_scaling_group_recommendations(params = {}, options = {})
|
525
|
+
req = build_request(:export_auto_scaling_group_recommendations, params)
|
526
|
+
req.send_request(options)
|
527
|
+
end
|
528
|
+
|
529
|
+
# Exports optimization recommendations for Amazon EC2 instances.
|
530
|
+
#
|
531
|
+
# Recommendations are exported in a comma-separated values (.csv) file,
|
532
|
+
# and its metadata in a JavaScript Object Notation (.json) file, to an
|
533
|
+
# existing Amazon Simple Storage Service (Amazon S3) bucket that you
|
534
|
+
# specify. For more information, see [Exporting Recommendations][1] in
|
535
|
+
# the *Compute Optimizer User Guide*.
|
536
|
+
#
|
537
|
+
# You can have only one Amazon EC2 instance export job in progress per
|
538
|
+
# AWS Region.
|
539
|
+
#
|
540
|
+
#
|
541
|
+
#
|
542
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html
|
543
|
+
#
|
544
|
+
# @option params [Array<String>] :account_ids
|
545
|
+
# The IDs of the AWS accounts for which to export instance
|
546
|
+
# recommendations.
|
547
|
+
#
|
548
|
+
# If your account is the master account of an organization, use this
|
549
|
+
# parameter to specify the member accounts for which you want to export
|
550
|
+
# recommendations.
|
551
|
+
#
|
552
|
+
# This parameter cannot be specified together with the include member
|
553
|
+
# accounts parameter. The parameters are mutually exclusive.
|
554
|
+
#
|
555
|
+
# Recommendations for member accounts are not included in the export if
|
556
|
+
# this parameter, or the include member accounts parameter, is omitted.
|
557
|
+
#
|
558
|
+
# You can specify multiple account IDs per request.
|
559
|
+
#
|
560
|
+
# @option params [Array<Types::Filter>] :filters
|
561
|
+
# An array of objects that describe a filter to export a more specific
|
562
|
+
# set of instance recommendations.
|
563
|
+
#
|
564
|
+
# @option params [Array<String>] :fields_to_export
|
565
|
+
# The recommendations data to include in the export file.
|
566
|
+
#
|
567
|
+
# @option params [required, Types::S3DestinationConfig] :s3_destination_config
|
568
|
+
# An object to specify the destination Amazon Simple Storage Service
|
569
|
+
# (Amazon S3) bucket name and key prefix for the export job.
|
570
|
+
#
|
571
|
+
# You must create the destination Amazon S3 bucket for your
|
572
|
+
# recommendations export before you create the export job. Compute
|
573
|
+
# Optimizer does not create the S3 bucket for you. After you create the
|
574
|
+
# S3 bucket, ensure that it has the required permission policy to allow
|
575
|
+
# Compute Optimizer to write the export file to it. If you plan to
|
576
|
+
# specify an object prefix when you create the export job, you must
|
577
|
+
# include the object prefix in the policy that you add to the S3 bucket.
|
578
|
+
# For more information, see [Amazon S3 Bucket Policy for Compute
|
579
|
+
# Optimizer][1] in the *Compute Optimizer user guide*.
|
580
|
+
#
|
581
|
+
#
|
582
|
+
#
|
583
|
+
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html
|
584
|
+
#
|
585
|
+
# @option params [String] :file_format
|
586
|
+
# The format of the export file.
|
587
|
+
#
|
588
|
+
# The only export file format currently supported is `Csv`.
|
589
|
+
#
|
590
|
+
# @option params [Boolean] :include_member_accounts
|
591
|
+
# Indicates whether to include recommendations for resources in all
|
592
|
+
# member accounts of the organization if your account is the master
|
593
|
+
# account of an organization.
|
594
|
+
#
|
595
|
+
# The member accounts must also be opted in to Compute Optimizer.
|
596
|
+
#
|
597
|
+
# Recommendations for member accounts of the organization are not
|
598
|
+
# included in the export file if this parameter is omitted.
|
599
|
+
#
|
600
|
+
# Recommendations for member accounts are not included in the export if
|
601
|
+
# this parameter, or the account IDs parameter, is omitted.
|
602
|
+
#
|
603
|
+
# @return [Types::ExportEC2InstanceRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
604
|
+
#
|
605
|
+
# * {Types::ExportEC2InstanceRecommendationsResponse#job_id #job_id} => String
|
606
|
+
# * {Types::ExportEC2InstanceRecommendationsResponse#s3_destination #s3_destination} => Types::S3Destination
|
607
|
+
#
|
608
|
+
# @example Request syntax with placeholder values
|
609
|
+
#
|
610
|
+
# resp = client.export_ec2_instance_recommendations({
|
611
|
+
# account_ids: ["AccountId"],
|
612
|
+
# filters: [
|
613
|
+
# {
|
614
|
+
# name: "Finding", # accepts Finding, RecommendationSourceType
|
615
|
+
# values: ["FilterValue"],
|
616
|
+
# },
|
617
|
+
# ],
|
618
|
+
# 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
|
619
|
+
# s3_destination_config: { # required
|
620
|
+
# bucket: "DestinationBucket",
|
621
|
+
# key_prefix: "DestinationKeyPrefix",
|
622
|
+
# },
|
623
|
+
# file_format: "Csv", # accepts Csv
|
624
|
+
# include_member_accounts: false,
|
625
|
+
# })
|
626
|
+
#
|
627
|
+
# @example Response structure
|
628
|
+
#
|
629
|
+
# resp.job_id #=> String
|
630
|
+
# resp.s3_destination.bucket #=> String
|
631
|
+
# resp.s3_destination.key #=> String
|
632
|
+
# resp.s3_destination.metadata_key #=> String
|
633
|
+
#
|
634
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/ExportEC2InstanceRecommendations AWS API Documentation
|
635
|
+
#
|
636
|
+
# @overload export_ec2_instance_recommendations(params = {})
|
637
|
+
# @param [Hash] params ({})
|
638
|
+
def export_ec2_instance_recommendations(params = {}, options = {})
|
639
|
+
req = build_request(:export_ec2_instance_recommendations, params)
|
640
|
+
req.send_request(options)
|
641
|
+
end
|
642
|
+
|
322
643
|
# Returns Auto Scaling group recommendations.
|
323
644
|
#
|
324
645
|
# AWS Compute Optimizer currently generates recommendations for Auto
|
@@ -335,9 +656,13 @@ module Aws::ComputeOptimizer
|
|
335
656
|
# [1]: https://docs.aws.amazon.com/compute-optimizer/latest/ug/what-is.html
|
336
657
|
#
|
337
658
|
# @option params [Array<String>] :account_ids
|
338
|
-
# The AWS
|
659
|
+
# The IDs of the AWS accounts for which to return Auto Scaling group
|
339
660
|
# recommendations.
|
340
661
|
#
|
662
|
+
# If your account is the master account of an organization, use this
|
663
|
+
# parameter to specify the member accounts for which you want to return
|
664
|
+
# Auto Scaling group recommendations.
|
665
|
+
#
|
341
666
|
# Only one account ID can be specified per request.
|
342
667
|
#
|
343
668
|
# @option params [Array<String>] :auto_scaling_group_arns
|
@@ -350,10 +675,10 @@ module Aws::ComputeOptimizer
|
|
350
675
|
#
|
351
676
|
# @option params [Integer] :max_results
|
352
677
|
# The maximum number of Auto Scaling group recommendations to return
|
353
|
-
# with a single
|
678
|
+
# with a single request.
|
354
679
|
#
|
355
|
-
# To retrieve the remaining results, make another
|
356
|
-
# `NextToken` value.
|
680
|
+
# To retrieve the remaining results, make another request with the
|
681
|
+
# returned `NextToken` value.
|
357
682
|
#
|
358
683
|
# @option params [Array<Types::Filter>] :filters
|
359
684
|
# An array of objects that describe a filter that returns a more
|
@@ -443,17 +768,22 @@ module Aws::ComputeOptimizer
|
|
443
768
|
#
|
444
769
|
# @option params [Integer] :max_results
|
445
770
|
# The maximum number of instance recommendations to return with a single
|
446
|
-
#
|
771
|
+
# request.
|
447
772
|
#
|
448
|
-
# To retrieve the remaining results, make another
|
449
|
-
# `NextToken` value.
|
773
|
+
# To retrieve the remaining results, make another request with the
|
774
|
+
# returned `NextToken` value.
|
450
775
|
#
|
451
776
|
# @option params [Array<Types::Filter>] :filters
|
452
777
|
# An array of objects that describe a filter that returns a more
|
453
778
|
# specific list of instance recommendations.
|
454
779
|
#
|
455
780
|
# @option params [Array<String>] :account_ids
|
456
|
-
# The AWS
|
781
|
+
# The IDs of the AWS accounts for which to return instance
|
782
|
+
# recommendations.
|
783
|
+
#
|
784
|
+
# If your account is the master account of an organization, use this
|
785
|
+
# parameter to specify the member accounts for which you want to return
|
786
|
+
# instance recommendations.
|
457
787
|
#
|
458
788
|
# Only one account ID can be specified per request.
|
459
789
|
#
|
@@ -575,7 +905,7 @@ module Aws::ComputeOptimizer
|
|
575
905
|
# Returns the enrollment (opt in) status of an account to the AWS
|
576
906
|
# Compute Optimizer service.
|
577
907
|
#
|
578
|
-
# If the account is
|
908
|
+
# If the account is the master account of an organization, this action
|
579
909
|
# also confirms the enrollment status of member accounts within the
|
580
910
|
# organization.
|
581
911
|
#
|
@@ -608,7 +938,12 @@ module Aws::ComputeOptimizer
|
|
608
938
|
# not optimized, or optimized.
|
609
939
|
#
|
610
940
|
# @option params [Array<String>] :account_ids
|
611
|
-
# The AWS
|
941
|
+
# The IDs of the AWS accounts for which to return recommendation
|
942
|
+
# summaries.
|
943
|
+
#
|
944
|
+
# If your account is the master account of an organization, use this
|
945
|
+
# parameter to specify the member accounts for which you want to return
|
946
|
+
# recommendation summaries.
|
612
947
|
#
|
613
948
|
# Only one account ID can be specified per request.
|
614
949
|
#
|
@@ -617,10 +952,10 @@ module Aws::ComputeOptimizer
|
|
617
952
|
#
|
618
953
|
# @option params [Integer] :max_results
|
619
954
|
# The maximum number of recommendation summaries to return with a single
|
620
|
-
#
|
955
|
+
# request.
|
621
956
|
#
|
622
|
-
# To retrieve the remaining results, make another
|
623
|
-
# `NextToken` value.
|
957
|
+
# To retrieve the remaining results, make another request with the
|
958
|
+
# returned `NextToken` value.
|
624
959
|
#
|
625
960
|
# @return [Types::GetRecommendationSummariesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
626
961
|
#
|
@@ -657,8 +992,8 @@ module Aws::ComputeOptimizer
|
|
657
992
|
# Updates the enrollment (opt in) status of an account to the AWS
|
658
993
|
# Compute Optimizer service.
|
659
994
|
#
|
660
|
-
# If the account is a master account of an organization, this
|
661
|
-
#
|
995
|
+
# If the account is a master account of an organization, this action can
|
996
|
+
# also be used to enroll member accounts within the organization.
|
662
997
|
#
|
663
998
|
# @option params [required, String] :status
|
664
999
|
# The new enrollment status of the account.
|
@@ -667,8 +1002,8 @@ module Aws::ComputeOptimizer
|
|
667
1002
|
# `Pending` or `Failed` are specified.
|
668
1003
|
#
|
669
1004
|
# @option params [Boolean] :include_member_accounts
|
670
|
-
# Indicates whether to enroll member accounts
|
671
|
-
#
|
1005
|
+
# Indicates whether to enroll member accounts of the organization if the
|
1006
|
+
# your account is the master account of an organization.
|
672
1007
|
#
|
673
1008
|
# @return [Types::UpdateEnrollmentStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
674
1009
|
#
|
@@ -709,7 +1044,7 @@ module Aws::ComputeOptimizer
|
|
709
1044
|
params: params,
|
710
1045
|
config: config)
|
711
1046
|
context[:gem_name] = 'aws-sdk-computeoptimizer'
|
712
|
-
context[:gem_version] = '1.
|
1047
|
+
context[:gem_version] = '1.6.0'
|
713
1048
|
Seahorse::Client::Request.new(handlers, context)
|
714
1049
|
end
|
715
1050
|
|