Skip to content

Get Ec2 Instance Recommendations

computeoptimizer_get_ec2_instance_recommendations R Documentation

Returns Amazon EC2 instance recommendations

Description

Returns Amazon EC2 instance recommendations.

Compute Optimizer generates recommendations for Amazon Elastic Compute Cloud (Amazon EC2) instances that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.

Usage

computeoptimizer_get_ec2_instance_recommendations(instanceArns,
  nextToken, maxResults, filters, accountIds, recommendationPreferences)

Arguments

instanceArns

The Amazon Resource Name (ARN) of the instances for which to return recommendations.

nextToken

The token to advance to the next page of instance recommendations.

maxResults

The maximum number of instance recommendations to return with a single request.

To retrieve the remaining results, make another request with the returned nextToken value.

filters

An array of objects to specify a filter that returns a more specific list of instance recommendations.

accountIds

The ID of the Amazon Web Services account for which to return instance recommendations.

If your account is the management account of an organization, use this parameter to specify the member account for which you want to return instance recommendations.

Only one account ID can be specified per request.

recommendationPreferences

An object to specify the preferences for the Amazon EC2 instance recommendations to return in the response.

Value

A list with the following syntax:

list(
  nextToken = "string",
  instanceRecommendations = list(
    list(
      instanceArn = "string",
      accountId = "string",
      instanceName = "string",
      currentInstanceType = "string",
      finding = "Underprovisioned"|"Overprovisioned"|"Optimized"|"NotOptimized",
      findingReasonCodes = list(
        "CPUOverprovisioned"|"CPUUnderprovisioned"|"MemoryOverprovisioned"|"MemoryUnderprovisioned"|"EBSThroughputOverprovisioned"|"EBSThroughputUnderprovisioned"|"EBSIOPSOverprovisioned"|"EBSIOPSUnderprovisioned"|"NetworkBandwidthOverprovisioned"|"NetworkBandwidthUnderprovisioned"|"NetworkPPSOverprovisioned"|"NetworkPPSUnderprovisioned"|"DiskIOPSOverprovisioned"|"DiskIOPSUnderprovisioned"|"DiskThroughputOverprovisioned"|"DiskThroughputUnderprovisioned"|"GPUUnderprovisioned"|"GPUOverprovisioned"|"GPUMemoryUnderprovisioned"|"GPUMemoryOverprovisioned"
      ),
      utilizationMetrics = list(
        list(
          name = "Cpu"|"Memory"|"EBS_READ_OPS_PER_SECOND"|"EBS_WRITE_OPS_PER_SECOND"|"EBS_READ_BYTES_PER_SECOND"|"EBS_WRITE_BYTES_PER_SECOND"|"DISK_READ_OPS_PER_SECOND"|"DISK_WRITE_OPS_PER_SECOND"|"DISK_READ_BYTES_PER_SECOND"|"DISK_WRITE_BYTES_PER_SECOND"|"NETWORK_IN_BYTES_PER_SECOND"|"NETWORK_OUT_BYTES_PER_SECOND"|"NETWORK_PACKETS_IN_PER_SECOND"|"NETWORK_PACKETS_OUT_PER_SECOND"|"GPU_PERCENTAGE"|"GPU_MEMORY_PERCENTAGE",
          statistic = "Maximum"|"Average",
          value = 123.0
        )
      ),
      lookBackPeriodInDays = 123.0,
      recommendationOptions = list(
        list(
          instanceType = "string",
          instanceGpuInfo = list(
            gpus = list(
              list(
                gpuCount = 123,
                gpuMemorySizeInMiB = 123
              )
            )
          ),
          projectedUtilizationMetrics = list(
            list(
              name = "Cpu"|"Memory"|"EBS_READ_OPS_PER_SECOND"|"EBS_WRITE_OPS_PER_SECOND"|"EBS_READ_BYTES_PER_SECOND"|"EBS_WRITE_BYTES_PER_SECOND"|"DISK_READ_OPS_PER_SECOND"|"DISK_WRITE_OPS_PER_SECOND"|"DISK_READ_BYTES_PER_SECOND"|"DISK_WRITE_BYTES_PER_SECOND"|"NETWORK_IN_BYTES_PER_SECOND"|"NETWORK_OUT_BYTES_PER_SECOND"|"NETWORK_PACKETS_IN_PER_SECOND"|"NETWORK_PACKETS_OUT_PER_SECOND"|"GPU_PERCENTAGE"|"GPU_MEMORY_PERCENTAGE",
              statistic = "Maximum"|"Average",
              value = 123.0
            )
          ),
          platformDifferences = list(
            "Hypervisor"|"NetworkInterface"|"StorageInterface"|"InstanceStoreAvailability"|"VirtualizationType"|"Architecture"
          ),
          performanceRisk = 123.0,
          rank = 123,
          savingsOpportunity = list(
            savingsOpportunityPercentage = 123.0,
            estimatedMonthlySavings = list(
              currency = "USD"|"CNY",
              value = 123.0
            )
          ),
          savingsOpportunityAfterDiscounts = list(
            savingsOpportunityPercentage = 123.0,
            estimatedMonthlySavings = list(
              currency = "USD"|"CNY",
              value = 123.0
            )
          ),
          migrationEffort = "VeryLow"|"Low"|"Medium"|"High"
        )
      ),
      recommendationSources = list(
        list(
          recommendationSourceArn = "string",
          recommendationSourceType = "Ec2Instance"|"AutoScalingGroup"|"EbsVolume"|"LambdaFunction"|"EcsService"|"License"|"RdsDBInstance"|"RdsDBInstanceStorage"
        )
      ),
      lastRefreshTimestamp = as.POSIXct(
        "2015-01-01"
      ),
      currentPerformanceRisk = "VeryLow"|"Low"|"Medium"|"High",
      effectiveRecommendationPreferences = list(
        cpuVendorArchitectures = list(
          "AWS_ARM64"|"CURRENT"
        ),
        enhancedInfrastructureMetrics = "Active"|"Inactive",
        inferredWorkloadTypes = "Active"|"Inactive",
        externalMetricsPreference = list(
          source = "Datadog"|"Dynatrace"|"NewRelic"|"Instana"
        ),
        lookBackPeriod = "DAYS_14"|"DAYS_32"|"DAYS_93",
        utilizationPreferences = list(
          list(
            metricName = "CpuUtilization"|"MemoryUtilization",
            metricParameters = list(
              threshold = "P90"|"P95"|"P99_5",
              headroom = "PERCENT_30"|"PERCENT_20"|"PERCENT_10"|"PERCENT_0"
            )
          )
        ),
        preferredResources = list(
          list(
            name = "Ec2InstanceTypes",
            includeList = list(
              "string"
            ),
            effectiveIncludeList = list(
              "string"
            ),
            excludeList = list(
              "string"
            )
          )
        ),
        savingsEstimationMode = list(
          source = "PublicPricing"|"CostExplorerRightsizing"|"CostOptimizationHub"
        )
      ),
      inferredWorkloadTypes = list(
        "AmazonEmr"|"ApacheCassandra"|"ApacheHadoop"|"Memcached"|"Nginx"|"PostgreSql"|"Redis"|"Kafka"|"SQLServer"
      ),
      instanceState = "pending"|"running"|"shutting-down"|"terminated"|"stopping"|"stopped",
      tags = list(
        list(
          key = "string",
          value = "string"
        )
      ),
      externalMetricStatus = list(
        statusCode = "NO_EXTERNAL_METRIC_SET"|"INTEGRATION_SUCCESS"|"DATADOG_INTEGRATION_ERROR"|"DYNATRACE_INTEGRATION_ERROR"|"NEWRELIC_INTEGRATION_ERROR"|"INSTANA_INTEGRATION_ERROR"|"INSUFFICIENT_DATADOG_METRICS"|"INSUFFICIENT_DYNATRACE_METRICS"|"INSUFFICIENT_NEWRELIC_METRICS"|"INSUFFICIENT_INSTANA_METRICS",
        statusReason = "string"
      ),
      currentInstanceGpuInfo = list(
        gpus = list(
          list(
            gpuCount = 123,
            gpuMemorySizeInMiB = 123
          )
        )
      ),
      idle = "True"|"False"
    )
  ),
  errors = list(
    list(
      identifier = "string",
      code = "string",
      message = "string"
    )
  )
)

Request syntax

svc$get_ec2_instance_recommendations(
  instanceArns = list(
    "string"
  ),
  nextToken = "string",
  maxResults = 123,
  filters = list(
    list(
      name = "Finding"|"FindingReasonCodes"|"RecommendationSourceType"|"InferredWorkloadTypes",
      values = list(
        "string"
      )
    )
  ),
  accountIds = list(
    "string"
  ),
  recommendationPreferences = list(
    cpuVendorArchitectures = list(
      "AWS_ARM64"|"CURRENT"
    )
  )
)