/** * 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 RecycleBin { /** *

This is the Recycle Bin API Reference. This documentation provides * descriptions and syntax for each of the actions and data types in Recycle * Bin.

Recycle Bin is a resource recovery feature that enables you to * restore accidentally deleted snapshots and EBS-backed AMIs. When using Recycle * Bin, if your resources are deleted, they are retained in the Recycle Bin for a * time period that you specify.

You can restore a resource from the Recycle * Bin at any time before its retention period expires. After you restore a * resource from the Recycle Bin, the resource is removed from the Recycle Bin, and * you can then use it in the same way you use any other resource of that type in * your account. If the retention period expires and the resource is not restored, * the resource is permanently deleted from the Recycle Bin and is no longer * available for recovery. For more information about Recycle Bin, see * Recycle Bin in the Amazon Elastic Compute Cloud User Guide.

*/ class AWS_RECYCLEBIN_API RecycleBinClient : 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 RecycleBinClientConfiguration ClientConfigurationType; typedef RecycleBinEndpointProvider 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. */ RecycleBinClient(const Aws::RecycleBin::RecycleBinClientConfiguration& clientConfiguration = Aws::RecycleBin::RecycleBinClientConfiguration(), 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. */ RecycleBinClient(const Aws::Auth::AWSCredentials& credentials, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::RecycleBin::RecycleBinClientConfiguration& clientConfiguration = Aws::RecycleBin::RecycleBinClientConfiguration()); /** * 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 */ RecycleBinClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::RecycleBin::RecycleBinClientConfiguration& clientConfiguration = Aws::RecycleBin::RecycleBinClientConfiguration()); /* 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. */ RecycleBinClient(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. */ RecycleBinClient(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 */ RecycleBinClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration); /* End of legacy constructors due deprecation */ virtual ~RecycleBinClient(); /** *

Creates a Recycle Bin retention rule. For more information, see * Create Recycle Bin retention rules in the Amazon Elastic Compute Cloud * User Guide.

See Also:

AWS API * Reference

*/ virtual Model::CreateRuleOutcome CreateRule(const Model::CreateRuleRequest& request) const; /** * A Callable wrapper for CreateRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateRuleOutcomeCallable CreateRuleCallable(const CreateRuleRequestT& request) const { return SubmitCallable(&RecycleBinClient::CreateRule, request); } /** * An Async wrapper for CreateRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateRuleAsync(const CreateRuleRequestT& request, const CreateRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&RecycleBinClient::CreateRule, request, handler, context); } /** *

Deletes a Recycle Bin retention rule. For more information, see * Delete Recycle Bin retention rules in the Amazon Elastic Compute Cloud * User Guide.

See Also:

AWS API * Reference

*/ virtual Model::DeleteRuleOutcome DeleteRule(const Model::DeleteRuleRequest& request) const; /** * A Callable wrapper for DeleteRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DeleteRuleOutcomeCallable DeleteRuleCallable(const DeleteRuleRequestT& request) const { return SubmitCallable(&RecycleBinClient::DeleteRule, request); } /** * An Async wrapper for DeleteRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DeleteRuleAsync(const DeleteRuleRequestT& request, const DeleteRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&RecycleBinClient::DeleteRule, request, handler, context); } /** *

Gets information about a Recycle Bin retention rule.

See Also:

* AWS API * Reference

*/ virtual Model::GetRuleOutcome GetRule(const Model::GetRuleRequest& request) const; /** * A Callable wrapper for GetRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetRuleOutcomeCallable GetRuleCallable(const GetRuleRequestT& request) const { return SubmitCallable(&RecycleBinClient::GetRule, request); } /** * An Async wrapper for GetRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetRuleAsync(const GetRuleRequestT& request, const GetRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&RecycleBinClient::GetRule, request, handler, context); } /** *

Lists the Recycle Bin retention rules in the Region.

See Also:

* AWS * API Reference

*/ virtual Model::ListRulesOutcome ListRules(const Model::ListRulesRequest& request) const; /** * A Callable wrapper for ListRules that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListRulesOutcomeCallable ListRulesCallable(const ListRulesRequestT& request) const { return SubmitCallable(&RecycleBinClient::ListRules, request); } /** * An Async wrapper for ListRules that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListRulesAsync(const ListRulesRequestT& request, const ListRulesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&RecycleBinClient::ListRules, request, handler, context); } /** *

Lists the tags assigned to a retention rule.

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(&RecycleBinClient::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(&RecycleBinClient::ListTagsForResource, request, handler, context); } /** *

Locks a retention rule. A locked retention rule can't be modified or * deleted.

See Also:

AWS API * Reference

*/ virtual Model::LockRuleOutcome LockRule(const Model::LockRuleRequest& request) const; /** * A Callable wrapper for LockRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::LockRuleOutcomeCallable LockRuleCallable(const LockRuleRequestT& request) const { return SubmitCallable(&RecycleBinClient::LockRule, request); } /** * An Async wrapper for LockRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void LockRuleAsync(const LockRuleRequestT& request, const LockRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&RecycleBinClient::LockRule, request, handler, context); } /** *

Assigns tags to the specified retention rule.

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(&RecycleBinClient::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(&RecycleBinClient::TagResource, request, handler, context); } /** *

Unlocks a retention rule. After a retention rule is unlocked, it can be * modified or deleted only after the unlock delay period expires.

See * Also:

AWS API * Reference

*/ virtual Model::UnlockRuleOutcome UnlockRule(const Model::UnlockRuleRequest& request) const; /** * A Callable wrapper for UnlockRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UnlockRuleOutcomeCallable UnlockRuleCallable(const UnlockRuleRequestT& request) const { return SubmitCallable(&RecycleBinClient::UnlockRule, request); } /** * An Async wrapper for UnlockRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UnlockRuleAsync(const UnlockRuleRequestT& request, const UnlockRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&RecycleBinClient::UnlockRule, request, handler, context); } /** *

Unassigns a tag from a retention rule.

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(&RecycleBinClient::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(&RecycleBinClient::UntagResource, request, handler, context); } /** *

Updates an existing Recycle Bin retention rule. You can update a retention * rule's description, resource tags, and retention period at any time after * creation. You can't update a retention rule's resource type after creation. For * more information, see * Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud * User Guide.

See Also:

AWS API * Reference

*/ virtual Model::UpdateRuleOutcome UpdateRule(const Model::UpdateRuleRequest& request) const; /** * A Callable wrapper for UpdateRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UpdateRuleOutcomeCallable UpdateRuleCallable(const UpdateRuleRequestT& request) const { return SubmitCallable(&RecycleBinClient::UpdateRule, request); } /** * An Async wrapper for UpdateRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UpdateRuleAsync(const UpdateRuleRequestT& request, const UpdateRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&RecycleBinClient::UpdateRule, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const RecycleBinClientConfiguration& clientConfiguration); RecycleBinClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace RecycleBin } // namespace Aws