/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace Scheduler
{
/**
* 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.
*/
class AWS_SCHEDULER_API SchedulerClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef SchedulerClientConfiguration ClientConfigurationType;
typedef SchedulerEndpointProvider EndpointProviderType;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SchedulerClient(const Aws::Scheduler::SchedulerClientConfiguration& clientConfiguration = Aws::Scheduler::SchedulerClientConfiguration(),
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG));
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SchedulerClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::Scheduler::SchedulerClientConfiguration& clientConfiguration = Aws::Scheduler::SchedulerClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
SchedulerClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::Scheduler::SchedulerClientConfiguration& clientConfiguration = Aws::Scheduler::SchedulerClientConfiguration());
/* Legacy constructors due deprecation */
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SchedulerClient(const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SchedulerClient(const Aws::Auth::AWSCredentials& credentials,
const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
SchedulerClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~SchedulerClient();
/**
* Creates the specified schedule.
See Also:
AWS
* API Reference
*/
virtual Model::CreateScheduleOutcome CreateSchedule(const Model::CreateScheduleRequest& request) const;
/**
* A Callable wrapper for CreateSchedule that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateScheduleOutcomeCallable CreateScheduleCallable(const CreateScheduleRequestT& request) const
{
return SubmitCallable(&SchedulerClient::CreateSchedule, request);
}
/**
* An Async wrapper for CreateSchedule that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateScheduleAsync(const CreateScheduleRequestT& request, const CreateScheduleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::CreateSchedule, request, handler, context);
}
/**
* Creates the specified schedule group.
See Also:
AWS
* API Reference
*/
virtual Model::CreateScheduleGroupOutcome CreateScheduleGroup(const Model::CreateScheduleGroupRequest& request) const;
/**
* A Callable wrapper for CreateScheduleGroup that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateScheduleGroupOutcomeCallable CreateScheduleGroupCallable(const CreateScheduleGroupRequestT& request) const
{
return SubmitCallable(&SchedulerClient::CreateScheduleGroup, request);
}
/**
* An Async wrapper for CreateScheduleGroup that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateScheduleGroupAsync(const CreateScheduleGroupRequestT& request, const CreateScheduleGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::CreateScheduleGroup, request, handler, context);
}
/**
* Deletes the specified schedule.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteScheduleOutcome DeleteSchedule(const Model::DeleteScheduleRequest& request) const;
/**
* A Callable wrapper for DeleteSchedule that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DeleteScheduleOutcomeCallable DeleteScheduleCallable(const DeleteScheduleRequestT& request) const
{
return SubmitCallable(&SchedulerClient::DeleteSchedule, request);
}
/**
* An Async wrapper for DeleteSchedule that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DeleteScheduleAsync(const DeleteScheduleRequestT& request, const DeleteScheduleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::DeleteSchedule, request, handler, context);
}
/**
* 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 DELETING
state 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.
*
See Also:
AWS
* API Reference
*/
virtual Model::DeleteScheduleGroupOutcome DeleteScheduleGroup(const Model::DeleteScheduleGroupRequest& request) const;
/**
* A Callable wrapper for DeleteScheduleGroup that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DeleteScheduleGroupOutcomeCallable DeleteScheduleGroupCallable(const DeleteScheduleGroupRequestT& request) const
{
return SubmitCallable(&SchedulerClient::DeleteScheduleGroup, request);
}
/**
* An Async wrapper for DeleteScheduleGroup that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DeleteScheduleGroupAsync(const DeleteScheduleGroupRequestT& request, const DeleteScheduleGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::DeleteScheduleGroup, request, handler, context);
}
/**
* Retrieves the specified schedule.
See Also:
AWS
* API Reference
*/
virtual Model::GetScheduleOutcome GetSchedule(const Model::GetScheduleRequest& request) const;
/**
* A Callable wrapper for GetSchedule that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetScheduleOutcomeCallable GetScheduleCallable(const GetScheduleRequestT& request) const
{
return SubmitCallable(&SchedulerClient::GetSchedule, request);
}
/**
* An Async wrapper for GetSchedule that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetScheduleAsync(const GetScheduleRequestT& request, const GetScheduleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::GetSchedule, request, handler, context);
}
/**
* Retrieves the specified schedule group.
See Also:
AWS
* API Reference
*/
virtual Model::GetScheduleGroupOutcome GetScheduleGroup(const Model::GetScheduleGroupRequest& request) const;
/**
* A Callable wrapper for GetScheduleGroup that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetScheduleGroupOutcomeCallable GetScheduleGroupCallable(const GetScheduleGroupRequestT& request) const
{
return SubmitCallable(&SchedulerClient::GetScheduleGroup, request);
}
/**
* An Async wrapper for GetScheduleGroup that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetScheduleGroupAsync(const GetScheduleGroupRequestT& request, const GetScheduleGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::GetScheduleGroup, request, handler, context);
}
/**
* Returns a paginated list of your schedule groups.
See Also:
* AWS
* API Reference
*/
virtual Model::ListScheduleGroupsOutcome ListScheduleGroups(const Model::ListScheduleGroupsRequest& request) const;
/**
* A Callable wrapper for ListScheduleGroups that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListScheduleGroupsOutcomeCallable ListScheduleGroupsCallable(const ListScheduleGroupsRequestT& request) const
{
return SubmitCallable(&SchedulerClient::ListScheduleGroups, request);
}
/**
* An Async wrapper for ListScheduleGroups that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListScheduleGroupsAsync(const ListScheduleGroupsRequestT& request, const ListScheduleGroupsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::ListScheduleGroups, request, handler, context);
}
/**
* Returns a paginated list of your EventBridge Scheduler
* schedules.
See Also:
AWS
* API Reference
*/
virtual Model::ListSchedulesOutcome ListSchedules(const Model::ListSchedulesRequest& request) const;
/**
* A Callable wrapper for ListSchedules that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListSchedulesOutcomeCallable ListSchedulesCallable(const ListSchedulesRequestT& request) const
{
return SubmitCallable(&SchedulerClient::ListSchedules, request);
}
/**
* An Async wrapper for ListSchedules that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListSchedulesAsync(const ListSchedulesRequestT& request, const ListSchedulesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::ListSchedules, request, handler, context);
}
/**
* Lists the tags associated with the Scheduler resource.
See
* Also:
AWS
* API Reference
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const
{
return SubmitCallable(&SchedulerClient::ListTagsForResource, request);
}
/**
* An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::ListTagsForResource, request, handler, context);
}
/**
* Assigns one or more tags (key-value pairs) to the specified EventBridge
* Scheduler resource. You can only assign tags to schedule groups.
See
* Also:
AWS
* API Reference
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const
{
return SubmitCallable(&SchedulerClient::TagResource, request);
}
/**
* An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::TagResource, request, handler, context);
}
/**
* Removes one or more tags from the specified EventBridge Scheduler schedule
* group.
See Also:
AWS
* API Reference
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const
{
return SubmitCallable(&SchedulerClient::UntagResource, request);
}
/**
* An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::UntagResource, request, handler, context);
}
/**
* 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 GetSchedule
API operation
* and make a note of all optional parameters for your UpdateSchedule
* call.
See Also:
AWS
* API Reference
*/
virtual Model::UpdateScheduleOutcome UpdateSchedule(const Model::UpdateScheduleRequest& request) const;
/**
* A Callable wrapper for UpdateSchedule that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UpdateScheduleOutcomeCallable UpdateScheduleCallable(const UpdateScheduleRequestT& request) const
{
return SubmitCallable(&SchedulerClient::UpdateSchedule, request);
}
/**
* An Async wrapper for UpdateSchedule that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UpdateScheduleAsync(const UpdateScheduleRequestT& request, const UpdateScheduleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SchedulerClient::UpdateSchedule, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const SchedulerClientConfiguration& clientConfiguration);
SchedulerClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace Scheduler
} // namespace Aws