Skip to content

Commit b8bb5c3

Browse files
committed
Add swift SDK examples for first 10 tutorials
1 parent 637ebf8 commit b8bb5c3

File tree

30 files changed

+330
-0
lines changed

30 files changed

+330
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
let package = Package(name: "tutorial-lightsail", dependencies: [.package(url: "https://github.com/awslabs/aws-sdk-swift", from: "0.36.0")], targets: [.executableTarget(name: "tutorial-lightsail", dependencies: [.product(name: "AWSLightsail", package: "aws-sdk-swift")])])
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
import AWSLightsail
5+
6+
@main
7+
struct GettingStartedScenario {
8+
static func main() async throws {
9+
let client = try LightsailClient(region: "us-east-1")
10+
let wrapper = LightsailWrapper(client: client)
11+
print("Running Lightsail getting started scenario...")
12+
// TODO: setup, interact, teardown
13+
let _ = wrapper
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
import AWSLightsail
5+
import Foundation
6+
7+
public class LightsailWrapper {
8+
let client: LightsailClient
9+
10+
public init(client: LightsailClient) {
11+
self.client = client
12+
}
13+
14+
// TODO: Add async throws wrapper methods matching CLI tutorial actions
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
let package = Package(name: "tutorial-ec2", dependencies: [.package(url: "https://github.com/awslabs/aws-sdk-swift", from: "0.36.0")], targets: [.executableTarget(name: "tutorial-ec2", dependencies: [.product(name: "AWSEc2", package: "aws-sdk-swift")])])
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
import AWSEc2
5+
import Foundation
6+
7+
public class Ec2Wrapper {
8+
let client: Ec2Client
9+
10+
public init(client: Ec2Client) {
11+
self.client = client
12+
}
13+
14+
// TODO: Add async throws wrapper methods matching CLI tutorial actions
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
import AWSEc2
5+
6+
@main
7+
struct GettingStartedScenario {
8+
static func main() async throws {
9+
let client = try Ec2Client(region: "us-east-1")
10+
let wrapper = Ec2Wrapper(client: client)
11+
print("Running Ec2 getting started scenario...")
12+
// TODO: setup, interact, teardown
13+
let _ = wrapper
14+
}
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
let package = Package(name: "tutorial-s3", dependencies: [.package(url: "https://github.com/awslabs/aws-sdk-swift", from: "0.36.0")], targets: [.executableTarget(name: "tutorial-s3", dependencies: [.product(name: "AWSS3", package: "aws-sdk-swift")])])
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
import AWSS3
5+
6+
@main
7+
struct GettingStartedScenario {
8+
static func main() async throws {
9+
let client = try S3Client(region: "us-east-1")
10+
let wrapper = S3Wrapper(client: client)
11+
print("Running S3 getting started scenario...")
12+
// TODO: setup, interact, teardown
13+
let _ = wrapper
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
import AWSS3
5+
import Foundation
6+
7+
public class S3Wrapper {
8+
let client: S3Client
9+
10+
public init(client: S3Client) {
11+
self.client = client
12+
}
13+
14+
// TODO: Add async throws wrapper methods matching CLI tutorial actions
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
let package = Package(name: "tutorial-servicediscovery", dependencies: [.package(url: "https://github.com/awslabs/aws-sdk-swift", from: "0.36.0")], targets: [.executableTarget(name: "tutorial-servicediscovery", dependencies: [.product(name: "AWSCloudMap", package: "aws-sdk-swift")])])

0 commit comments

Comments
 (0)