Skip to content

Commit

Permalink
feat(client-oam): This release introduces support for Source Accounts…
Browse files Browse the repository at this point in the history
… to define which Metrics and Logs to share with the Monitoring Account
  • Loading branch information
awstools committed Apr 26, 2024
1 parent e30cf9a commit 28b5215
Show file tree
Hide file tree
Showing 16 changed files with 449 additions and 106 deletions.
18 changes: 9 additions & 9 deletions clients/client-oam/src/OAM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,16 @@ export interface OAM {

/**
* <p>Use Amazon CloudWatch Observability Access Manager to create and manage links between source accounts and
* monitoring accounts by using <i>CloudWatch cross-account observability</i>. With
* CloudWatch cross-account observability, you can monitor and troubleshoot applications that span
* multiple accounts within a Region. Seamlessly search, visualize, and analyze your metrics,
* logs, traces, and Application Insights applications in any of the linked accounts without account boundaries.</p>
* monitoring accounts by using <i>CloudWatch cross-account observability</i>. With
* CloudWatch cross-account observability, you can monitor and troubleshoot applications that span
* multiple accounts within a Region. Seamlessly search, visualize, and analyze your metrics,
* logs, traces, and Application Insights applications in any of the linked accounts without account boundaries.</p>
* <p>Set up one or more Amazon Web Services accounts as <i>monitoring
* accounts</i> and link them with multiple <i>source accounts</i>. A
* monitoring account is a central Amazon Web Services account that can view and interact with
* observability data generated from source accounts. A source account is an individual Amazon Web Services account that generates observability data for the resources that reside in it.
* Source accounts share their observability data with the monitoring account. The shared
* observability data can include metrics in Amazon CloudWatch, logs in Amazon CloudWatch Logs, traces in X-Ray, and applications in Amazon CloudWatch Application Insights.</p>
* accounts</i> and link them with multiple <i>source accounts</i>. A
* monitoring account is a central Amazon Web Services account that can view and interact with
* observability data generated from source accounts. A source account is an individual Amazon Web Services account that generates observability data for the resources that reside in it.
* Source accounts share their observability data with the monitoring account. The shared
* observability data can include metrics in Amazon CloudWatch, logs in Amazon CloudWatch Logs, traces in X-Ray, and applications in Amazon CloudWatch Application Insights.</p>
* @public
*/
export class OAM extends OAMClient implements OAM {}
Expand Down
18 changes: 9 additions & 9 deletions clients/client-oam/src/OAMClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,16 @@ export interface OAMClientResolvedConfig extends OAMClientResolvedConfigType {}

/**
* <p>Use Amazon CloudWatch Observability Access Manager to create and manage links between source accounts and
* monitoring accounts by using <i>CloudWatch cross-account observability</i>. With
* CloudWatch cross-account observability, you can monitor and troubleshoot applications that span
* multiple accounts within a Region. Seamlessly search, visualize, and analyze your metrics,
* logs, traces, and Application Insights applications in any of the linked accounts without account boundaries.</p>
* monitoring accounts by using <i>CloudWatch cross-account observability</i>. With
* CloudWatch cross-account observability, you can monitor and troubleshoot applications that span
* multiple accounts within a Region. Seamlessly search, visualize, and analyze your metrics,
* logs, traces, and Application Insights applications in any of the linked accounts without account boundaries.</p>
* <p>Set up one or more Amazon Web Services accounts as <i>monitoring
* accounts</i> and link them with multiple <i>source accounts</i>. A
* monitoring account is a central Amazon Web Services account that can view and interact with
* observability data generated from source accounts. A source account is an individual Amazon Web Services account that generates observability data for the resources that reside in it.
* Source accounts share their observability data with the monitoring account. The shared
* observability data can include metrics in Amazon CloudWatch, logs in Amazon CloudWatch Logs, traces in X-Ray, and applications in Amazon CloudWatch Application Insights.</p>
* accounts</i> and link them with multiple <i>source accounts</i>. A
* monitoring account is a central Amazon Web Services account that can view and interact with
* observability data generated from source accounts. A source account is an individual Amazon Web Services account that generates observability data for the resources that reside in it.
* Source accounts share their observability data with the monitoring account. The shared
* observability data can include metrics in Amazon CloudWatch, logs in Amazon CloudWatch Logs, traces in X-Ray, and applications in Amazon CloudWatch Application Insights.</p>
* @public
*/
export class OAMClient extends __Client<
Expand Down
30 changes: 24 additions & 6 deletions clients/client-oam/src/commands/CreateLinkCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ export interface CreateLinkCommandInput extends CreateLinkInput {}
export interface CreateLinkCommandOutput extends CreateLinkOutput, __MetadataBearer {}

/**
* <p>Creates a link between a source account and a sink that you have created in a monitoring account.</p>
* <p>Creates a link between a source account and a sink that you have created in a monitoring account. After the link is created,
* data is sent from the source account to the monitoring account. When you create a link, you can optionally specify filters
* that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.</p>
* <p>Before you create a link, you must create a sink in the monitoring account and create a
* sink policy in that account. The sink policy must permit the source account to link to it. You
* can grant permission to source accounts by granting permission to an entire organization or to
* individual accounts.</p>
* sink policy in that account. The sink policy must permit the source account to link to it. You
* can grant permission to source accounts by granting permission to an entire organization or to
* individual accounts.</p>
* <p>For more information, see
* <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html">CreateSink</a> and
* <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html">PutSinkPolicy</a>.</p>
* <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html">CreateSink</a> and
* <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html">PutSinkPolicy</a>.</p>
* <p>Each monitoring account can be linked to as many as 100,000 source accounts.</p>
* <p>Each source account can be linked to as many as five monitoring accounts.</p>
* @example
Expand All @@ -52,6 +54,14 @@ export interface CreateLinkCommandOutput extends CreateLinkOutput, __MetadataBea
* Tags: { // TagMapInput
* "<keys>": "STRING_VALUE",
* },
* LinkConfiguration: { // LinkConfiguration
* LogGroupConfiguration: { // LogGroupConfiguration
* Filter: "STRING_VALUE", // required
* },
* MetricConfiguration: { // MetricConfiguration
* Filter: "STRING_VALUE", // required
* },
* },
* };
* const command = new CreateLinkCommand(input);
* const response = await client.send(command);
Expand All @@ -67,6 +77,14 @@ export interface CreateLinkCommandOutput extends CreateLinkOutput, __MetadataBea
* // Tags: { // TagMapOutput
* // "<keys>": "STRING_VALUE",
* // },
* // LinkConfiguration: { // LinkConfiguration
* // LogGroupConfiguration: { // LogGroupConfiguration
* // Filter: "STRING_VALUE", // required
* // },
* // MetricConfiguration: { // MetricConfiguration
* // Filter: "STRING_VALUE", // required
* // },
* // },
* // };
*
* ```
Expand Down
10 changes: 5 additions & 5 deletions clients/client-oam/src/commands/CreateSinkCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export interface CreateSinkCommandOutput extends CreateSinkOutput, __MetadataBea

/**
* <p>Use this to create a <i>sink</i> in the current account, so that it can be
* used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that
* represents an attachment point in a monitoring account. Source accounts can link to the sink
* to send observability data.</p>
* used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that
* represents an attachment point in a monitoring account. Source accounts can link to the sink
* to send observability data.</p>
* <p>After you create a sink, you must create a sink policy that allows source accounts to attach to it.
* For more information, see <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html">PutSinkPolicy</a>.</p>
* <p>Each account can contain one sink. If you delete a sink, you can then create a new one in that account.</p>
* For more information, see <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html">PutSinkPolicy</a>.</p>
* <p>Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-oam/src/commands/DeleteLinkCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface DeleteLinkCommandOutput extends DeleteLinkOutput, __MetadataBea

/**
* <p>Deletes a link between a monitoring account sink and a source account. You must run this operation
* in the source account.</p>
* in the source account.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
8 changes: 8 additions & 0 deletions clients/client-oam/src/commands/GetLinkCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ export interface GetLinkCommandOutput extends GetLinkOutput, __MetadataBearer {}
* // Tags: { // TagMapOutput
* // "<keys>": "STRING_VALUE",
* // },
* // LinkConfiguration: { // LinkConfiguration
* // LogGroupConfiguration: { // LogGroupConfiguration
* // Filter: "STRING_VALUE", // required
* // },
* // MetricConfiguration: { // MetricConfiguration
* // Filter: "STRING_VALUE", // required
* // },
* // },
* // };
*
* ```
Expand Down
2 changes: 1 addition & 1 deletion clients/client-oam/src/commands/GetSinkPolicyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface GetSinkPolicyCommandOutput extends GetSinkPolicyOutput, __Metad

/**
* <p>Returns the current sink policy attached to this sink. The sink policy specifies what
* accounts can attach to this sink as source accounts, and what types of data they can share.</p>
* accounts can attach to this sink as source accounts, and what types of data they can share.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-oam/src/commands/ListLinksCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface ListLinksCommandOutput extends ListLinksOutput, __MetadataBeare

/**
* <p>Use this operation in a source account to return a list of links to monitoring account sinks that
* this source account has.</p>
* this source account has.</p>
* <p>To find a list of links for one monitoring account sink, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListAttachedLinks.html">ListAttachedLinks</a> from within the monitoring account.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
8 changes: 4 additions & 4 deletions clients/client-oam/src/commands/PutSinkPolicyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ export interface PutSinkPolicyCommandOutput extends PutSinkPolicyOutput, __Metad

/**
* <p>Creates or updates the resource policy that grants permissions to source
* accounts to link to the monitoring account sink. When you create a sink policy, you can grant
* permissions to all accounts in an organization or to individual accounts.</p>
* accounts to link to the monitoring account sink. When you create a sink policy, you can grant
* permissions to all accounts in an organization or to individual accounts.</p>
* <p>You can also use a sink policy to limit the types of data that is shared. The three types that
* you can allow or deny are:</p>
* you can allow or deny are:</p>
* <ul>
* <li>
* <p>
* <b>Metrics</b> - Specify with
* <code>AWS::CloudWatch::Metric</code>
* <code>AWS::CloudWatch::Metric</code>
* </p>
* </li>
* <li>
Expand Down
18 changes: 9 additions & 9 deletions clients/client-oam/src/commands/TagResourceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ export interface TagResourceCommandOutput extends TagResourceOutput, __MetadataB

/**
* <p>Assigns one or more tags (key-value pairs) to the specified resource.
* Both sinks and links can be tagged. </p>
* Both sinks and links can be tagged. </p>
* <p>Tags can help you organize and categorize your resources. You can also use them to scope user
* permissions by granting a user
* permission to access or change only resources with certain tag values.</p>
* permissions by granting a user
* permission to access or change only resources with certain tag values.</p>
* <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
* <p>You can use the <code>TagResource</code> action with a resource that already has tags. If you specify a new tag key for the alarm,
* this tag is appended to the list of tags associated
* with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces
* the previous value for that tag.</p>
* this tag is appended to the list of tags associated
* with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces
* the previous value for that tag.</p>
* <p>You can associate as many as 50 tags with a resource.</p>
* <important>
* <p>Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and
* sinks you must have the <code>oam:ResourceTag</code> permission. The
* <code>iam:ResourceTag</code> permission does not allow you to tag and untag links and
* sinks.</p>
* sinks you must have the <code>oam:ResourceTag</code> permission. The
* <code>iam:ResourceTag</code> permission does not allow you to tag and untag links and
* sinks.</p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
6 changes: 3 additions & 3 deletions clients/client-oam/src/commands/UntagResourceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export interface UntagResourceCommandOutput extends UntagResourceOutput, __Metad
* <p>Removes one or more tags from the specified resource.</p>
* <important>
* <p>Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and
* sinks you must have the <code>oam:ResourceTag</code> permission. The
* <code>iam:TagResource</code> permission does not allow you to tag and untag links and
* sinks.</p>
* sinks you must have the <code>oam:ResourceTag</code> permission. The
* <code>iam:TagResource</code> permission does not allow you to tag and untag links and
* sinks.</p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
22 changes: 20 additions & 2 deletions clients/client-oam/src/commands/UpdateLinkCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ export interface UpdateLinkCommandOutput extends UpdateLinkOutput, __MetadataBea

/**
* <p>Use this operation to change what types of data are shared from a source account to its linked
* monitoring account sink. You can't change the sink or change the monitoring account with this operation.</p>
* monitoring account sink. You can't change the sink or change the monitoring account with this operation.</p>
* <p>When you update a link, you can optionally specify filters
* that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.</p>
* <p>To update the list of tags associated with the sink, use
* <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_TagResource.html">TagResource</a>.</p>
* <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_TagResource.html">TagResource</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -42,6 +44,14 @@ export interface UpdateLinkCommandOutput extends UpdateLinkOutput, __MetadataBea
* ResourceTypes: [ // ResourceTypesInput // required
* "AWS::CloudWatch::Metric" || "AWS::Logs::LogGroup" || "AWS::XRay::Trace" || "AWS::ApplicationInsights::Application" || "AWS::InternetMonitor::Monitor",
* ],
* LinkConfiguration: { // LinkConfiguration
* LogGroupConfiguration: { // LogGroupConfiguration
* Filter: "STRING_VALUE", // required
* },
* MetricConfiguration: { // MetricConfiguration
* Filter: "STRING_VALUE", // required
* },
* },
* };
* const command = new UpdateLinkCommand(input);
* const response = await client.send(command);
Expand All @@ -57,6 +67,14 @@ export interface UpdateLinkCommandOutput extends UpdateLinkOutput, __MetadataBea
* // Tags: { // TagMapOutput
* // "<keys>": "STRING_VALUE",
* // },
* // LinkConfiguration: { // LinkConfiguration
* // LogGroupConfiguration: { // LogGroupConfiguration
* // Filter: "STRING_VALUE", // required
* // },
* // MetricConfiguration: { // MetricConfiguration
* // Filter: "STRING_VALUE", // required
* // },
* // },
* // };
*
* ```
Expand Down
Loading

0 comments on commit 28b5215

Please sign in to comment.