Skip to content

Commit d748b8b

Browse files
authored
CPP: IoT Workflow follow (#6183)
1 parent afdef4a commit d748b8b

File tree

78 files changed

+4795
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4795
-35
lines changed

.doc_gen/metadata/iot-data_metadata.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ iot-data-plane_GetThingShadow:
2222
- description:
2323
snippet_tags:
2424
- iot.java2.get.shadow.writer.main
25+
C++:
26+
versions:
27+
- sdk_version: 1
28+
github: cpp/example_code/iot
29+
excerpts:
30+
- description:
31+
snippet_tags:
32+
- cpp.example_code.iot.GetThingShadow
2533
services:
2634
iot-data-plane: {GetThingShadow}
2735
iot-data-plane_UpdateThingShadow:
@@ -47,5 +55,13 @@ iot-data-plane_UpdateThingShadow:
4755
- description:
4856
snippet_tags:
4957
- iot.java2.update.shadow.thing.main
58+
C++:
59+
versions:
60+
- sdk_version: 1
61+
github: cpp/example_code/iot
62+
excerpts:
63+
- description:
64+
snippet_tags:
65+
- cpp.example_code.iot.UpdateThingShadow
5066
services:
5167
iot-data-plane: {UpdateThingShadow}

.doc_gen/metadata/iot_metadata.yaml

+194-14
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ iot_Hello:
2323
- description:
2424
snippet_tags:
2525
- iot.java2.hello_iot.main
26+
C++:
27+
versions:
28+
- sdk_version: 1
29+
github: cpp/example_code/iot/hello_iot
30+
github_note_at_bottom: true
31+
excerpts:
32+
- description: Code for the CMakeLists.txt CMake file.
33+
snippet_tags:
34+
- cpp.example_code.iot.hello_iot.cmake
35+
- description: Code for the hello_iot.cpp source file.
36+
snippet_tags:
37+
- cpp.example_code.iot.hello_iot
2638
services:
2739
iot: {listThings}
2840
iot_DescribeEndpoint:
@@ -56,6 +68,14 @@ iot_DescribeEndpoint:
5668
- description:
5769
snippet_tags:
5870
- iot.rust.describe-endpoint
71+
C++:
72+
versions:
73+
- sdk_version: 1
74+
github: cpp/example_code/iot
75+
excerpts:
76+
- description:
77+
snippet_tags:
78+
- cpp.example_code.iot.DescribeEndpoint
5979
services:
6080
iot: {DescribeEndpoint}
6181
iot_ListThings:
@@ -97,8 +117,16 @@ iot_ListCertificates:
97117
- description:
98118
snippet_tags:
99119
- iot.java2.list.certs.main
120+
C++:
121+
versions:
122+
- sdk_version: 1
123+
github: cpp/example_code/iot
124+
excerpts:
125+
- description:
126+
snippet_tags:
127+
- cpp.example_code.iot.ListCertificates
100128
services:
101-
iot: {ListCertificates}
129+
iot: {ListCertificates}
102130
iot_CreateCertificate:
103131
title: Create an &IoT; certificate using an &AWS; SDK
104132
title_abbrev: Create a certificate
@@ -122,8 +150,16 @@ iot_CreateCertificate:
122150
- description:
123151
snippet_tags:
124152
- iot.java2.create.cert.main
153+
C++:
154+
versions:
155+
- sdk_version: 1
156+
github: cpp/example_code/iot
157+
excerpts:
158+
- description:
159+
snippet_tags:
160+
- cpp.example_code.iot.CreateKeysAndCertificate
125161
services:
126-
iot: {CreateKeysAndCertificate}
162+
iot: {CreateKeysAndCertificate}
127163
iot_DeleteCertificate:
128164
title: Delete an &IoT; certificate using an &AWS; SDK
129165
title_abbrev: Delete a certificate
@@ -147,8 +183,16 @@ iot_DeleteCertificate:
147183
- description:
148184
snippet_tags:
149185
- iot.java2.delete.cert.main
186+
C++:
187+
versions:
188+
- sdk_version: 1
189+
github: cpp/example_code/iot
190+
excerpts:
191+
- description:
192+
snippet_tags:
193+
- cpp.example_code.iot.DeleteCertificate
150194
services:
151-
iot: {DeleteCertificate}
195+
iot: {DeleteCertificate}
152196
iot_SearchIndex:
153197
title: Query the &IoT; search index using an &AWS; SDK
154198
title_abbrev: Query the search index
@@ -172,8 +216,32 @@ iot_SearchIndex:
172216
- description:
173217
snippet_tags:
174218
- iot.java2.search.thing.main
219+
C++:
220+
versions:
221+
- sdk_version: 1
222+
github: cpp/example_code/iot
223+
excerpts:
224+
- description:
225+
snippet_tags:
226+
- cpp.example_code.iot.SearchIndex
227+
services:
228+
iot: {SearchIndex}
229+
iot_UpdateIndexingConfiguration:
230+
title: Update the &IoT; search configuration using an &AWS; SDK
231+
title_abbrev: Update the search configuration
232+
synopsis: update the &IoT; search configuration.
233+
category:
234+
languages:
235+
C++:
236+
versions:
237+
- sdk_version: 1
238+
github: cpp/example_code/iot
239+
excerpts:
240+
- description:
241+
snippet_tags:
242+
- cpp.example_code.iot.UpdateIndexingConfiguration
175243
services:
176-
iot: {SearchIndex}
244+
iot: {UpdateIndexingConfiguration}
177245
iot_DeleteThing:
178246
title: Delete an &IoT; thing using an &AWS; SDK
179247
title_abbrev: Delete a thing
@@ -197,8 +265,16 @@ iot_DeleteThing:
197265
- description:
198266
snippet_tags:
199267
- iot.java2.delete.thing.main
268+
C++:
269+
versions:
270+
- sdk_version: 1
271+
github: cpp/example_code/iot
272+
excerpts:
273+
- description:
274+
snippet_tags:
275+
- cpp.example_code.iot.DeleteThing
200276
services:
201-
iot: {DeleteThing}
277+
iot: {DeleteThing}
202278
iot_DescribeThing:
203279
title: Describe an &IoT; thing using an &AWS; SDK
204280
title_abbrev: Describe a thing
@@ -222,8 +298,16 @@ iot_DescribeThing:
222298
- description:
223299
snippet_tags:
224300
- iot.java2.describe.thing.main
301+
C++:
302+
versions:
303+
- sdk_version: 1
304+
github: cpp/example_code/iot
305+
excerpts:
306+
- description:
307+
snippet_tags:
308+
- cpp.example_code.iot.DescribeThing
225309
services:
226-
iot: {DescribeThing}
310+
iot: {DescribeThing}
227311
iot_AttachThingPrincipal:
228312
title: Attach a certificate to an &IoT; thing using an &AWS; SDK
229313
title_abbrev: Attach a certificate
@@ -247,8 +331,16 @@ iot_AttachThingPrincipal:
247331
- description:
248332
snippet_tags:
249333
- iot.java2.attach.thing.main
334+
C++:
335+
versions:
336+
- sdk_version: 1
337+
github: cpp/example_code/iot
338+
excerpts:
339+
- description:
340+
snippet_tags:
341+
- cpp.example_code.iot.AttachThingPrincipal
250342
services:
251-
iot: {AttachThingPrincipal}
343+
iot: {AttachThingPrincipal}
252344
iot_DetachThingPrincipal:
253345
title: Detach a certificate from an &IoT; thing using an &AWS; SDK
254346
title_abbrev: Detach a certificate
@@ -272,8 +364,16 @@ iot_DetachThingPrincipal:
272364
- description:
273365
snippet_tags:
274366
- iot.java2.detach.thing.main
367+
C++:
368+
versions:
369+
- sdk_version: 1
370+
github: cpp/example_code/iot
371+
excerpts:
372+
- description:
373+
snippet_tags:
374+
- cpp.example_code.iot.DetachThingPrincipal
275375
services:
276-
iot: {DetachThingPrincipal}
376+
iot: {DetachThingPrincipal}
277377
iot_UpdateThing:
278378
title: Update an &IoT; thing using an &AWS; SDK
279379
title_abbrev: Update a thing
@@ -297,8 +397,16 @@ iot_UpdateThing:
297397
- description:
298398
snippet_tags:
299399
- iot.java2.update.thing.main
400+
C++:
401+
versions:
402+
- sdk_version: 1
403+
github: cpp/example_code/iot
404+
excerpts:
405+
- description:
406+
snippet_tags:
407+
- cpp.example_code.iot.UpdateThing
300408
services:
301-
iot: {UpdateThing}
409+
iot: {UpdateThing}
302410
iot_CreateRule:
303411
title: Create an &IoT; rule using an &AWS; SDK
304412
title_abbrev: Create a rule
@@ -322,8 +430,32 @@ iot_CreateRule:
322430
- description:
323431
snippet_tags:
324432
- iot.java2.create.rule.main
433+
C++:
434+
versions:
435+
- sdk_version: 1
436+
github: cpp/example_code/iot
437+
excerpts:
438+
- description:
439+
snippet_tags:
440+
- cpp.example_code.iot.CreateTopicRule
441+
services:
442+
iot: {CreateTopicRule}
443+
iot_DeleteRule:
444+
title: Delete an &IoT; rule using an &AWS; SDK
445+
title_abbrev: Delete a rule
446+
synopsis: delete an &IoT; rule.
447+
category:
448+
languages:
449+
C++:
450+
versions:
451+
- sdk_version: 1
452+
github: cpp/example_code/iot
453+
excerpts:
454+
- description:
455+
snippet_tags:
456+
- cpp.example_code.iot.DeleteTopicRule
325457
services:
326-
iot: {CreateTopicRule}
458+
iot: {DeleteTopicRule}
327459
iot_CreateThing:
328460
title: Create &IoT; things using an &AWS; SDK
329461
title_abbrev: Create a thing
@@ -347,12 +479,20 @@ iot_CreateThing:
347479
- description:
348480
snippet_tags:
349481
- iot.java2.create.thing.main
482+
C++:
483+
versions:
484+
- sdk_version: 1
485+
github: cpp/example_code/iot
486+
excerpts:
487+
- description:
488+
snippet_tags:
489+
- cpp.example_code.iot.CreateThing
350490
services:
351-
iot: {CreateThing}
491+
iot: {CreateThing}
352492
iot_Scenario:
353-
title: Working with &IoT; devices, things, and shadows using &IoT; SDK
354-
title_abbrev: Working with device management use cases
355-
synopsis: working with &IoT; device management use cases using &IoT; SDK
493+
title: Work with &IoT; devices, things, and shadows using &IoT; SDK
494+
title_abbrev: Work with device management use cases
495+
synopsis: work with &IoT; device management use cases using &IoT; SDK
356496
category: Scenarios
357497
languages:
358498
Kotlin:
@@ -373,5 +513,45 @@ iot_Scenario:
373513
- description:
374514
snippet_tags:
375515
- iot.java2.scenario.main
516+
C++:
517+
versions:
518+
- sdk_version: 1
519+
github: cpp/example_code/iot/things_and_shadows_workflow
520+
excerpts:
521+
- description: Create an &IoT; thing.
522+
snippet_tags:
523+
- cpp.example_code.iot.iot_things_and_shadows.create_thing
524+
- description:
525+
snippet_tags:
526+
- cpp.example_code.iot.CreateThing
527+
- description: Generate and attach a device certificate.
528+
snippet_tags:
529+
- cpp.example_code.iot.iot_things_and_shadows.certificates
530+
- description:
531+
snippet_tags:
532+
- cpp.example_code.iot.CreateKeysAndCertificate
533+
- cpp.example_code.iot.AttachThingPrincipal
534+
- description: Perform various operations on the &IoT; thing.
535+
snippet_tags:
536+
- cpp.example_code.iot.iot_things_and_shadows.various_operations
537+
- description:
538+
snippet_tags:
539+
- cpp.example_code.iot.UpdateThing
540+
- cpp.example_code.iot.DescribeEndpoint
541+
- cpp.example_code.iot.ListCertificates
542+
- cpp.example_code.iot.UpdateThingShadow
543+
- cpp.example_code.iot.GetThingShadow
544+
- cpp.example_code.iot.CreateTopicRule
545+
- cpp.example_code.iot.ListTopicRules
546+
- cpp.example_code.iot.SearchIndex
547+
- description: Clean up resources.
548+
snippet_tags:
549+
- cpp.example_code.iot.iot_things_and_shadows.cleanup
550+
- description:
551+
snippet_tags:
552+
- cpp.example_code.iot.DetachThingPrincipal
553+
- cpp.example_code.iot.DeleteCertificate
554+
- cpp.example_code.iot.DeleteTopicRule
555+
- cpp.example_code.iot.DeleteThing
376556
services:
377557
iot: {}

cpp/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN \
1515

1616
# Build only the services needed for example code.
1717
ENV SERVICES="acm;autoscaling;cloudtrail;codebuild;codecommit;cognito-idp;dynamodb;ec2;elasticache;elasticbeanstalk"
18-
ENV SERVICES=${SERVICES}";elasticfilesystem;email;events;glacier;glue;guardduty;iam;kinesis;lambda;logs;mediaconvert;medical-imaging;monitoring"
18+
ENV SERVICES=${SERVICES}";elasticfilesystem;email;events;glacier;glue;guardduty;iam;iot;iot-data;kinesis;lambda;logs;mediaconvert;medical-imaging;monitoring"
1919
ENV SERVICES=${SERVICES}";monitoring;neptune;rds;rds-data;redshift;rekognition;s3;s3-crt;s3-encryption;secretsmanager;sesv2;sns;sqs"
2020
ENV SERVICES=${SERVICES}";storagegateway;sts;transfer;transcribe;transcribestreaming"
2121

cpp/example_code/aurora/getting_started_with_db_clusters.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1260,12 +1260,12 @@ int AwsDoc::Aurora::askQuestionForIntRange(const Aws::String &string, int low,
12601260
int number = std::stoi(string1);
12611261
bool result = number >= low && number <= high;
12621262
if (!result) {
1263-
std::cout << "\nThe number is out of range." << std::endl;
1263+
std::cerr << "\nThe number is out of range." << std::endl;
12641264
}
12651265
return result;
12661266
}
12671267
catch (const std::invalid_argument &) {
1268-
std::cout << "\nNot a valid number." << std::endl;
1268+
std::cerr << "\nNot a valid number." << std::endl;
12691269
return false;
12701270
}
12711271
});

