Skip to content

Commit 5127910

Browse files
committed
Add kotlin SDK examples for first 10 tutorials
1 parent 49f07d9 commit 5127910

File tree

30 files changed

+280
-0
lines changed

30 files changed

+280
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins { kotlin("jvm") version "1.9.0"; application }
2+
repositories { mavenCentral() }
3+
dependencies { implementation("aws.sdk.kotlin:lightsail:1.0.0"); testImplementation(kotlin("test")) }
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+
package com.example.lightsail
5+
6+
import aws.sdk.kotlin.services.lightsail.LightsailClient
7+
import kotlinx.coroutines.runBlocking
8+
9+
fun main() = runBlocking {
10+
LightsailClient { region = "us-east-1" }.use { client ->
11+
val wrapper = LightsailWrapper(client)
12+
println("Running Lightsail getting started scenario...")
13+
// TODO: setup, interact, teardown
14+
}
15+
}
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+
package com.example.lightsail
5+
6+
import aws.sdk.kotlin.services.lightsail.LightsailClient
7+
8+
class LightsailWrapper(private val client: LightsailClient) {
9+
// TODO: Add suspend wrapper methods matching CLI tutorial actions
10+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins { kotlin("jvm") version "1.9.0"; application }
2+
repositories { mavenCentral() }
3+
dependencies { implementation("aws.sdk.kotlin:ec2:1.0.0"); testImplementation(kotlin("test")) }
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+
package com.example.ec2
5+
6+
import aws.sdk.kotlin.services.ec2.Ec2Client
7+
8+
class Ec2Wrapper(private val client: Ec2Client) {
9+
// TODO: Add suspend wrapper methods matching CLI tutorial actions
10+
}
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+
package com.example.ec2
5+
6+
import aws.sdk.kotlin.services.ec2.Ec2Client
7+
import kotlinx.coroutines.runBlocking
8+
9+
fun main() = runBlocking {
10+
Ec2Client { region = "us-east-1" }.use { client ->
11+
val wrapper = Ec2Wrapper(client)
12+
println("Running Ec2 getting started scenario...")
13+
// TODO: setup, interact, teardown
14+
}
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins { kotlin("jvm") version "1.9.0"; application }
2+
repositories { mavenCentral() }
3+
dependencies { implementation("aws.sdk.kotlin:s3:1.0.0"); testImplementation(kotlin("test")) }
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+
package com.example.s3
5+
6+
import aws.sdk.kotlin.services.s3.S3Client
7+
import kotlinx.coroutines.runBlocking
8+
9+
fun main() = runBlocking {
10+
S3Client { region = "us-east-1" }.use { client ->
11+
val wrapper = S3Wrapper(client)
12+
println("Running S3 getting started scenario...")
13+
// TODO: setup, interact, teardown
14+
}
15+
}
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+
package com.example.s3
5+
6+
import aws.sdk.kotlin.services.s3.S3Client
7+
8+
class S3Wrapper(private val client: S3Client) {
9+
// TODO: Add suspend wrapper methods matching CLI tutorial actions
10+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins { kotlin("jvm") version "1.9.0"; application }
2+
repositories { mavenCentral() }
3+
dependencies { implementation("aws.sdk.kotlin:servicediscovery:1.0.0"); testImplementation(kotlin("test")) }

0 commit comments

Comments
 (0)