Skip to content

Commit 0ac256b

Browse files
author
awstools
committed
feat(client-cloudwatch): Adds cross-account support to the GetMetricData API. Adds cross-account support to the ListMetrics API through the usage of the IncludeLinkedAccounts flag and the new OwningAccounts field.
1 parent 92c3eef commit 0ac256b

File tree

8 files changed

+951
-689
lines changed

8 files changed

+951
-689
lines changed

clients/client-cloudwatch/src/CloudWatch.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export class CloudWatch extends CloudWatchClient {
216216
* because there is always still a composite alarm that depends on that alarm that you want to delete.</p>
217217
* <p>To get out of such a situation, you must
218218
* break the cycle by changing the rule of one of the composite alarms in the cycle to remove a dependency that creates the cycle. The simplest
219-
* change to make to break a cycle is to change the <code>AlarmRule</code> of one of the alarms to <code>False</code>. </p>
219+
* change to make to break a cycle is to change the <code>AlarmRule</code> of one of the alarms to <code>false</code>. </p>
220220
* <p>Additionally, the evaluation of composite alarms stops if CloudWatch detects a cycle in the evaluation path.
221221
* </p>
222222
* </note>
@@ -1128,14 +1128,15 @@ export class CloudWatch extends CloudWatchClient {
11281128
}
11291129

11301130
/**
1131-
* <p>List the specified metrics. You can use the returned metrics with
1132-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or
1133-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a> to obtain statistical data.</p>
1131+
* <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>
11341132
* <p>Up to 500 results are returned for any one call. To retrieve additional results,
11351133
* use the returned token with subsequent calls.</p>
1136-
* <p>After you create a metric, allow up to 15 minutes before the metric appears.
1137-
* You can see statistics about the metric sooner by using <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or
1138-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a>.</p>
1134+
* <p>After you create a metric, allow up to 15 minutes for the metric to appear. To see metric
1135+
* 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>
1136+
*
1137+
* <p>If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and
1138+
* view metrics from the linked source accounts. For more information, see
1139+
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html">CloudWatch cross-account observability</a>.</p>
11391140
*
11401141
* <p>
11411142
* <code>ListMetrics</code> doesn't return information about metrics if those metrics haven't
@@ -1288,7 +1289,7 @@ export class CloudWatch extends CloudWatchClient {
12881289
* because there is always still a composite alarm that depends on that alarm that you want to delete.</p>
12891290
* <p>To get out of such a situation, you must
12901291
* break the cycle by changing the rule of one of the composite alarms in the cycle to remove a dependency that creates the cycle. The simplest
1291-
* change to make to break a cycle is to change the <code>AlarmRule</code> of one of the alarms to <code>False</code>. </p>
1292+
* change to make to break a cycle is to change the <code>AlarmRule</code> of one of the alarms to <code>false</code>. </p>
12921293
* <p>Additionally, the evaluation of composite alarms stops if CloudWatch detects a cycle in the evaluation path.
12931294
* </p>
12941295
* </note>
@@ -1635,16 +1636,15 @@ export class CloudWatch extends CloudWatchClient {
16351636
}
16361637

16371638
/**
1638-
* <p>Creates or updates a metric stream. Metric streams can automatically stream CloudWatch metrics
1639-
* to Amazon Web Services destinations including
1640-
* Amazon S3 and to many third-party solutions.</p>
1639+
* <p>Creates or updates a metric stream. Metric streams can automatically stream CloudWatch
1640+
* metrics to Amazon Web Services destinations, including Amazon S3, and to many third-party
1641+
* solutions.</p>
16411642
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html">
16421643
* Using Metric Streams</a>.</p>
1643-
* <p>To create a metric stream,
1644-
* you must be logged on to an account that has the <code>iam:PassRole</code> permission
1645-
* and either the <code>CloudWatchFullAccess</code>
1646-
* policy or the <code>cloudwatch:PutMetricStream</code>
1647-
* permission.</p>
1644+
* <p>To create a metric stream, you must be signed in to an account that has the
1645+
* <code>iam:PassRole</code> permission and either the
1646+
* <code>CloudWatchFullAccess</code> policy or the
1647+
* <code>cloudwatch:PutMetricStream</code> permission.</p>
16481648
* <p>When you create or update a metric stream, you choose one of the following:</p>
16491649
* <ul>
16501650
* <li>
@@ -1660,11 +1660,11 @@ export class CloudWatch extends CloudWatchClient {
16601660
* </li>
16611661
* </ul>
16621662
*
1663-
* <p>By default, a metric stream always sends the <code>MAX</code>, <code>MIN</code>, <code>SUM</code>,
1664-
* and <code>SAMPLECOUNT</code> statistics for each metric that is streamed. You can use the
1665-
* <code>StatisticsConfigurations</code> parameter to have
1666-
* the metric stream also send additional statistics in the stream. Streaming additional statistics incurs
1667-
* additional costs. For more information, see <a href="https://aws.amazon.com/cloudwatch/pricing/">Amazon CloudWatch Pricing</a>. </p>
1663+
* <p>By default, a metric stream always sends the <code>MAX</code>, <code>MIN</code>,
1664+
* <code>SUM</code>, and <code>SAMPLECOUNT</code> statistics for each metric that is
1665+
* streamed. You can use the <code>StatisticsConfigurations</code> parameter to have the
1666+
* metric stream send additional statistics in the stream. Streaming additional statistics
1667+
* incurs additional costs. For more information, see <a href="https://aws.amazon.com/cloudwatch/pricing/">Amazon CloudWatch Pricing</a>. </p>
16681668
*
16691669
* <p>When you use <code>PutMetricStream</code> to create a new metric stream, the stream
16701670
* is created in the <code>running</code> state. If you use it to update an existing stream,

clients/client-cloudwatch/src/commands/DeleteAlarmsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface DeleteAlarmsCommandOutput extends __MetadataBearer {}
3333
* because there is always still a composite alarm that depends on that alarm that you want to delete.</p>
3434
* <p>To get out of such a situation, you must
3535
* break the cycle by changing the rule of one of the composite alarms in the cycle to remove a dependency that creates the cycle. The simplest
36-
* change to make to break a cycle is to change the <code>AlarmRule</code> of one of the alarms to <code>False</code>. </p>
36+
* change to make to break a cycle is to change the <code>AlarmRule</code> of one of the alarms to <code>false</code>. </p>
3737
* <p>Additionally, the evaluation of composite alarms stops if CloudWatch detects a cycle in the evaluation path.
3838
* </p>
3939
* </note>

clients/client-cloudwatch/src/commands/ListMetricsCommand.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ export interface ListMetricsCommandInput extends ListMetricsInput {}
2626
export interface ListMetricsCommandOutput extends ListMetricsOutput, __MetadataBearer {}
2727

2828
/**
29-
* <p>List the specified metrics. You can use the returned metrics with
30-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or
31-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a> to obtain statistical data.</p>
29+
* <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>
3230
* <p>Up to 500 results are returned for any one call. To retrieve additional results,
3331
* use the returned token with subsequent calls.</p>
34-
* <p>After you create a metric, allow up to 15 minutes before the metric appears.
35-
* You can see statistics about the metric sooner by using <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html">GetMetricData</a> or
36-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html">GetMetricStatistics</a>.</p>
32+
* <p>After you create a metric, allow up to 15 minutes for the metric to appear. To see metric
33+
* 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>
34+
*
35+
* <p>If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and
36+
* view metrics from the linked source accounts. For more information, see
37+
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html">CloudWatch cross-account observability</a>.</p>
3738
*
3839
* <p>
3940
* <code>ListMetrics</code> doesn't return information about metrics if those metrics haven't

clients/client-cloudwatch/src/commands/PutCompositeAlarmCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface PutCompositeAlarmCommandOutput extends __MetadataBearer {}
4646
* because there is always still a composite alarm that depends on that alarm that you want to delete.</p>
4747
* <p>To get out of such a situation, you must
4848
* break the cycle by changing the rule of one of the composite alarms in the cycle to remove a dependency that creates the cycle. The simplest
49-
* change to make to break a cycle is to change the <code>AlarmRule</code> of one of the alarms to <code>False</code>. </p>
49+
* change to make to break a cycle is to change the <code>AlarmRule</code> of one of the alarms to <code>false</code>. </p>
5050
* <p>Additionally, the evaluation of composite alarms stops if CloudWatch detects a cycle in the evaluation path.
5151
* </p>
5252
* </note>

clients/client-cloudwatch/src/commands/PutMetricStreamCommand.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,15 @@ export interface PutMetricStreamCommandInput extends PutMetricStreamInput {}
2929
export interface PutMetricStreamCommandOutput extends PutMetricStreamOutput, __MetadataBearer {}
3030

3131
/**
32-
* <p>Creates or updates a metric stream. Metric streams can automatically stream CloudWatch metrics
33-
* to Amazon Web Services destinations including
34-
* Amazon S3 and to many third-party solutions.</p>
32+
* <p>Creates or updates a metric stream. Metric streams can automatically stream CloudWatch
33+
* metrics to Amazon Web Services destinations, including Amazon S3, and to many third-party
34+
* solutions.</p>
3535
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html">
3636
* Using Metric Streams</a>.</p>
37-
* <p>To create a metric stream,
38-
* you must be logged on to an account that has the <code>iam:PassRole</code> permission
39-
* and either the <code>CloudWatchFullAccess</code>
40-
* policy or the <code>cloudwatch:PutMetricStream</code>
41-
* permission.</p>
37+
* <p>To create a metric stream, you must be signed in to an account that has the
38+
* <code>iam:PassRole</code> permission and either the
39+
* <code>CloudWatchFullAccess</code> policy or the
40+
* <code>cloudwatch:PutMetricStream</code> permission.</p>
4241
* <p>When you create or update a metric stream, you choose one of the following:</p>
4342
* <ul>
4443
* <li>
@@ -54,11 +53,11 @@ export interface PutMetricStreamCommandOutput extends PutMetricStreamOutput, __M
5453
* </li>
5554
* </ul>
5655
*
57-
* <p>By default, a metric stream always sends the <code>MAX</code>, <code>MIN</code>, <code>SUM</code>,
58-
* and <code>SAMPLECOUNT</code> statistics for each metric that is streamed. You can use the
59-
* <code>StatisticsConfigurations</code> parameter to have
60-
* the metric stream also send additional statistics in the stream. Streaming additional statistics incurs
61-
* additional costs. For more information, see <a href="https://aws.amazon.com/cloudwatch/pricing/">Amazon CloudWatch Pricing</a>. </p>
56+
* <p>By default, a metric stream always sends the <code>MAX</code>, <code>MIN</code>,
57+
* <code>SUM</code>, and <code>SAMPLECOUNT</code> statistics for each metric that is
58+
* streamed. You can use the <code>StatisticsConfigurations</code> parameter to have the
59+
* metric stream send additional statistics in the stream. Streaming additional statistics
60+
* incurs additional costs. For more information, see <a href="https://aws.amazon.com/cloudwatch/pricing/">Amazon CloudWatch Pricing</a>. </p>
6261
*
6362
* <p>When you use <code>PutMetricStream</code> to create a new metric stream, the stream
6463
* is created in the <code>running</code> state. If you use it to update an existing stream,

0 commit comments

Comments
 (0)