/**
* 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
#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 CodeStarNotifications
{
namespace Model
{
class CreateNotificationRuleRequest;
class DeleteNotificationRuleRequest;
class DeleteTargetRequest;
class DescribeNotificationRuleRequest;
class ListEventTypesRequest;
class ListNotificationRulesRequest;
class ListTagsForResourceRequest;
class ListTargetsRequest;
class SubscribeRequest;
class TagResourceRequest;
class UnsubscribeRequest;
class UntagResourceRequest;
class UpdateNotificationRuleRequest;
typedef Aws::Utils::Outcome CreateNotificationRuleOutcome;
typedef Aws::Utils::Outcome DeleteNotificationRuleOutcome;
typedef Aws::Utils::Outcome DeleteTargetOutcome;
typedef Aws::Utils::Outcome DescribeNotificationRuleOutcome;
typedef Aws::Utils::Outcome ListEventTypesOutcome;
typedef Aws::Utils::Outcome ListNotificationRulesOutcome;
typedef Aws::Utils::Outcome ListTagsForResourceOutcome;
typedef Aws::Utils::Outcome ListTargetsOutcome;
typedef Aws::Utils::Outcome SubscribeOutcome;
typedef Aws::Utils::Outcome TagResourceOutcome;
typedef Aws::Utils::Outcome UnsubscribeOutcome;
typedef Aws::Utils::Outcome UntagResourceOutcome;
typedef Aws::Utils::Outcome UpdateNotificationRuleOutcome;
typedef std::future CreateNotificationRuleOutcomeCallable;
typedef std::future DeleteNotificationRuleOutcomeCallable;
typedef std::future DeleteTargetOutcomeCallable;
typedef std::future DescribeNotificationRuleOutcomeCallable;
typedef std::future ListEventTypesOutcomeCallable;
typedef std::future ListNotificationRulesOutcomeCallable;
typedef std::future ListTagsForResourceOutcomeCallable;
typedef std::future ListTargetsOutcomeCallable;
typedef std::future SubscribeOutcomeCallable;
typedef std::future TagResourceOutcomeCallable;
typedef std::future UnsubscribeOutcomeCallable;
typedef std::future UntagResourceOutcomeCallable;
typedef std::future UpdateNotificationRuleOutcomeCallable;
} // namespace Model
class CodeStarNotificationsClient;
typedef std::function&) > CreateNotificationRuleResponseReceivedHandler;
typedef std::function&) > DeleteNotificationRuleResponseReceivedHandler;
typedef std::function&) > DeleteTargetResponseReceivedHandler;
typedef std::function&) > DescribeNotificationRuleResponseReceivedHandler;
typedef std::function&) > ListEventTypesResponseReceivedHandler;
typedef std::function&) > ListNotificationRulesResponseReceivedHandler;
typedef std::function&) > ListTagsForResourceResponseReceivedHandler;
typedef std::function&) > ListTargetsResponseReceivedHandler;
typedef std::function&) > SubscribeResponseReceivedHandler;
typedef std::function&) > TagResourceResponseReceivedHandler;
typedef std::function&) > UnsubscribeResponseReceivedHandler;
typedef std::function&) > UntagResourceResponseReceivedHandler;
typedef std::function&) > UpdateNotificationRuleResponseReceivedHandler;
/**
* 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 (SNS topic) from a
* notification rule.
-
ListTargets, which lists the
* targets associated with a notification rule.
Events, by
* calling the following:
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 link in the
* CodeStarNotifications User Guide.
*/
class AWS_CODESTARNOTIFICATIONS_API CodeStarNotificationsClient : 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.
*/
CodeStarNotificationsClient(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.
*/
CodeStarNotificationsClient(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
*/
CodeStarNotificationsClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~CodeStarNotificationsClient();
/**
* Creates a notification rule for a resource. The rule specifies the events you
* want notifications about and the targets (such as SNS topics) where you want to
* receive them.
See Also:
AWS
* API Reference
*/
virtual Model::CreateNotificationRuleOutcome CreateNotificationRule(const Model::CreateNotificationRuleRequest& request) const;
/**
* Creates a notification rule for a resource. The rule specifies the events you
* want notifications about and the targets (such as SNS topics) where you want to
* receive them.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateNotificationRuleOutcomeCallable CreateNotificationRuleCallable(const Model::CreateNotificationRuleRequest& request) const;
/**
* Creates a notification rule for a resource. The rule specifies the events you
* want notifications about and the targets (such as SNS topics) where you want to
* receive them.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateNotificationRuleAsync(const Model::CreateNotificationRuleRequest& request, const CreateNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Deletes a notification rule for a resource.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteNotificationRuleOutcome DeleteNotificationRule(const Model::DeleteNotificationRuleRequest& request) const;
/**
* Deletes a notification rule for a resource.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteNotificationRuleOutcomeCallable DeleteNotificationRuleCallable(const Model::DeleteNotificationRuleRequest& request) const;
/**
* Deletes a notification rule for a resource.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteNotificationRuleAsync(const Model::DeleteNotificationRuleRequest& request, const DeleteNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Deletes a specified target for notifications.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteTargetOutcome DeleteTarget(const Model::DeleteTargetRequest& request) const;
/**
* Deletes a specified target for notifications.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteTargetOutcomeCallable DeleteTargetCallable(const Model::DeleteTargetRequest& request) const;
/**
* Deletes a specified target for notifications.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteTargetAsync(const Model::DeleteTargetRequest& request, const DeleteTargetResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns information about a specified notification rule.
See
* Also:
AWS
* API Reference
*/
virtual Model::DescribeNotificationRuleOutcome DescribeNotificationRule(const Model::DescribeNotificationRuleRequest& request) const;
/**
* Returns information about a specified notification rule.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeNotificationRuleOutcomeCallable DescribeNotificationRuleCallable(const Model::DescribeNotificationRuleRequest& request) const;
/**
* Returns information about a specified notification rule.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeNotificationRuleAsync(const Model::DescribeNotificationRuleRequest& request, const DescribeNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns information about the event types available for configuring
* notifications.
See Also:
AWS
* API Reference
*/
virtual Model::ListEventTypesOutcome ListEventTypes(const Model::ListEventTypesRequest& request) const;
/**
* Returns information about the event types available for configuring
* notifications.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListEventTypesOutcomeCallable ListEventTypesCallable(const Model::ListEventTypesRequest& request) const;
/**
* Returns information about the event types available for configuring
* notifications.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListEventTypesAsync(const Model::ListEventTypesRequest& request, const ListEventTypesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a list of the notification rules for an AWS account.
See
* Also:
AWS
* API Reference
*/
virtual Model::ListNotificationRulesOutcome ListNotificationRules(const Model::ListNotificationRulesRequest& request) const;
/**
* Returns a list of the notification rules for an AWS account.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListNotificationRulesOutcomeCallable ListNotificationRulesCallable(const Model::ListNotificationRulesRequest& request) const;
/**
* Returns a list of the notification rules for an AWS account.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListNotificationRulesAsync(const Model::ListNotificationRulesRequest& request, const ListNotificationRulesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* 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;
/**
* Returns a list of the tags associated with a notification rule.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const Model::ListTagsForResourceRequest& request) const;
/**
* Returns a list of the tags associated with a notification rule.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListTagsForResourceAsync(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a list of the notification rule targets for an AWS
* account.
See Also:
AWS
* API Reference
*/
virtual Model::ListTargetsOutcome ListTargets(const Model::ListTargetsRequest& request) const;
/**
* Returns a list of the notification rule targets for an AWS
* account.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListTargetsOutcomeCallable ListTargetsCallable(const Model::ListTargetsRequest& request) const;
/**
* Returns a list of the notification rule targets for an AWS
* account.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListTargetsAsync(const Model::ListTargetsRequest& request, const ListTargetsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Creates an association between a notification rule and an SNS topic 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;
/**
* Creates an association between a notification rule and an SNS topic so that
* the associated target can receive notifications when the events described in the
* rule are triggered.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::SubscribeOutcomeCallable SubscribeCallable(const Model::SubscribeRequest& request) const;
/**
* Creates an association between a notification rule and an SNS topic so that
* the associated target can receive notifications when the events described in the
* rule are triggered.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void SubscribeAsync(const Model::SubscribeRequest& request, const SubscribeResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Associates a set of provided tags with a notification rule.
See
* Also:
AWS
* API Reference
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* Associates a set of provided tags with a notification rule.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::TagResourceOutcomeCallable TagResourceCallable(const Model::TagResourceRequest& request) const;
/**
* Associates a set of provided tags with a notification rule.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void TagResourceAsync(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Removes an association between a notification rule and an Amazon SNS 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;
/**
* Removes an association between a notification rule and an Amazon SNS topic so
* that subscribers to that topic stop receiving notifications when the events
* described in the rule are triggered.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UnsubscribeOutcomeCallable UnsubscribeCallable(const Model::UnsubscribeRequest& request) const;
/**
* Removes an association between a notification rule and an Amazon SNS topic so
* that subscribers to that topic stop receiving notifications when the events
* described in the rule are triggered.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UnsubscribeAsync(const Model::UnsubscribeRequest& request, const UnsubscribeResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* 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;
/**
* Removes the association between one or more provided tags and a notification
* rule.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UntagResourceOutcomeCallable UntagResourceCallable(const Model::UntagResourceRequest& request) const;
/**
* Removes the association between one or more provided tags and a notification
* rule.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UntagResourceAsync(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* 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;
/**
* 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
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UpdateNotificationRuleOutcomeCallable UpdateNotificationRuleCallable(const Model::UpdateNotificationRuleRequest& request) const;
/**
* 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
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UpdateNotificationRuleAsync(const Model::UpdateNotificationRuleRequest& request, const UpdateNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CreateNotificationRuleAsyncHelper(const Model::CreateNotificationRuleRequest& request, const CreateNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DeleteNotificationRuleAsyncHelper(const Model::DeleteNotificationRuleRequest& request, const DeleteNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DeleteTargetAsyncHelper(const Model::DeleteTargetRequest& request, const DeleteTargetResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeNotificationRuleAsyncHelper(const Model::DescribeNotificationRuleRequest& request, const DescribeNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListEventTypesAsyncHelper(const Model::ListEventTypesRequest& request, const ListEventTypesResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListNotificationRulesAsyncHelper(const Model::ListNotificationRulesRequest& request, const ListNotificationRulesResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListTagsForResourceAsyncHelper(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListTargetsAsyncHelper(const Model::ListTargetsRequest& request, const ListTargetsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void SubscribeAsyncHelper(const Model::SubscribeRequest& request, const SubscribeResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void TagResourceAsyncHelper(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UnsubscribeAsyncHelper(const Model::UnsubscribeRequest& request, const UnsubscribeResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UntagResourceAsyncHelper(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UpdateNotificationRuleAsyncHelper(const Model::UpdateNotificationRuleRequest& request, const UpdateNotificationRuleResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace CodeStarNotifications
} // namespace Aws