Skip to content

Get Ec2 Recommendation Projected Metrics

computeoptimizer_get_ec2_recommendation_projected_metrics R Documentation

Returns the projected utilization metrics of Amazon EC2 instance recommendations

Description

Returns the projected utilization metrics of Amazon EC2 instance recommendations.

The Cpu and Memory metrics are the only projected utilization metrics returned when you run this action. Additionally, the Memory 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.

Usage

computeoptimizer_get_ec2_recommendation_projected_metrics(instanceArn,
  stat, period, startTime, endTime, recommendationPreferences)

Arguments

instanceArn

[required] The Amazon Resource Name (ARN) of the instances for which to return recommendation projected metrics.

stat

[required] The statistic of the projected metrics.

period

[required] The granularity, in seconds, of the projected metrics data points.

startTime

[required] The timestamp of the first projected metrics data point to return.

endTime

[required] The timestamp of the last projected metrics data point to return.

recommendationPreferences

An object to specify the preferences for the Amazon EC2 recommendation projected metrics to return in the response.

Value

A list with the following syntax:

list(
  recommendedOptionProjectedMetrics = list(
    list(
      recommendedInstanceType = "string",
      rank = 123,
      projectedMetrics = 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",
          timestamps = list(
            as.POSIXct(
              "2015-01-01"
            )
          ),
          values = list(
            123.0
          )
        )
      )
    )
  )
)

Request syntax

svc$get_ec2_recommendation_projected_metrics(
  instanceArn = "string",
  stat = "Maximum"|"Average",
  period = 123,
  startTime = as.POSIXct(
    "2015-01-01"
  ),
  endTime = as.POSIXct(
    "2015-01-01"
  ),
  recommendationPreferences = list(
    cpuVendorArchitectures = list(
      "AWS_ARM64"|"CURRENT"
    )
  )
)