
software.amazon.awssdk.services.codestarnotifications.CodestarNotificationsAsyncClient Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.codestarnotifications;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.awscore.AwsClient;
import software.amazon.awssdk.services.codestarnotifications.model.CreateNotificationRuleRequest;
import software.amazon.awssdk.services.codestarnotifications.model.CreateNotificationRuleResponse;
import software.amazon.awssdk.services.codestarnotifications.model.DeleteNotificationRuleRequest;
import software.amazon.awssdk.services.codestarnotifications.model.DeleteNotificationRuleResponse;
import software.amazon.awssdk.services.codestarnotifications.model.DeleteTargetRequest;
import software.amazon.awssdk.services.codestarnotifications.model.DeleteTargetResponse;
import software.amazon.awssdk.services.codestarnotifications.model.DescribeNotificationRuleRequest;
import software.amazon.awssdk.services.codestarnotifications.model.DescribeNotificationRuleResponse;
import software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest;
import software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse;
import software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest;
import software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse;
import software.amazon.awssdk.services.codestarnotifications.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.codestarnotifications.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest;
import software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse;
import software.amazon.awssdk.services.codestarnotifications.model.SubscribeRequest;
import software.amazon.awssdk.services.codestarnotifications.model.SubscribeResponse;
import software.amazon.awssdk.services.codestarnotifications.model.TagResourceRequest;
import software.amazon.awssdk.services.codestarnotifications.model.TagResourceResponse;
import software.amazon.awssdk.services.codestarnotifications.model.UnsubscribeRequest;
import software.amazon.awssdk.services.codestarnotifications.model.UnsubscribeResponse;
import software.amazon.awssdk.services.codestarnotifications.model.UntagResourceRequest;
import software.amazon.awssdk.services.codestarnotifications.model.UntagResourceResponse;
import software.amazon.awssdk.services.codestarnotifications.model.UpdateNotificationRuleRequest;
import software.amazon.awssdk.services.codestarnotifications.model.UpdateNotificationRuleResponse;
import software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher;
import software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher;
import software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher;
/**
* Service client for accessing AWS CodeStar Notifications asynchronously. This can be created using the static
* {@link #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:
*
*
* -
*
* CreateNotificationRule, which creates a notification rule for a resource in your account.
*
*
* -
*
* DeleteNotificationRule, which deletes a notification rule.
*
*
* -
*
* DescribeNotificationRule, which provides information about a notification rule.
*
*
* -
*
* ListNotificationRules, which lists the notification rules associated with your account.
*
*
* -
*
* UpdateNotificationRule, which changes the name, events, or targets associated with a notification rule.
*
*
* -
*
* Subscribe, which subscribes a target to a notification rule.
*
*
* -
*
* Unsubscribe, which removes a target from a notification rule.
*
*
*
*
* Targets, by calling the following:
*
*
* -
*
* DeleteTarget, which removes a notification rule target from a notification rule.
*
*
* -
*
* ListTargets, which lists the targets associated with a notification rule.
*
*
*
*
* Events, by calling the following:
*
*
* -
*
* ListEventTypes, which lists the event types you can include in a notification rule.
*
*
*
*
* Tags, by calling the following:
*
*
* -
*
* ListTagsForResource, which lists the tags already associated with a notification rule in your account.
*
*
* -
*
* TagResource, which associates a tag you provide with a notification rule in your account.
*
*
* -
*
* UntagResource, which removes a tag from a notification rule in your account.
*
*
*
*
* For information about how to use AWS CodeStar Notifications, see the Amazon Web Services Developer
* Tools Console User Guide.
*
*/
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
@ThreadSafe
public interface CodestarNotificationsAsyncClient extends AwsClient {
String SERVICE_NAME = "codestar-notifications";
/**
* Value for looking up the service's metadata from the
* {@link software.amazon.awssdk.regions.ServiceMetadataProvider}.
*/
String SERVICE_METADATA_ID = "codestar-notifications";
/**
*
* Creates a notification rule for a resource. The rule specifies the events you want notifications about and the
* targets (such as Chatbot topics or Chatbot clients configured for Slack) where you want to receive them.
*
*
* @param createNotificationRuleRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.CreateNotificationRule
* @see AWS API Documentation
*/
default CompletableFuture createNotificationRule(
CreateNotificationRuleRequest createNotificationRuleRequest) {
throw new UnsupportedOperationException();
}
/**
*
* 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 {@link CreateNotificationRuleRequest.Builder} avoiding the
* need to create one manually via {@link CreateNotificationRuleRequest#builder()}
*
*
* @param createNotificationRuleRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.CreateNotificationRuleRequest.Builder}
* to create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.CreateNotificationRule
* @see AWS API Documentation
*/
default CompletableFuture createNotificationRule(
Consumer createNotificationRuleRequest) {
return createNotificationRule(CreateNotificationRuleRequest.builder().applyMutation(createNotificationRuleRequest)
.build());
}
/**
*
* Deletes a notification rule for a resource.
*
*
* @param deleteNotificationRuleRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.DeleteNotificationRule
* @see AWS API Documentation
*/
default CompletableFuture deleteNotificationRule(
DeleteNotificationRuleRequest deleteNotificationRuleRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Deletes a notification rule for a resource.
*
*
*
* This is a convenience which creates an instance of the {@link DeleteNotificationRuleRequest.Builder} avoiding the
* need to create one manually via {@link DeleteNotificationRuleRequest#builder()}
*
*
* @param deleteNotificationRuleRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.DeleteNotificationRuleRequest.Builder}
* to create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.DeleteNotificationRule
* @see AWS API Documentation
*/
default CompletableFuture deleteNotificationRule(
Consumer deleteNotificationRuleRequest) {
return deleteNotificationRule(DeleteNotificationRuleRequest.builder().applyMutation(deleteNotificationRuleRequest)
.build());
}
/**
*
* Deletes a specified target for notifications.
*
*
* @param deleteTargetRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.DeleteTarget
* @see AWS API Documentation
*/
default CompletableFuture deleteTarget(DeleteTargetRequest deleteTargetRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Deletes a specified target for notifications.
*
*
*
* This is a convenience which creates an instance of the {@link DeleteTargetRequest.Builder} avoiding the need to
* create one manually via {@link DeleteTargetRequest#builder()}
*
*
* @param deleteTargetRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.DeleteTargetRequest.Builder} to create
* a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.DeleteTarget
* @see AWS API Documentation
*/
default CompletableFuture deleteTarget(Consumer deleteTargetRequest) {
return deleteTarget(DeleteTargetRequest.builder().applyMutation(deleteTargetRequest).build());
}
/**
*
* Returns information about a specified notification rule.
*
*
* @param describeNotificationRuleRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.DescribeNotificationRule
* @see AWS API Documentation
*/
default CompletableFuture describeNotificationRule(
DescribeNotificationRuleRequest describeNotificationRuleRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns information about a specified notification rule.
*
*
*
* This is a convenience which creates an instance of the {@link DescribeNotificationRuleRequest.Builder} avoiding
* the need to create one manually via {@link DescribeNotificationRuleRequest#builder()}
*
*
* @param describeNotificationRuleRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.DescribeNotificationRuleRequest.Builder}
* to create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.DescribeNotificationRule
* @see AWS API Documentation
*/
default CompletableFuture describeNotificationRule(
Consumer describeNotificationRuleRequest) {
return describeNotificationRule(DescribeNotificationRuleRequest.builder().applyMutation(describeNotificationRuleRequest)
.build());
}
/**
*
* Returns information about the event types available for configuring notifications.
*
*
* @param listEventTypesRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListEventTypes
* @see AWS API Documentation
*/
default CompletableFuture listEventTypes(ListEventTypesRequest listEventTypesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns information about the event types available for configuring notifications.
*
*
*
* This is a convenience which creates an instance of the {@link ListEventTypesRequest.Builder} avoiding the need to
* create one manually via {@link ListEventTypesRequest#builder()}
*
*
* @param listEventTypesRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest.Builder} to
* create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListEventTypes
* @see AWS API Documentation
*/
default CompletableFuture listEventTypes(Consumer listEventTypesRequest) {
return listEventTypes(ListEventTypesRequest.builder().applyMutation(listEventTypesRequest).build());
}
/**
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher publisher = client.listEventTypesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher publisher = client.listEventTypesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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
* {@link #listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)}
* operation.
*
*
* @param listEventTypesRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListEventTypes
* @see AWS API Documentation
*/
default ListEventTypesPublisher listEventTypesPaginator(ListEventTypesRequest listEventTypesRequest) {
return new ListEventTypesPublisher(this, listEventTypesRequest);
}
/**
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher publisher = client.listEventTypesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesPublisher publisher = client.listEventTypesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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
* {@link #listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)}
* operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListEventTypesRequest.Builder} avoiding the need to
* create one manually via {@link ListEventTypesRequest#builder()}
*
*
* @param listEventTypesRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest.Builder} to
* create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListEventTypes
* @see AWS API Documentation
*/
default ListEventTypesPublisher listEventTypesPaginator(Consumer listEventTypesRequest) {
return listEventTypesPaginator(ListEventTypesRequest.builder().applyMutation(listEventTypesRequest).build());
}
/**
*
* Returns a list of the notification rules for an Amazon Web Services account.
*
*
* @param listNotificationRulesRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListNotificationRules
* @see AWS API Documentation
*/
default CompletableFuture listNotificationRules(
ListNotificationRulesRequest listNotificationRulesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of the notification rules for an Amazon Web Services account.
*
*
*
* This is a convenience which creates an instance of the {@link ListNotificationRulesRequest.Builder} avoiding the
* need to create one manually via {@link ListNotificationRulesRequest#builder()}
*
*
* @param listNotificationRulesRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest.Builder}
* to create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListNotificationRules
* @see AWS API Documentation
*/
default CompletableFuture listNotificationRules(
Consumer listNotificationRulesRequest) {
return listNotificationRules(ListNotificationRulesRequest.builder().applyMutation(listNotificationRulesRequest).build());
}
/**
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher publisher = client.listNotificationRulesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher publisher = client.listNotificationRulesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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
* {@link #listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)}
* operation.
*
*
* @param listNotificationRulesRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListNotificationRules
* @see AWS API Documentation
*/
default ListNotificationRulesPublisher listNotificationRulesPaginator(
ListNotificationRulesRequest listNotificationRulesRequest) {
return new ListNotificationRulesPublisher(this, listNotificationRulesRequest);
}
/**
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher publisher = client.listNotificationRulesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesPublisher publisher = client.listNotificationRulesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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
* {@link #listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)}
* operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListNotificationRulesRequest.Builder} avoiding the
* need to create one manually via {@link ListNotificationRulesRequest#builder()}
*
*
* @param listNotificationRulesRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest.Builder}
* to create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListNotificationRules
* @see AWS API Documentation
*/
default ListNotificationRulesPublisher listNotificationRulesPaginator(
Consumer listNotificationRulesRequest) {
return listNotificationRulesPaginator(ListNotificationRulesRequest.builder().applyMutation(listNotificationRulesRequest)
.build());
}
/**
*
* Returns a list of the tags associated with a notification rule.
*
*
* @param listTagsForResourceRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListTagsForResource
* @see AWS API Documentation
*/
default CompletableFuture listTagsForResource(
ListTagsForResourceRequest listTagsForResourceRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of the tags associated with a notification rule.
*
*
*
* This is a convenience which creates an instance of the {@link ListTagsForResourceRequest.Builder} avoiding the
* need to create one manually via {@link ListTagsForResourceRequest#builder()}
*
*
* @param listTagsForResourceRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.ListTagsForResourceRequest.Builder} to
* create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListTagsForResource
* @see AWS API Documentation
*/
default CompletableFuture listTagsForResource(
Consumer listTagsForResourceRequest) {
return listTagsForResource(ListTagsForResourceRequest.builder().applyMutation(listTagsForResourceRequest).build());
}
/**
*
* Returns a list of the notification rule targets for an Amazon Web Services account.
*
*
* @param listTargetsRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListTargets
* @see AWS API Documentation
*/
default CompletableFuture listTargets(ListTargetsRequest listTargetsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of the notification rule targets for an Amazon Web Services account.
*
*
*
* This is a convenience which creates an instance of the {@link ListTargetsRequest.Builder} avoiding the need to
* create one manually via {@link ListTargetsRequest#builder()}
*
*
* @param listTargetsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest.Builder} to create a
* request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListTargets
* @see AWS API Documentation
*/
default CompletableFuture listTargets(Consumer listTargetsRequest) {
return listTargets(ListTargetsRequest.builder().applyMutation(listTargetsRequest).build());
}
/**
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher publisher = client.listTargetsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher publisher = client.listTargetsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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
* {@link #listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)}
* operation.
*
*
* @param listTargetsRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListTargets
* @see AWS API Documentation
*/
default ListTargetsPublisher listTargetsPaginator(ListTargetsRequest listTargetsRequest) {
return new ListTargetsPublisher(this, listTargetsRequest);
}
/**
*
* This is a variant of
* {@link #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
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.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
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher publisher = client.listTargetsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsPublisher publisher = client.listTargetsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* 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
* {@link #listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)}
* operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListTargetsRequest.Builder} avoiding the need to
* create one manually via {@link ListTargetsRequest#builder()}
*
*
* @param listTargetsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest.Builder} to create a
* request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.ListTargets
* @see AWS API Documentation
*/
default ListTargetsPublisher listTargetsPaginator(Consumer listTargetsRequest) {
return listTargetsPaginator(ListTargetsRequest.builder().applyMutation(listTargetsRequest).build());
}
/**
*
* Creates an association between a notification rule and an Chatbot topic or Chatbot client so that the associated
* target can receive notifications when the events described in the rule are triggered.
*
*
* @param subscribeRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.Subscribe
* @see AWS API Documentation
*/
default CompletableFuture subscribe(SubscribeRequest subscribeRequest) {
throw new UnsupportedOperationException();
}
/**
*
* 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 {@link SubscribeRequest.Builder} avoiding the need to
* create one manually via {@link SubscribeRequest#builder()}
*
*
* @param subscribeRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.SubscribeRequest.Builder} to create a
* request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.Subscribe
* @see AWS API Documentation
*/
default CompletableFuture subscribe(Consumer subscribeRequest) {
return subscribe(SubscribeRequest.builder().applyMutation(subscribeRequest).build());
}
/**
*
* Associates a set of provided tags with a notification rule.
*
*
* @param tagResourceRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.TagResource
* @see AWS API Documentation
*/
default CompletableFuture tagResource(TagResourceRequest tagResourceRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Associates a set of provided tags with a notification rule.
*
*
*
* This is a convenience which creates an instance of the {@link TagResourceRequest.Builder} avoiding the need to
* create one manually via {@link TagResourceRequest#builder()}
*
*
* @param tagResourceRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.TagResourceRequest.Builder} to create a
* request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.TagResource
* @see AWS API Documentation
*/
default CompletableFuture tagResource(Consumer tagResourceRequest) {
return tagResource(TagResourceRequest.builder().applyMutation(tagResourceRequest).build());
}
/**
*
* Removes an association between a notification rule and an Chatbot topic so that subscribers to that topic stop
* receiving notifications when the events described in the rule are triggered.
*
*
* @param unsubscribeRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.Unsubscribe
* @see AWS API Documentation
*/
default CompletableFuture unsubscribe(UnsubscribeRequest unsubscribeRequest) {
throw new UnsupportedOperationException();
}
/**
*
* 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 {@link UnsubscribeRequest.Builder} avoiding the need to
* create one manually via {@link UnsubscribeRequest#builder()}
*
*
* @param unsubscribeRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.UnsubscribeRequest.Builder} to create a
* request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.Unsubscribe
* @see AWS API Documentation
*/
default CompletableFuture unsubscribe(Consumer unsubscribeRequest) {
return unsubscribe(UnsubscribeRequest.builder().applyMutation(unsubscribeRequest).build());
}
/**
*
* Removes the association between one or more provided tags and a notification rule.
*
*
* @param untagResourceRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.UntagResource
* @see AWS API Documentation
*/
default CompletableFuture untagResource(UntagResourceRequest untagResourceRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Removes the association between one or more provided tags and a notification rule.
*
*
*
* This is a convenience which creates an instance of the {@link UntagResourceRequest.Builder} avoiding the need to
* create one manually via {@link UntagResourceRequest#builder()}
*
*
* @param untagResourceRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.UntagResourceRequest.Builder} to create
* a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.UntagResource
* @see AWS API Documentation
*/
default CompletableFuture untagResource(Consumer untagResourceRequest) {
return untagResource(UntagResourceRequest.builder().applyMutation(untagResourceRequest).build());
}
/**
*
* 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.
*
*
*
* @param updateNotificationRuleRequest
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.UpdateNotificationRule
* @see AWS API Documentation
*/
default CompletableFuture updateNotificationRule(
UpdateNotificationRuleRequest updateNotificationRuleRequest) {
throw new UnsupportedOperationException();
}
/**
*
* 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 {@link UpdateNotificationRuleRequest.Builder} avoiding the
* need to create one manually via {@link UpdateNotificationRuleRequest#builder()}
*
*
* @param updateNotificationRuleRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codestarnotifications.model.UpdateNotificationRuleRequest.Builder}
* to create a request.
* @return 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.
*
* @sample CodestarNotificationsAsyncClient.UpdateNotificationRule
* @see AWS API Documentation
*/
default CompletableFuture updateNotificationRule(
Consumer updateNotificationRuleRequest) {
return updateNotificationRule(UpdateNotificationRuleRequest.builder().applyMutation(updateNotificationRuleRequest)
.build());
}
@Override
default CodestarNotificationsServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}
/**
* Create a {@link CodestarNotificationsAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static CodestarNotificationsAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link CodestarNotificationsAsyncClient}.
*/
static CodestarNotificationsAsyncClientBuilder builder() {
return new DefaultCodestarNotificationsAsyncClientBuilder();
}
}