/**
* 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 AugmentedAIRuntime
{
/**
* Amazon Augmented AI (Amazon A2I) adds the benefit of human judgment to any
* machine learning application. When an AI application can't evaluate data with a
* high degree of confidence, human reviewers can take over. This human review is
* called a human review workflow. To create and start a human review workflow, you
* need three resources: a worker task template, a flow definition,
* and a human loop.
For information about these resources and
* prerequisites for using Amazon A2I, see Get
* Started with Amazon Augmented AI in the Amazon SageMaker Developer
* Guide.
This API reference includes information about API actions and data
* types that you can use to interact with Amazon A2I programmatically. Use this
* guide to:
-
Start a human loop with the
* StartHumanLoop
operation when using Amazon A2I with a custom
* task type. To learn more about the difference between custom and built-in
* task types, see Use
* Task Types . To learn how to start a human loop using this API, see Create
* and Start a Human Loop for a Custom Task Type in the Amazon SageMaker
* Developer Guide.
-
Manage your human loops. You can list all
* human loops that you have created, describe individual human loops, and stop and
* delete human loops. To learn more, see Monitor
* and Manage Your Human Loop in the Amazon SageMaker Developer Guide.
*
Amazon A2I integrates APIs from various AWS services to create
* and start human review workflows for those services. To learn how Amazon A2I
* uses these APIs, see Use
* APIs in Amazon A2I in the Amazon SageMaker Developer Guide.
*/
class AWS_AUGMENTEDAIRUNTIME_API AugmentedAIRuntimeClient : 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 AugmentedAIRuntimeClientConfiguration ClientConfigurationType;
typedef AugmentedAIRuntimeEndpointProvider 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.
*/
AugmentedAIRuntimeClient(const Aws::AugmentedAIRuntime::AugmentedAIRuntimeClientConfiguration& clientConfiguration = Aws::AugmentedAIRuntime::AugmentedAIRuntimeClientConfiguration(),
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.
*/
AugmentedAIRuntimeClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::AugmentedAIRuntime::AugmentedAIRuntimeClientConfiguration& clientConfiguration = Aws::AugmentedAIRuntime::AugmentedAIRuntimeClientConfiguration());
/**
* 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
*/
AugmentedAIRuntimeClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::AugmentedAIRuntime::AugmentedAIRuntimeClientConfiguration& clientConfiguration = Aws::AugmentedAIRuntime::AugmentedAIRuntimeClientConfiguration());
/* 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.
*/
AugmentedAIRuntimeClient(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.
*/
AugmentedAIRuntimeClient(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
*/
AugmentedAIRuntimeClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~AugmentedAIRuntimeClient();
/**
* Deletes the specified human loop for a flow definition.
If the human
* loop was deleted, this operation will return a
* ResourceNotFoundException
.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteHumanLoopOutcome DeleteHumanLoop(const Model::DeleteHumanLoopRequest& request) const;
/**
* A Callable wrapper for DeleteHumanLoop that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DeleteHumanLoopOutcomeCallable DeleteHumanLoopCallable(const DeleteHumanLoopRequestT& request) const
{
return SubmitCallable(&AugmentedAIRuntimeClient::DeleteHumanLoop, request);
}
/**
* An Async wrapper for DeleteHumanLoop that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DeleteHumanLoopAsync(const DeleteHumanLoopRequestT& request, const DeleteHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AugmentedAIRuntimeClient::DeleteHumanLoop, request, handler, context);
}
/**
* Returns information about the specified human loop. If the human loop was
* deleted, this operation will return a ResourceNotFoundException
* error.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeHumanLoopOutcome DescribeHumanLoop(const Model::DescribeHumanLoopRequest& request) const;
/**
* A Callable wrapper for DescribeHumanLoop that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DescribeHumanLoopOutcomeCallable DescribeHumanLoopCallable(const DescribeHumanLoopRequestT& request) const
{
return SubmitCallable(&AugmentedAIRuntimeClient::DescribeHumanLoop, request);
}
/**
* An Async wrapper for DescribeHumanLoop that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DescribeHumanLoopAsync(const DescribeHumanLoopRequestT& request, const DescribeHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AugmentedAIRuntimeClient::DescribeHumanLoop, request, handler, context);
}
/**
* Returns information about human loops, given the specified parameters. If a
* human loop was deleted, it will not be included.
See Also:
AWS
* API Reference
*/
virtual Model::ListHumanLoopsOutcome ListHumanLoops(const Model::ListHumanLoopsRequest& request) const;
/**
* A Callable wrapper for ListHumanLoops that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListHumanLoopsOutcomeCallable ListHumanLoopsCallable(const ListHumanLoopsRequestT& request) const
{
return SubmitCallable(&AugmentedAIRuntimeClient::ListHumanLoops, request);
}
/**
* An Async wrapper for ListHumanLoops that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListHumanLoopsAsync(const ListHumanLoopsRequestT& request, const ListHumanLoopsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AugmentedAIRuntimeClient::ListHumanLoops, request, handler, context);
}
/**
* Starts a human loop, provided that at least one activation condition is
* met.
See Also:
AWS
* API Reference
*/
virtual Model::StartHumanLoopOutcome StartHumanLoop(const Model::StartHumanLoopRequest& request) const;
/**
* A Callable wrapper for StartHumanLoop that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::StartHumanLoopOutcomeCallable StartHumanLoopCallable(const StartHumanLoopRequestT& request) const
{
return SubmitCallable(&AugmentedAIRuntimeClient::StartHumanLoop, request);
}
/**
* An Async wrapper for StartHumanLoop that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void StartHumanLoopAsync(const StartHumanLoopRequestT& request, const StartHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AugmentedAIRuntimeClient::StartHumanLoop, request, handler, context);
}
/**
* Stops the specified human loop.
See Also:
AWS
* API Reference
*/
virtual Model::StopHumanLoopOutcome StopHumanLoop(const Model::StopHumanLoopRequest& request) const;
/**
* A Callable wrapper for StopHumanLoop that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::StopHumanLoopOutcomeCallable StopHumanLoopCallable(const StopHumanLoopRequestT& request) const
{
return SubmitCallable(&AugmentedAIRuntimeClient::StopHumanLoop, request);
}
/**
* An Async wrapper for StopHumanLoop that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void StopHumanLoopAsync(const StopHumanLoopRequestT& request, const StopHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AugmentedAIRuntimeClient::StopHumanLoop, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const AugmentedAIRuntimeClientConfiguration& clientConfiguration);
AugmentedAIRuntimeClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace AugmentedAIRuntime
} // namespace Aws