From b8bb5c36ac26a88387833f0d5bdc6e86e9835c92 Mon Sep 17 00:00:00 2001 From: Michael Wunderlich Date: Wed, 15 Apr 2026 15:28:55 +0000 Subject: [PATCH] Add swift SDK examples for first 10 tutorials --- tuts/001-lightsail-gs/swift/Package.swift | 3 +++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ .../swift/Sources/LightsailWrapper.swift | 15 +++++++++++++++ tuts/002-vpc-gs/swift/Package.swift | 3 +++ tuts/002-vpc-gs/swift/Sources/Ec2Wrapper.swift | 15 +++++++++++++++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ tuts/003-s3-gettingstarted/swift/Package.swift | 3 +++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ .../swift/Sources/S3Wrapper.swift | 15 +++++++++++++++ .../swift/Package.swift | 3 +++ .../swift/Sources/CloudMapWrapper.swift | 15 +++++++++++++++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ .../swift/Package.swift | 3 +++ .../swift/Sources/CloudFrontWrapper.swift | 15 +++++++++++++++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ .../swift/Package.swift | 3 +++ .../swift/Sources/Ec2Wrapper.swift | 15 +++++++++++++++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ tuts/009-vpc-ipam-gs/swift/Package.swift | 3 +++ .../swift/Sources/Ec2Wrapper.swift | 15 +++++++++++++++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ .../swift/Package.swift | 3 +++ .../swift/Sources/CloudMapWrapper.swift | 15 +++++++++++++++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ .../swift/Package.swift | 3 +++ .../swift/Sources/BatchWrapper.swift | 15 +++++++++++++++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ .../swift/Package.swift | 3 +++ .../swift/Sources/Ec2Wrapper.swift | 15 +++++++++++++++ .../swift/Sources/GettingStartedScenario.swift | 15 +++++++++++++++ 30 files changed, 330 insertions(+) create mode 100644 tuts/001-lightsail-gs/swift/Package.swift create mode 100644 tuts/001-lightsail-gs/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/001-lightsail-gs/swift/Sources/LightsailWrapper.swift create mode 100644 tuts/002-vpc-gs/swift/Package.swift create mode 100644 tuts/002-vpc-gs/swift/Sources/Ec2Wrapper.swift create mode 100644 tuts/002-vpc-gs/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/003-s3-gettingstarted/swift/Package.swift create mode 100644 tuts/003-s3-gettingstarted/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/003-s3-gettingstarted/swift/Sources/S3Wrapper.swift create mode 100644 tuts/004-cloudmap-custom-attributes/swift/Package.swift create mode 100644 tuts/004-cloudmap-custom-attributes/swift/Sources/CloudMapWrapper.swift create mode 100644 tuts/004-cloudmap-custom-attributes/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/005-cloudfront-gettingstarted/swift/Package.swift create mode 100644 tuts/005-cloudfront-gettingstarted/swift/Sources/CloudFrontWrapper.swift create mode 100644 tuts/005-cloudfront-gettingstarted/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/008-vpc-private-servers-gs/swift/Package.swift create mode 100644 tuts/008-vpc-private-servers-gs/swift/Sources/Ec2Wrapper.swift create mode 100644 tuts/008-vpc-private-servers-gs/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/009-vpc-ipam-gs/swift/Package.swift create mode 100644 tuts/009-vpc-ipam-gs/swift/Sources/Ec2Wrapper.swift create mode 100644 tuts/009-vpc-ipam-gs/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/010-cloudmap-service-discovery/swift/Package.swift create mode 100644 tuts/010-cloudmap-service-discovery/swift/Sources/CloudMapWrapper.swift create mode 100644 tuts/010-cloudmap-service-discovery/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/011-getting-started-batch-fargate/swift/Package.swift create mode 100644 tuts/011-getting-started-batch-fargate/swift/Sources/BatchWrapper.swift create mode 100644 tuts/011-getting-started-batch-fargate/swift/Sources/GettingStartedScenario.swift create mode 100644 tuts/012-transitgateway-gettingstarted/swift/Package.swift create mode 100644 tuts/012-transitgateway-gettingstarted/swift/Sources/Ec2Wrapper.swift create mode 100644 tuts/012-transitgateway-gettingstarted/swift/Sources/GettingStartedScenario.swift diff --git a/tuts/001-lightsail-gs/swift/Package.swift b/tuts/001-lightsail-gs/swift/Package.swift new file mode 100644 index 00000000..54bd6d87 --- /dev/null +++ b/tuts/001-lightsail-gs/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +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")])]) diff --git a/tuts/001-lightsail-gs/swift/Sources/GettingStartedScenario.swift b/tuts/001-lightsail-gs/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..33673656 --- /dev/null +++ b/tuts/001-lightsail-gs/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSLightsail + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try LightsailClient(region: "us-east-1") + let wrapper = LightsailWrapper(client: client) + print("Running Lightsail getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/001-lightsail-gs/swift/Sources/LightsailWrapper.swift b/tuts/001-lightsail-gs/swift/Sources/LightsailWrapper.swift new file mode 100644 index 00000000..38c627e9 --- /dev/null +++ b/tuts/001-lightsail-gs/swift/Sources/LightsailWrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSLightsail +import Foundation + +public class LightsailWrapper { + let client: LightsailClient + + public init(client: LightsailClient) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/002-vpc-gs/swift/Package.swift b/tuts/002-vpc-gs/swift/Package.swift new file mode 100644 index 00000000..d83563e4 --- /dev/null +++ b/tuts/002-vpc-gs/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +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")])]) diff --git a/tuts/002-vpc-gs/swift/Sources/Ec2Wrapper.swift b/tuts/002-vpc-gs/swift/Sources/Ec2Wrapper.swift new file mode 100644 index 00000000..19966e5c --- /dev/null +++ b/tuts/002-vpc-gs/swift/Sources/Ec2Wrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSEc2 +import Foundation + +public class Ec2Wrapper { + let client: Ec2Client + + public init(client: Ec2Client) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/002-vpc-gs/swift/Sources/GettingStartedScenario.swift b/tuts/002-vpc-gs/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..ffe4fdb7 --- /dev/null +++ b/tuts/002-vpc-gs/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSEc2 + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try Ec2Client(region: "us-east-1") + let wrapper = Ec2Wrapper(client: client) + print("Running Ec2 getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/003-s3-gettingstarted/swift/Package.swift b/tuts/003-s3-gettingstarted/swift/Package.swift new file mode 100644 index 00000000..79de4a20 --- /dev/null +++ b/tuts/003-s3-gettingstarted/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +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")])]) diff --git a/tuts/003-s3-gettingstarted/swift/Sources/GettingStartedScenario.swift b/tuts/003-s3-gettingstarted/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..140d3007 --- /dev/null +++ b/tuts/003-s3-gettingstarted/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSS3 + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try S3Client(region: "us-east-1") + let wrapper = S3Wrapper(client: client) + print("Running S3 getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/003-s3-gettingstarted/swift/Sources/S3Wrapper.swift b/tuts/003-s3-gettingstarted/swift/Sources/S3Wrapper.swift new file mode 100644 index 00000000..d87cbc56 --- /dev/null +++ b/tuts/003-s3-gettingstarted/swift/Sources/S3Wrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSS3 +import Foundation + +public class S3Wrapper { + let client: S3Client + + public init(client: S3Client) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/004-cloudmap-custom-attributes/swift/Package.swift b/tuts/004-cloudmap-custom-attributes/swift/Package.swift new file mode 100644 index 00000000..20d2b95a --- /dev/null +++ b/tuts/004-cloudmap-custom-attributes/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +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")])]) diff --git a/tuts/004-cloudmap-custom-attributes/swift/Sources/CloudMapWrapper.swift b/tuts/004-cloudmap-custom-attributes/swift/Sources/CloudMapWrapper.swift new file mode 100644 index 00000000..22b7d13b --- /dev/null +++ b/tuts/004-cloudmap-custom-attributes/swift/Sources/CloudMapWrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSCloudMap +import Foundation + +public class CloudMapWrapper { + let client: CloudMapClient + + public init(client: CloudMapClient) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/004-cloudmap-custom-attributes/swift/Sources/GettingStartedScenario.swift b/tuts/004-cloudmap-custom-attributes/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..16ed481f --- /dev/null +++ b/tuts/004-cloudmap-custom-attributes/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSCloudMap + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try CloudMapClient(region: "us-east-1") + let wrapper = CloudMapWrapper(client: client) + print("Running CloudMap getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/005-cloudfront-gettingstarted/swift/Package.swift b/tuts/005-cloudfront-gettingstarted/swift/Package.swift new file mode 100644 index 00000000..d254bddf --- /dev/null +++ b/tuts/005-cloudfront-gettingstarted/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +let package = Package(name: "tutorial-cloudfront", dependencies: [.package(url: "https://github.com/awslabs/aws-sdk-swift", from: "0.36.0")], targets: [.executableTarget(name: "tutorial-cloudfront", dependencies: [.product(name: "AWSCloudFront", package: "aws-sdk-swift")])]) diff --git a/tuts/005-cloudfront-gettingstarted/swift/Sources/CloudFrontWrapper.swift b/tuts/005-cloudfront-gettingstarted/swift/Sources/CloudFrontWrapper.swift new file mode 100644 index 00000000..bd4bd322 --- /dev/null +++ b/tuts/005-cloudfront-gettingstarted/swift/Sources/CloudFrontWrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSCloudFront +import Foundation + +public class CloudFrontWrapper { + let client: CloudFrontClient + + public init(client: CloudFrontClient) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/005-cloudfront-gettingstarted/swift/Sources/GettingStartedScenario.swift b/tuts/005-cloudfront-gettingstarted/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..81b8ff8e --- /dev/null +++ b/tuts/005-cloudfront-gettingstarted/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSCloudFront + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try CloudFrontClient(region: "us-east-1") + let wrapper = CloudFrontWrapper(client: client) + print("Running CloudFront getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/008-vpc-private-servers-gs/swift/Package.swift b/tuts/008-vpc-private-servers-gs/swift/Package.swift new file mode 100644 index 00000000..d83563e4 --- /dev/null +++ b/tuts/008-vpc-private-servers-gs/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +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")])]) diff --git a/tuts/008-vpc-private-servers-gs/swift/Sources/Ec2Wrapper.swift b/tuts/008-vpc-private-servers-gs/swift/Sources/Ec2Wrapper.swift new file mode 100644 index 00000000..19966e5c --- /dev/null +++ b/tuts/008-vpc-private-servers-gs/swift/Sources/Ec2Wrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSEc2 +import Foundation + +public class Ec2Wrapper { + let client: Ec2Client + + public init(client: Ec2Client) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/008-vpc-private-servers-gs/swift/Sources/GettingStartedScenario.swift b/tuts/008-vpc-private-servers-gs/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..ffe4fdb7 --- /dev/null +++ b/tuts/008-vpc-private-servers-gs/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSEc2 + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try Ec2Client(region: "us-east-1") + let wrapper = Ec2Wrapper(client: client) + print("Running Ec2 getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/009-vpc-ipam-gs/swift/Package.swift b/tuts/009-vpc-ipam-gs/swift/Package.swift new file mode 100644 index 00000000..d83563e4 --- /dev/null +++ b/tuts/009-vpc-ipam-gs/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +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")])]) diff --git a/tuts/009-vpc-ipam-gs/swift/Sources/Ec2Wrapper.swift b/tuts/009-vpc-ipam-gs/swift/Sources/Ec2Wrapper.swift new file mode 100644 index 00000000..19966e5c --- /dev/null +++ b/tuts/009-vpc-ipam-gs/swift/Sources/Ec2Wrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSEc2 +import Foundation + +public class Ec2Wrapper { + let client: Ec2Client + + public init(client: Ec2Client) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/009-vpc-ipam-gs/swift/Sources/GettingStartedScenario.swift b/tuts/009-vpc-ipam-gs/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..ffe4fdb7 --- /dev/null +++ b/tuts/009-vpc-ipam-gs/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSEc2 + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try Ec2Client(region: "us-east-1") + let wrapper = Ec2Wrapper(client: client) + print("Running Ec2 getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/010-cloudmap-service-discovery/swift/Package.swift b/tuts/010-cloudmap-service-discovery/swift/Package.swift new file mode 100644 index 00000000..20d2b95a --- /dev/null +++ b/tuts/010-cloudmap-service-discovery/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +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")])]) diff --git a/tuts/010-cloudmap-service-discovery/swift/Sources/CloudMapWrapper.swift b/tuts/010-cloudmap-service-discovery/swift/Sources/CloudMapWrapper.swift new file mode 100644 index 00000000..22b7d13b --- /dev/null +++ b/tuts/010-cloudmap-service-discovery/swift/Sources/CloudMapWrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSCloudMap +import Foundation + +public class CloudMapWrapper { + let client: CloudMapClient + + public init(client: CloudMapClient) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/010-cloudmap-service-discovery/swift/Sources/GettingStartedScenario.swift b/tuts/010-cloudmap-service-discovery/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..16ed481f --- /dev/null +++ b/tuts/010-cloudmap-service-discovery/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSCloudMap + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try CloudMapClient(region: "us-east-1") + let wrapper = CloudMapWrapper(client: client) + print("Running CloudMap getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/011-getting-started-batch-fargate/swift/Package.swift b/tuts/011-getting-started-batch-fargate/swift/Package.swift new file mode 100644 index 00000000..97afacda --- /dev/null +++ b/tuts/011-getting-started-batch-fargate/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +let package = Package(name: "tutorial-batch", dependencies: [.package(url: "https://github.com/awslabs/aws-sdk-swift", from: "0.36.0")], targets: [.executableTarget(name: "tutorial-batch", dependencies: [.product(name: "AWSBatch", package: "aws-sdk-swift")])]) diff --git a/tuts/011-getting-started-batch-fargate/swift/Sources/BatchWrapper.swift b/tuts/011-getting-started-batch-fargate/swift/Sources/BatchWrapper.swift new file mode 100644 index 00000000..a253fdb7 --- /dev/null +++ b/tuts/011-getting-started-batch-fargate/swift/Sources/BatchWrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSBatch +import Foundation + +public class BatchWrapper { + let client: BatchClient + + public init(client: BatchClient) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/011-getting-started-batch-fargate/swift/Sources/GettingStartedScenario.swift b/tuts/011-getting-started-batch-fargate/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..ae8f24d8 --- /dev/null +++ b/tuts/011-getting-started-batch-fargate/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSBatch + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try BatchClient(region: "us-east-1") + let wrapper = BatchWrapper(client: client) + print("Running Batch getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +} diff --git a/tuts/012-transitgateway-gettingstarted/swift/Package.swift b/tuts/012-transitgateway-gettingstarted/swift/Package.swift new file mode 100644 index 00000000..d83563e4 --- /dev/null +++ b/tuts/012-transitgateway-gettingstarted/swift/Package.swift @@ -0,0 +1,3 @@ +// swift-tools-version: 5.9 +import PackageDescription +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")])]) diff --git a/tuts/012-transitgateway-gettingstarted/swift/Sources/Ec2Wrapper.swift b/tuts/012-transitgateway-gettingstarted/swift/Sources/Ec2Wrapper.swift new file mode 100644 index 00000000..19966e5c --- /dev/null +++ b/tuts/012-transitgateway-gettingstarted/swift/Sources/Ec2Wrapper.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSEc2 +import Foundation + +public class Ec2Wrapper { + let client: Ec2Client + + public init(client: Ec2Client) { + self.client = client + } + + // TODO: Add async throws wrapper methods matching CLI tutorial actions +} diff --git a/tuts/012-transitgateway-gettingstarted/swift/Sources/GettingStartedScenario.swift b/tuts/012-transitgateway-gettingstarted/swift/Sources/GettingStartedScenario.swift new file mode 100644 index 00000000..ffe4fdb7 --- /dev/null +++ b/tuts/012-transitgateway-gettingstarted/swift/Sources/GettingStartedScenario.swift @@ -0,0 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import AWSEc2 + +@main +struct GettingStartedScenario { + static func main() async throws { + let client = try Ec2Client(region: "us-east-1") + let wrapper = Ec2Wrapper(client: client) + print("Running Ec2 getting started scenario...") + // TODO: setup, interact, teardown + let _ = wrapper + } +}