AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Get-CWMetricData-UtcEndTime <DateTime>-MaxDatapoint <Int32>-MetricDataQuery <MetricDataQuery[]>-ScanBy <ScanBy>-UtcStartTime <DateTime>-EndTime <DateTime>-NextToken <String>-StartTime <DateTime>-Select <String>
GetMetricData
API to retrieve as many as 100 different metrics in a single request, with a total of as many as 100,800 datapoints. You can also optionally perform math expressions on the values of the returned statistics, to create new time series that represent new insights into your data. For example, using Lambda metrics, you could divide the Errors metric by the Invocations metric to get an error rate time series. For more information about metric math expressions, see Metric Math Syntax and Functions in the Amazon CloudWatch User Guide.
Calls to the GetMetricData
API have a different pricing structure than calls to GetMetricStatistics
. For more information about pricing, see Amazon CloudWatch Pricing.
Amazon CloudWatch retains metric data as follows: StorageResolution
of 1. Unit
in your request, all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions. StartTime
and EndTime
values that align with the value of the metric's Period
and sync up with the beginning and end of an hour. For example, if the Period
of a metric is 5 minutes, specifying 12:05 or 12:30 as EndTime
can get a faster response from CloudWatch than setting 12:07 or 12:29 as the EndTime
.This parameter is deprecated. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | MaxDatapoints |
GetMetricData
call can include as many as 100 MetricDataQuery
structures. Each of these structures can specify either a metric to retrieve, or a math expression to perform on retrieved data. Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | MetricDataQueries |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
TimestampDescending
returns the newest data first and paginates when the MaxDatapoints
limit is reached. TimestampAscending
returns the oldest data first and paginates when the MaxDatapoints
limit is reached. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Period
to 5, 10, or 30, the start time of your request is rounded down to the nearest time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you make a query at (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is rounded down and you receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of data, using a period of 5 seconds, you receive data timestamped between 15:02:15 and 15:07:15. For better performance, specify StartTime
and EndTime
values that align with the value of the metric's Period
and sync up with the beginning and end of an hour. For example, if the Period
of a metric is 5 minutes, specifying 12:05 or 12:30 as StartTime
can get a faster response from CloudWatch than setting 12:07 or 12:29 as the StartTime
.This parameter is deprecated. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
StartTime
and EndTime
values that align with the value of the metric's Period
and sync up with the beginning and end of an hour. For example, if the Period
of a metric is 5 minutes, specifying 12:05 or 12:30 as EndTime
can get a faster response from CloudWatch than setting 12:07 or 12:29 as the EndTime
. Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Period
to 5, 10, or 30, the start time of your request is rounded down to the nearest time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you make a query at (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is rounded down and you receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of data, using a period of 5 seconds, you receive data timestamped between 15:02:15 and 15:07:15. For better performance, specify StartTime
and EndTime
values that align with the value of the metric's Period
and sync up with the beginning and end of an hour. For example, if the Period
of a metric is 5 minutes, specifying 12:05 or 12:30 as StartTime
can get a faster response from CloudWatch than setting 12:07 or 12:29 as the StartTime
. Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)
If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.
If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.
As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfileName, StoredCredentials |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SecretAccessKey, SK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
The endpoint to make the call against.
Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
AWS Tools for PowerShell: 2.x.y.z