Skip to content

Commit

Permalink
added more lintered files
Browse files Browse the repository at this point in the history
  • Loading branch information
scmacdon committed Jun 10, 2024
1 parent f48e28a commit f9042d7
Show file tree
Hide file tree
Showing 6 changed files with 674 additions and 605 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ suspend fun listCertificates() {
// snippet-start:[iot.kotlin.describe.endpoint.main]
suspend fun describeEndpoint(): String? {
val request = DescribeEndpointRequest {}

IotClient { region = "us-east-1" }.use { iotClient ->
val endpointResponse = iotClient.describeEndpoint(request)
val endpointUrl: String? = endpointResponse.endpointAddress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ suspend fun createDataSource(
}

KendraClient { region = "us-east-1" }.use { kendra ->

val createDataSourceResponse = kendra.createDataSource(createDataSourceRequest)
println("Response of creating data source $createDataSourceResponse")
val dataSourceId = createDataSourceResponse.id
Expand Down Expand Up @@ -156,7 +155,7 @@ suspend fun createDataSource(
// snippet-start:[kendra.kotlin.start.datasource.main]
suspend fun startDataSource(
indexIdVal: String?,
dataSourceId: String?,
dataSourceId: String?
) {
println("Synchronize the data source $dataSourceId")
val startDataSourceSyncJobRequest =
Expand Down
2 changes: 1 addition & 1 deletion kotlin/services/keyspaces/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
implementation("aws.sdk.kotlin:keyspaces:1.0.30")
implementation("aws.sdk.kotlin:keyspaces:1.2.28")
implementation("com.datastax.oss:java-driver-core:4.15.0")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.keyspace

import aws.sdk.kotlin.services.keyspaces.KeyspacesClient
import aws.sdk.kotlin.services.keyspaces.model.ListKeyspacesRequest

// snippet-start:[keyspace.kotlin.hello.main]
/**
Before running this Kotlin code example, set up your development environment, including your credentials.
For more information, see the following documentation topic:
https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/

suspend fun main() {
listKeyspaces()
}

suspend fun listKeyspaces() {
val keyspacesRequest = ListKeyspacesRequest {
maxResults = 10
}

KeyspacesClient { region = "us-east-1" }.use { keyClient ->
val response = keyClient.listKeyspaces(keyspacesRequest)
response.keyspaces?.forEach { keyspace ->
println("The name of the keyspace is ${keyspace.keyspaceName}")
}
}
}
// snippet-end:[keyspace.kotlin.hello.main]
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.keyspace

import aws.sdk.kotlin.services.keyspaces.KeyspacesClient
import aws.sdk.kotlin.services.keyspaces.model.ListKeyspacesRequest

// snippet-start:[keyspace.kotlin.hello.main]

/**
Before running this Kotlin code example, set up your development environment, including your credentials.
For more information, see the following documentation topic:
https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/

suspend fun main() {
listKeyspaces()
}

suspend fun listKeyspaces() {
val keyspacesRequest =
ListKeyspacesRequest {
maxResults = 10
}

KeyspacesClient { region = "us-east-1" }.use { keyClient ->
val response = keyClient.listKeyspaces(keyspacesRequest)
response.keyspaces?.forEach { keyspace ->
println("The name of the keyspace is ${keyspace.keyspaceName}")
}
}
}
// snippet-end:[keyspace.kotlin.hello.main]
Loading

0 comments on commit f9042d7

Please sign in to comment.