/**
* 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 IoTEventsData
{
/**
* IoT Events monitors your equipment or device fleets for failures or changes
* in operation, and triggers actions when such events occur. You can use IoT
* Events Data API commands to send inputs to detectors, list detectors, and view
* or update a detector's status.
For more information, see What
* is IoT Events? in the IoT Events Developer Guide.
*/
class AWS_IOTEVENTSDATA_API IoTEventsDataClient : 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 IoTEventsDataClientConfiguration ClientConfigurationType;
typedef IoTEventsDataEndpointProvider 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.
*/
IoTEventsDataClient(const Aws::IoTEventsData::IoTEventsDataClientConfiguration& clientConfiguration = Aws::IoTEventsData::IoTEventsDataClientConfiguration(),
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.
*/
IoTEventsDataClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::IoTEventsData::IoTEventsDataClientConfiguration& clientConfiguration = Aws::IoTEventsData::IoTEventsDataClientConfiguration());
/**
* 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
*/
IoTEventsDataClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::IoTEventsData::IoTEventsDataClientConfiguration& clientConfiguration = Aws::IoTEventsData::IoTEventsDataClientConfiguration());
/* 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.
*/
IoTEventsDataClient(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.
*/
IoTEventsDataClient(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
*/
IoTEventsDataClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~IoTEventsDataClient();
/**
* Acknowledges one or more alarms. The alarms change to the
* ACKNOWLEDGED
state after you acknowledge them.
See
* Also:
AWS
* API Reference
*/
virtual Model::BatchAcknowledgeAlarmOutcome BatchAcknowledgeAlarm(const Model::BatchAcknowledgeAlarmRequest& request) const;
/**
* A Callable wrapper for BatchAcknowledgeAlarm that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchAcknowledgeAlarmOutcomeCallable BatchAcknowledgeAlarmCallable(const BatchAcknowledgeAlarmRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::BatchAcknowledgeAlarm, request);
}
/**
* An Async wrapper for BatchAcknowledgeAlarm that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchAcknowledgeAlarmAsync(const BatchAcknowledgeAlarmRequestT& request, const BatchAcknowledgeAlarmResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::BatchAcknowledgeAlarm, request, handler, context);
}
/**
* Deletes one or more detectors that were created. When a detector is deleted,
* its state will be cleared and the detector will be removed from the list of
* detectors. The deleted detector will no longer appear if referenced in the ListDetectors
* API call.
See Also:
AWS
* API Reference
*/
virtual Model::BatchDeleteDetectorOutcome BatchDeleteDetector(const Model::BatchDeleteDetectorRequest& request) const;
/**
* A Callable wrapper for BatchDeleteDetector that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchDeleteDetectorOutcomeCallable BatchDeleteDetectorCallable(const BatchDeleteDetectorRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::BatchDeleteDetector, request);
}
/**
* An Async wrapper for BatchDeleteDetector that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchDeleteDetectorAsync(const BatchDeleteDetectorRequestT& request, const BatchDeleteDetectorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::BatchDeleteDetector, request, handler, context);
}
/**
* Disables one or more alarms. The alarms change to the DISABLED
* state after you disable them.
See Also:
AWS
* API Reference
*/
virtual Model::BatchDisableAlarmOutcome BatchDisableAlarm(const Model::BatchDisableAlarmRequest& request) const;
/**
* A Callable wrapper for BatchDisableAlarm that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchDisableAlarmOutcomeCallable BatchDisableAlarmCallable(const BatchDisableAlarmRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::BatchDisableAlarm, request);
}
/**
* An Async wrapper for BatchDisableAlarm that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchDisableAlarmAsync(const BatchDisableAlarmRequestT& request, const BatchDisableAlarmResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::BatchDisableAlarm, request, handler, context);
}
/**
* Enables one or more alarms. The alarms change to the NORMAL
* state after you enable them.
See Also:
AWS
* API Reference
*/
virtual Model::BatchEnableAlarmOutcome BatchEnableAlarm(const Model::BatchEnableAlarmRequest& request) const;
/**
* A Callable wrapper for BatchEnableAlarm that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchEnableAlarmOutcomeCallable BatchEnableAlarmCallable(const BatchEnableAlarmRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::BatchEnableAlarm, request);
}
/**
* An Async wrapper for BatchEnableAlarm that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchEnableAlarmAsync(const BatchEnableAlarmRequestT& request, const BatchEnableAlarmResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::BatchEnableAlarm, request, handler, context);
}
/**
* Sends a set of messages to the IoT Events system. Each message payload is
* transformed into the input you specify ("inputName"
) and ingested
* into any detectors that monitor that input. If multiple messages are sent, the
* order in which the messages are processed isn't guaranteed. To guarantee
* ordering, you must send messages one at a time and wait for a successful
* response.
See Also:
AWS
* API Reference
*/
virtual Model::BatchPutMessageOutcome BatchPutMessage(const Model::BatchPutMessageRequest& request) const;
/**
* A Callable wrapper for BatchPutMessage that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchPutMessageOutcomeCallable BatchPutMessageCallable(const BatchPutMessageRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::BatchPutMessage, request);
}
/**
* An Async wrapper for BatchPutMessage that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchPutMessageAsync(const BatchPutMessageRequestT& request, const BatchPutMessageResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::BatchPutMessage, request, handler, context);
}
/**
* Resets one or more alarms. The alarms return to the NORMAL
state
* after you reset them.
See Also:
AWS
* API Reference
*/
virtual Model::BatchResetAlarmOutcome BatchResetAlarm(const Model::BatchResetAlarmRequest& request) const;
/**
* A Callable wrapper for BatchResetAlarm that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchResetAlarmOutcomeCallable BatchResetAlarmCallable(const BatchResetAlarmRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::BatchResetAlarm, request);
}
/**
* An Async wrapper for BatchResetAlarm that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchResetAlarmAsync(const BatchResetAlarmRequestT& request, const BatchResetAlarmResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::BatchResetAlarm, request, handler, context);
}
/**
* Changes one or more alarms to the snooze mode. The alarms change to the
* SNOOZE_DISABLED
state after you set them to the snooze
* mode.
See Also:
AWS
* API Reference
*/
virtual Model::BatchSnoozeAlarmOutcome BatchSnoozeAlarm(const Model::BatchSnoozeAlarmRequest& request) const;
/**
* A Callable wrapper for BatchSnoozeAlarm that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchSnoozeAlarmOutcomeCallable BatchSnoozeAlarmCallable(const BatchSnoozeAlarmRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::BatchSnoozeAlarm, request);
}
/**
* An Async wrapper for BatchSnoozeAlarm that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchSnoozeAlarmAsync(const BatchSnoozeAlarmRequestT& request, const BatchSnoozeAlarmResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::BatchSnoozeAlarm, request, handler, context);
}
/**
* Updates the state, variable values, and timer settings of one or more
* detectors (instances) of a specified detector model.
See Also:
* AWS
* API Reference
*/
virtual Model::BatchUpdateDetectorOutcome BatchUpdateDetector(const Model::BatchUpdateDetectorRequest& request) const;
/**
* A Callable wrapper for BatchUpdateDetector that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchUpdateDetectorOutcomeCallable BatchUpdateDetectorCallable(const BatchUpdateDetectorRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::BatchUpdateDetector, request);
}
/**
* An Async wrapper for BatchUpdateDetector that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchUpdateDetectorAsync(const BatchUpdateDetectorRequestT& request, const BatchUpdateDetectorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::BatchUpdateDetector, request, handler, context);
}
/**
* Retrieves information about an alarm.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeAlarmOutcome DescribeAlarm(const Model::DescribeAlarmRequest& request) const;
/**
* A Callable wrapper for DescribeAlarm that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DescribeAlarmOutcomeCallable DescribeAlarmCallable(const DescribeAlarmRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::DescribeAlarm, request);
}
/**
* An Async wrapper for DescribeAlarm that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DescribeAlarmAsync(const DescribeAlarmRequestT& request, const DescribeAlarmResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::DescribeAlarm, request, handler, context);
}
/**
* Returns information about the specified detector (instance).
See
* Also:
AWS
* API Reference
*/
virtual Model::DescribeDetectorOutcome DescribeDetector(const Model::DescribeDetectorRequest& request) const;
/**
* A Callable wrapper for DescribeDetector that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DescribeDetectorOutcomeCallable DescribeDetectorCallable(const DescribeDetectorRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::DescribeDetector, request);
}
/**
* An Async wrapper for DescribeDetector that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DescribeDetectorAsync(const DescribeDetectorRequestT& request, const DescribeDetectorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::DescribeDetector, request, handler, context);
}
/**
* Lists one or more alarms. The operation returns only the metadata associated
* with each alarm.
See Also:
AWS
* API Reference
*/
virtual Model::ListAlarmsOutcome ListAlarms(const Model::ListAlarmsRequest& request) const;
/**
* A Callable wrapper for ListAlarms that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListAlarmsOutcomeCallable ListAlarmsCallable(const ListAlarmsRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::ListAlarms, request);
}
/**
* An Async wrapper for ListAlarms that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListAlarmsAsync(const ListAlarmsRequestT& request, const ListAlarmsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::ListAlarms, request, handler, context);
}
/**
* Lists detectors (the instances of a detector model).
See Also:
* AWS
* API Reference
*/
virtual Model::ListDetectorsOutcome ListDetectors(const Model::ListDetectorsRequest& request) const;
/**
* A Callable wrapper for ListDetectors that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListDetectorsOutcomeCallable ListDetectorsCallable(const ListDetectorsRequestT& request) const
{
return SubmitCallable(&IoTEventsDataClient::ListDetectors, request);
}
/**
* An Async wrapper for ListDetectors that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListDetectorsAsync(const ListDetectorsRequestT& request, const ListDetectorsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoTEventsDataClient::ListDetectors, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const IoTEventsDataClientConfiguration& clientConfiguration);
IoTEventsDataClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace IoTEventsData
} // namespace Aws