Interface CodestarNotificationsClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface CodestarNotificationsClient extends AwsClient
Service client for accessing AWS CodeStar Notifications. This can be created using the staticbuilder()method.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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static CodestarNotificationsClientBuilderbuilder()Create a builder that can be used to configure and create aCodestarNotificationsClient.static CodestarNotificationsClientcreate()Create aCodestarNotificationsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateNotificationRuleResponsecreateNotificationRule(Consumer<CreateNotificationRuleRequest.Builder> createNotificationRuleRequest)Creates a notification rule for a resource.default CreateNotificationRuleResponsecreateNotificationRule(CreateNotificationRuleRequest createNotificationRuleRequest)Creates a notification rule for a resource.default DeleteNotificationRuleResponsedeleteNotificationRule(Consumer<DeleteNotificationRuleRequest.Builder> deleteNotificationRuleRequest)Deletes a notification rule for a resource.default DeleteNotificationRuleResponsedeleteNotificationRule(DeleteNotificationRuleRequest deleteNotificationRuleRequest)Deletes a notification rule for a resource.default DeleteTargetResponsedeleteTarget(Consumer<DeleteTargetRequest.Builder> deleteTargetRequest)Deletes a specified target for notifications.default DeleteTargetResponsedeleteTarget(DeleteTargetRequest deleteTargetRequest)Deletes a specified target for notifications.default DescribeNotificationRuleResponsedescribeNotificationRule(Consumer<DescribeNotificationRuleRequest.Builder> describeNotificationRuleRequest)Returns information about a specified notification rule.default DescribeNotificationRuleResponsedescribeNotificationRule(DescribeNotificationRuleRequest describeNotificationRuleRequest)Returns information about a specified notification rule.default ListEventTypesResponselistEventTypes(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest)Returns information about the event types available for configuring notifications.default ListEventTypesResponselistEventTypes(ListEventTypesRequest listEventTypesRequest)Returns information about the event types available for configuring notifications.default ListEventTypesIterablelistEventTypesPaginator(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest)Returns information about the event types available for configuring notifications.default ListEventTypesIterablelistEventTypesPaginator(ListEventTypesRequest listEventTypesRequest)Returns information about the event types available for configuring notifications.default ListNotificationRulesResponselistNotificationRules(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest)Returns a list of the notification rules for an Amazon Web Services account.default ListNotificationRulesResponselistNotificationRules(ListNotificationRulesRequest listNotificationRulesRequest)Returns a list of the notification rules for an Amazon Web Services account.default ListNotificationRulesIterablelistNotificationRulesPaginator(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest)Returns a list of the notification rules for an Amazon Web Services account.default ListNotificationRulesIterablelistNotificationRulesPaginator(ListNotificationRulesRequest listNotificationRulesRequest)Returns a list of the notification rules for an Amazon Web Services account.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)Returns a list of the tags associated with a notification rule.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)Returns a list of the tags associated with a notification rule.default ListTargetsResponselistTargets(Consumer<ListTargetsRequest.Builder> listTargetsRequest)Returns a list of the notification rule targets for an Amazon Web Services account.default ListTargetsResponselistTargets(ListTargetsRequest listTargetsRequest)Returns a list of the notification rule targets for an Amazon Web Services account.default ListTargetsIterablelistTargetsPaginator(Consumer<ListTargetsRequest.Builder> listTargetsRequest)Returns a list of the notification rule targets for an Amazon Web Services account.default ListTargetsIterablelistTargetsPaginator(ListTargetsRequest listTargetsRequest)Returns a list of the notification rule targets for an Amazon Web Services account.default CodestarNotificationsServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default SubscribeResponsesubscribe(Consumer<SubscribeRequest.Builder> subscribeRequest)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.default SubscribeResponsesubscribe(SubscribeRequest subscribeRequest)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.default TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)Associates a set of provided tags with a notification rule.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest)Associates a set of provided tags with a notification rule.default UnsubscribeResponseunsubscribe(Consumer<UnsubscribeRequest.Builder> unsubscribeRequest)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.default UnsubscribeResponseunsubscribe(UnsubscribeRequest unsubscribeRequest)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.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)Removes the association between one or more provided tags and a notification rule.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest)Removes the association between one or more provided tags and a notification rule.default UpdateNotificationRuleResponseupdateNotificationRule(Consumer<UpdateNotificationRuleRequest.Builder> updateNotificationRuleRequest)Updates a notification rule for a resource.default UpdateNotificationRuleResponseupdateNotificationRule(UpdateNotificationRuleRequest updateNotificationRuleRequest)Updates a notification rule for a resource.-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
createNotificationRule
default CreateNotificationRuleResponse createNotificationRule(CreateNotificationRuleRequest createNotificationRuleRequest) throws ResourceAlreadyExistsException, ValidationException, LimitExceededException, ConfigurationException, ConcurrentModificationException, AccessDeniedException, AwsServiceException, SdkClientException, CodestarNotificationsException
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.
- Parameters:
createNotificationRuleRequest-- Returns:
- 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.ValidationException- One or more parameter values are not valid.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.ConfigurationException- Some or all of the configuration is incomplete, missing, or not valid.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.AccessDeniedException- AWS CodeStar Notifications can't create the notification rule because you do not have sufficient permissions.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
createNotificationRule
default CreateNotificationRuleResponse createNotificationRule(Consumer<CreateNotificationRuleRequest.Builder> createNotificationRuleRequest) throws ResourceAlreadyExistsException, ValidationException, LimitExceededException, ConfigurationException, ConcurrentModificationException, AccessDeniedException, AwsServiceException, SdkClientException, CodestarNotificationsException
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.
This is a convenience which creates an instance of the
CreateNotificationRuleRequest.Builderavoiding the need to create one manually viaCreateNotificationRuleRequest.builder()- Parameters:
createNotificationRuleRequest- AConsumerthat will call methods onCreateNotificationRuleRequest.Builderto create a request.- Returns:
- 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.ValidationException- One or more parameter values are not valid.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.ConfigurationException- Some or all of the configuration is incomplete, missing, or not valid.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.AccessDeniedException- AWS CodeStar Notifications can't create the notification rule because you do not have sufficient permissions.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteNotificationRule
default DeleteNotificationRuleResponse deleteNotificationRule(DeleteNotificationRuleRequest deleteNotificationRuleRequest) throws ValidationException, LimitExceededException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Deletes a notification rule for a resource.
- Parameters:
deleteNotificationRuleRequest-- Returns:
- Result of the DeleteNotificationRule operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.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.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.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteNotificationRule
default DeleteNotificationRuleResponse deleteNotificationRule(Consumer<DeleteNotificationRuleRequest.Builder> deleteNotificationRuleRequest) throws ValidationException, LimitExceededException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Deletes a notification rule for a resource.
This is a convenience which creates an instance of the
DeleteNotificationRuleRequest.Builderavoiding the need to create one manually viaDeleteNotificationRuleRequest.builder()- Parameters:
deleteNotificationRuleRequest- AConsumerthat will call methods onDeleteNotificationRuleRequest.Builderto create a request.- Returns:
- Result of the DeleteNotificationRule operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.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.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.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteTarget
default DeleteTargetResponse deleteTarget(DeleteTargetRequest deleteTargetRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Deletes a specified target for notifications.
- Parameters:
deleteTargetRequest-- Returns:
- Result of the DeleteTarget operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteTarget
default DeleteTargetResponse deleteTarget(Consumer<DeleteTargetRequest.Builder> deleteTargetRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Deletes a specified target for notifications.
This is a convenience which creates an instance of the
DeleteTargetRequest.Builderavoiding the need to create one manually viaDeleteTargetRequest.builder()- Parameters:
deleteTargetRequest- AConsumerthat will call methods onDeleteTargetRequest.Builderto create a request.- Returns:
- Result of the DeleteTarget operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
describeNotificationRule
default DescribeNotificationRuleResponse describeNotificationRule(DescribeNotificationRuleRequest describeNotificationRuleRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about a specified notification rule.
- Parameters:
describeNotificationRuleRequest-- Returns:
- Result of the DescribeNotificationRule operation returned by the service.
- Throws:
ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
describeNotificationRule
default DescribeNotificationRuleResponse describeNotificationRule(Consumer<DescribeNotificationRuleRequest.Builder> describeNotificationRuleRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about a specified notification rule.
This is a convenience which creates an instance of the
DescribeNotificationRuleRequest.Builderavoiding the need to create one manually viaDescribeNotificationRuleRequest.builder()- Parameters:
describeNotificationRuleRequest- AConsumerthat will call methods onDescribeNotificationRuleRequest.Builderto create a request.- Returns:
- Result of the DescribeNotificationRule operation returned by the service.
- Throws:
ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listEventTypes
default ListEventTypesResponse listEventTypes(ListEventTypesRequest listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about the event types available for configuring notifications.
- Parameters:
listEventTypesRequest-- Returns:
- 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.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listEventTypes
default ListEventTypesResponse listEventTypes(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about the event types available for configuring notifications.
This is a convenience which creates an instance of the
ListEventTypesRequest.Builderavoiding the need to create one manually viaListEventTypesRequest.builder()- Parameters:
listEventTypesRequest- AConsumerthat will call methods onListEventTypesRequest.Builderto create a request.- Returns:
- 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.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listEventTypesPaginator
default ListEventTypesIterable listEventTypesPaginator(ListEventTypesRequest listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about the event types available for configuring notifications.
This is a variant of
listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client .listEventTypesPaginator(request); for (software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request); responses.iterator().forEachRemaining(....);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
listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)operation.- Parameters:
listEventTypesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidNextTokenException- The value for the enumeration token used in the request to return the next batch of the results is not valid.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listEventTypesPaginator
default ListEventTypesIterable listEventTypesPaginator(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about the event types available for configuring notifications.
This is a variant of
listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client .listEventTypesPaginator(request); for (software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request); responses.iterator().forEachRemaining(....);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
listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)operation.This is a convenience which creates an instance of the
ListEventTypesRequest.Builderavoiding the need to create one manually viaListEventTypesRequest.builder()- Parameters:
listEventTypesRequest- AConsumerthat will call methods onListEventTypesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidNextTokenException- The value for the enumeration token used in the request to return the next batch of the results is not valid.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listNotificationRules
default ListNotificationRulesResponse listNotificationRules(ListNotificationRulesRequest listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rules for an Amazon Web Services account.
- Parameters:
listNotificationRulesRequest-- Returns:
- 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.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listNotificationRules
default ListNotificationRulesResponse listNotificationRules(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rules for an Amazon Web Services account.
This is a convenience which creates an instance of the
ListNotificationRulesRequest.Builderavoiding the need to create one manually viaListNotificationRulesRequest.builder()- Parameters:
listNotificationRulesRequest- AConsumerthat will call methods onListNotificationRulesRequest.Builderto create a request.- Returns:
- 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.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listNotificationRulesPaginator
default ListNotificationRulesIterable listNotificationRulesPaginator(ListNotificationRulesRequest listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rules for an Amazon Web Services account.
This is a variant of
listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client .listNotificationRulesPaginator(request); for (software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request); responses.iterator().forEachRemaining(....);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
listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)operation.- Parameters:
listNotificationRulesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidNextTokenException- The value for the enumeration token used in the request to return the next batch of the results is not valid.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listNotificationRulesPaginator
default ListNotificationRulesIterable listNotificationRulesPaginator(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rules for an Amazon Web Services account.
This is a variant of
listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client .listNotificationRulesPaginator(request); for (software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request); responses.iterator().forEachRemaining(....);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
listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)operation.This is a convenience which creates an instance of the
ListNotificationRulesRequest.Builderavoiding the need to create one manually viaListNotificationRulesRequest.builder()- Parameters:
listNotificationRulesRequest- AConsumerthat will call methods onListNotificationRulesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidNextTokenException- The value for the enumeration token used in the request to return the next batch of the results is not valid.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the tags associated with a notification rule.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the tags associated with a notification rule.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTargets
default ListTargetsResponse listTargets(ListTargetsRequest listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rule targets for an Amazon Web Services account.
- Parameters:
listTargetsRequest-- Returns:
- 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.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTargets
default ListTargetsResponse listTargets(Consumer<ListTargetsRequest.Builder> listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rule targets for an Amazon Web Services account.
This is a convenience which creates an instance of the
ListTargetsRequest.Builderavoiding the need to create one manually viaListTargetsRequest.builder()- Parameters:
listTargetsRequest- AConsumerthat will call methods onListTargetsRequest.Builderto create a request.- Returns:
- 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.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTargetsPaginator
default ListTargetsIterable listTargetsPaginator(ListTargetsRequest listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rule targets for an Amazon Web Services account.
This is a variant of
listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client .listTargetsPaginator(request); for (software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request); responses.iterator().forEachRemaining(....);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
listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)operation.- Parameters:
listTargetsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidNextTokenException- The value for the enumeration token used in the request to return the next batch of the results is not valid.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTargetsPaginator
default ListTargetsIterable listTargetsPaginator(Consumer<ListTargetsRequest.Builder> listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rule targets for an Amazon Web Services account.
This is a variant of
listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client .listTargetsPaginator(request); for (software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request); responses.iterator().forEachRemaining(....);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
listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)operation.This is a convenience which creates an instance of the
ListTargetsRequest.Builderavoiding the need to create one manually viaListTargetsRequest.builder()- Parameters:
listTargetsRequest- AConsumerthat will call methods onListTargetsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidNextTokenException- The value for the enumeration token used in the request to return the next batch of the results is not valid.ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
subscribe
default SubscribeResponse subscribe(SubscribeRequest subscribeRequest) throws ValidationException, ResourceNotFoundException, ConfigurationException, AwsServiceException, SdkClientException, CodestarNotificationsException
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.
- Parameters:
subscribeRequest-- Returns:
- Result of the Subscribe operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.ConfigurationException- Some or all of the configuration is incomplete, missing, or not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
subscribe
default SubscribeResponse subscribe(Consumer<SubscribeRequest.Builder> subscribeRequest) throws ValidationException, ResourceNotFoundException, ConfigurationException, AwsServiceException, SdkClientException, CodestarNotificationsException
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.
This is a convenience which creates an instance of the
SubscribeRequest.Builderavoiding the need to create one manually viaSubscribeRequest.builder()- Parameters:
subscribeRequest- AConsumerthat will call methods onSubscribeRequest.Builderto create a request.- Returns:
- Result of the Subscribe operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.ConfigurationException- Some or all of the configuration is incomplete, missing, or not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Associates a set of provided tags with a notification rule.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.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.ValidationException- One or more parameter values are not valid.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.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Associates a set of provided tags with a notification rule.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.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.ValidationException- One or more parameter values are not valid.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.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
unsubscribe
default UnsubscribeResponse unsubscribe(UnsubscribeRequest unsubscribeRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
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.
- Parameters:
unsubscribeRequest-- Returns:
- Result of the Unsubscribe operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
unsubscribe
default UnsubscribeResponse unsubscribe(Consumer<UnsubscribeRequest.Builder> unsubscribeRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
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.
This is a convenience which creates an instance of the
UnsubscribeRequest.Builderavoiding the need to create one manually viaUnsubscribeRequest.builder()- Parameters:
unsubscribeRequest- AConsumerthat will call methods onUnsubscribeRequest.Builderto create a request.- Returns:
- Result of the Unsubscribe operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Removes the association between one or more provided tags and a notification rule.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.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.ValidationException- One or more parameter values are not valid.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.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Removes the association between one or more provided tags and a notification rule.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.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.ValidationException- One or more parameter values are not valid.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.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateNotificationRule
default UpdateNotificationRuleResponse updateNotificationRule(UpdateNotificationRuleRequest updateNotificationRuleRequest) throws ValidationException, ResourceNotFoundException, ConfigurationException, AwsServiceException, SdkClientException, CodestarNotificationsException
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.
- Parameters:
updateNotificationRuleRequest-- Returns:
- Result of the UpdateNotificationRule operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.ConfigurationException- Some or all of the configuration is incomplete, missing, or not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateNotificationRule
default UpdateNotificationRuleResponse updateNotificationRule(Consumer<UpdateNotificationRuleRequest.Builder> updateNotificationRuleRequest) throws ValidationException, ResourceNotFoundException, ConfigurationException, AwsServiceException, SdkClientException, CodestarNotificationsException
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.
This is a convenience which creates an instance of the
UpdateNotificationRuleRequest.Builderavoiding the need to create one manually viaUpdateNotificationRuleRequest.builder()- Parameters:
updateNotificationRuleRequest- AConsumerthat will call methods onUpdateNotificationRuleRequest.Builderto create a request.- Returns:
- Result of the UpdateNotificationRule operation returned by the service.
- Throws:
ValidationException- One or more parameter values are not valid.ResourceNotFoundException- AWS CodeStar Notifications can't find a resource that matches the provided ARN.ConfigurationException- Some or all of the configuration is incomplete, missing, or not valid.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.CodestarNotificationsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
create
static CodestarNotificationsClient create()
Create aCodestarNotificationsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static CodestarNotificationsClientBuilder builder()
Create a builder that can be used to configure and create aCodestarNotificationsClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default CodestarNotificationsServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-