Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions steering_docs/kotlin-tech/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class {Service}Scenario {
try {
runScenario({service}Client)
} catch (e: Exception) {
println("Scenario failed: ${e.message}")
println("Scenario failed: ${e.message}")
e.printStackTrace()
} finally {
cleanupPhase({service}Client)
Expand All @@ -133,7 +133,7 @@ class {Service}Scenario {
demonstrationPhase({service}Client)
examinationPhase({service}Client)
} catch (e: Exception) {
println("Error during scenario execution: ${e.message}")
println("Error during scenario execution: ${e.message}")
throw e
}
}
Expand Down Expand Up @@ -163,10 +163,10 @@ class {Service}Scenario {
// Create new resource as specified
println("Creating new resource...")
resourceId = {service}Actions.createResource({service}Client)
println("Resource created successfully: $resourceId")
println("Resource created successfully: $resourceId")

} catch (e: {Service}Exception) {
println("Error during setup: ${e.message}")
println("Error during setup: ${e.message}")
throw e
}
}
Expand All @@ -181,15 +181,15 @@ class {Service}Scenario {
// Example: Generate sample data if specified
resourceId?.let { id ->
{service}Actions.createSampleData({service}Client, id)
println("Sample data created successfully")
println("Sample data created successfully")

// Wait if specified in the specification
println("Waiting for data to be processed...")
delay(5000)
}

} catch (e: {Service}Exception) {
println("Error during demonstration: ${e.message}")
println("Error during demonstration: ${e.message}")
throw e
}
}
Expand Down Expand Up @@ -232,7 +232,7 @@ class {Service}Scenario {
}

} catch (e: {Service}Exception) {
println("Error during examination: ${e.message}")
println("Error during examination: ${e.message}")
throw e
}
}
Expand All @@ -250,9 +250,9 @@ class {Service}Scenario {
if (deleteResource) {
try {
{service}Actions.deleteResource({service}Client, id)
println("Deleted resource: $id")
println("Deleted resource: $id")
} catch (e: {Service}Exception) {
println("Error deleting resource: ${e.message}")
println("Error deleting resource: ${e.message}")
}
} else {
println("Resource $id will continue running.")
Expand Down Expand Up @@ -335,9 +335,9 @@ val count = readLine()?.toIntOrNull() ?: 0
### Information Display
```kotlin
// Progress indicators
println("Operation completed successfully")
println("⚠️ Warning message")
println("Error occurred")
println("Operation completed successfully")
println("Warning message")
println("Error occurred")

// Formatted output
println(DASHES)
Expand All @@ -361,20 +361,20 @@ try {
when (e.errorDetails?.errorCode) {
"BadRequestException" -> {
// Handle as specified: "Validate input parameters and notify user"
println("Invalid configuration. Please check your parameters.")
println("Invalid configuration. Please check your parameters.")
}
"InternalServerErrorException" -> {
// Handle as specified: "Retry operation with exponential backoff"
println("⚠️ Service temporarily unavailable. Retrying...")
println("Service temporarily unavailable. Retrying...")
// Implement retry logic
}
else -> {
println("Unexpected error: ${e.message}")
println("Unexpected error: ${e.message}")
}
}
throw e
} catch (e: ClientException) {
println("Client error: ${e.message}")
println("Client error: ${e.message}")
throw e
}
```
Expand Down
46 changes: 23 additions & 23 deletions steering_docs/kotlin-tech/hello.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ suspend fun hello{Service}(region: String) {

val response = {service}Client.{basicOperation}(request)

println("🔍 Hello, {AWS Service}!")
println("Hello, {AWS Service}!")

// Display appropriate result information
response.{resultField}?.let { results ->
Expand All @@ -110,24 +110,24 @@ suspend fun hello{Service}(region: String) {
}

} catch (e: {Service}Exception) {
println("{AWS Service} error occurred: ${e.message}")
println("{AWS Service} error occurred: ${e.message}")
when (e.errorDetails?.errorCode) {
"UnauthorizedOperation" -> {
println("💡 You don't have permission to access {AWS Service}.")
println("You don't have permission to access {AWS Service}.")
println(" Please check your IAM permissions.")
}
"InvalidParameterValue" -> {
println("💡 Invalid parameter provided to {AWS Service}.")
println("Invalid parameter provided to {AWS Service}.")
println(" Please check your input parameters.")
}
else -> {
println("💡 Please check your AWS credentials and region configuration.")
println("Please check your AWS credentials and region configuration.")
}
}
exitProcess(1)
} catch (e: ClientException) {
println("Client error occurred: ${e.message}")
println("💡 Please check your AWS credentials and network connectivity.")
println("Client error occurred: ${e.message}")
println("Please check your AWS credentials and network connectivity.")
exitProcess(1)
}
}
Expand Down Expand Up @@ -159,7 +159,7 @@ suspend fun hello{Service}(region: String) {
val request = List{Resources}Request { }
val response = {service}Client.list{Resources}(request)

println("🔍 Hello, {AWS Service}!")
println("Hello, {AWS Service}!")

response.{resources}?.let { resources ->
println("Found ${resources.size} {resources}:")
Expand All @@ -169,7 +169,7 @@ suspend fun hello{Service}(region: String) {
}

} catch (e: {Service}Exception) {
println("{AWS Service} error: ${e.message}")
println("{AWS Service} error: ${e.message}")
exitProcess(1)
}
}
Expand All @@ -184,12 +184,12 @@ suspend fun hello{Service}(region: String) {
val request = Get{Service}StatusRequest { }
val response = {service}Client.get{Service}Status(request)

println("🔍 Hello, {AWS Service}!")
println("Hello, {AWS Service}!")
println("Service status: ${response.status}")
println("{AWS Service} is ready to use.")

} catch (e: {Service}Exception) {
println("{AWS Service} error: ${e.message}")
println("{AWS Service} error: ${e.message}")
exitProcess(1)
}
}
Expand All @@ -206,7 +206,7 @@ suspend fun hello{Service}(region: String) {
}
val response = {service}Client.describe{Resources}(request)

println("🔍 Hello, {AWS Service}!")
println("Hello, {AWS Service}!")

response.{resources}?.let { resources ->
println("Found ${resources.size} {resources}:")
Expand All @@ -216,7 +216,7 @@ suspend fun hello{Service}(region: String) {
}

} catch (e: {Service}Exception) {
println("{AWS Service} error: ${e.message}")
println("{AWS Service} error: ${e.message}")
exitProcess(1)
}
}
Expand All @@ -235,28 +235,28 @@ try {
// Service-specific errors
when (e.errorDetails?.errorCode) {
"UnauthorizedOperation" -> {
println("You don't have permission to access {AWS Service}.")
println("💡 Please check your IAM permissions.")
println("You don't have permission to access {AWS Service}.")
println("Please check your IAM permissions.")
}
"InvalidParameterValue" -> {
println("Invalid parameter provided to {AWS Service}.")
println("💡 Please verify your input parameters.")
println("Invalid parameter provided to {AWS Service}.")
println("Please verify your input parameters.")
}
"ResourceNotFoundException" -> {
println("Resource not found in {AWS Service}.")
println("💡 Please check if the resource exists.")
println("Resource not found in {AWS Service}.")
println("Please check if the resource exists.")
}
else -> {
println("{AWS Service} error: ${e.message}")
println("💡 Please check your AWS configuration.")
println("{AWS Service} error: ${e.message}")
println("Please check your AWS configuration.")
}
}
exitProcess(1)

} catch (e: ClientException) {
// General client errors (network, credentials, etc.)
println("Client error: ${e.message}")
println("💡 Please check your AWS credentials and network connectivity.")
println("Client error: ${e.message}")
println("Please check your AWS credentials and network connectivity.")
exitProcess(1)
}
```
Expand Down
8 changes: 0 additions & 8 deletions steering_docs/kotlin-tech/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,38 +119,30 @@ Look for the metadata table:
All code must include proper snippet tags that match metadata:

```kotlin
// snippet-start:[{service}.kotlin.{action_name}.main]
suspend fun {actionMethod}({service}Client: {Service}Client, param: String): {ActionName}Response {
// Action implementation
}
// snippet-end:[{service}.kotlin.{action_name}.main]
```

### Actions Class Tags
```kotlin
// snippet-start:[{service}.kotlin.{service}_actions.main]
class {Service}Actions {
// Actions class implementation
}
// snippet-end:[{service}.kotlin.{service}_actions.main]
```

### Scenario Tags
```kotlin
// snippet-start:[{service}.kotlin.{service}_scenario.main]
class {Service}Scenario {
// Scenario class implementation
}
// snippet-end:[{service}.kotlin.{service}_scenario.main]
```

### Hello Tags
```kotlin
// snippet-start:[{service}.kotlin.hello.main]
suspend fun main() {
// Hello implementation
}
// snippet-end:[{service}.kotlin.hello.main]
```

## Service Abbreviations
Expand Down
Loading