OamClient

interface OamClient : SdkClient

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.

Properties

Link copied to clipboard
abstract override val config: OamClient.Config

OamClient's configuration

Functions

Link copied to clipboard
abstract suspend fun createLink(input: CreateLinkRequest): CreateLinkResponse

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.

Link copied to clipboard
abstract suspend fun createSink(input: CreateSinkRequest): CreateSinkResponse

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.

Link copied to clipboard
abstract suspend fun deleteLink(input: DeleteLinkRequest): DeleteLinkResponse

Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.

Link copied to clipboard
abstract suspend fun deleteSink(input: DeleteSinkRequest): DeleteSinkResponse

Deletes a sink. You must delete all links to a sink before you can delete that sink.

Link copied to clipboard
abstract suspend fun getLink(input: GetLinkRequest): GetLinkResponse

Returns complete information about one link.

Link copied to clipboard
abstract suspend fun getSink(input: GetSinkRequest): GetSinkResponse

Returns complete information about one monitoring account sink.

Link copied to clipboard

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.

Link copied to clipboard

Returns a list of source account links that are linked to this monitoring account sink.

Link copied to clipboard
abstract suspend fun listLinks(input: ListLinksRequest = ListLinksRequest { }): ListLinksResponse

Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.

Link copied to clipboard
abstract suspend fun listSinks(input: ListSinksRequest = ListSinksRequest { }): ListSinksResponse

Use this operation in a monitoring account to return the list of sinks created in that account.

Link copied to clipboard

Displays the tags associated with a resource. Both sinks and links support tagging.

Link copied to clipboard

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.

Link copied to clipboard
abstract suspend fun tagResource(input: TagResourceRequest): TagResourceResponse

Assigns one or more tags (key-value pairs) to the specified resource. Both sinks and links can be tagged.

Link copied to clipboard

Removes one or more tags from the specified resource.

Link copied to clipboard
abstract suspend fun updateLink(input: UpdateLinkRequest): UpdateLinkResponse

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.

Inherited functions

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
inline suspend fun OamClient.createLink(crossinline block: CreateLinkRequest.Builder.() -> Unit): CreateLinkResponse

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.

Link copied to clipboard
inline suspend fun OamClient.createSink(crossinline block: CreateSinkRequest.Builder.() -> Unit): CreateSinkResponse

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.

Link copied to clipboard
inline suspend fun OamClient.deleteLink(crossinline block: DeleteLinkRequest.Builder.() -> Unit): DeleteLinkResponse

Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.

Link copied to clipboard
inline suspend fun OamClient.deleteSink(crossinline block: DeleteSinkRequest.Builder.() -> Unit): DeleteSinkResponse

Deletes a sink. You must delete all links to a sink before you can delete that sink.

Link copied to clipboard
inline suspend fun OamClient.getLink(crossinline block: GetLinkRequest.Builder.() -> Unit): GetLinkResponse

Returns complete information about one link.

Link copied to clipboard
inline suspend fun OamClient.getSink(crossinline block: GetSinkRequest.Builder.() -> Unit): GetSinkResponse

Returns complete information about one monitoring account sink.

Link copied to clipboard
inline suspend fun OamClient.getSinkPolicy(crossinline block: GetSinkPolicyRequest.Builder.() -> Unit): GetSinkPolicyResponse

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.

Link copied to clipboard

Returns a list of source account links that are linked to this monitoring account sink.

Link copied to clipboard
inline suspend fun OamClient.listLinks(crossinline block: ListLinksRequest.Builder.() -> Unit): ListLinksResponse

Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.

Link copied to clipboard
fun OamClient.listLinksPaginated(initialRequest: ListLinksRequest = ListLinksRequest { }): Flow<ListLinksResponse>

Paginate over ListLinksResponse results.

Link copied to clipboard
inline suspend fun OamClient.listSinks(crossinline block: ListSinksRequest.Builder.() -> Unit): ListSinksResponse

Use this operation in a monitoring account to return the list of sinks created in that account.

Link copied to clipboard
fun OamClient.listSinksPaginated(initialRequest: ListSinksRequest = ListSinksRequest { }): Flow<ListSinksResponse>

Paginate over ListSinksResponse results.

Link copied to clipboard

Displays the tags associated with a resource. Both sinks and links support tagging.

Link copied to clipboard
inline suspend fun OamClient.putSinkPolicy(crossinline block: PutSinkPolicyRequest.Builder.() -> Unit): PutSinkPolicyResponse

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.

Link copied to clipboard
inline suspend fun OamClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse

Assigns one or more tags (key-value pairs) to the specified resource. Both sinks and links can be tagged.

Link copied to clipboard
inline suspend fun OamClient.untagResource(crossinline block: UntagResourceRequest.Builder.() -> Unit): UntagResourceResponse

Removes one or more tags from the specified resource.

Link copied to clipboard
inline suspend fun OamClient.updateLink(crossinline block: UpdateLinkRequest.Builder.() -> Unit): UpdateLinkResponse

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.

Link copied to clipboard

Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.