File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed
kotlin/services/mediastore
src/main/kotlin/com/kotlin/mediastore Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22
33plugins {
4- kotlin(" jvm" ) version " 1.9 .0"
4+ kotlin(" jvm" ) version " 2.1 .0"
55 application
66}
77group = " me.scmacdon"
@@ -26,7 +26,7 @@ repositories {
2626}
2727apply (plugin = " org.jlleitschuh.gradle.ktlint" )
2828dependencies {
29- implementation(platform(" aws.sdk.kotlin:bom:1.3.112 " ))
29+ implementation(platform(" aws.sdk.kotlin:bom:1.4.119 " ))
3030 implementation(" aws.sdk.kotlin:mediastore" )
3131 implementation(" aws.smithy.kotlin:http-client-engine-okhttp" )
3232 implementation(" aws.smithy.kotlin:http-client-engine-crt" )
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ suspend fun createMediaContainer(containerNameVal: String?) {
4343 containerName = containerNameVal
4444 }
4545
46- MediaStoreClient { region = " us-west-2" }.use { mediaStoreClient ->
46+ MediaStoreClient .fromEnvironment { region = " us-west-2" }.use { mediaStoreClient ->
4747 val containerResponse = mediaStoreClient.createContainer(request)
4848 var status = containerResponse.container?.status.toString()
4949
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ suspend fun deleteMediaContainer(containerNameVal: String?) {
4343 containerName = containerNameVal
4444 }
4545
46- MediaStoreClient { region = " us-west-2" }.use { mediaStoreClient ->
46+ MediaStoreClient .fromEnvironment { region = " us-west-2" }.use { mediaStoreClient ->
4747 mediaStoreClient.deleteContainer(request)
4848 println (" The $containerNameVal was deleted" )
4949 }
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ suspend fun checkContainer(containerNameVal: String?): String? {
4343 containerName = containerNameVal
4444 }
4545
46- MediaStoreClient { region = " us-west-2" }.use { mediaStoreClient ->
46+ MediaStoreClient .fromEnvironment { region = " us-west-2" }.use { mediaStoreClient ->
4747 val containerResponse = mediaStoreClient.describeContainer(request)
4848 println (" The container name is ${containerResponse.container?.name} " )
4949 println (" The container ARN is ${containerResponse.container?.arn} " )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ suspend fun main() {
2222
2323// snippet-start:[mediastore.kotlin.list_containers.main]
2424suspend fun listAllContainers () {
25- MediaStoreClient { region = " us-west-2" }.use { mediaStoreClient ->
25+ MediaStoreClient .fromEnvironment { region = " us-west-2" }.use { mediaStoreClient ->
2626 val response = mediaStoreClient.listContainers(ListContainersRequest {})
2727 response.containers?.forEach { container ->
2828 println (" Container name is ${container.name} " )
You can’t perform that action at this time.
0 commit comments