Skip to content

Commit 89d5d79

Browse files
committed
Add cpp SDK examples for first 10 tutorials
1 parent 49f07d9 commit 89d5d79

40 files changed

+430
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cmake_minimum_required(VERSION 3.13)
2+
project(tutorial-lightsail)
3+
find_package(AWSSDK REQUIRED COMPONENTS lightsail)
4+
add_executable(scenario getting_started_scenario.cpp lightsail_wrapper.cpp)
5+
target_link_libraries(scenario ${AWSSDK_LINK_LIBRARIES})
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#include <aws/core/Aws.h>
5+
#include <aws/lightsail/LightsailClient.h>
6+
#include "lightsail_wrapper.h"
7+
#include <iostream>
8+
9+
int main(int argc, char *argv[]) {
10+
Aws::SDKOptions options;
11+
Aws::InitAPI(options);
12+
{
13+
Aws::Lightsail::LightsailClient client;
14+
std::cout << "Running Lightsail getting started scenario..." << std::endl;
15+
// TODO: setup, interact, teardown
16+
}
17+
Aws::ShutdownAPI(options);
18+
return 0;
19+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#include "lightsail_wrapper.h"
5+
#include <iostream>
6+
7+
bool placeholder(const Aws::Lightsail::LightsailClient &client) {
8+
// TODO: Implement
9+
return true;
10+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
#include <aws/lightsail/LightsailClient.h>
6+
#include <string>
7+
8+
bool placeholder(const Aws::Lightsail::LightsailClient &client);
9+
// TODO: Add wrapper function declarations matching CLI tutorial actions

tuts/002-vpc-gs/cpp/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cmake_minimum_required(VERSION 3.13)
2+
project(tutorial-ec2)
3+
find_package(AWSSDK REQUIRED COMPONENTS ec2)
4+
add_executable(scenario getting_started_scenario.cpp ec2_wrapper.cpp)
5+
target_link_libraries(scenario ${AWSSDK_LINK_LIBRARIES})
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#include "ec2_wrapper.h"
5+
#include <iostream>
6+
7+
bool placeholder(const Aws::Ec2::Ec2Client &client) {
8+
// TODO: Implement
9+
return true;
10+
}

tuts/002-vpc-gs/cpp/ec2_wrapper.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
#include <aws/ec2/Ec2Client.h>
6+
#include <string>
7+
8+
bool placeholder(const Aws::Ec2::Ec2Client &client);
9+
// TODO: Add wrapper function declarations matching CLI tutorial actions
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#include <aws/core/Aws.h>
5+
#include <aws/ec2/Ec2Client.h>
6+
#include "ec2_wrapper.h"
7+
#include <iostream>
8+
9+
int main(int argc, char *argv[]) {
10+
Aws::SDKOptions options;
11+
Aws::InitAPI(options);
12+
{
13+
Aws::Ec2::Ec2Client client;
14+
std::cout << "Running Ec2 getting started scenario..." << std::endl;
15+
// TODO: setup, interact, teardown
16+
}
17+
Aws::ShutdownAPI(options);
18+
return 0;
19+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cmake_minimum_required(VERSION 3.13)
2+
project(tutorial-s3)
3+
find_package(AWSSDK REQUIRED COMPONENTS s3)
4+
add_executable(scenario getting_started_scenario.cpp s3_wrapper.cpp)
5+
target_link_libraries(scenario ${AWSSDK_LINK_LIBRARIES})
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#include <aws/core/Aws.h>
5+
#include <aws/s3/S3Client.h>
6+
#include "s3_wrapper.h"
7+
#include <iostream>
8+
9+
int main(int argc, char *argv[]) {
10+
Aws::SDKOptions options;
11+
Aws::InitAPI(options);
12+
{
13+
Aws::S3::S3Client client;
14+
std::cout << "Running S3 getting started scenario..." << std::endl;
15+
// TODO: setup, interact, teardown
16+
}
17+
Aws::ShutdownAPI(options);
18+
return 0;
19+
}

0 commit comments

Comments
 (0)