Oam class
Use Amazon CloudWatch Observability Access Manager to create and manage links between source accounts and monitoring accounts by using CloudWatch cross-account observability. 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, Application Signals services and service level objectives (SLOs), Application Insights applications, and internet monitors in any of the linked accounts without account boundaries.
Set up one or more Amazon Web Services accounts as monitoring accounts and link them with multiple source accounts. 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, Application Signals services and service level objectives (SLOs), applications in Amazon CloudWatch Application Insights, and internet monitors in CloudWatch Internet Monitor.
When you set up a link, you can choose to share the metrics from all namespaces with the monitoring account, or filter to a subset of namespaces. And for CloudWatch Logs, you can choose to share all log groups with the monitoring account, or filter to a subset of log groups.
Constructors
- Oam({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createLink(
{required String labelTemplate, required List< ResourceType> resourceTypes, required String sinkIdentifier, LinkConfiguration? linkConfiguration, Map<String, String> ? tags}) → Future<CreateLinkOutput> - 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.
-
createSink(
{required String name, Map< String, String> ? tags}) → Future<CreateSinkOutput> - Use this to create a sink 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.
-
deleteLink(
{required String identifier}) → Future< void> - Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.
-
deleteSink(
{required String identifier}) → Future< void> - Deletes a sink. You must delete all links to a sink before you can delete that sink.
-
getLink(
{required String identifier, bool? includeTags}) → Future< GetLinkOutput> - Returns complete information about one link.
-
getSink(
{required String identifier, bool? includeTags}) → Future< GetSinkOutput> - Returns complete information about one monitoring account sink.
-
getSinkPolicy(
{required String sinkIdentifier}) → Future< GetSinkPolicyOutput> - 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.
-
listAttachedLinks(
{required String sinkIdentifier, int? maxResults, String? nextToken}) → Future< ListAttachedLinksOutput> - Returns a list of source account links that are linked to this monitoring account sink.
-
listLinks(
{int? maxResults, String? nextToken}) → Future< ListLinksOutput> - Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.
-
listSinks(
{int? maxResults, String? nextToken}) → Future< ListSinksOutput> - Use this operation in a monitoring account to return the list of sinks created in that account.
-
listTagsForResource(
{required String resourceArn}) → Future< ListTagsForResourceOutput> - Displays the tags associated with a resource. Both sinks and links support tagging.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putSinkPolicy(
{required String policy, required String sinkIdentifier}) → Future< PutSinkPolicyOutput> - 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.
-
tagResource(
{required String resourceArn, required Map< String, String> tags}) → Future<void> - Assigns one or more tags (key-value pairs) to the specified resource. Both sinks and links can be tagged.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceArn, required List< String> tagKeys}) → Future<void> - Removes one or more tags from the specified resource.
-
updateLink(
{required String identifier, required List< ResourceType> resourceTypes, bool? includeTags, LinkConfiguration? linkConfiguration}) → Future<UpdateLinkOutput> - 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.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited