Repository navigation
Expand file tree
/
Copy pathsns_samples.h
More file actions
147 lines (130 loc) · 6.42 KB
/
Copy pathsns_samples.h
File metadata and controls
147 lines (130 loc) · 6.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#pragma once
#ifndef SNS_EXAMPLES_SNS_SAMPLES_H
#define SNS_EXAMPLES_SNS_SAMPLES_H
#include <aws/core/client/ClientConfiguration.h>
namespace AwsDoc {
namespace SNS {
//! Create an Amazon Simple Notification Service (Amazon SNS) topic.
/*!
\param topicName: An Amazon SNS topic name.
\param topicARNResult: String to return the Amazon Resource Name (ARN) for the topic.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool createTopic(const Aws::String &topicName, Aws::String &topicARNResult,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Delete an Amazon SNS topic.
/*!
\param topicARN: The ARN for an Amazon SNS topic.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool deleteTopic(const Aws::String &topicARN,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Retrieve the default settings for sending SMS messages from your AWS account
//! by using Amazon SNS.
/*!
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool getSMSType(const Aws::Client::ClientConfiguration &clientConfiguration);
//! Retrieve the properties of an Amazon Simple Notification Service (Amazon SNS) subscription.
/*!
\param subscriptionARN: The Amazon Resource Name (ARN) for an Amazon SNS subscription.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool getSubscriptionAttributes(const Aws::String &subscriptionARN,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Retrieve the properties of an Amazon SNS topic.
/*!
\param topicARN: The ARN for an Amazon SNS topic.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool getTopicAttributes(const Aws::String &topicARN,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Retrieve a list of Amazon SNS subscriptions.
/*!
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool
listSubscriptions(const Aws::Client::ClientConfiguration &clientConfiguration);
//! Retrieve a list of Amazon SNS topics.
/*!
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool listTopics(const Aws::Client::ClientConfiguration &clientConfiguration);
//! Send an SMS text message to a phone number.
/*!
\param message: The message to publish.
\param phoneNumber: The phone number of the recipient in E.164 format.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool publishSms(const Aws::String &message,
const Aws::String &phoneNumber,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Send a message to an Amazon SNS topic.
/*!
\param message: The message to publish.
\param topicARN: The ARN for an Amazon SNS topic.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool publishToTopic(const Aws::String &message,
const Aws::String &topicARN,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Set the default settings for sending SMS messages.
/*!
\param smsType: The type of SMS message that you will send by default.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool setSMSType(const Aws::String &smsType,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Subscribe to an Amazon SNS topic with delivery to a mobile app.
/*!
\param topicARN: The ARN for an Amazon SNS topic.
\param endpointARN: The ARN for a mobile app or device endpoint.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool subscribeApp(const Aws::String &topicARN,
const Aws::String &endpointARN,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Subscribe to an Amazon SNS topic with delivery to an email address.
/*!
\param topicARN: The ARN for an Amazon SNS topic.
\param emailAddress: An email address.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool subscribeEmail(const Aws::String &topicARN,
const Aws::String &emailAddress,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Subscribe to an Amazon SNS topic with delivery to an AWS Lambda function.
/*!
\param topicARN: The ARN for an Amazon SNS topic.
\param lambdaFunctionARN: The ARN for an AWS Lambda function.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool subscribeLambda(const Aws::String &topicARN,
const Aws::String &lambdaFunctionARN,
const Aws::Client::ClientConfiguration &clientConfiguration);
//! Delete a subscription to an Amazon SNS topic.
/*!
\param subscriptionARN: The ARN for an Amazon SNS topic subscription.
\param clientConfiguration: AWS client configuration.
\return bool: Function succeeded.
*/
bool unsubscribe(const Aws::String &topicSubscriptionARN,
const Aws::Client::ClientConfiguration &clientConfiguration);
} // SNS
} // AwsDoc
#endif //SNS_EXAMPLES_SNS_SAMPLES_H