cpp/example_code/autoscaling/groups_and_instances_scenario.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1176,12 +1176,12 @@ int AwsDoc::AutoScaling::askQuestionForIntRange(const Aws::String &string, int l
11761176
int number = std::stoi(string1);
11771177
bool result = number >= low && number <= high;
11781178
if (!result) {
1179-
std::cout << "\nThe number is out of range." << std::endl;
1179+
std::cerr << "\nThe number is out of range." << std::endl;
11801180
}
11811181
return result;
11821182
}
11831183
catch (const std::invalid_argument &) {
1184-
std::cout << "\nNot a valid number." << std::endl;
1184+
std::cerr << "\nNot a valid number." << std::endl;
11851185
return false;
11861186
}
11871187
});

cpp/example_code/cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -902,12 +902,12 @@ int AwsDoc::TopicsAndQueues::askQuestionForIntRange(const Aws::String &string, i
902902
int number = std::stoi(string1);
903903
bool result = number >= low && number <= high;
904904
if (!result) {
905-
std::cout << "\nThe number is out of range." << std::endl;
905+
std::cerr << "\nThe number is out of range." << std::endl;
906906
}
907907
return result;
908908
}
909909
catch (const std::invalid_argument &) {
910-
std::cout << "\nNot a valid number." << std::endl;
910+
std::cerr << "\nNot a valid number." << std::endl;
911911
return false;
912912
}
913913
});

0 commit comments

Comments
 (0)