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

This AWS CodeStar Notifications API Reference provides descriptions and usage * examples of the operations and data types for the AWS CodeStar Notifications * API. You can use the AWS CodeStar Notifications API to work with the following * objects:

Notification rules, by calling the following:

Targets, by calling the following:

  • * DeleteTarget, which removes a notification rule target from a * notification rule.

  • ListTargets, which lists the * targets associated with a notification rule.

Events, by * calling the following:

  • ListEventTypes, which lists the * event types you can include in a notification rule.

Tags, by * calling the following:

  • ListTagsForResource, which * lists the tags already associated with a notification rule in your account.

    *
  • TagResource, which associates a tag you provide with a * notification rule in your account.

  • UntagResource, * which removes a tag from a notification rule in your account.

*

For information about how to use AWS CodeStar Notifications, see the Amazon * Web Services Developer Tools Console User Guide.

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

Creates a notification rule for a resource. The rule specifies the events you * want notifications about and the targets (such as Chatbot topics or Chatbot * clients configured for Slack) where you want to receive them.

See * Also:

AWS * API Reference

*/ virtual Model::CreateNotificationRuleOutcome CreateNotificationRule(const Model::CreateNotificationRuleRequest& request) const; /** * A Callable wrapper for CreateNotificationRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateNotificationRuleOutcomeCallable CreateNotificationRuleCallable(const CreateNotificationRuleRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::CreateNotificationRule, request); } /** * An Async wrapper for CreateNotificationRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateNotificationRuleAsync(const CreateNotificationRuleRequestT& request, const CreateNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::CreateNotificationRule, request, handler, context); } /** *

Deletes a notification rule for a resource.

See Also:

AWS * API Reference

*/ virtual Model::DeleteNotificationRuleOutcome DeleteNotificationRule(const Model::DeleteNotificationRuleRequest& request) const; /** * A Callable wrapper for DeleteNotificationRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DeleteNotificationRuleOutcomeCallable DeleteNotificationRuleCallable(const DeleteNotificationRuleRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::DeleteNotificationRule, request); } /** * An Async wrapper for DeleteNotificationRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DeleteNotificationRuleAsync(const DeleteNotificationRuleRequestT& request, const DeleteNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::DeleteNotificationRule, request, handler, context); } /** *

Deletes a specified target for notifications.

See Also:

AWS * API Reference

*/ virtual Model::DeleteTargetOutcome DeleteTarget(const Model::DeleteTargetRequest& request) const; /** * A Callable wrapper for DeleteTarget that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DeleteTargetOutcomeCallable DeleteTargetCallable(const DeleteTargetRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::DeleteTarget, request); } /** * An Async wrapper for DeleteTarget that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DeleteTargetAsync(const DeleteTargetRequestT& request, const DeleteTargetResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::DeleteTarget, request, handler, context); } /** *

Returns information about a specified notification rule.

See * Also:

AWS * API Reference

*/ virtual Model::DescribeNotificationRuleOutcome DescribeNotificationRule(const Model::DescribeNotificationRuleRequest& request) const; /** * A Callable wrapper for DescribeNotificationRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeNotificationRuleOutcomeCallable DescribeNotificationRuleCallable(const DescribeNotificationRuleRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::DescribeNotificationRule, request); } /** * An Async wrapper for DescribeNotificationRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeNotificationRuleAsync(const DescribeNotificationRuleRequestT& request, const DescribeNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::DescribeNotificationRule, request, handler, context); } /** *

Returns information about the event types available for configuring * notifications.

See Also:

AWS * API Reference

*/ virtual Model::ListEventTypesOutcome ListEventTypes(const Model::ListEventTypesRequest& request) const; /** * A Callable wrapper for ListEventTypes that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListEventTypesOutcomeCallable ListEventTypesCallable(const ListEventTypesRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::ListEventTypes, request); } /** * An Async wrapper for ListEventTypes that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListEventTypesAsync(const ListEventTypesRequestT& request, const ListEventTypesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::ListEventTypes, request, handler, context); } /** *

Returns a list of the notification rules for an Amazon Web Services * account.

See Also:

AWS * API Reference

*/ virtual Model::ListNotificationRulesOutcome ListNotificationRules(const Model::ListNotificationRulesRequest& request) const; /** * A Callable wrapper for ListNotificationRules that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListNotificationRulesOutcomeCallable ListNotificationRulesCallable(const ListNotificationRulesRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::ListNotificationRules, request); } /** * An Async wrapper for ListNotificationRules that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListNotificationRulesAsync(const ListNotificationRulesRequestT& request, const ListNotificationRulesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::ListNotificationRules, request, handler, context); } /** *

Returns a list of the tags associated with a notification 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(&CodeStarNotificationsClient::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(&CodeStarNotificationsClient::ListTagsForResource, request, handler, context); } /** *

Returns a list of the notification rule targets for an Amazon Web Services * account.

See Also:

AWS * API Reference

*/ virtual Model::ListTargetsOutcome ListTargets(const Model::ListTargetsRequest& request) const; /** * A Callable wrapper for ListTargets that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListTargetsOutcomeCallable ListTargetsCallable(const ListTargetsRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::ListTargets, request); } /** * An Async wrapper for ListTargets that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListTargetsAsync(const ListTargetsRequestT& request, const ListTargetsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::ListTargets, request, handler, context); } /** *

Creates an association between a notification rule and an Chatbot topic or * Chatbot client so that the associated target can receive notifications when the * events described in the rule are triggered.

See Also:

AWS * API Reference

*/ virtual Model::SubscribeOutcome Subscribe(const Model::SubscribeRequest& request) const; /** * A Callable wrapper for Subscribe that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::SubscribeOutcomeCallable SubscribeCallable(const SubscribeRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::Subscribe, request); } /** * An Async wrapper for Subscribe that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void SubscribeAsync(const SubscribeRequestT& request, const SubscribeResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::Subscribe, request, handler, context); } /** *

Associates a set of provided tags with a notification 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(&CodeStarNotificationsClient::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(&CodeStarNotificationsClient::TagResource, request, handler, context); } /** *

Removes an association between a notification rule and an Chatbot topic so * that subscribers to that topic stop receiving notifications when the events * described in the rule are triggered.

See Also:

AWS * API Reference

*/ virtual Model::UnsubscribeOutcome Unsubscribe(const Model::UnsubscribeRequest& request) const; /** * A Callable wrapper for Unsubscribe that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UnsubscribeOutcomeCallable UnsubscribeCallable(const UnsubscribeRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::Unsubscribe, request); } /** * An Async wrapper for Unsubscribe that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UnsubscribeAsync(const UnsubscribeRequestT& request, const UnsubscribeResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::Unsubscribe, request, handler, context); } /** *

Removes the association between one or more provided tags and a notification * 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(&CodeStarNotificationsClient::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(&CodeStarNotificationsClient::UntagResource, request, handler, context); } /** *

Updates a notification rule for a resource. You can change the events that * trigger the notification rule, the status of the rule, and the targets that * receive the notifications.

To add or remove tags for a * notification rule, you must use TagResource and UntagResource.

*

See Also:

AWS * API Reference

*/ virtual Model::UpdateNotificationRuleOutcome UpdateNotificationRule(const Model::UpdateNotificationRuleRequest& request) const; /** * A Callable wrapper for UpdateNotificationRule that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UpdateNotificationRuleOutcomeCallable UpdateNotificationRuleCallable(const UpdateNotificationRuleRequestT& request) const { return SubmitCallable(&CodeStarNotificationsClient::UpdateNotificationRule, request); } /** * An Async wrapper for UpdateNotificationRule that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UpdateNotificationRuleAsync(const UpdateNotificationRuleRequestT& request, const UpdateNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeStarNotificationsClient::UpdateNotificationRule, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const CodeStarNotificationsClientConfiguration& clientConfiguration); CodeStarNotificationsClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace CodeStarNotifications } // namespace Aws