/* * 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.codestarnotifications; import javax.annotation.Generated; import com.amazonaws.*; import com.amazonaws.regions.*; import com.amazonaws.services.codestarnotifications.model.*; /** * Interface for accessing AWS CodeStar Notifications. *
* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.codestarnotifications.AbstractAWSCodeStarNotifications} instead. *
**
* This AWS CodeStar Notifications API Reference provides descriptions and usage examples of the operations and data * types for the AWS CodeStar Notifications API. You can use the AWS CodeStar Notifications API to work with the * following objects: *
** Notification rules, by calling the following: *
** CreateNotificationRule, which creates a notification rule for a resource in your account. *
** DeleteNotificationRule, which deletes a notification rule. *
** DescribeNotificationRule, which provides information about a notification rule. *
** ListNotificationRules, which lists the notification rules associated with your account. *
** UpdateNotificationRule, which changes the name, events, or targets associated with a notification rule. *
** Subscribe, which subscribes a target to a notification rule. *
** Unsubscribe, which removes a target from a notification rule. *
** Targets, by calling the following: *
** DeleteTarget, which removes a notification rule target from a notification rule. *
** ListTargets, which lists the targets associated with a notification rule. *
** Events, by calling the following: *
** ListEventTypes, which lists the event types you can include in a notification rule. *
** Tags, by calling the following: *
** ListTagsForResource, which lists the tags already associated with a notification rule in your account. *
** TagResource, which associates a tag you provide with a notification rule in your account. *
** UntagResource, which removes a tag from a notification rule in your account. *
** For information about how to use AWS CodeStar Notifications, see the Amazon Web Services Developer * Tools Console User Guide. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AWSCodeStarNotifications { /** * 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 = "codestar-notifications"; /** ** Creates a notification rule for a resource. The rule specifies the events you want notifications about and the * targets (such as Chatbot topics or Chatbot clients configured for Slack) where you want to receive them. *
* * @param createNotificationRuleRequest * @return Result of the CreateNotificationRule operation returned by the service. * @throws ResourceAlreadyExistsException * A resource with the same name or ID already exists. Notification rule names must be unique in your Amazon * Web Services account. * @throws ValidationException * One or more parameter values are not valid. * @throws LimitExceededException * One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification * rules, notifications, resources, and targets. For more information, see Limits. * @throws ConfigurationException * Some or all of the configuration is incomplete, missing, or not valid. * @throws ConcurrentModificationException * AWS CodeStar Notifications can't complete the request because the resource is being modified by another * process. Wait a few minutes and try again. * @throws AccessDeniedException * AWS CodeStar Notifications can't create the notification rule because you do not have sufficient * permissions. * @sample AWSCodeStarNotifications.CreateNotificationRule * @see AWS API Documentation */ CreateNotificationRuleResult createNotificationRule(CreateNotificationRuleRequest createNotificationRuleRequest); /** ** Deletes a notification rule for a resource. *
* * @param deleteNotificationRuleRequest * @return Result of the DeleteNotificationRule operation returned by the service. * @throws ValidationException * One or more parameter values are not valid. * @throws LimitExceededException * One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification * rules, notifications, resources, and targets. For more information, see Limits. * @throws ConcurrentModificationException * AWS CodeStar Notifications can't complete the request because the resource is being modified by another * process. Wait a few minutes and try again. * @sample AWSCodeStarNotifications.DeleteNotificationRule * @see AWS API Documentation */ DeleteNotificationRuleResult deleteNotificationRule(DeleteNotificationRuleRequest deleteNotificationRuleRequest); /** ** Deletes a specified target for notifications. *
* * @param deleteTargetRequest * @return Result of the DeleteTarget operation returned by the service. * @throws ValidationException * One or more parameter values are not valid. * @sample AWSCodeStarNotifications.DeleteTarget * @see AWS API Documentation */ DeleteTargetResult deleteTarget(DeleteTargetRequest deleteTargetRequest); /** ** Returns information about a specified notification rule. *
* * @param describeNotificationRuleRequest * @return Result of the DescribeNotificationRule operation returned by the service. * @throws ResourceNotFoundException * AWS CodeStar Notifications can't find a resource that matches the provided ARN. * @throws ValidationException * One or more parameter values are not valid. * @sample AWSCodeStarNotifications.DescribeNotificationRule * @see AWS API Documentation */ DescribeNotificationRuleResult describeNotificationRule(DescribeNotificationRuleRequest describeNotificationRuleRequest); /** ** Returns information about the event types available for configuring notifications. *
* * @param listEventTypesRequest * @return Result of the ListEventTypes operation returned by the service. * @throws InvalidNextTokenException * The value for the enumeration token used in the request to return the next batch of the results is not * valid. * @throws ValidationException * One or more parameter values are not valid. * @sample AWSCodeStarNotifications.ListEventTypes * @see AWS API Documentation */ ListEventTypesResult listEventTypes(ListEventTypesRequest listEventTypesRequest); /** ** Returns a list of the notification rules for an Amazon Web Services account. *
* * @param listNotificationRulesRequest * @return Result of the ListNotificationRules operation returned by the service. * @throws InvalidNextTokenException * The value for the enumeration token used in the request to return the next batch of the results is not * valid. * @throws ValidationException * One or more parameter values are not valid. * @sample AWSCodeStarNotifications.ListNotificationRules * @see AWS API Documentation */ ListNotificationRulesResult listNotificationRules(ListNotificationRulesRequest listNotificationRulesRequest); /** ** Returns a list of the tags associated with a notification rule. *
* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * AWS CodeStar Notifications can't find a resource that matches the provided ARN. * @throws ValidationException * One or more parameter values are not valid. * @sample AWSCodeStarNotifications.ListTagsForResource * @see AWS API Documentation */ ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest); /** ** Returns a list of the notification rule targets for an Amazon Web Services account. *
* * @param listTargetsRequest * @return Result of the ListTargets operation returned by the service. * @throws InvalidNextTokenException * The value for the enumeration token used in the request to return the next batch of the results is not * valid. * @throws ValidationException * One or more parameter values are not valid. * @sample AWSCodeStarNotifications.ListTargets * @see AWS API Documentation */ ListTargetsResult listTargets(ListTargetsRequest listTargetsRequest); /** ** Creates an association between a notification rule and an Chatbot topic or Chatbot client so that the associated * target can receive notifications when the events described in the rule are triggered. *
* * @param subscribeRequest * @return Result of the Subscribe operation returned by the service. * @throws ValidationException * One or more parameter values are not valid. * @throws ResourceNotFoundException * AWS CodeStar Notifications can't find a resource that matches the provided ARN. * @throws ConfigurationException * Some or all of the configuration is incomplete, missing, or not valid. * @sample AWSCodeStarNotifications.Subscribe * @see AWS API Documentation */ SubscribeResult subscribe(SubscribeRequest subscribeRequest); /** ** Associates a set of provided tags with a notification rule. *
* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ResourceNotFoundException * AWS CodeStar Notifications can't find a resource that matches the provided ARN. * @throws LimitExceededException * One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification * rules, notifications, resources, and targets. For more information, see Limits. * @throws ValidationException * One or more parameter values are not valid. * @throws ConcurrentModificationException * AWS CodeStar Notifications can't complete the request because the resource is being modified by another * process. Wait a few minutes and try again. * @sample AWSCodeStarNotifications.TagResource * @see AWS API Documentation */ TagResourceResult tagResource(TagResourceRequest tagResourceRequest); /** ** Removes an association between a notification rule and an Chatbot topic so that subscribers to that topic stop * receiving notifications when the events described in the rule are triggered. *
* * @param unsubscribeRequest * @return Result of the Unsubscribe operation returned by the service. * @throws ValidationException * One or more parameter values are not valid. * @sample AWSCodeStarNotifications.Unsubscribe * @see AWS API Documentation */ UnsubscribeResult unsubscribe(UnsubscribeRequest unsubscribeRequest); /** ** Removes the association between one or more provided tags and a notification rule. *
* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ResourceNotFoundException * AWS CodeStar Notifications can't find a resource that matches the provided ARN. * @throws LimitExceededException * One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification * rules, notifications, resources, and targets. For more information, see Limits. * @throws ValidationException * One or more parameter values are not valid. * @throws ConcurrentModificationException * AWS CodeStar Notifications can't complete the request because the resource is being modified by another * process. Wait a few minutes and try again. * @sample AWSCodeStarNotifications.UntagResource * @see AWS API Documentation */ UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest); /** ** Updates a notification rule for a resource. You can change the events that trigger the notification rule, the * status of the rule, and the targets that receive the notifications. *
** To add or remove tags for a notification rule, you must use TagResource and UntagResource. *
** 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); }