com.amazonaws.services.oam.AWSOAM Maven / Gradle / Ivy
Show all versions of aws-java-sdk-oam Show documentation
/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.oam;
import javax.annotation.Generated;
import com.amazonaws.*;
import com.amazonaws.regions.*;
import com.amazonaws.services.oam.model.*;
/**
* Interface for accessing CloudWatch Observability Access Manager.
*
* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
* {@link com.amazonaws.services.oam.AbstractAWSOAM} instead.
*
*
*
* 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, and traces in any of the linked accounts without account boundaries.
*
*
*
* <p>Set up one or more Amazon Web Services accounts as <i>monitoring accounts</i> and link them with multiple <i>source accounts</i>. A monitoring account is a central Amazon Web Services account that can view and interact with observability data generated from source accounts. A source account is an individual Amazon Web Services account that generates observability data for the resources that reside in it. Source accounts share their observability data with the monitoring account. The shared observability data can include metrics in Amazon CloudWatch, logs in Amazon CloudWatch Logs, and traces in X-Ray.</p>
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public interface AWSOAM {
/**
* The region metadata service name for computing region endpoints. You can use this value to retrieve metadata
* (such as supported regions) of the service.
*
* @see RegionUtils#getRegionsForService(String)
*/
String ENDPOINT_PREFIX = "oam";
/**
*
* Creates a link between a source account and a sink that you have created in a 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.
*
*
* @param createLinkRequest
* @return Result of the CreateLink operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws ConflictException
* A resource was in an inconsistent state during an update or a deletion.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws ServiceQuotaExceededException
* The request would cause a service quota to be exceeded.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @sample AWSOAM.CreateLink
* @see AWS API
* Documentation
*/
CreateLinkResult createLink(CreateLinkRequest createLinkRequest);
/**
*
* 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. If you delete a sink, you can then create a new one in that account.
*
*
* @param createSinkRequest
* @return Result of the CreateSink operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws ConflictException
* A resource was in an inconsistent state during an update or a deletion.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws ServiceQuotaExceededException
* The request would cause a service quota to be exceeded.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @sample AWSOAM.CreateSink
* @see AWS API
* Documentation
*/
CreateSinkResult createSink(CreateSinkRequest createSinkRequest);
/**
*
* Deletes a link between a monitoring account sink and a source account. You must run this operation in the source
* account.
*
*
* @param deleteLinkRequest
* @return Result of the DeleteLink operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.DeleteLink
* @see AWS API
* Documentation
*/
DeleteLinkResult deleteLink(DeleteLinkRequest deleteLinkRequest);
/**
*
* Deletes a sink. You must delete all links to a sink before you can delete that sink.
*
*
* @param deleteSinkRequest
* @return Result of the DeleteSink operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws ConflictException
* A resource was in an inconsistent state during an update or a deletion.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.DeleteSink
* @see AWS API
* Documentation
*/
DeleteSinkResult deleteSink(DeleteSinkRequest deleteSinkRequest);
/**
*
* Returns complete information about one link.
*
*
* To use this operation, provide the link ARN. To retrieve a list of link ARNs, use ListLinks.
*
*
* @param getLinkRequest
* @return Result of the GetLink operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.GetLink
* @see AWS API
* Documentation
*/
GetLinkResult getLink(GetLinkRequest getLinkRequest);
/**
*
* 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.
*
*
* @param getSinkRequest
* @return Result of the GetSink operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.GetSink
* @see AWS API
* Documentation
*/
GetSinkResult getSink(GetSinkRequest getSinkRequest);
/**
*
* 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.
*
*
* @param getSinkPolicyRequest
* @return Result of the GetSinkPolicy operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.GetSinkPolicy
* @see AWS API
* Documentation
*/
GetSinkPolicyResult getSinkPolicy(GetSinkPolicyRequest getSinkPolicyRequest);
/**
*
* 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.
*
*
* @param listAttachedLinksRequest
* @return Result of the ListAttachedLinks operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.ListAttachedLinks
* @see AWS API
* Documentation
*/
ListAttachedLinksResult listAttachedLinks(ListAttachedLinksRequest listAttachedLinksRequest);
/**
*
* 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.
*
*
* @param listLinksRequest
* @return Result of the ListLinks operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.ListLinks
* @see AWS API
* Documentation
*/
ListLinksResult listLinks(ListLinksRequest listLinksRequest);
/**
*
* Use this operation in a monitoring account to return the list of sinks created in that account.
*
*
* @param listSinksRequest
* @return Result of the ListSinks operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.ListSinks
* @see AWS API
* Documentation
*/
ListSinksResult listSinks(ListSinksRequest listSinksRequest);
/**
*
* Displays the tags associated with a resource. Both sinks and links support tagging.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws ValidationException
* The value of a parameter in the request caused an error.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.ListTagsForResource
* @see AWS API
* Documentation
*/
ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest);
/**
*
* 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
*
*
*
*
* See the examples in this section to see how to specify permitted source accounts and data types.
*
*
* @param putSinkPolicyRequest
* @return Result of the PutSinkPolicy operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.PutSinkPolicy
* @see AWS API
* Documentation
*/
PutSinkPolicyResult putSinkPolicy(PutSinkPolicyRequest putSinkPolicyRequest);
/**
*
* 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. The iam:ResourceTag
permission does not allow you to
* tag and untag links and sinks.
*
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws ValidationException
* The value of a parameter in the request caused an error.
* @throws TooManyTagsException
* A resource can have no more than 50 tags.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.TagResource
* @see AWS API
* Documentation
*/
TagResourceResult tagResource(TagResourceRequest tagResourceRequest);
/**
*
* 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. The iam:TagResource
permission does not allow you to
* tag and untag links and sinks.
*
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws ValidationException
* The value of a parameter in the request caused an error.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.UntagResource
* @see AWS API
* Documentation
*/
UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest);
/**
*
* 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.
*
*
* To update the list of tags associated with the sink, use TagResource.
*
*
* @param updateLinkRequest
* @return Result of the UpdateLink operation returned by the service.
* @throws InternalServiceException
* Unexpected error while processing the request. Retry the request.
* @throws MissingRequiredParameterException
* A required parameter is missing from the request.
* @throws InvalidParameterException
* A parameter is specified incorrectly.
* @throws ResourceNotFoundException
* The request references a resource that does not exist.
* @sample AWSOAM.UpdateLink
* @see AWS API
* Documentation
*/
UpdateLinkResult updateLink(UpdateLinkRequest updateLinkRequest);
/**
* Shuts down this client object, releasing any resources that might be held open. This is an optional method, and
* callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client
* has been shutdown, it should not be used to make any more requests.
*/
void shutdown();
/**
* Returns additional metadata for a previously executed successful request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
*
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing a request.
*
* @param request
* The originally executed request.
*
* @return The response metadata for the specified request, or null if none is available.
*/
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request);
}