Interface SchedulerAsyncClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface SchedulerAsyncClient extends AwsClient
Service client for accessing Amazon EventBridge Scheduler asynchronously. This can be created using the staticbuilder()method.The asynchronous client performs non-blocking I/O when configured with anySdkAsyncHttpClientsupported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API call.Amazon EventBridge Scheduler is a serverless scheduler that allows you to create, run, and manage tasks from one central, managed service. EventBridge Scheduler delivers your tasks reliably, with built-in mechanisms that adjust your schedules based on the availability of downstream targets. The following reference lists the available API actions, and data types for EventBridge Scheduler.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
createSchedule
default CompletableFuture<CreateScheduleResponse> createSchedule(CreateScheduleRequest createScheduleRequest)
Creates the specified schedule.
- Parameters:
createScheduleRequest-- Returns:
- A Java Future containing the result of the CreateSchedule operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The request exceeds a service quota.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
createSchedule
default CompletableFuture<CreateScheduleResponse> createSchedule(Consumer<CreateScheduleRequest.Builder> createScheduleRequest)
Creates the specified schedule.
This is a convenience which creates an instance of the
CreateScheduleRequest.Builderavoiding the need to create one manually viaCreateScheduleRequest.builder()- Parameters:
createScheduleRequest- AConsumerthat will call methods onCreateScheduleRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateSchedule operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The request exceeds a service quota.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
createScheduleGroup
default CompletableFuture<CreateScheduleGroupResponse> createScheduleGroup(CreateScheduleGroupRequest createScheduleGroupRequest)
Creates the specified schedule group.
- Parameters:
createScheduleGroupRequest-- Returns:
- A Java Future containing the result of the CreateScheduleGroup operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The request exceeds a service quota.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
createScheduleGroup
default CompletableFuture<CreateScheduleGroupResponse> createScheduleGroup(Consumer<CreateScheduleGroupRequest.Builder> createScheduleGroupRequest)
Creates the specified schedule group.
This is a convenience which creates an instance of the
CreateScheduleGroupRequest.Builderavoiding the need to create one manually viaCreateScheduleGroupRequest.builder()- Parameters:
createScheduleGroupRequest- AConsumerthat will call methods onCreateScheduleGroupRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateScheduleGroup operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The request exceeds a service quota.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
deleteSchedule
default CompletableFuture<DeleteScheduleResponse> deleteSchedule(DeleteScheduleRequest deleteScheduleRequest)
Deletes the specified schedule.
- Parameters:
deleteScheduleRequest-- Returns:
- A Java Future containing the result of the DeleteSchedule operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
deleteSchedule
default CompletableFuture<DeleteScheduleResponse> deleteSchedule(Consumer<DeleteScheduleRequest.Builder> deleteScheduleRequest)
Deletes the specified schedule.
This is a convenience which creates an instance of the
DeleteScheduleRequest.Builderavoiding the need to create one manually viaDeleteScheduleRequest.builder()- Parameters:
deleteScheduleRequest- AConsumerthat will call methods onDeleteScheduleRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteSchedule operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
deleteScheduleGroup
default CompletableFuture<DeleteScheduleGroupResponse> deleteScheduleGroup(DeleteScheduleGroupRequest deleteScheduleGroupRequest)
Deletes the specified schedule group. Deleting a schedule group results in EventBridge Scheduler deleting all schedules associated with the group. When you delete a group, it remains in a
DELETINGstate until all of its associated schedules are deleted. Schedules associated with the group that are set to run while the schedule group is in the process of being deleted might continue to invoke their targets until the schedule group and its associated schedules are deleted.This operation is eventually consistent.
- Parameters:
deleteScheduleGroupRequest-- Returns:
- A Java Future containing the result of the DeleteScheduleGroup operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
deleteScheduleGroup
default CompletableFuture<DeleteScheduleGroupResponse> deleteScheduleGroup(Consumer<DeleteScheduleGroupRequest.Builder> deleteScheduleGroupRequest)
Deletes the specified schedule group. Deleting a schedule group results in EventBridge Scheduler deleting all schedules associated with the group. When you delete a group, it remains in a
DELETINGstate until all of its associated schedules are deleted. Schedules associated with the group that are set to run while the schedule group is in the process of being deleted might continue to invoke their targets until the schedule group and its associated schedules are deleted.This operation is eventually consistent.
This is a convenience which creates an instance of the
DeleteScheduleGroupRequest.Builderavoiding the need to create one manually viaDeleteScheduleGroupRequest.builder()- Parameters:
deleteScheduleGroupRequest- AConsumerthat will call methods onDeleteScheduleGroupRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteScheduleGroup operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
getSchedule
default CompletableFuture<GetScheduleResponse> getSchedule(GetScheduleRequest getScheduleRequest)
Retrieves the specified schedule.
- Parameters:
getScheduleRequest-- Returns:
- A Java Future containing the result of the GetSchedule operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
getSchedule
default CompletableFuture<GetScheduleResponse> getSchedule(Consumer<GetScheduleRequest.Builder> getScheduleRequest)
Retrieves the specified schedule.
This is a convenience which creates an instance of the
GetScheduleRequest.Builderavoiding the need to create one manually viaGetScheduleRequest.builder()- Parameters:
getScheduleRequest- AConsumerthat will call methods onGetScheduleRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetSchedule operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
getScheduleGroup
default CompletableFuture<GetScheduleGroupResponse> getScheduleGroup(GetScheduleGroupRequest getScheduleGroupRequest)
Retrieves the specified schedule group.
- Parameters:
getScheduleGroupRequest-- Returns:
- A Java Future containing the result of the GetScheduleGroup operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
getScheduleGroup
default CompletableFuture<GetScheduleGroupResponse> getScheduleGroup(Consumer<GetScheduleGroupRequest.Builder> getScheduleGroupRequest)
Retrieves the specified schedule group.
This is a convenience which creates an instance of the
GetScheduleGroupRequest.Builderavoiding the need to create one manually viaGetScheduleGroupRequest.builder()- Parameters:
getScheduleGroupRequest- AConsumerthat will call methods onGetScheduleGroupRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetScheduleGroup operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
listScheduleGroups
default CompletableFuture<ListScheduleGroupsResponse> listScheduleGroups(ListScheduleGroupsRequest listScheduleGroupsRequest)
Returns a paginated list of your schedule groups.
- Parameters:
listScheduleGroupsRequest-- Returns:
- A Java Future containing the result of the ListScheduleGroups operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
listScheduleGroups
default CompletableFuture<ListScheduleGroupsResponse> listScheduleGroups(Consumer<ListScheduleGroupsRequest.Builder> listScheduleGroupsRequest)
Returns a paginated list of your schedule groups.
This is a convenience which creates an instance of the
ListScheduleGroupsRequest.Builderavoiding the need to create one manually viaListScheduleGroupsRequest.builder()- Parameters:
listScheduleGroupsRequest- AConsumerthat will call methods onListScheduleGroupsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListScheduleGroups operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
listScheduleGroupsPaginator
default ListScheduleGroupsPublisher listScheduleGroupsPaginator(ListScheduleGroupsRequest listScheduleGroupsRequest)
This is a variant of
listScheduleGroups(software.amazon.awssdk.services.scheduler.model.ListScheduleGroupsRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.scheduler.paginators.ListScheduleGroupsPublisher publisher = client.listScheduleGroupsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.scheduler.paginators.ListScheduleGroupsPublisher publisher = client.listScheduleGroupsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.scheduler.model.ListScheduleGroupsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.scheduler.model.ListScheduleGroupsResponse response) { //... }; });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
listScheduleGroups(software.amazon.awssdk.services.scheduler.model.ListScheduleGroupsRequest)operation.- Parameters:
listScheduleGroupsRequest-- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
listScheduleGroupsPaginator
default ListScheduleGroupsPublisher listScheduleGroupsPaginator(Consumer<ListScheduleGroupsRequest.Builder> listScheduleGroupsRequest)
This is a variant of
listScheduleGroups(software.amazon.awssdk.services.scheduler.model.ListScheduleGroupsRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.scheduler.paginators.ListScheduleGroupsPublisher publisher = client.listScheduleGroupsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.scheduler.paginators.ListScheduleGroupsPublisher publisher = client.listScheduleGroupsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.scheduler.model.ListScheduleGroupsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.scheduler.model.ListScheduleGroupsResponse response) { //... }; });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
listScheduleGroups(software.amazon.awssdk.services.scheduler.model.ListScheduleGroupsRequest)operation.
This is a convenience which creates an instance of the
ListScheduleGroupsRequest.Builderavoiding the need to create one manually viaListScheduleGroupsRequest.builder()- Parameters:
listScheduleGroupsRequest- AConsumerthat will call methods onListScheduleGroupsRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
listSchedules
default CompletableFuture<ListSchedulesResponse> listSchedules(ListSchedulesRequest listSchedulesRequest)
Returns a paginated list of your EventBridge Scheduler schedules.
- Parameters:
listSchedulesRequest-- Returns:
- A Java Future containing the result of the ListSchedules operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
listSchedules
default CompletableFuture<ListSchedulesResponse> listSchedules(Consumer<ListSchedulesRequest.Builder> listSchedulesRequest)
Returns a paginated list of your EventBridge Scheduler schedules.
This is a convenience which creates an instance of the
ListSchedulesRequest.Builderavoiding the need to create one manually viaListSchedulesRequest.builder()- Parameters:
listSchedulesRequest- AConsumerthat will call methods onListSchedulesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListSchedules operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
listSchedulesPaginator
default ListSchedulesPublisher listSchedulesPaginator(ListSchedulesRequest listSchedulesRequest)
This is a variant of
listSchedules(software.amazon.awssdk.services.scheduler.model.ListSchedulesRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.scheduler.paginators.ListSchedulesPublisher publisher = client.listSchedulesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.scheduler.paginators.ListSchedulesPublisher publisher = client.listSchedulesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.scheduler.model.ListSchedulesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.scheduler.model.ListSchedulesResponse response) { //... }; });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
listSchedules(software.amazon.awssdk.services.scheduler.model.ListSchedulesRequest)operation.- Parameters:
listSchedulesRequest-- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
listSchedulesPaginator
default ListSchedulesPublisher listSchedulesPaginator(Consumer<ListSchedulesRequest.Builder> listSchedulesRequest)
This is a variant of
listSchedules(software.amazon.awssdk.services.scheduler.model.ListSchedulesRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.scheduler.paginators.ListSchedulesPublisher publisher = client.listSchedulesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.scheduler.paginators.ListSchedulesPublisher publisher = client.listSchedulesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.scheduler.model.ListSchedulesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.scheduler.model.ListSchedulesResponse response) { //... }; });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
listSchedules(software.amazon.awssdk.services.scheduler.model.ListSchedulesRequest)operation.
This is a convenience which creates an instance of the
ListSchedulesRequest.Builderavoiding the need to create one manually viaListSchedulesRequest.builder()- Parameters:
listSchedulesRequest- AConsumerthat will call methods onListSchedulesRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException 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)
Lists the tags associated with the Scheduler resource.
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException 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)
Lists the tags associated with the Scheduler resource.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException 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)
Assigns one or more tags (key-value pairs) to the specified EventBridge Scheduler resource. You can only assign tags to schedule groups.
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException 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)
Assigns one or more tags (key-value pairs) to the specified EventBridge Scheduler resource. You can only assign tags to schedule groups.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException 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 one or more tags from the specified EventBridge Scheduler schedule group.
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException 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 one or more tags from the specified EventBridge Scheduler schedule group.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
updateSchedule
default CompletableFuture<UpdateScheduleResponse> updateSchedule(UpdateScheduleRequest updateScheduleRequest)
Updates the specified schedule. When you call
UpdateSchedule, EventBridge Scheduler uses all values, including empty values, specified in the request and overrides the existing schedule. This is by design. This means that if you do not set an optional field in your request, that field will be set to its system-default value after the update.Before calling this operation, we recommend that you call the
GetScheduleAPI operation and make a note of all optional parameters for yourUpdateSchedulecall.- Parameters:
updateScheduleRequest-- Returns:
- A Java Future containing the result of the UpdateSchedule operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
updateSchedule
default CompletableFuture<UpdateScheduleResponse> updateSchedule(Consumer<UpdateScheduleRequest.Builder> updateScheduleRequest)
Updates the specified schedule. When you call
UpdateSchedule, EventBridge Scheduler uses all values, including empty values, specified in the request and overrides the existing schedule. This is by design. This means that if you do not set an optional field in your request, that field will be set to its system-default value after the update.Before calling this operation, we recommend that you call the
GetScheduleAPI operation and make a note of all optional parameters for yourUpdateSchedulecall.
This is a convenience which creates an instance of the
UpdateScheduleRequest.Builderavoiding the need to create one manually viaUpdateScheduleRequest.builder()- Parameters:
updateScheduleRequest- AConsumerthat will call methods onUpdateScheduleRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateSchedule operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- InternalServerException Unexpected error encountered while processing the request.
- ConflictException Updating or deleting the resource can cause an inconsistent state.
- ResourceNotFoundException The request references a resource which does not exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- SchedulerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
- AWS API Documentation
-
serviceClientConfiguration
default SchedulerServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
create
static SchedulerAsyncClient create()
Create aSchedulerAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static SchedulerAsyncClientBuilder builder()
Create a builder that can be used to configure and create aSchedulerAsyncClient.
-
-