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

Fault Injection Simulator is a managed service that enables you to perform * fault injection experiments on your Amazon Web Services workloads. For more * information, see the Fault Injection * Simulator User Guide.

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

Creates an experiment template.

An experiment template includes the * following components:

  • Targets: A target can be a * specific resource in your Amazon Web Services environment, or one or more * resources that match criteria that you specify, for example, resources that have * specific tags.

  • Actions: The actions to carry out on * the target. You can specify multiple actions, the duration of each action, and * when to start each action during an experiment.

  • Stop * conditions: If a stop condition is triggered while an experiment is running, * the experiment is automatically stopped. You can define a stop condition as a * CloudWatch alarm.

For more information, see Experiment * templates in the Fault Injection Simulator User Guide.

See * Also:

AWS * API Reference

*/ virtual Model::CreateExperimentTemplateOutcome CreateExperimentTemplate(const Model::CreateExperimentTemplateRequest& request) const; /** * A Callable wrapper for CreateExperimentTemplate that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateExperimentTemplateOutcomeCallable CreateExperimentTemplateCallable(const CreateExperimentTemplateRequestT& request) const { return SubmitCallable(&FISClient::CreateExperimentTemplate, request); } /** * An Async wrapper for CreateExperimentTemplate that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateExperimentTemplateAsync(const CreateExperimentTemplateRequestT& request, const CreateExperimentTemplateResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::CreateExperimentTemplate, request, handler, context); } /** *

Deletes the specified experiment template.

See Also:

AWS * API Reference

*/ virtual Model::DeleteExperimentTemplateOutcome DeleteExperimentTemplate(const Model::DeleteExperimentTemplateRequest& request) const; /** * A Callable wrapper for DeleteExperimentTemplate that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DeleteExperimentTemplateOutcomeCallable DeleteExperimentTemplateCallable(const DeleteExperimentTemplateRequestT& request) const { return SubmitCallable(&FISClient::DeleteExperimentTemplate, request); } /** * An Async wrapper for DeleteExperimentTemplate that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DeleteExperimentTemplateAsync(const DeleteExperimentTemplateRequestT& request, const DeleteExperimentTemplateResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::DeleteExperimentTemplate, request, handler, context); } /** *

Gets information about the specified FIS action.

See Also:

* AWS * API Reference

*/ virtual Model::GetActionOutcome GetAction(const Model::GetActionRequest& request) const; /** * A Callable wrapper for GetAction that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetActionOutcomeCallable GetActionCallable(const GetActionRequestT& request) const { return SubmitCallable(&FISClient::GetAction, request); } /** * An Async wrapper for GetAction that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetActionAsync(const GetActionRequestT& request, const GetActionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::GetAction, request, handler, context); } /** *

Gets information about the specified experiment.

See Also:

* AWS * API Reference

*/ virtual Model::GetExperimentOutcome GetExperiment(const Model::GetExperimentRequest& request) const; /** * A Callable wrapper for GetExperiment that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetExperimentOutcomeCallable GetExperimentCallable(const GetExperimentRequestT& request) const { return SubmitCallable(&FISClient::GetExperiment, request); } /** * An Async wrapper for GetExperiment that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetExperimentAsync(const GetExperimentRequestT& request, const GetExperimentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::GetExperiment, request, handler, context); } /** *

Gets information about the specified experiment template.

See * Also:

AWS * API Reference

*/ virtual Model::GetExperimentTemplateOutcome GetExperimentTemplate(const Model::GetExperimentTemplateRequest& request) const; /** * A Callable wrapper for GetExperimentTemplate that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetExperimentTemplateOutcomeCallable GetExperimentTemplateCallable(const GetExperimentTemplateRequestT& request) const { return SubmitCallable(&FISClient::GetExperimentTemplate, request); } /** * An Async wrapper for GetExperimentTemplate that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetExperimentTemplateAsync(const GetExperimentTemplateRequestT& request, const GetExperimentTemplateResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::GetExperimentTemplate, request, handler, context); } /** *

Gets information about the specified resource type.

See Also:

* AWS * API Reference

*/ virtual Model::GetTargetResourceTypeOutcome GetTargetResourceType(const Model::GetTargetResourceTypeRequest& request) const; /** * A Callable wrapper for GetTargetResourceType that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetTargetResourceTypeOutcomeCallable GetTargetResourceTypeCallable(const GetTargetResourceTypeRequestT& request) const { return SubmitCallable(&FISClient::GetTargetResourceType, request); } /** * An Async wrapper for GetTargetResourceType that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetTargetResourceTypeAsync(const GetTargetResourceTypeRequestT& request, const GetTargetResourceTypeResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::GetTargetResourceType, request, handler, context); } /** *

Lists the available FIS actions.

See Also:

AWS API * Reference

*/ virtual Model::ListActionsOutcome ListActions(const Model::ListActionsRequest& request) const; /** * A Callable wrapper for ListActions that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListActionsOutcomeCallable ListActionsCallable(const ListActionsRequestT& request) const { return SubmitCallable(&FISClient::ListActions, request); } /** * An Async wrapper for ListActions that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListActionsAsync(const ListActionsRequestT& request, const ListActionsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::ListActions, request, handler, context); } /** *

Lists your experiment templates.

See Also:

AWS * API Reference

*/ virtual Model::ListExperimentTemplatesOutcome ListExperimentTemplates(const Model::ListExperimentTemplatesRequest& request) const; /** * A Callable wrapper for ListExperimentTemplates that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListExperimentTemplatesOutcomeCallable ListExperimentTemplatesCallable(const ListExperimentTemplatesRequestT& request) const { return SubmitCallable(&FISClient::ListExperimentTemplates, request); } /** * An Async wrapper for ListExperimentTemplates that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListExperimentTemplatesAsync(const ListExperimentTemplatesRequestT& request, const ListExperimentTemplatesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::ListExperimentTemplates, request, handler, context); } /** *

Lists your experiments.

See Also:

AWS * API Reference

*/ virtual Model::ListExperimentsOutcome ListExperiments(const Model::ListExperimentsRequest& request) const; /** * A Callable wrapper for ListExperiments that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListExperimentsOutcomeCallable ListExperimentsCallable(const ListExperimentsRequestT& request) const { return SubmitCallable(&FISClient::ListExperiments, request); } /** * An Async wrapper for ListExperiments that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListExperimentsAsync(const ListExperimentsRequestT& request, const ListExperimentsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::ListExperiments, request, handler, context); } /** *

Lists the tags for the specified resource.

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

Lists the target resource types.

See Also:

AWS * API Reference

*/ virtual Model::ListTargetResourceTypesOutcome ListTargetResourceTypes(const Model::ListTargetResourceTypesRequest& request) const; /** * A Callable wrapper for ListTargetResourceTypes that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListTargetResourceTypesOutcomeCallable ListTargetResourceTypesCallable(const ListTargetResourceTypesRequestT& request) const { return SubmitCallable(&FISClient::ListTargetResourceTypes, request); } /** * An Async wrapper for ListTargetResourceTypes that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListTargetResourceTypesAsync(const ListTargetResourceTypesRequestT& request, const ListTargetResourceTypesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::ListTargetResourceTypes, request, handler, context); } /** *

Starts running an experiment from the specified experiment * template.

See Also:

AWS * API Reference

*/ virtual Model::StartExperimentOutcome StartExperiment(const Model::StartExperimentRequest& request) const; /** * A Callable wrapper for StartExperiment that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::StartExperimentOutcomeCallable StartExperimentCallable(const StartExperimentRequestT& request) const { return SubmitCallable(&FISClient::StartExperiment, request); } /** * An Async wrapper for StartExperiment that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void StartExperimentAsync(const StartExperimentRequestT& request, const StartExperimentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::StartExperiment, request, handler, context); } /** *

Stops the specified experiment.

See Also:

AWS * API Reference

*/ virtual Model::StopExperimentOutcome StopExperiment(const Model::StopExperimentRequest& request) const; /** * A Callable wrapper for StopExperiment that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::StopExperimentOutcomeCallable StopExperimentCallable(const StopExperimentRequestT& request) const { return SubmitCallable(&FISClient::StopExperiment, request); } /** * An Async wrapper for StopExperiment that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void StopExperimentAsync(const StopExperimentRequestT& request, const StopExperimentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::StopExperiment, request, handler, context); } /** *

Applies the specified tags to the specified resource.

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

Removes the specified tags from the specified resource.

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

Updates the specified experiment template.

See Also:

AWS * API Reference

*/ virtual Model::UpdateExperimentTemplateOutcome UpdateExperimentTemplate(const Model::UpdateExperimentTemplateRequest& request) const; /** * A Callable wrapper for UpdateExperimentTemplate that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UpdateExperimentTemplateOutcomeCallable UpdateExperimentTemplateCallable(const UpdateExperimentTemplateRequestT& request) const { return SubmitCallable(&FISClient::UpdateExperimentTemplate, request); } /** * An Async wrapper for UpdateExperimentTemplate that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UpdateExperimentTemplateAsync(const UpdateExperimentTemplateRequestT& request, const UpdateExperimentTemplateResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&FISClient::UpdateExperimentTemplate, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const FISClientConfiguration& clientConfiguration); FISClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace FIS } // namespace Aws