Module cloudfront

@pulumi/awsx > cloudfront

module metrics

function bytesDownloaded

bytesDownloaded(change?: CloudfrontMetricChange): Metric

The number of bytes downloaded by viewers for GET, HEAD, and OPTIONS requests.

Valid Statistics: Sum Units: None

function bytesUploaded

bytesUploaded(change?: CloudfrontMetricChange): Metric

The number of bytes uploaded to your origin with CloudFront using POST and PUT requests.

Valid Statistics: Sum Units: None

function errorRate4xx

errorRate4xx(change?: CloudfrontMetricChange): Metric

The percentage of all requests for which the HTTP status code is 4xx.

Valid Statistics: Average Units: Percent

function errorRate5xx

errorRate5xx(change?: CloudfrontMetricChange): Metric

The percentage of all requests for which the HTTP status code is 5xx.

Valid Statistics: Average Units: Percent

function metric

metric(metricName: CloudfrontMetricName, change: CloudfrontMetricChange): Metric

Creates an AWS/CloudFront metric with the requested [metricName]. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/monitoring-using-cloudwatch.html for list of all metric-names.

Note, individual metrics can easily be obtained without supplying the name using the other [metricXXX] functions.

CloudFront metrics use the CloudFront namespace and provide metrics for two dimensions:

  1. “DistributionId”: The CloudFront ID of the distribution for which you want to display metrics.
  2. “Region”: The region for which you want to display metrics. This value must be Global. The Region dimension is different from the region in which CloudFront metrics are stored, which is US East (N. Virginia).

function requests

requests(change?: CloudfrontMetricChange): Metric

The number of requests for all HTTP methods and for both HTTP and HTTPS requests.

Valid Statistics: Sum Units: None

function totalErrorRate

totalErrorRate(change?: CloudfrontMetricChange): Metric

The percentage of all requests for which the HTTP status code is 4xx or 5xx.

Valid Statistics: Average Units: Percent

interface CloudfrontMetricChange

type CloudfrontMetricName

type CloudfrontMetricName = "Requests" | "BytesDownloaded" | "BytesUploaded" | "TotalErrorRate" | "4xxErrorRate" | "5xxErrorRate";