Client library for AWS Compute Optimizer
npm install --save @datafire/amazonaws_compute_optimizer
let amazonaws_compute_optimizer = require('@datafire/amazonaws_compute_optimizer').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});
.then(data => {
console.log(data);
});
AWS Compute Optimizer is a service that analyzes the configuration and utilization metrics of your AWS compute resources, such as EC2 instances, Auto Scaling groups, and Amazon EBS volumes. It reports whether your resources are optimal, and generates optimization recommendations to reduce the cost and improve the performance of your workloads. Compute Optimizer also provides recent utilization metric data, as well as projected utilization metric data for the recommendations, which you can use to evaluate which recommendation provides the best price-performance trade-off. The analysis of your usage patterns can help you decide when to move or resize your running resources, and still meet your performance and capacity requirements. For more information about Compute Optimizer, including the required permissions to use the service, see the AWS Compute Optimizer User Guide.
amazonaws_compute_optimizer.DescribeRecommendationExportJobs({}, context)
amazonaws_compute_optimizer.ExportAutoScalingGroupRecommendations({
"s3DestinationConfig": null
}, context)
- input
object
amazonaws_compute_optimizer.ExportEC2InstanceRecommendations({
"s3DestinationConfig": null
}, context)
- input
object
- accountIds
- items AccountId
- fieldsToExport
- items ExportableInstanceField
- fileFormat
- filters
- items Filter
- includeMemberAccounts
- s3DestinationConfig required
- bucket
- keyPrefix
- accountIds
amazonaws_compute_optimizer.GetAutoScalingGroupRecommendations({}, context)
- input
object
- accountIds
- items AccountId
- autoScalingGroupArns
- items AutoScalingGroupArn
- filters
- items Filter
- maxResults
- nextToken
- accountIds
amazonaws_compute_optimizer.GetEBSVolumeRecommendations({}, context)
- input
object
amazonaws_compute_optimizer.GetEC2InstanceRecommendations({}, context)
- input
object
- accountIds
- items AccountId
- filters
- items Filter
- instanceArns
- items InstanceArn
- maxResults
- nextToken
- accountIds
amazonaws_compute_optimizer.GetEC2RecommendationProjectedMetrics({
"instanceArn": null,
"stat": null,
"period": null,
"startTime": null,
"endTime": null
}, context)
- input
object
- endTime required
- instanceArn required
- period required
- startTime required
- stat required
amazonaws_compute_optimizer.GetEnrollmentStatus({}, context)
- input
object
- output GetEnrollmentStatusResponse
amazonaws_compute_optimizer.GetRecommendationSummaries({}, context)
- input
object
- accountIds
- items AccountId
- maxResults
- nextToken
- accountIds
amazonaws_compute_optimizer.UpdateEnrollmentStatus({
"status": null
}, context)
- input
object
- includeMemberAccounts
- status required
- AccountId
string
- AccountIds
array
- items AccountId
- AutoScalingGroupArn
string
- AutoScalingGroupArns
array
- items AutoScalingGroupArn
- AutoScalingGroupConfiguration
object
: Describes the configuration of an Auto Scaling group.- desiredCapacity
- instanceType
- maxSize
- minSize
- AutoScalingGroupName
string
- AutoScalingGroupRecommendation
object
: Describes an Auto Scaling group recommendation.- accountId
- autoScalingGroupArn
- autoScalingGroupName
- currentConfiguration
- desiredCapacity
- instanceType
- maxSize
- minSize
- finding
- lastRefreshTimestamp
- lookBackPeriodInDays
- recommendationOptions
- utilizationMetrics
- items UtilizationMetric
- AutoScalingGroupRecommendationOption
object
: Describes a recommendation option for an Auto Scaling group.- configuration
- desiredCapacity
- instanceType
- maxSize
- minSize
- performanceRisk
- projectedUtilizationMetrics
- items UtilizationMetric
- rank
- configuration
- AutoScalingGroupRecommendationOptions
array
- AutoScalingGroupRecommendations
array
- Code
string
- CreationTimestamp
string
- CurrentInstanceType
string
- DescribeRecommendationExportJobsRequest
object
- DescribeRecommendationExportJobsResponse
object
- nextToken
- recommendationExportJobs
- items RecommendationExportJob
- DesiredCapacity
integer
- DestinationBucket
string
- DestinationKey
string
- DestinationKeyPrefix
string
- EBSFilter
object
:Describes a filter that returns a more specific list of Amazon Elastic Block Store (Amazon EBS) volume recommendations.
This filter is used with the
GetEBSVolumeRecommendations
action.- name
- values
- items FilterValue
- EBSFilterName
string
(values: Finding)
- EBSFilters
array
- items EBSFilter
- EBSFinding
string
(values: Optimized, NotOptimized)
- EBSMetricName
string
(values: VolumeReadOpsPerSecond, VolumeWriteOpsPerSecond, VolumeReadBytesPerSecond, VolumeWriteBytesPerSecond)
- EBSUtilizationMetric
object
:Describes a utilization metric of an Amazon Elastic Block Store (Amazon EBS) volume.
Compare the utilization metric data of your resource against its projected utilization metric data to determine the performance difference between your current resource and the recommended option.
- name
- statistic
- value
- EBSUtilizationMetrics
array
- items EBSUtilizationMetric
- ExportAutoScalingGroupRecommendationsRequest
object
- ExportAutoScalingGroupRecommendationsResponse
object
- jobId
- s3Destination
- bucket
- key
- metadataKey
- ExportDestination
object
: Describes the destination of the recommendations export and metadata files.- s3
- bucket
- key
- metadataKey
- s3
- ExportEC2InstanceRecommendationsRequest
object
- accountIds
- items AccountId
- fieldsToExport
- items ExportableInstanceField
- fileFormat
- filters
- items Filter
- includeMemberAccounts
- s3DestinationConfig required
- bucket
- keyPrefix
- accountIds
- ExportEC2InstanceRecommendationsResponse
object
- jobId
- s3Destination
- bucket
- key
- metadataKey
- ExportableAutoScalingGroupField
string
(values: AccountId, AutoScalingGroupArn, AutoScalingGroupName, Finding, UtilizationMetricsCpuMaximum, UtilizationMetricsMemoryMaximum, UtilizationMetricsEbsReadOpsPerSecondMaximum, UtilizationMetricsEbsWriteOpsPerSecondMaximum, UtilizationMetricsEbsReadBytesPerSecondMaximum, UtilizationMetricsEbsWriteBytesPerSecondMaximum, 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)
- ExportableAutoScalingGroupFields
array
- ExportableInstanceField
string
(values: AccountId, InstanceArn, InstanceName, Finding, LookbackPeriodInDays, CurrentInstanceType, UtilizationMetricsCpuMaximum, UtilizationMetricsMemoryMaximum, UtilizationMetricsEbsReadOpsPerSecondMaximum, UtilizationMetricsEbsWriteOpsPerSecondMaximum, UtilizationMetricsEbsReadBytesPerSecondMaximum, UtilizationMetricsEbsWriteBytesPerSecondMaximum, CurrentOnDemandPrice, CurrentStandardOneYearNoUpfrontReservedPrice, CurrentStandardThreeYearNoUpfrontReservedPrice, CurrentVCpus, CurrentMemory, CurrentStorage, CurrentNetwork, RecommendationOptionsInstanceType, RecommendationOptionsProjectedUtilizationMetricsCpuMaximum, RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum, RecommendationOptionsPerformanceRisk, RecommendationOptionsVcpus, RecommendationOptionsMemory, RecommendationOptionsStorage, RecommendationOptionsNetwork, RecommendationOptionsOnDemandPrice, RecommendationOptionsStandardOneYearNoUpfrontReservedPrice, RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice, RecommendationsSourcesRecommendationSourceArn, RecommendationsSourcesRecommendationSourceType, LastRefreshTimestamp)
- ExportableInstanceFields
array
- items ExportableInstanceField
- FailureReason
string
- FileFormat
string
(values: Csv)
- Filter
object
:Describes a filter that returns a more specific list of recommendations.
This filter is used with the
GetAutoScalingGroupRecommendations
andGetEC2InstanceRecommendations
actions.- name
- values
- items FilterValue
- FilterName
string
(values: Finding, RecommendationSourceType)
- FilterValue
string
- FilterValues
array
- items FilterValue
- Filters
array
- items Filter
- Finding
string
(values: Underprovisioned, Overprovisioned, Optimized, NotOptimized)
- GetAutoScalingGroupRecommendationsRequest
object
- accountIds
- items AccountId
- autoScalingGroupArns
- items AutoScalingGroupArn
- filters
- items Filter
- maxResults
- nextToken
- accountIds
- GetAutoScalingGroupRecommendationsResponse
object
- autoScalingGroupRecommendations
- errors
- items GetRecommendationError
- nextToken
- GetEBSVolumeRecommendationsRequest
object
- GetEBSVolumeRecommendationsResponse
object
- errors
- items GetRecommendationError
- nextToken
- volumeRecommendations
- items VolumeRecommendation
- errors
- GetEC2InstanceRecommendationsRequest
object
- accountIds
- items AccountId
- filters
- items Filter
- instanceArns
- items InstanceArn
- maxResults
- nextToken
- accountIds
- GetEC2InstanceRecommendationsResponse
object
- errors
- items GetRecommendationError
- instanceRecommendations
- items InstanceRecommendation
- nextToken
- errors
- GetEC2RecommendationProjectedMetricsRequest
object
- endTime required
- instanceArn required
- period required
- startTime required
- stat required
- GetEC2RecommendationProjectedMetricsResponse
object
- recommendedOptionProjectedMetrics
- GetEnrollmentStatusRequest
object
- GetEnrollmentStatusResponse
object
- memberAccountsEnrolled
- status
- statusReason
- GetRecommendationError
object
:Describes an error experienced when getting recommendations.
For example, an error is returned if you request recommendations for an unsupported Auto Scaling group, or if you request recommendations for an instance of an unsupported instance family.
- code
- identifier
- message
- GetRecommendationErrors
array
- items GetRecommendationError
- GetRecommendationSummariesRequest
object
- accountIds
- items AccountId
- maxResults
- nextToken
- accountIds
- GetRecommendationSummariesResponse
object
- nextToken
- recommendationSummaries
- items RecommendationSummary
- Identifier
string
- IncludeMemberAccounts
boolean
- InstanceArn
string
- InstanceArns
array
- items InstanceArn
- InstanceName
string
- InstanceRecommendation
object
: Describes an Amazon EC2 instance recommendation.- accountId
- currentInstanceType
- finding
- instanceArn
- instanceName
- lastRefreshTimestamp
- lookBackPeriodInDays
- recommendationOptions
- recommendationSources
- items RecommendationSource
- utilizationMetrics
- items UtilizationMetric
- InstanceRecommendationOption
object
: Describes a recommendation option for an Amazon EC2 instance.- instanceType
- performanceRisk
- projectedUtilizationMetrics
- items UtilizationMetric
- rank
- InstanceRecommendations
array
- items InstanceRecommendation
- InstanceType
string
- JobFilter
object
:Describes a filter that returns a more specific list of recommendation export jobs.
This filter is used with the
DescribeRecommendationExportJobs
action.- name
- values
- items FilterValue
- JobFilterName
string
(values: ResourceType, JobStatus)
- JobFilters
array
- items JobFilter
- JobId
string
- JobIds
array
- items JobId
- JobStatus
string
(values: Queued, InProgress, Complete, Failed)
- LastRefreshTimestamp
string
- LastUpdatedTimestamp
string
- LookBackPeriodInDays
number
- MaxResults
integer
- MaxSize
integer
- MemberAccountsEnrolled
boolean
- Message
string
- MetadataKey
string
- MetricName
string
(values: Cpu, Memory, EBS_READ_OPS_PER_SECOND, EBS_WRITE_OPS_PER_SECOND, EBS_READ_BYTES_PER_SECOND, EBS_WRITE_BYTES_PER_SECOND)
- MetricStatistic
string
(values: Maximum, Average)
- MetricValue
number
- MetricValues
array
- items MetricValue
- MinSize
integer
- NextToken
string
- PerformanceRisk
number
- Period
integer
- ProjectedMetric
object
:Describes a projected utilization metric of a recommendation option, such as an Amazon EC2 instance. This represents the projected utilization of a recommendation option had you used that resource during the analyzed period.
Compare the utilization metric data of your resource against its projected utilization metric data to determine the performance difference between your current resource and the recommended option.
The
Cpu
andMemory
metrics are the only projected utilization metrics returned when you run theGetEC2RecommendationProjectedMetrics
action. Additionally, theMemory
metric is returned only for resources that have the unified CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.- name
- timestamps
- items Timestamp
- values
- items MetricValue
- ProjectedMetrics
array
- items ProjectedMetric
- ProjectedUtilizationMetrics
array
- items UtilizationMetric
- Rank
integer
- RecommendationExportJob
object
:Describes a recommendation export job.
Use the
DescribeRecommendationExportJobs
action to view your recommendation export jobs.Use the
ExportAutoScalingGroupRecommendations
orExportEC2InstanceRecommendations
actions to request an export of your recommendations.- creationTimestamp
- destination
- s3
- bucket
- key
- metadataKey
- s3
- failureReason
- jobId
- lastUpdatedTimestamp
- resourceType
- status
- RecommendationExportJobs
array
- items RecommendationExportJob
- RecommendationOptions
array
- RecommendationSource
object
: Describes the source of a recommendation, such as an Amazon EC2 instance or Auto Scaling group.- recommendationSourceArn
- recommendationSourceType
- RecommendationSourceArn
string
- RecommendationSourceType
string
(values: Ec2Instance, AutoScalingGroup, EbsVolume)
- RecommendationSources
array
- items RecommendationSource
- RecommendationSummaries
array
- items RecommendationSummary
- RecommendationSummary
object
: A summary of a recommendation.- accountId
- recommendationResourceType
- summaries
- items Summary
- RecommendedInstanceType
string
- RecommendedOptionProjectedMetric
object
:Describes a projected utilization metric of a recommendation option.
The
Cpu
andMemory
metrics are the only projected utilization metrics returned when you run theGetEC2RecommendationProjectedMetrics
action. Additionally, theMemory
metric is returned only for resources that have the unified CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.- projectedMetrics
- items ProjectedMetric
- rank
- recommendedInstanceType
- projectedMetrics
- RecommendedOptionProjectedMetrics
array
- ResourceType
string
(values: Ec2Instance, AutoScalingGroup)
- S3Destination
object
: Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and object keys of a recommendations export file, and its associated metadata file.- bucket
- key
- metadataKey
- S3DestinationConfig
object
:Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and key prefix for a recommendations export job.
You must create the destination Amazon S3 bucket for your recommendations export before you create the export job. Compute Optimizer does not create the S3 bucket for you. After you create the S3 bucket, ensure that it has the required permission policy to allow Compute Optimizer to write the export file to it. If you plan to specify an object prefix when you create the export job, you must include the object prefix in the policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the Compute Optimizer user guide.
- bucket
- keyPrefix
- Status
string
(values: Active, Inactive, Pending, Failed)
- StatusReason
string
- Summaries
array
- items Summary
- Summary
object
: The summary of a recommendation.- name
- value
- SummaryValue
number
- Timestamp
string
- Timestamps
array
- items Timestamp
- UpdateEnrollmentStatusRequest
object
- includeMemberAccounts
- status required
- UpdateEnrollmentStatusResponse
object
- status
- statusReason
- UtilizationMetric
object
:Describes a utilization metric of a resource, such as an Amazon EC2 instance.
Compare the utilization metric data of your resource against its projected utilization metric data to determine the performance difference between your current resource and the recommended option.
- name
- statistic
- value
- UtilizationMetrics
array
- items UtilizationMetric
- VolumeArn
string
- VolumeArns
array
- items VolumeArn
- VolumeBaselineIOPS
integer
- VolumeBaselineThroughput
integer
- VolumeBurstIOPS
integer
- VolumeBurstThroughput
integer
- VolumeConfiguration
object
: Describes the configuration of an Amazon Elastic Block Store (Amazon EBS) volume.- volumeBaselineIOPS
- volumeBaselineThroughput
- volumeBurstIOPS
- volumeBurstThroughput
- volumeSize
- volumeType
- VolumeRecommendation
object
: Describes an Amazon Elastic Block Store (Amazon EBS) volume recommendation.- accountId
- currentConfiguration
- volumeBaselineIOPS
- volumeBaselineThroughput
- volumeBurstIOPS
- volumeBurstThroughput
- volumeSize
- volumeType
- finding
- lastRefreshTimestamp
- lookBackPeriodInDays
- utilizationMetrics
- items EBSUtilizationMetric
- volumeArn
- volumeRecommendationOptions
- VolumeRecommendationOption
object
: Describes a recommendation option for an Amazon Elastic Block Store (Amazon EBS) instance.- configuration
- volumeBaselineIOPS
- volumeBaselineThroughput
- volumeBurstIOPS
- volumeBurstThroughput
- volumeSize
- volumeType
- performanceRisk
- rank
- configuration
- VolumeRecommendationOptions
array
- VolumeRecommendations
array
- items VolumeRecommendation
- VolumeSize
integer
- VolumeType
string