Interface OamAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
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, and Application Insights applications 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, and applications in Amazon CloudWatch Application Insights.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic OamAsyncClientBuilder
builder()
Create a builder that can be used to configure and create aOamAsyncClient
.static OamAsyncClient
create()
Create aOamAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CompletableFuture
<CreateLinkResponse> createLink
(Consumer<CreateLinkRequest.Builder> createLinkRequest) Creates a link between a source account and a sink that you have created in a monitoring account.default CompletableFuture
<CreateLinkResponse> createLink
(CreateLinkRequest createLinkRequest) Creates a link between a source account and a sink that you have created in a monitoring account.default CompletableFuture
<CreateSinkResponse> createSink
(Consumer<CreateSinkRequest.Builder> createSinkRequest) 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.default CompletableFuture
<CreateSinkResponse> createSink
(CreateSinkRequest createSinkRequest) 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.default CompletableFuture
<DeleteLinkResponse> deleteLink
(Consumer<DeleteLinkRequest.Builder> deleteLinkRequest) Deletes a link between a monitoring account sink and a source account.default CompletableFuture
<DeleteLinkResponse> deleteLink
(DeleteLinkRequest deleteLinkRequest) Deletes a link between a monitoring account sink and a source account.default CompletableFuture
<DeleteSinkResponse> deleteSink
(Consumer<DeleteSinkRequest.Builder> deleteSinkRequest) Deletes a sink.default CompletableFuture
<DeleteSinkResponse> deleteSink
(DeleteSinkRequest deleteSinkRequest) Deletes a sink.default CompletableFuture
<GetLinkResponse> getLink
(Consumer<GetLinkRequest.Builder> getLinkRequest) Returns complete information about one link.default CompletableFuture
<GetLinkResponse> getLink
(GetLinkRequest getLinkRequest) Returns complete information about one link.default CompletableFuture
<GetSinkResponse> getSink
(Consumer<GetSinkRequest.Builder> getSinkRequest) Returns complete information about one monitoring account sink.default CompletableFuture
<GetSinkResponse> getSink
(GetSinkRequest getSinkRequest) Returns complete information about one monitoring account sink.default CompletableFuture
<GetSinkPolicyResponse> getSinkPolicy
(Consumer<GetSinkPolicyRequest.Builder> getSinkPolicyRequest) Returns the current sink policy attached to this sink.default CompletableFuture
<GetSinkPolicyResponse> getSinkPolicy
(GetSinkPolicyRequest getSinkPolicyRequest) Returns the current sink policy attached to this sink.listAttachedLinks
(Consumer<ListAttachedLinksRequest.Builder> listAttachedLinksRequest) Returns a list of source account links that are linked to this monitoring account sink.listAttachedLinks
(ListAttachedLinksRequest listAttachedLinksRequest) Returns a list of source account links that are linked to this monitoring account sink.default ListAttachedLinksPublisher
listAttachedLinksPaginator
(Consumer<ListAttachedLinksRequest.Builder> listAttachedLinksRequest) This is a variant oflistAttachedLinks(software.amazon.awssdk.services.oam.model.ListAttachedLinksRequest)
operation.default ListAttachedLinksPublisher
listAttachedLinksPaginator
(ListAttachedLinksRequest listAttachedLinksRequest) This is a variant oflistAttachedLinks(software.amazon.awssdk.services.oam.model.ListAttachedLinksRequest)
operation.default CompletableFuture
<ListLinksResponse> listLinks
(Consumer<ListLinksRequest.Builder> listLinksRequest) Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.default CompletableFuture
<ListLinksResponse> listLinks
(ListLinksRequest listLinksRequest) Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.default ListLinksPublisher
listLinksPaginator
(Consumer<ListLinksRequest.Builder> listLinksRequest) This is a variant oflistLinks(software.amazon.awssdk.services.oam.model.ListLinksRequest)
operation.default ListLinksPublisher
listLinksPaginator
(ListLinksRequest listLinksRequest) This is a variant oflistLinks(software.amazon.awssdk.services.oam.model.ListLinksRequest)
operation.default CompletableFuture
<ListSinksResponse> listSinks
(Consumer<ListSinksRequest.Builder> listSinksRequest) Use this operation in a monitoring account to return the list of sinks created in that account.default CompletableFuture
<ListSinksResponse> listSinks
(ListSinksRequest listSinksRequest) Use this operation in a monitoring account to return the list of sinks created in that account.default ListSinksPublisher
listSinksPaginator
(Consumer<ListSinksRequest.Builder> listSinksRequest) This is a variant oflistSinks(software.amazon.awssdk.services.oam.model.ListSinksRequest)
operation.default ListSinksPublisher
listSinksPaginator
(ListSinksRequest listSinksRequest) This is a variant oflistSinks(software.amazon.awssdk.services.oam.model.ListSinksRequest)
operation.listTagsForResource
(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Displays the tags associated with a resource.listTagsForResource
(ListTagsForResourceRequest listTagsForResourceRequest) Displays the tags associated with a resource.default CompletableFuture
<PutSinkPolicyResponse> putSinkPolicy
(Consumer<PutSinkPolicyRequest.Builder> putSinkPolicyRequest) Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink.default CompletableFuture
<PutSinkPolicyResponse> putSinkPolicy
(PutSinkPolicyRequest putSinkPolicyRequest) Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink.default OamServiceClientConfiguration
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture
<TagResourceResponse> tagResource
(Consumer<TagResourceRequest.Builder> tagResourceRequest) Assigns one or more tags (key-value pairs) to the specified resource.default CompletableFuture
<TagResourceResponse> tagResource
(TagResourceRequest tagResourceRequest) Assigns one or more tags (key-value pairs) to the specified resource.default CompletableFuture
<UntagResourceResponse> untagResource
(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes one or more tags from the specified resource.default CompletableFuture
<UntagResourceResponse> untagResource
(UntagResourceRequest untagResourceRequest) Removes one or more tags from the specified resource.default CompletableFuture
<UpdateLinkResponse> updateLink
(Consumer<UpdateLinkRequest.Builder> updateLinkRequest) Use this operation to change what types of data are shared from a source account to its linked monitoring account sink.default CompletableFuture
<UpdateLinkResponse> updateLink
(UpdateLinkRequest updateLinkRequest) Use this operation to change what types of data are shared from a source account to its linked monitoring account sink.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
createLink
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.
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.
For more information, see CreateSink and PutSinkPolicy.
Each monitoring account can be linked to as many as 100,000 source accounts.
Each source account can be linked to as many as five monitoring accounts.
- Parameters:
createLinkRequest
-- Returns:
- A Java Future containing the result of the CreateLink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- ConflictException A resource was in an inconsistent state during an update or a deletion.
- MissingRequiredParameterException A required parameter is missing from the request.
- ServiceQuotaExceededException The request would cause a service quota to be exceeded.
- InvalidParameterException A parameter is specified incorrectly.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createLink
default CompletableFuture<CreateLinkResponse> createLink(Consumer<CreateLinkRequest.Builder> createLinkRequest) 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.
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.
For more information, see CreateSink and PutSinkPolicy.
Each monitoring account can be linked to as many as 100,000 source accounts.
Each source account can be linked to as many as five monitoring accounts.
This is a convenience which creates an instance of the
CreateLinkRequest.Builder
avoiding the need to create one manually viaCreateLinkRequest.builder()
- Parameters:
createLinkRequest
- AConsumer
that will call methods onCreateLinkRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateLink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- ConflictException A resource was in an inconsistent state during an update or a deletion.
- MissingRequiredParameterException A required parameter is missing from the request.
- ServiceQuotaExceededException The request would cause a service quota to be exceeded.
- InvalidParameterException A parameter is specified incorrectly.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createSink
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.
After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see PutSinkPolicy.
Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.
- Parameters:
createSinkRequest
-- Returns:
- A Java Future containing the result of the CreateSink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- ConflictException A resource was in an inconsistent state during an update or a deletion.
- MissingRequiredParameterException A required parameter is missing from the request.
- ServiceQuotaExceededException The request would cause a service quota to be exceeded.
- InvalidParameterException A parameter is specified incorrectly.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createSink
default CompletableFuture<CreateSinkResponse> createSink(Consumer<CreateSinkRequest.Builder> createSinkRequest) 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.
After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see PutSinkPolicy.
Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.
This is a convenience which creates an instance of the
CreateSinkRequest.Builder
avoiding the need to create one manually viaCreateSinkRequest.builder()
- Parameters:
createSinkRequest
- AConsumer
that will call methods onCreateSinkRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateSink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- ConflictException A resource was in an inconsistent state during an update or a deletion.
- MissingRequiredParameterException A required parameter is missing from the request.
- ServiceQuotaExceededException The request would cause a service quota to be exceeded.
- InvalidParameterException A parameter is specified incorrectly.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteLink
Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.
- Parameters:
deleteLinkRequest
-- Returns:
- A Java Future containing the result of the DeleteLink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteLink
default CompletableFuture<DeleteLinkResponse> deleteLink(Consumer<DeleteLinkRequest.Builder> deleteLinkRequest) Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.
This is a convenience which creates an instance of the
DeleteLinkRequest.Builder
avoiding the need to create one manually viaDeleteLinkRequest.builder()
- Parameters:
deleteLinkRequest
- AConsumer
that will call methods onDeleteLinkRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteLink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteSink
Deletes a sink. You must delete all links to a sink before you can delete that sink.
- Parameters:
deleteSinkRequest
-- Returns:
- A Java Future containing the result of the DeleteSink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- ConflictException A resource was in an inconsistent state during an update or a deletion.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteSink
default CompletableFuture<DeleteSinkResponse> deleteSink(Consumer<DeleteSinkRequest.Builder> deleteSinkRequest) Deletes a sink. You must delete all links to a sink before you can delete that sink.
This is a convenience which creates an instance of the
DeleteSinkRequest.Builder
avoiding the need to create one manually viaDeleteSinkRequest.builder()
- Parameters:
deleteSinkRequest
- AConsumer
that will call methods onDeleteSinkRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteSink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- ConflictException A resource was in an inconsistent state during an update or a deletion.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getLink
Returns complete information about one link.
To use this operation, provide the link ARN. To retrieve a list of link ARNs, use ListLinks.
- Parameters:
getLinkRequest
-- Returns:
- A Java Future containing the result of the GetLink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getLink
Returns complete information about one link.
To use this operation, provide the link ARN. To retrieve a list of link ARNs, use ListLinks.
This is a convenience which creates an instance of the
GetLinkRequest.Builder
avoiding the need to create one manually viaGetLinkRequest.builder()
- Parameters:
getLinkRequest
- AConsumer
that will call methods onGetLinkRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetLink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSink
Returns complete information about one monitoring account sink.
To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.
- Parameters:
getSinkRequest
-- Returns:
- A Java Future containing the result of the GetSink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSink
Returns complete information about one monitoring account sink.
To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.
This is a convenience which creates an instance of the
GetSinkRequest.Builder
avoiding the need to create one manually viaGetSinkRequest.builder()
- Parameters:
getSinkRequest
- AConsumer
that will call methods onGetSinkRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetSink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSinkPolicy
default CompletableFuture<GetSinkPolicyResponse> getSinkPolicy(GetSinkPolicyRequest getSinkPolicyRequest) 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.
- Parameters:
getSinkPolicyRequest
-- Returns:
- A Java Future containing the result of the GetSinkPolicy operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSinkPolicy
default CompletableFuture<GetSinkPolicyResponse> getSinkPolicy(Consumer<GetSinkPolicyRequest.Builder> getSinkPolicyRequest) 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.
This is a convenience which creates an instance of the
GetSinkPolicyRequest.Builder
avoiding the need to create one manually viaGetSinkPolicyRequest.builder()
- Parameters:
getSinkPolicyRequest
- AConsumer
that will call methods onGetSinkPolicyRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetSinkPolicy operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAttachedLinks
default CompletableFuture<ListAttachedLinksResponse> listAttachedLinks(ListAttachedLinksRequest listAttachedLinksRequest) Returns a list of source account links that are linked to this monitoring account sink.
To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.
To find a list of links for one source account, use ListLinks.
- Parameters:
listAttachedLinksRequest
-- Returns:
- A Java Future containing the result of the ListAttachedLinks operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAttachedLinks
default CompletableFuture<ListAttachedLinksResponse> listAttachedLinks(Consumer<ListAttachedLinksRequest.Builder> listAttachedLinksRequest) Returns a list of source account links that are linked to this monitoring account sink.
To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.
To find a list of links for one source account, use ListLinks.
This is a convenience which creates an instance of the
ListAttachedLinksRequest.Builder
avoiding the need to create one manually viaListAttachedLinksRequest.builder()
- Parameters:
listAttachedLinksRequest
- AConsumer
that will call methods onListAttachedLinksRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListAttachedLinks operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAttachedLinksPaginator
default ListAttachedLinksPublisher listAttachedLinksPaginator(ListAttachedLinksRequest listAttachedLinksRequest) This is a variant of
listAttachedLinks(software.amazon.awssdk.services.oam.model.ListAttachedLinksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.oam.paginators.ListAttachedLinksPublisher publisher = client.listAttachedLinksPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.oam.paginators.ListAttachedLinksPublisher publisher = client.listAttachedLinksPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.oam.model.ListAttachedLinksResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.oam.model.ListAttachedLinksResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listAttachedLinks(software.amazon.awssdk.services.oam.model.ListAttachedLinksRequest)
operation.- Parameters:
listAttachedLinksRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAttachedLinksPaginator
default ListAttachedLinksPublisher listAttachedLinksPaginator(Consumer<ListAttachedLinksRequest.Builder> listAttachedLinksRequest) This is a variant of
listAttachedLinks(software.amazon.awssdk.services.oam.model.ListAttachedLinksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.oam.paginators.ListAttachedLinksPublisher publisher = client.listAttachedLinksPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.oam.paginators.ListAttachedLinksPublisher publisher = client.listAttachedLinksPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.oam.model.ListAttachedLinksResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.oam.model.ListAttachedLinksResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listAttachedLinks(software.amazon.awssdk.services.oam.model.ListAttachedLinksRequest)
operation.
This is a convenience which creates an instance of the
ListAttachedLinksRequest.Builder
avoiding the need to create one manually viaListAttachedLinksRequest.builder()
- Parameters:
listAttachedLinksRequest
- AConsumer
that will call methods onListAttachedLinksRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listLinks
Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.
To find a list of links for one monitoring account sink, use ListAttachedLinks from within the monitoring account.
- Parameters:
listLinksRequest
-- Returns:
- A Java Future containing the result of the ListLinks operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listLinks
default CompletableFuture<ListLinksResponse> listLinks(Consumer<ListLinksRequest.Builder> listLinksRequest) Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.
To find a list of links for one monitoring account sink, use ListAttachedLinks from within the monitoring account.
This is a convenience which creates an instance of the
ListLinksRequest.Builder
avoiding the need to create one manually viaListLinksRequest.builder()
- Parameters:
listLinksRequest
- AConsumer
that will call methods onListLinksRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListLinks operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listLinksPaginator
This is a variant of
listLinks(software.amazon.awssdk.services.oam.model.ListLinksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.oam.paginators.ListLinksPublisher publisher = client.listLinksPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.oam.paginators.ListLinksPublisher publisher = client.listLinksPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.oam.model.ListLinksResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.oam.model.ListLinksResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listLinks(software.amazon.awssdk.services.oam.model.ListLinksRequest)
operation.- Parameters:
listLinksRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listLinksPaginator
This is a variant of
listLinks(software.amazon.awssdk.services.oam.model.ListLinksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.oam.paginators.ListLinksPublisher publisher = client.listLinksPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.oam.paginators.ListLinksPublisher publisher = client.listLinksPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.oam.model.ListLinksResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.oam.model.ListLinksResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listLinks(software.amazon.awssdk.services.oam.model.ListLinksRequest)
operation.
This is a convenience which creates an instance of the
ListLinksRequest.Builder
avoiding the need to create one manually viaListLinksRequest.builder()
- Parameters:
listLinksRequest
- AConsumer
that will call methods onListLinksRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSinks
Use this operation in a monitoring account to return the list of sinks created in that account.
- Parameters:
listSinksRequest
-- Returns:
- A Java Future containing the result of the ListSinks operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSinks
default CompletableFuture<ListSinksResponse> listSinks(Consumer<ListSinksRequest.Builder> listSinksRequest) Use this operation in a monitoring account to return the list of sinks created in that account.
This is a convenience which creates an instance of the
ListSinksRequest.Builder
avoiding the need to create one manually viaListSinksRequest.builder()
- Parameters:
listSinksRequest
- AConsumer
that will call methods onListSinksRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListSinks operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSinksPaginator
This is a variant of
listSinks(software.amazon.awssdk.services.oam.model.ListSinksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.oam.paginators.ListSinksPublisher publisher = client.listSinksPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.oam.paginators.ListSinksPublisher publisher = client.listSinksPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.oam.model.ListSinksResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.oam.model.ListSinksResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listSinks(software.amazon.awssdk.services.oam.model.ListSinksRequest)
operation.- Parameters:
listSinksRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSinksPaginator
This is a variant of
listSinks(software.amazon.awssdk.services.oam.model.ListSinksRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.oam.paginators.ListSinksPublisher publisher = client.listSinksPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.oam.paginators.ListSinksPublisher publisher = client.listSinksPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.oam.model.ListSinksResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.oam.model.ListSinksResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listSinks(software.amazon.awssdk.services.oam.model.ListSinksRequest)
operation.
This is a convenience which creates an instance of the
ListSinksRequest.Builder
avoiding the need to create one manually viaListSinksRequest.builder()
- Parameters:
listSinksRequest
- AConsumer
that will call methods onListSinksRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Displays the tags associated with a resource. Both sinks and links support tagging.
- Parameters:
listTagsForResourceRequest
-- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ValidationException The value of a parameter in the request caused an error.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Displays the tags associated with a resource. Both sinks and links support tagging.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ValidationException The value of a parameter in the request caused an error.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
putSinkPolicy
default CompletableFuture<PutSinkPolicyResponse> putSinkPolicy(PutSinkPolicyRequest putSinkPolicyRequest) 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.
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:
-
Metrics - Specify with
AWS::CloudWatch::Metric
-
Log groups - Specify with
AWS::Logs::LogGroup
-
Traces - Specify with
AWS::XRay::Trace
-
Application Insights - Applications - Specify with
AWS::ApplicationInsights::Application
See the examples in this section to see how to specify permitted source accounts and data types.
- Parameters:
putSinkPolicyRequest
-- Returns:
- A Java Future containing the result of the PutSinkPolicy operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
putSinkPolicy
default CompletableFuture<PutSinkPolicyResponse> putSinkPolicy(Consumer<PutSinkPolicyRequest.Builder> putSinkPolicyRequest) 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.
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:
-
Metrics - Specify with
AWS::CloudWatch::Metric
-
Log groups - Specify with
AWS::Logs::LogGroup
-
Traces - Specify with
AWS::XRay::Trace
-
Application Insights - Applications - Specify with
AWS::ApplicationInsights::Application
See the examples in this section to see how to specify permitted source accounts and data types.
This is a convenience which creates an instance of the
PutSinkPolicyRequest.Builder
avoiding the need to create one manually viaPutSinkPolicyRequest.builder()
- Parameters:
putSinkPolicyRequest
- AConsumer
that will call methods onPutSinkPolicyRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the PutSinkPolicy operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
tagResource
Assigns one or more tags (key-value pairs) to the specified resource. Both sinks and links can be tagged.
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.
Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
You can use the
TagResource
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.You can associate as many as 50 tags with a resource.
Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the
oam:ResourceTag
permission. Theiam:ResourceTag
permission does not allow you to tag and untag links and sinks.- Parameters:
tagResourceRequest
-- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ValidationException The value of a parameter in the request caused an error.
- TooManyTagsException A resource can have no more than 50 tags.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Assigns one or more tags (key-value pairs) to the specified resource. Both sinks and links can be tagged.
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.
Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
You can use the
TagResource
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.You can associate as many as 50 tags with a resource.
Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the
oam:ResourceTag
permission. Theiam:ResourceTag
permission does not allow you to tag and untag links and sinks.
This is a convenience which creates an instance of the
TagResourceRequest.Builder
avoiding the need to create one manually viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ValidationException The value of a parameter in the request caused an error.
- TooManyTagsException A resource can have no more than 50 tags.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes one or more tags from the specified resource.
Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the
oam:ResourceTag
permission. Theiam:TagResource
permission does not allow you to tag and untag links and sinks.- Parameters:
untagResourceRequest
-- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ValidationException The value of a parameter in the request caused an error.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes one or more tags from the specified resource.
Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the
oam:ResourceTag
permission. Theiam:TagResource
permission does not allow you to tag and untag links and sinks.
This is a convenience which creates an instance of the
UntagResourceRequest.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ValidationException The value of a parameter in the request caused an error.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateLink
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.
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.
To update the list of tags associated with the sink, use TagResource.
- Parameters:
updateLinkRequest
-- Returns:
- A Java Future containing the result of the UpdateLink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateLink
default CompletableFuture<UpdateLinkResponse> updateLink(Consumer<UpdateLinkRequest.Builder> updateLinkRequest) 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.
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.
To update the list of tags associated with the sink, use TagResource.
This is a convenience which creates an instance of the
UpdateLinkRequest.Builder
avoiding the need to create one manually viaUpdateLinkRequest.builder()
- Parameters:
updateLinkRequest
- AConsumer
that will call methods onUpdateLinkRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the UpdateLink operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServiceException Unexpected error while processing the request. Retry the request.
- MissingRequiredParameterException A required parameter is missing from the request.
- InvalidParameterException A parameter is specified incorrectly.
- ResourceNotFoundException The request references a resource that does not exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- OamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aOamAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aOamAsyncClient
.
-