/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace MigrationHubConfig
{
namespace Model
{
class CreateHomeRegionControlRequest;
class DescribeHomeRegionControlsRequest;
class GetHomeRegionRequest;
typedef Aws::Utils::Outcome CreateHomeRegionControlOutcome;
typedef Aws::Utils::Outcome DescribeHomeRegionControlsOutcome;
typedef Aws::Utils::Outcome GetHomeRegionOutcome;
typedef std::future CreateHomeRegionControlOutcomeCallable;
typedef std::future DescribeHomeRegionControlsOutcomeCallable;
typedef std::future GetHomeRegionOutcomeCallable;
} // namespace Model
class MigrationHubConfigClient;
typedef std::function&) > CreateHomeRegionControlResponseReceivedHandler;
typedef std::function&) > DescribeHomeRegionControlsResponseReceivedHandler;
typedef std::function&) > GetHomeRegionResponseReceivedHandler;
/**
* The AWS Migration Hub home region APIs are available specifically for working
* with your Migration Hub home region. You can use these APIs to determine a home
* region, as well as to create and work with controls that describe the home
* region.
-
You must make API calls for write actions (create,
* notify, associate, disassociate, import, or put) while in your home region, or a
* HomeRegionNotSetException error is returned.
-
API
* calls for read actions (list, describe, stop, and delete) are permitted outside
* of your home region.
-
If you call a write API outside the home
* region, an InvalidInputException is returned.
-
You
* can call GetHomeRegion action to obtain the account's Migration Hub
* home region.
For specific API usage, see the sections that
* follow in this AWS Migration Hub Home Region API reference.
*/
class AWS_MIGRATIONHUBCONFIG_API MigrationHubConfigClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* 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.
*/
MigrationHubConfigClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::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.
*/
MigrationHubConfigClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::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
*/
MigrationHubConfigClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~MigrationHubConfigClient();
/**
* This API sets up the home region for the calling account only.
See
* Also:
AWS
* API Reference
*/
virtual Model::CreateHomeRegionControlOutcome CreateHomeRegionControl(const Model::CreateHomeRegionControlRequest& request) const;
/**
* This API sets up the home region for the calling account only.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateHomeRegionControlOutcomeCallable CreateHomeRegionControlCallable(const Model::CreateHomeRegionControlRequest& request) const;
/**
* This API sets up the home region for the calling account only.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateHomeRegionControlAsync(const Model::CreateHomeRegionControlRequest& request, const CreateHomeRegionControlResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* This API permits filtering on the ControlId and
* HomeRegion fields.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeHomeRegionControlsOutcome DescribeHomeRegionControls(const Model::DescribeHomeRegionControlsRequest& request) const;
/**
* This API permits filtering on the ControlId and
* HomeRegion fields.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeHomeRegionControlsOutcomeCallable DescribeHomeRegionControlsCallable(const Model::DescribeHomeRegionControlsRequest& request) const;
/**
* This API permits filtering on the ControlId and
* HomeRegion fields.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeHomeRegionControlsAsync(const Model::DescribeHomeRegionControlsRequest& request, const DescribeHomeRegionControlsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns the calling account’s home region, if configured. This API is used by
* other AWS services to determine the regional endpoint for calling AWS
* Application Discovery Service and Migration Hub. You must call
* GetHomeRegion at least once before you call any other AWS
* Application Discovery Service and AWS Migration Hub APIs, to obtain the
* account's Migration Hub home region.
See Also:
AWS
* API Reference
*/
virtual Model::GetHomeRegionOutcome GetHomeRegion(const Model::GetHomeRegionRequest& request) const;
/**
* Returns the calling account’s home region, if configured. This API is used by
* other AWS services to determine the regional endpoint for calling AWS
* Application Discovery Service and Migration Hub. You must call
* GetHomeRegion at least once before you call any other AWS
* Application Discovery Service and AWS Migration Hub APIs, to obtain the
* account's Migration Hub home region.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetHomeRegionOutcomeCallable GetHomeRegionCallable(const Model::GetHomeRegionRequest& request) const;
/**
* Returns the calling account’s home region, if configured. This API is used by
* other AWS services to determine the regional endpoint for calling AWS
* Application Discovery Service and Migration Hub. You must call
* GetHomeRegion at least once before you call any other AWS
* Application Discovery Service and AWS Migration Hub APIs, to obtain the
* account's Migration Hub home region.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetHomeRegionAsync(const Model::GetHomeRegionRequest& request, const GetHomeRegionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CreateHomeRegionControlAsyncHelper(const Model::CreateHomeRegionControlRequest& request, const CreateHomeRegionControlResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeHomeRegionControlsAsyncHelper(const Model::DescribeHomeRegionControlsRequest& request, const DescribeHomeRegionControlsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GetHomeRegionAsyncHelper(const Model::GetHomeRegionRequest& request, const GetHomeRegionResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace MigrationHubConfig
} // namespace Aws