/**
* 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 SageMakerMetrics
{
/**
* Contains all data plane API operations and data types for Amazon SageMaker
* Metrics. Use these APIs to put and retrieve (get) features related to your
* training run.
*/
class AWS_SAGEMAKERMETRICS_API SageMakerMetricsClient : 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 SageMakerMetricsClientConfiguration ClientConfigurationType;
typedef SageMakerMetricsEndpointProvider 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.
*/
SageMakerMetricsClient(const Aws::SageMakerMetrics::SageMakerMetricsClientConfiguration& clientConfiguration = Aws::SageMakerMetrics::SageMakerMetricsClientConfiguration(),
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.
*/
SageMakerMetricsClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::SageMakerMetrics::SageMakerMetricsClientConfiguration& clientConfiguration = Aws::SageMakerMetrics::SageMakerMetricsClientConfiguration());
/**
* 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
*/
SageMakerMetricsClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::SageMakerMetrics::SageMakerMetricsClientConfiguration& clientConfiguration = Aws::SageMakerMetrics::SageMakerMetricsClientConfiguration());
/* 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.
*/
SageMakerMetricsClient(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.
*/
SageMakerMetricsClient(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
*/
SageMakerMetricsClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~SageMakerMetricsClient();
/**
* Used to ingest training metrics into SageMaker. These metrics can be
* visualized in SageMaker Studio and retrieved with the GetMetrics
* API.
See Also:
AWS
* API Reference
*/
virtual Model::BatchPutMetricsOutcome BatchPutMetrics(const Model::BatchPutMetricsRequest& request) const;
/**
* A Callable wrapper for BatchPutMetrics that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::BatchPutMetricsOutcomeCallable BatchPutMetricsCallable(const BatchPutMetricsRequestT& request) const
{
return SubmitCallable(&SageMakerMetricsClient::BatchPutMetrics, request);
}
/**
* An Async wrapper for BatchPutMetrics that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void BatchPutMetricsAsync(const BatchPutMetricsRequestT& request, const BatchPutMetricsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SageMakerMetricsClient::BatchPutMetrics, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const SageMakerMetricsClientConfiguration& clientConfiguration);
SageMakerMetricsClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace SageMakerMetrics
} // namespace Aws