Interface CodestarNotificationsAsyncClient

  • All Superinterfaces:
    AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

    @Generated("software.amazon.awssdk:codegen")
    @ThreadSafe
    public interface CodestarNotificationsAsyncClient
    extends AwsClient
    Service client for accessing AWS CodeStar Notifications asynchronously. This can be created using the static builder() 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:

    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.

    • Method Detail

      • createNotificationRule

        default CompletableFuture<CreateNotificationRuleResponse> createNotificationRule​(CreateNotificationRuleRequest createNotificationRuleRequest)

        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:
        A Java Future containing the result of the CreateNotificationRule operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • createNotificationRule

        default CompletableFuture<CreateNotificationRuleResponse> createNotificationRule​(Consumer<CreateNotificationRuleRequest.Builder> createNotificationRuleRequest)

        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.Builder avoiding the need to create one manually via CreateNotificationRuleRequest.builder()

        Parameters:
        createNotificationRuleRequest - A Consumer that will call methods on CreateNotificationRuleRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the CreateNotificationRule operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • deleteNotificationRule

        default CompletableFuture<DeleteNotificationRuleResponse> deleteNotificationRule​(DeleteNotificationRuleRequest deleteNotificationRuleRequest)

        Deletes a notification rule for a resource.

        Parameters:
        deleteNotificationRuleRequest -
        Returns:
        A Java Future containing the result of the DeleteNotificationRule operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • deleteNotificationRule

        default CompletableFuture<DeleteNotificationRuleResponse> deleteNotificationRule​(Consumer<DeleteNotificationRuleRequest.Builder> deleteNotificationRuleRequest)

        Deletes a notification rule for a resource.


        This is a convenience which creates an instance of the DeleteNotificationRuleRequest.Builder avoiding the need to create one manually via DeleteNotificationRuleRequest.builder()

        Parameters:
        deleteNotificationRuleRequest - A Consumer that will call methods on DeleteNotificationRuleRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the DeleteNotificationRule operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • deleteTarget

        default CompletableFuture<DeleteTargetResponse> deleteTarget​(DeleteTargetRequest deleteTargetRequest)

        Deletes a specified target for notifications.

        Parameters:
        deleteTargetRequest -
        Returns:
        A Java Future containing the result of the DeleteTarget operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • deleteTarget

        default CompletableFuture<DeleteTargetResponse> deleteTarget​(Consumer<DeleteTargetRequest.Builder> deleteTargetRequest)

        Deletes a specified target for notifications.


        This is a convenience which creates an instance of the DeleteTargetRequest.Builder avoiding the need to create one manually via DeleteTargetRequest.builder()

        Parameters:
        deleteTargetRequest - A Consumer that will call methods on DeleteTargetRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the DeleteTarget operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • describeNotificationRule

        default CompletableFuture<DescribeNotificationRuleResponse> describeNotificationRule​(DescribeNotificationRuleRequest describeNotificationRuleRequest)

        Returns information about a specified notification rule.

        Parameters:
        describeNotificationRuleRequest -
        Returns:
        A Java Future containing the result of the DescribeNotificationRule operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • describeNotificationRule

        default CompletableFuture<DescribeNotificationRuleResponse> describeNotificationRule​(Consumer<DescribeNotificationRuleRequest.Builder> describeNotificationRuleRequest)

        Returns information about a specified notification rule.


        This is a convenience which creates an instance of the DescribeNotificationRuleRequest.Builder avoiding the need to create one manually via DescribeNotificationRuleRequest.builder()

        Parameters:
        describeNotificationRuleRequest - A Consumer that will call methods on DescribeNotificationRuleRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the DescribeNotificationRule operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listEventTypes

        default CompletableFuture<ListEventTypesResponse> listEventTypes​(ListEventTypesRequest listEventTypesRequest)

        Returns information about the event types available for configuring notifications.

        Parameters:
        listEventTypesRequest -
        Returns:
        A Java Future containing the result of the ListEventTypes operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listEventTypes

        default CompletableFuture<ListEventTypesResponse> listEventTypes​(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest)

        Returns information about the event types available for configuring notifications.


        This is a convenience which creates an instance of the ListEventTypesRequest.Builder avoiding the need to create one manually via ListEventTypesRequest.builder()

        Parameters:
        listEventTypesRequest - A Consumer that will call methods on ListEventTypesRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the ListEventTypes operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listEventTypesPaginator

        default ListEventTypesPublisher listEventTypesPaginator​(ListEventTypesRequest listEventTypesRequest)

        This is a variant of listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

        When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

        The following are few ways to use the response class:

        1) Using the subscribe helper method
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher publisher = client.listEventTypesPaginator(request);
         CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
         future.get();
         
         
        2) Using a custom subscriber
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher publisher = client.listEventTypesPaginator(request);
         publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse>() {
         
         public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
         
         
         public void onNext(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse response) { //... };
         });
         
        As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

        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 publisher that can be subscribed to request a stream of response pages.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listEventTypesPaginator

        default ListEventTypesPublisher listEventTypesPaginator​(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest)

        This is a variant of listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

        When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

        The following are few ways to use the response class:

        1) Using the subscribe helper method
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher publisher = client.listEventTypesPaginator(request);
         CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
         future.get();
         
         
        2) Using a custom subscriber
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher publisher = client.listEventTypesPaginator(request);
         publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse>() {
         
         public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
         
         
         public void onNext(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse response) { //... };
         });
         
        As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

        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.Builder avoiding the need to create one manually via ListEventTypesRequest.builder()

        Parameters:
        listEventTypesRequest - A Consumer that will call methods on ListEventTypesRequest.Builder to create a request.
        Returns:
        A custom publisher that can be subscribed to request a stream of response pages.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listNotificationRules

        default CompletableFuture<ListNotificationRulesResponse> listNotificationRules​(ListNotificationRulesRequest listNotificationRulesRequest)

        Returns a list of the notification rules for an Amazon Web Services account.

        Parameters:
        listNotificationRulesRequest -
        Returns:
        A Java Future containing the result of the ListNotificationRules operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listNotificationRules

        default CompletableFuture<ListNotificationRulesResponse> listNotificationRules​(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest)

        Returns a list of the notification rules for an Amazon Web Services account.


        This is a convenience which creates an instance of the ListNotificationRulesRequest.Builder avoiding the need to create one manually via ListNotificationRulesRequest.builder()

        Parameters:
        listNotificationRulesRequest - A Consumer that will call methods on ListNotificationRulesRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the ListNotificationRules operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listNotificationRulesPaginator

        default ListNotificationRulesPublisher listNotificationRulesPaginator​(ListNotificationRulesRequest listNotificationRulesRequest)

        This is a variant of listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

        When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

        The following are few ways to use the response class:

        1) Using the subscribe helper method
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher publisher = client.listNotificationRulesPaginator(request);
         CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
         future.get();
         
         
        2) Using a custom subscriber
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher publisher = client.listNotificationRulesPaginator(request);
         publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse>() {
         
         public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
         
         
         public void onNext(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse response) { //... };
         });
         
        As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

        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 publisher that can be subscribed to request a stream of response pages.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listNotificationRulesPaginator

        default ListNotificationRulesPublisher listNotificationRulesPaginator​(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest)

        This is a variant of listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

        When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

        The following are few ways to use the response class:

        1) Using the subscribe helper method
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher publisher = client.listNotificationRulesPaginator(request);
         CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
         future.get();
         
         
        2) Using a custom subscriber
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher publisher = client.listNotificationRulesPaginator(request);
         publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse>() {
         
         public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
         
         
         public void onNext(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse response) { //... };
         });
         
        As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

        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.Builder avoiding the need to create one manually via ListNotificationRulesRequest.builder()

        Parameters:
        listNotificationRulesRequest - A Consumer that will call methods on ListNotificationRulesRequest.Builder to create a request.
        Returns:
        A custom publisher that can be subscribed to request a stream of response pages.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listTagsForResource

        default CompletableFuture<ListTagsForResourceResponse> listTagsForResource​(ListTagsForResourceRequest listTagsForResourceRequest)

        Returns a list of the tags associated with a notification rule.

        Parameters:
        listTagsForResourceRequest -
        Returns:
        A Java Future containing the result of the ListTagsForResource operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listTagsForResource

        default CompletableFuture<ListTagsForResourceResponse> listTagsForResource​(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)

        Returns a list of the tags associated with a notification rule.


        This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder avoiding the need to create one manually via ListTagsForResourceRequest.builder()

        Parameters:
        listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the ListTagsForResource operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listTargets

        default CompletableFuture<ListTargetsResponse> listTargets​(ListTargetsRequest listTargetsRequest)

        Returns a list of the notification rule targets for an Amazon Web Services account.

        Parameters:
        listTargetsRequest -
        Returns:
        A Java Future containing the result of the ListTargets operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listTargets

        default CompletableFuture<ListTargetsResponse> listTargets​(Consumer<ListTargetsRequest.Builder> listTargetsRequest)

        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.Builder avoiding the need to create one manually via ListTargetsRequest.builder()

        Parameters:
        listTargetsRequest - A Consumer that will call methods on ListTargetsRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the ListTargets operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listTargetsPaginator

        default ListTargetsPublisher listTargetsPaginator​(ListTargetsRequest listTargetsRequest)

        This is a variant of listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

        When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

        The following are few ways to use the response class:

        1) Using the subscribe helper method
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher publisher = client.listTargetsPaginator(request);
         CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
         future.get();
         
         
        2) Using a custom subscriber
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher publisher = client.listTargetsPaginator(request);
         publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse>() {
         
         public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
         
         
         public void onNext(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse response) { //... };
         });
         
        As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

        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 publisher that can be subscribed to request a stream of response pages.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • listTargetsPaginator

        default ListTargetsPublisher listTargetsPaginator​(Consumer<ListTargetsRequest.Builder> listTargetsRequest)

        This is a variant of listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

        When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

        The following are few ways to use the response class:

        1) Using the subscribe helper method
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher publisher = client.listTargetsPaginator(request);
         CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
         future.get();
         
         
        2) Using a custom subscriber
         
         software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher publisher = client.listTargetsPaginator(request);
         publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse>() {
         
         public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
         
         
         public void onNext(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse response) { //... };
         });
         
        As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

        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.Builder avoiding the need to create one manually via ListTargetsRequest.builder()

        Parameters:
        listTargetsRequest - A Consumer that will call methods on ListTargetsRequest.Builder to create a request.
        Returns:
        A custom publisher that can be subscribed to request a stream of response pages.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • subscribe

        default CompletableFuture<SubscribeResponse> subscribe​(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.

        Parameters:
        subscribeRequest -
        Returns:
        A Java Future containing the result of the Subscribe operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • subscribe

        default CompletableFuture<SubscribeResponse> subscribe​(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.


        This is a convenience which creates an instance of the SubscribeRequest.Builder avoiding the need to create one manually via SubscribeRequest.builder()

        Parameters:
        subscribeRequest - A Consumer that will call methods on SubscribeRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the Subscribe operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • tagResource

        default CompletableFuture<TagResourceResponse> tagResource​(TagResourceRequest tagResourceRequest)

        Associates a set of provided tags with a notification rule.

        Parameters:
        tagResourceRequest -
        Returns:
        A Java Future containing the result of the TagResource operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • tagResource

        default CompletableFuture<TagResourceResponse> tagResource​(Consumer<TagResourceRequest.Builder> tagResourceRequest)

        Associates a set of provided tags with a notification rule.


        This is a convenience which creates an instance of the TagResourceRequest.Builder avoiding the need to create one manually via TagResourceRequest.builder()

        Parameters:
        tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the TagResource operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • unsubscribe

        default CompletableFuture<UnsubscribeResponse> unsubscribe​(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.

        Parameters:
        unsubscribeRequest -
        Returns:
        A Java Future containing the result of the Unsubscribe operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • unsubscribe

        default CompletableFuture<UnsubscribeResponse> unsubscribe​(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.


        This is a convenience which creates an instance of the UnsubscribeRequest.Builder avoiding the need to create one manually via UnsubscribeRequest.builder()

        Parameters:
        unsubscribeRequest - A Consumer that will call methods on UnsubscribeRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the Unsubscribe operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • untagResource

        default CompletableFuture<UntagResourceResponse> untagResource​(UntagResourceRequest untagResourceRequest)

        Removes the association between one or more provided tags and a notification rule.

        Parameters:
        untagResourceRequest -
        Returns:
        A Java Future containing the result of the UntagResource operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • untagResource

        default CompletableFuture<UntagResourceResponse> untagResource​(Consumer<UntagResourceRequest.Builder> untagResourceRequest)

        Removes the association between one or more provided tags and a notification rule.


        This is a convenience which creates an instance of the UntagResourceRequest.Builder avoiding the need to create one manually via UntagResourceRequest.builder()

        Parameters:
        untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the UntagResource operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • updateNotificationRule

        default CompletableFuture<UpdateNotificationRuleResponse> updateNotificationRule​(UpdateNotificationRuleRequest updateNotificationRuleRequest)

        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:
        A Java Future containing the result of the UpdateNotificationRule operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation
      • updateNotificationRule

        default CompletableFuture<UpdateNotificationRuleResponse> updateNotificationRule​(Consumer<UpdateNotificationRuleRequest.Builder> updateNotificationRuleRequest)

        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.Builder avoiding the need to create one manually via UpdateNotificationRuleRequest.builder()

        Parameters:
        updateNotificationRuleRequest - A Consumer that will call methods on UpdateNotificationRuleRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the UpdateNotificationRule operation returned by the service.
        The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
        • 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.
        See Also:
        AWS API Documentation