@aws-sdk/client-cloudwatch 3.692.0 → 3.694.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -13
- package/dist-cjs/index.js +110 -17
- package/dist-es/protocols/Aws_query.js +112 -16
- package/dist-types/CloudWatch.d.ts +13 -13
- package/dist-types/CloudWatchClient.d.ts +13 -13
- package/dist-types/commands/DeleteAlarmsCommand.d.ts +18 -16
- package/dist-types/commands/DeleteAnomalyDetectorCommand.d.ts +5 -10
- package/dist-types/commands/DeleteDashboardsCommand.d.ts +4 -4
- package/dist-types/commands/DeleteInsightRulesCommand.d.ts +2 -3
- package/dist-types/commands/DeleteMetricStreamCommand.d.ts +2 -1
- package/dist-types/commands/DescribeAlarmHistoryCommand.d.ts +7 -5
- package/dist-types/commands/DescribeAlarmsCommand.d.ts +6 -5
- package/dist-types/commands/DescribeAlarmsForMetricCommand.d.ts +5 -5
- package/dist-types/commands/DescribeAnomalyDetectorsCommand.d.ts +8 -8
- package/dist-types/commands/DescribeInsightRulesCommand.d.ts +2 -2
- package/dist-types/commands/DisableAlarmActionsCommand.d.ts +2 -2
- package/dist-types/commands/DisableInsightRulesCommand.d.ts +2 -2
- package/dist-types/commands/EnableInsightRulesCommand.d.ts +2 -1
- package/dist-types/commands/GetDashboardCommand.d.ts +5 -4
- package/dist-types/commands/GetInsightRuleReportCommand.d.ts +23 -14
- package/dist-types/commands/GetMetricDataCommand.d.ts +50 -34
- package/dist-types/commands/GetMetricStatisticsCommand.d.ts +38 -27
- package/dist-types/commands/GetMetricStreamCommand.d.ts +2 -1
- package/dist-types/commands/GetMetricWidgetImageCommand.d.ts +9 -8
- package/dist-types/commands/ListDashboardsCommand.d.ts +9 -9
- package/dist-types/commands/ListManagedInsightRulesCommand.d.ts +3 -6
- package/dist-types/commands/ListMetricStreamsCommand.d.ts +2 -1
- package/dist-types/commands/ListMetricsCommand.d.ts +10 -11
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +4 -3
- package/dist-types/commands/PutAnomalyDetectorCommand.d.ts +8 -6
- package/dist-types/commands/PutCompositeAlarmCommand.d.ts +33 -31
- package/dist-types/commands/PutDashboardCommand.d.ts +15 -12
- package/dist-types/commands/PutInsightRuleCommand.d.ts +6 -5
- package/dist-types/commands/PutManagedInsightRulesCommand.d.ts +9 -16
- package/dist-types/commands/PutMetricAlarmCommand.d.ts +32 -35
- package/dist-types/commands/PutMetricDataCommand.d.ts +85 -38
- package/dist-types/commands/PutMetricStreamCommand.d.ts +22 -21
- package/dist-types/commands/SetAlarmStateCommand.d.ts +16 -16
- package/dist-types/commands/StartMetricStreamsCommand.d.ts +2 -1
- package/dist-types/commands/StopMetricStreamsCommand.d.ts +2 -1
- package/dist-types/commands/TagResourceCommand.d.ts +15 -11
- package/dist-types/commands/UntagResourceCommand.d.ts +2 -1
- package/dist-types/index.d.ts +13 -13
- package/dist-types/models/models_0.d.ts +1312 -1203
- package/dist-types/ts3.4/models/models_0.d.ts +28 -18
- package/package.json +13 -13
|
@@ -29,17 +29,15 @@ declare const ListMetricsCommand_base: {
|
|
|
29
29
|
/**
|
|
30
30
|
* <p>List the specified metrics. You can use the returned metrics with <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a> to get statistical data.</p>
|
|
31
31
|
* <p>Up to 500 results are returned for any one call. To retrieve additional results,
|
|
32
|
-
*
|
|
33
|
-
* <p>After you create a metric, allow up to 15 minutes for the metric to appear. To see
|
|
34
|
-
*
|
|
35
|
-
* <p>If you are using CloudWatch cross-account observability, you can use this
|
|
36
|
-
*
|
|
37
|
-
*
|
|
32
|
+
* use the returned token with subsequent calls.</p>
|
|
33
|
+
* <p>After you create a metric, allow up to 15 minutes for the metric to appear. To see
|
|
34
|
+
* metric statistics sooner, use <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a>.</p>
|
|
35
|
+
* <p>If you are using CloudWatch cross-account observability, you can use this
|
|
36
|
+
* operation in a monitoring account and view metrics from the linked source accounts. For
|
|
37
|
+
* more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html">CloudWatch cross-account observability</a>.</p>
|
|
38
38
|
* <p>
|
|
39
|
-
* <code>ListMetrics</code> doesn't return information about metrics if those metrics
|
|
40
|
-
*
|
|
41
|
-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or
|
|
42
|
-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a>.</p>
|
|
39
|
+
* <code>ListMetrics</code> doesn't return information about metrics if those metrics
|
|
40
|
+
* haven't reported data in the past two weeks. To retrieve those metrics, use <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a>.</p>
|
|
43
41
|
* @example
|
|
44
42
|
* Use a bare-bones client and the command you need to make an API call.
|
|
45
43
|
* ```javascript
|
|
@@ -90,7 +88,8 @@ declare const ListMetricsCommand_base: {
|
|
|
90
88
|
* @see {@link CloudWatchClientResolvedConfig | config} for CloudWatchClient's `config` shape.
|
|
91
89
|
*
|
|
92
90
|
* @throws {@link InternalServiceFault} (server fault)
|
|
93
|
-
* <p>Request processing has failed due to some unknown error, exception, or
|
|
91
|
+
* <p>Request processing has failed due to some unknown error, exception, or
|
|
92
|
+
* failure.</p>
|
|
94
93
|
*
|
|
95
94
|
* @throws {@link InvalidParameterValueException} (client fault)
|
|
96
95
|
* <p>The value of an input parameter is bad or out-of-range.</p>
|
|
@@ -27,8 +27,8 @@ declare const ListTagsForResourceCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Displays the tags associated with a CloudWatch resource. Currently, alarms
|
|
31
|
-
*
|
|
30
|
+
* <p>Displays the tags associated with a CloudWatch resource. Currently, alarms and
|
|
31
|
+
* Contributor Insights rules support tagging.</p>
|
|
32
32
|
* @example
|
|
33
33
|
* Use a bare-bones client and the command you need to make an API call.
|
|
34
34
|
* ```javascript
|
|
@@ -58,7 +58,8 @@ declare const ListTagsForResourceCommand_base: {
|
|
|
58
58
|
* @see {@link CloudWatchClientResolvedConfig | config} for CloudWatchClient's `config` shape.
|
|
59
59
|
*
|
|
60
60
|
* @throws {@link InternalServiceFault} (server fault)
|
|
61
|
-
* <p>Request processing has failed due to some unknown error, exception, or
|
|
61
|
+
* <p>Request processing has failed due to some unknown error, exception, or
|
|
62
|
+
* failure.</p>
|
|
62
63
|
*
|
|
63
64
|
* @throws {@link InvalidParameterValueException} (client fault)
|
|
64
65
|
* <p>The value of an input parameter is bad or out-of-range.</p>
|
|
@@ -27,11 +27,12 @@ declare const PutAnomalyDetectorCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Creates an anomaly detection model for a CloudWatch metric. You can use the model
|
|
31
|
-
*
|
|
32
|
-
* <p>If you have enabled unified cross-account observability, and this account is a
|
|
33
|
-
*
|
|
34
|
-
*
|
|
30
|
+
* <p>Creates an anomaly detection model for a CloudWatch metric. You can use the model to
|
|
31
|
+
* display a band of expected normal values when the metric is graphed.</p>
|
|
32
|
+
* <p>If you have enabled unified cross-account observability, and this account is a
|
|
33
|
+
* monitoring account, the metric can be in the same account or a source account. You can
|
|
34
|
+
* specify the account ID in the object you specify in the
|
|
35
|
+
* <code>SingleMetricAnomalyDetector</code> parameter.</p>
|
|
35
36
|
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Anomaly_Detection.html">CloudWatch Anomaly Detection</a>.</p>
|
|
36
37
|
* @example
|
|
37
38
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -109,7 +110,8 @@ declare const PutAnomalyDetectorCommand_base: {
|
|
|
109
110
|
* @see {@link CloudWatchClientResolvedConfig | config} for CloudWatchClient's `config` shape.
|
|
110
111
|
*
|
|
111
112
|
* @throws {@link InternalServiceFault} (server fault)
|
|
112
|
-
* <p>Request processing has failed due to some unknown error, exception, or
|
|
113
|
+
* <p>Request processing has failed due to some unknown error, exception, or
|
|
114
|
+
* failure.</p>
|
|
113
115
|
*
|
|
114
116
|
* @throws {@link InvalidParameterCombinationException} (client fault)
|
|
115
117
|
* <p>Parameters were used together that cannot be used together.</p>
|
|
@@ -28,19 +28,17 @@ declare const PutCompositeAlarmCommand_base: {
|
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* <p>Creates or updates a <i>composite alarm</i>. When you create a composite
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* alarm, you specify a rule expression for the alarm that takes into account the alarm
|
|
32
|
+
* states of other alarms that you have created. The composite alarm goes into ALARM state
|
|
33
|
+
* only if all conditions of the rule are met.</p>
|
|
34
34
|
* <p>The alarms specified in a composite alarm's rule expression can include metric alarms
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* alarm that goes into ALARM state only when more than one of the underlying metric alarms
|
|
43
|
-
* are in ALARM state.</p>
|
|
35
|
+
* and other composite alarms. The rule expression of a composite alarm can include as many
|
|
36
|
+
* as 100 underlying alarms. Any single alarm can be included in the rule expressions of as
|
|
37
|
+
* many as 150 composite alarms.</p>
|
|
38
|
+
* <p>Using composite alarms can reduce alarm noise. You can create multiple metric alarms,
|
|
39
|
+
* and also create a composite alarm and set up alerts only for the composite alarm. For
|
|
40
|
+
* example, you could create a composite alarm that goes into ALARM state only when more
|
|
41
|
+
* than one of the underlying metric alarms are in ALARM state.</p>
|
|
44
42
|
* <p>Composite alarms can take the following actions:</p>
|
|
45
43
|
* <ul>
|
|
46
44
|
* <li>
|
|
@@ -57,28 +55,32 @@ declare const PutCompositeAlarmCommand_base: {
|
|
|
57
55
|
* </li>
|
|
58
56
|
* </ul>
|
|
59
57
|
* <note>
|
|
60
|
-
* <p>It is possible to create a loop or cycle of composite alarms, where composite
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
58
|
+
* <p>It is possible to create a loop or cycle of composite alarms, where composite
|
|
59
|
+
* alarm A depends on composite alarm B, and composite alarm B also depends on
|
|
60
|
+
* composite alarm A. In this scenario, you can't delete any composite alarm that is
|
|
61
|
+
* part of the cycle because there is always still a composite alarm that depends on
|
|
62
|
+
* that alarm that you want to delete.</p>
|
|
63
|
+
* <p>To get out of such a situation, you must break the cycle by changing the rule of
|
|
64
|
+
* one of the composite alarms in the cycle to remove a dependency that creates the
|
|
65
|
+
* cycle. The simplest change to make to break a cycle is to change the
|
|
66
|
+
* <code>AlarmRule</code> of one of the alarms to <code>false</code>. </p>
|
|
67
|
+
* <p>Additionally, the evaluation of composite alarms stops if CloudWatch detects a
|
|
68
|
+
* cycle in the evaluation path. </p>
|
|
68
69
|
* </note>
|
|
69
70
|
* <p>When this operation creates an alarm, the alarm state is immediately set to
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* alarm can be in <code>INSUFFICIENT_DATA</code> state.</p>
|
|
71
|
+
* <code>INSUFFICIENT_DATA</code>. The alarm is then evaluated and its state is set
|
|
72
|
+
* appropriately. Any actions associated with the new state are then executed. For a
|
|
73
|
+
* composite alarm, this initial time after creation is the only time that the alarm can be
|
|
74
|
+
* in <code>INSUFFICIENT_DATA</code> state.</p>
|
|
75
75
|
* <p>When you update an existing alarm, its state is left unchanged, but the update
|
|
76
|
-
*
|
|
77
|
-
* <p>To use this operation, you must be signed on with
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
76
|
+
* completely overwrites the previous configuration of the alarm.</p>
|
|
77
|
+
* <p>To use this operation, you must be signed on with the
|
|
78
|
+
* <code>cloudwatch:PutCompositeAlarm</code> permission that is scoped to
|
|
79
|
+
* <code>*</code>. You can't create a composite alarms if your
|
|
80
|
+
* <code>cloudwatch:PutCompositeAlarm</code> permission has a narrower scope.</p>
|
|
81
|
+
* <p>If you are an IAM user, you must have
|
|
82
|
+
* <code>iam:CreateServiceLinkedRole</code> to create a composite alarm that has
|
|
83
|
+
* Systems Manager OpsItem actions.</p>
|
|
82
84
|
* @example
|
|
83
85
|
* Use a bare-bones client and the command you need to make an API call.
|
|
84
86
|
* ```javascript
|
|
@@ -27,20 +27,22 @@ declare const PutDashboardCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Creates a dashboard if it does not already exist, or updates an existing dashboard.
|
|
31
|
-
*
|
|
30
|
+
* <p>Creates a dashboard if it does not already exist, or updates an existing dashboard.
|
|
31
|
+
* If you update a dashboard, the entire contents are replaced with what you specify
|
|
32
|
+
* here.</p>
|
|
32
33
|
* <p>All dashboards in your account are global, not region-specific.</p>
|
|
33
34
|
* <p>A simple way to create a dashboard using <code>PutDashboard</code> is to copy an
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* existing dashboard. To copy an existing dashboard using the console, you can load the
|
|
36
|
+
* dashboard and then use the View/edit source command in the Actions menu to display the
|
|
37
|
+
* JSON block for that dashboard. Another way to copy a dashboard is to use
|
|
38
|
+
* <code>GetDashboard</code>, and then use the data returned within
|
|
39
|
+
* <code>DashboardBody</code> as the template for the new dashboard when you call
|
|
40
|
+
* <code>PutDashboard</code>.</p>
|
|
39
41
|
* <p>When you create a dashboard with <code>PutDashboard</code>, a good practice is to
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
42
|
+
* add a text widget at the top of the dashboard with a message that the dashboard was
|
|
43
|
+
* created by script and should not be changed in the console. This message could also
|
|
44
|
+
* point console users to the location of the <code>DashboardBody</code> script or the
|
|
45
|
+
* CloudFormation template used to create the dashboard.</p>
|
|
44
46
|
* @example
|
|
45
47
|
* Use a bare-bones client and the command you need to make an API call.
|
|
46
48
|
* ```javascript
|
|
@@ -74,7 +76,8 @@ declare const PutDashboardCommand_base: {
|
|
|
74
76
|
* <p>Some part of the dashboard data is invalid.</p>
|
|
75
77
|
*
|
|
76
78
|
* @throws {@link InternalServiceFault} (server fault)
|
|
77
|
-
* <p>Request processing has failed due to some unknown error, exception, or
|
|
79
|
+
* <p>Request processing has failed due to some unknown error, exception, or
|
|
80
|
+
* failure.</p>
|
|
78
81
|
*
|
|
79
82
|
* @throws {@link CloudWatchServiceException}
|
|
80
83
|
* <p>Base exception class for all service exceptions from CloudWatch service.</p>
|
|
@@ -27,11 +27,12 @@ declare const PutInsightRuleCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Creates a Contributor Insights rule. Rules evaluate log events in a
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
30
|
+
* <p>Creates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs
|
|
31
|
+
* log group, enabling you to find contributor data for the log events in that log group.
|
|
32
|
+
* For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights.html">Using Contributor
|
|
33
|
+
* Insights to Analyze High-Cardinality Data</a>.</p>
|
|
34
|
+
* <p>If you create a rule, delete it, and then re-create it with the same name, historical
|
|
35
|
+
* data from the first time the rule was created might not be available.</p>
|
|
35
36
|
* @example
|
|
36
37
|
* Use a bare-bones client and the command you need to make an API call.
|
|
37
38
|
* ```javascript
|
|
@@ -27,23 +27,16 @@ declare const PutManagedInsightRulesCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* with <code>PutInsightRule</code>.
|
|
39
|
-
* The rules can be enabled, disabled, and deleted using <code>EnableInsightRules</code>, <code>DisableInsightRules</code>, and <code>DeleteInsightRules</code>.
|
|
40
|
-
* If a previously created managed rule is currently disabled,
|
|
41
|
-
* a subsequent call
|
|
42
|
-
* to this API will re-enable it.
|
|
43
|
-
* Use <code>ListManagedInsightRules</code>
|
|
44
|
-
* to describe all available rules.
|
|
30
|
+
* <p> Creates a managed Contributor Insights rule for a specified Amazon Web Services
|
|
31
|
+
* resource. When you enable a managed rule, you create a Contributor Insights rule that
|
|
32
|
+
* collects data from Amazon Web Services services. You cannot edit these rules with
|
|
33
|
+
* <code>PutInsightRule</code>. The rules can be enabled, disabled, and deleted using
|
|
34
|
+
* <code>EnableInsightRules</code>, <code>DisableInsightRules</code>, and
|
|
35
|
+
* <code>DeleteInsightRules</code>. If a previously created managed rule is currently
|
|
36
|
+
* disabled, a subsequent call to this API will re-enable it. Use
|
|
37
|
+
* <code>ListManagedInsightRules</code> to describe all available rules.
|
|
45
38
|
*
|
|
46
|
-
*
|
|
39
|
+
* </p>
|
|
47
40
|
* @example
|
|
48
41
|
* Use a bare-bones client and the command you need to make an API call.
|
|
49
42
|
* ```javascript
|
|
@@ -27,57 +27,54 @@ declare const PutMetricAlarmCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Creates or updates an alarm and associates it with the specified metric, metric
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* <p>Creates or updates an alarm and associates it with the specified metric, metric
|
|
31
|
+
* math expression, anomaly detection model, or Metrics Insights query. For more
|
|
32
|
+
* information about using a Metrics Insights query for an alarm, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Metrics_Insights_Alarm.html">Create
|
|
33
|
+
* alarms on Metrics Insights queries</a>.</p>
|
|
33
34
|
* <p>Alarms based on anomaly detection models cannot have Auto Scaling actions.</p>
|
|
34
35
|
* <p>When this operation creates an alarm, the alarm state is immediately set to
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* <p>When you update an existing alarm, its state is left unchanged, but the
|
|
38
|
-
*
|
|
39
|
-
* <p>If you are an IAM user, you must have
|
|
40
|
-
*
|
|
36
|
+
* <code>INSUFFICIENT_DATA</code>. The alarm is then evaluated and its state is set
|
|
37
|
+
* appropriately. Any actions associated with the new state are then executed.</p>
|
|
38
|
+
* <p>When you update an existing alarm, its state is left unchanged, but the update
|
|
39
|
+
* completely overwrites the previous configuration of the alarm.</p>
|
|
40
|
+
* <p>If you are an IAM user, you must have Amazon EC2 permissions for
|
|
41
|
+
* some alarm operations:</p>
|
|
41
42
|
* <ul>
|
|
42
43
|
* <li>
|
|
43
|
-
* <p>The <code>iam:CreateServiceLinkedRole</code> permission for all alarms with
|
|
44
|
+
* <p>The <code>iam:CreateServiceLinkedRole</code> permission for all alarms with
|
|
45
|
+
* EC2 actions</p>
|
|
44
46
|
* </li>
|
|
45
47
|
* <li>
|
|
46
48
|
* <p>The <code>iam:CreateServiceLinkedRole</code> permissions to create an alarm
|
|
47
|
-
*
|
|
49
|
+
* with Systems Manager OpsItem or response plan actions.</p>
|
|
48
50
|
* </li>
|
|
49
51
|
* </ul>
|
|
50
|
-
* <p>The first time you create an alarm in the
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
52
|
+
* <p>The first time you create an alarm in the Amazon Web Services Management Console, the CLI, or by using the PutMetricAlarm API, CloudWatch creates the necessary
|
|
53
|
+
* service-linked role for you. The service-linked roles are called
|
|
54
|
+
* <code>AWSServiceRoleForCloudWatchEvents</code> and
|
|
55
|
+
* <code>AWSServiceRoleForCloudWatchAlarms_ActionSSM</code>. For more information, see
|
|
56
|
+
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role">Amazon Web Services service-linked role</a>.</p>
|
|
57
|
+
* <p>Each <code>PutMetricAlarm</code> action has a maximum uncompressed payload of 120
|
|
58
|
+
* KB.</p>
|
|
57
59
|
* <p>
|
|
58
60
|
* <b>Cross-account alarms</b>
|
|
59
61
|
* </p>
|
|
60
|
-
* <p>You can set an alarm on metrics in the current account, or in another
|
|
61
|
-
*
|
|
62
|
-
*
|
|
62
|
+
* <p>You can set an alarm on metrics in the current account, or in another account. To
|
|
63
|
+
* create a cross-account alarm that watches a metric in a different account, you must have
|
|
64
|
+
* completed the following pre-requisites:</p>
|
|
63
65
|
* <ul>
|
|
64
66
|
* <li>
|
|
65
|
-
* <p>The account where the metrics are located (the <i>sharing
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* role must grant access
|
|
71
|
-
* to the ID of the account where you are creating the alarm.
|
|
72
|
-
* </p>
|
|
67
|
+
* <p>The account where the metrics are located (the <i>sharing
|
|
68
|
+
* account</i>) must already have a sharing role named <b>CloudWatch-CrossAccountSharingRole</b>. If it does not
|
|
69
|
+
* already have this role, you must create it using the instructions in <b>Set up a sharing account</b> in <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html#enable-cross-account-cross-Region"> Cross-account cross-Region CloudWatch console</a>. The policy
|
|
70
|
+
* for that role must grant access to the ID of the account where you are creating
|
|
71
|
+
* the alarm. </p>
|
|
73
72
|
* </li>
|
|
74
73
|
* <li>
|
|
75
|
-
* <p>The account where you are creating the alarm (the <i>monitoring
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* monitoring account</b> in <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html#enable-cross-account-cross-Region">
|
|
80
|
-
* Cross-account cross-Region CloudWatch console</a>.</p>
|
|
74
|
+
* <p>The account where you are creating the alarm (the <i>monitoring
|
|
75
|
+
* account</i>) must already have a service-linked role named <b>AWSServiceRoleForCloudWatchCrossAccount</b> to allow
|
|
76
|
+
* CloudWatch to assume the sharing role in the sharing account. If it
|
|
77
|
+
* does not, you must create it following the directions in <b>Set up a monitoring account</b> in <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html#enable-cross-account-cross-Region"> Cross-account cross-Region CloudWatch console</a>.</p>
|
|
81
78
|
* </li>
|
|
82
79
|
* </ul>
|
|
83
80
|
* @example
|
|
@@ -27,47 +27,53 @@ declare const PutMetricDataCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Publishes metric data
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* <p>You can publish
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* <p>
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* <p>
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
30
|
+
* <p>Publishes metric data to Amazon CloudWatch. CloudWatch associates the data with the
|
|
31
|
+
* specified metric. If the specified metric does not exist, CloudWatch creates the metric.
|
|
32
|
+
* When CloudWatch creates a metric, it can take up to fifteen minutes for the metric to
|
|
33
|
+
* appear in calls to <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html">ListMetrics</a>.</p>
|
|
34
|
+
* <p>You can publish metrics with associated entity data (so that related telemetry can be
|
|
35
|
+
* found and viewed together), or publish metric data by itself. To send entity data with
|
|
36
|
+
* your metrics, use the <code>EntityMetricData</code> parameter. To send metrics without
|
|
37
|
+
* entity data, use the <code>MetricData</code> parameter. The
|
|
38
|
+
* <code>EntityMetricData</code> structure includes <code>MetricData</code> structures
|
|
39
|
+
* for the metric data.</p>
|
|
40
|
+
* <p>You can publish either individual values in the <code>Value</code> field, or arrays of
|
|
41
|
+
* values and the number of times each value occurred during the period by using the
|
|
42
|
+
* <code>Values</code> and <code>Counts</code> fields in the <code>MetricData</code>
|
|
43
|
+
* structure. Using the <code>Values</code> and <code>Counts</code> method enables you to
|
|
44
|
+
* publish up to 150 values per metric with one <code>PutMetricData</code> request, and
|
|
45
|
+
* supports retrieving percentile statistics on this data.</p>
|
|
46
|
+
* <p>Each <code>PutMetricData</code> request is limited to 1 MB in size for HTTP POST
|
|
47
|
+
* requests. You can send a payload compressed by gzip. Each request is also limited to no
|
|
48
|
+
* more than 1000 different metrics (across both the <code>MetricData</code> and
|
|
49
|
+
* <code>EntityMetricData</code> properties).</p>
|
|
50
|
+
* <p>Although the <code>Value</code> parameter accepts numbers of type <code>Double</code>,
|
|
51
|
+
* CloudWatch rejects values that are either too small or too large. Values must be in the
|
|
52
|
+
* range of -2^360 to 2^360. In addition, special values (for example, NaN, +Infinity,
|
|
53
|
+
* -Infinity) are not supported.</p>
|
|
54
|
+
* <p>You can use up to 30 dimensions per metric to further clarify what data the metric
|
|
55
|
+
* collects. Each dimension consists of a Name and Value pair. For more information about
|
|
56
|
+
* specifying dimensions, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html">Publishing
|
|
57
|
+
* Metrics</a> in the <i>Amazon CloudWatch User Guide</i>.</p>
|
|
58
|
+
* <p>You specify the time stamp to be associated with each data point. You can specify time
|
|
59
|
+
* stamps that are as much as two weeks before the current date, and as much as 2 hours
|
|
60
|
+
* after the current day and time.</p>
|
|
61
|
+
* <p>Data points with time stamps from 24 hours ago or longer can take at least 48 hours to
|
|
62
|
+
* become available for <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a> from the time they are submitted. Data points with time
|
|
63
|
+
* stamps between 3 and 24 hours ago can take as much as 2 hours to become available for
|
|
64
|
+
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a>.</p>
|
|
59
65
|
* <p>CloudWatch needs raw data points to calculate percentile statistics. If you publish
|
|
60
|
-
*
|
|
61
|
-
*
|
|
66
|
+
* data using a statistic set instead, you can only retrieve percentile statistics for this
|
|
67
|
+
* data if one of the following conditions is true:</p>
|
|
62
68
|
* <ul>
|
|
63
69
|
* <li>
|
|
64
|
-
* <p>The <code>SampleCount</code> value of the statistic set is 1 and
|
|
65
|
-
*
|
|
70
|
+
* <p>The <code>SampleCount</code> value of the statistic set is 1 and
|
|
71
|
+
* <code>Min</code>, <code>Max</code>, and <code>Sum</code> are all
|
|
72
|
+
* equal.</p>
|
|
66
73
|
* </li>
|
|
67
74
|
* <li>
|
|
68
|
-
* <p>The <code>Min</code> and
|
|
69
|
-
*
|
|
70
|
-
* multiplied by <code>SampleCount</code>.</p>
|
|
75
|
+
* <p>The <code>Min</code> and <code>Max</code> are equal, and <code>Sum</code>
|
|
76
|
+
* is equal to <code>Min</code> multiplied by <code>SampleCount</code>.</p>
|
|
71
77
|
* </li>
|
|
72
78
|
* </ul>
|
|
73
79
|
* @example
|
|
@@ -78,7 +84,7 @@ declare const PutMetricDataCommand_base: {
|
|
|
78
84
|
* const client = new CloudWatchClient(config);
|
|
79
85
|
* const input = { // PutMetricDataInput
|
|
80
86
|
* Namespace: "STRING_VALUE", // required
|
|
81
|
-
* MetricData: [ // MetricData
|
|
87
|
+
* MetricData: [ // MetricData
|
|
82
88
|
* { // MetricDatum
|
|
83
89
|
* MetricName: "STRING_VALUE", // required
|
|
84
90
|
* Dimensions: [ // Dimensions
|
|
@@ -105,6 +111,46 @@ declare const PutMetricDataCommand_base: {
|
|
|
105
111
|
* StorageResolution: Number("int"),
|
|
106
112
|
* },
|
|
107
113
|
* ],
|
|
114
|
+
* EntityMetricData: [ // EntityMetricDataList
|
|
115
|
+
* { // EntityMetricData
|
|
116
|
+
* Entity: { // Entity
|
|
117
|
+
* KeyAttributes: { // EntityKeyAttributesMap
|
|
118
|
+
* "<keys>": "STRING_VALUE",
|
|
119
|
+
* },
|
|
120
|
+
* Attributes: { // EntityAttributesMap
|
|
121
|
+
* "<keys>": "STRING_VALUE",
|
|
122
|
+
* },
|
|
123
|
+
* },
|
|
124
|
+
* MetricData: [
|
|
125
|
+
* {
|
|
126
|
+
* MetricName: "STRING_VALUE", // required
|
|
127
|
+
* Dimensions: [
|
|
128
|
+
* {
|
|
129
|
+
* Name: "STRING_VALUE", // required
|
|
130
|
+
* Value: "STRING_VALUE", // required
|
|
131
|
+
* },
|
|
132
|
+
* ],
|
|
133
|
+
* Timestamp: new Date("TIMESTAMP"),
|
|
134
|
+
* Value: Number("double"),
|
|
135
|
+
* StatisticValues: {
|
|
136
|
+
* SampleCount: Number("double"), // required
|
|
137
|
+
* Sum: Number("double"), // required
|
|
138
|
+
* Minimum: Number("double"), // required
|
|
139
|
+
* Maximum: Number("double"), // required
|
|
140
|
+
* },
|
|
141
|
+
* Values: [
|
|
142
|
+
* Number("double"),
|
|
143
|
+
* ],
|
|
144
|
+
* Counts: [
|
|
145
|
+
* Number("double"),
|
|
146
|
+
* ],
|
|
147
|
+
* Unit: "Seconds" || "Microseconds" || "Milliseconds" || "Bytes" || "Kilobytes" || "Megabytes" || "Gigabytes" || "Terabytes" || "Bits" || "Kilobits" || "Megabits" || "Gigabits" || "Terabits" || "Percent" || "Count" || "Bytes/Second" || "Kilobytes/Second" || "Megabytes/Second" || "Gigabytes/Second" || "Terabytes/Second" || "Bits/Second" || "Kilobits/Second" || "Megabits/Second" || "Gigabits/Second" || "Terabits/Second" || "Count/Second" || "None",
|
|
148
|
+
* StorageResolution: Number("int"),
|
|
149
|
+
* },
|
|
150
|
+
* ],
|
|
151
|
+
* },
|
|
152
|
+
* ],
|
|
153
|
+
* StrictEntityValidation: true || false,
|
|
108
154
|
* };
|
|
109
155
|
* const command = new PutMetricDataCommand(input);
|
|
110
156
|
* const response = await client.send(command);
|
|
@@ -119,7 +165,8 @@ declare const PutMetricDataCommand_base: {
|
|
|
119
165
|
* @see {@link CloudWatchClientResolvedConfig | config} for CloudWatchClient's `config` shape.
|
|
120
166
|
*
|
|
121
167
|
* @throws {@link InternalServiceFault} (server fault)
|
|
122
|
-
* <p>Request processing has failed due to some unknown error, exception, or
|
|
168
|
+
* <p>Request processing has failed due to some unknown error, exception, or
|
|
169
|
+
* failure.</p>
|
|
123
170
|
*
|
|
124
171
|
* @throws {@link InvalidParameterCombinationException} (client fault)
|
|
125
172
|
* <p>Parameters were used together that cannot be used together.</p>
|