Skip to content

Commit e745689

Browse files
committed
update build number
1 parent 6f79b1f commit e745689

File tree

15 files changed

+46
-46
lines changed

15 files changed

+46
-46
lines changed

kotlin/services/rds/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
kotlin("jvm") version "1.9.0"
4+
kotlin("jvm") version "2.1.0"
55
application
66
}
77

@@ -27,7 +27,7 @@ repositories {
2727
}
2828
apply(plugin = "org.jlleitschuh.gradle.ktlint")
2929
dependencies {
30-
implementation(platform("aws.sdk.kotlin:bom:1.3.112"))
30+
implementation(platform("aws.sdk.kotlin:bom:1.4.119"))
3131
implementation("aws.sdk.kotlin:rds")
3232
implementation("aws.sdk.kotlin:secretsmanager")
3333
implementation("aws.smithy.kotlin:http-client-engine-okhttp")

kotlin/services/rds/src/main/kotlin/com/kotlin/rds/AuroraScenario.kt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ suspend fun deleteDBClusterGroup(
160160
var didFind: Boolean
161161
var instanceARN: String
162162

163-
RdsClient { region = "us-west-2" }.use { rdsClient ->
163+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
164164
// Make sure that the database has been deleted.
165165
while (!isDataDel) {
166166
val response = rdsClient.describeDbInstances()
@@ -204,7 +204,7 @@ suspend fun deleteCluster(dbInstanceClusterIdentifier: String) {
204204
skipFinalSnapshot = true
205205
}
206206

207-
RdsClient { region = "us-west-2" }.use { rdsClient ->
207+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
208208
rdsClient.deleteDbCluster(deleteDbClusterRequest)
209209
println("$dbInstanceClusterIdentifier was deleted!")
210210
}
@@ -220,7 +220,7 @@ suspend fun deleteDBInstance(dbInstanceIdentifierVal: String) {
220220
skipFinalSnapshot = true
221221
}
222222

223-
RdsClient { region = "us-west-2" }.use { rdsClient ->
223+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
224224
val response = rdsClient.deleteDbInstance(deleteDbInstanceRequest)
225225
print("The status of the database is ${response.dbInstance?.dbInstanceStatus}")
226226
}
@@ -242,7 +242,7 @@ suspend fun waitSnapshotReady(
242242
dbClusterIdentifier = dbInstanceClusterIdentifier
243243
}
244244

245-
RdsClient { region = "us-west-2" }.use { rdsClient ->
245+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
246246
while (!snapshotReady) {
247247
val response = rdsClient.describeDbClusterSnapshots(snapshotsRequest)
248248
val snapshotList = response.dbClusterSnapshots
@@ -274,7 +274,7 @@ suspend fun createDBClusterSnapshot(
274274
dbClusterSnapshotIdentifier = dbSnapshotIdentifier
275275
}
276276

277-
RdsClient { region = "us-west-2" }.use { rdsClient ->
277+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
278278
val response = rdsClient.createDbClusterSnapshot(snapshotRequest)
279279
println("The Snapshot ARN is ${response.dbClusterSnapshot?.dbClusterSnapshotArn}")
280280
}
@@ -292,7 +292,7 @@ suspend fun waitDBAuroraInstanceReady(dbInstanceIdentifierVal: String?) {
292292
}
293293

294294
var endpoint = ""
295-
RdsClient { region = "us-west-2" }.use { rdsClient ->
295+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
296296
while (!instanceReady) {
297297
val response = rdsClient.describeDbInstances(instanceRequest)
298298
response.dbInstances?.forEach { instance ->
@@ -325,7 +325,7 @@ suspend fun createDBInstanceCluster(
325325
dbInstanceClass = instanceClassVal
326326
}
327327

328-
RdsClient { region = "us-west-2" }.use { rdsClient ->
328+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
329329
val response = rdsClient.createDbInstance(instanceRequest)
330330
print("The status is ${response.dbInstance?.dbInstanceStatus}")
331331
return response.dbInstance?.dbInstanceArn
@@ -341,7 +341,7 @@ suspend fun getListInstanceClasses(): String {
341341
maxRecords = 20
342342
}
343343
var instanceClass = ""
344-
RdsClient { region = "us-west-2" }.use { rdsClient ->
344+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
345345
val response = rdsClient.describeOrderableDbInstanceOptions(optionsRequest)
346346
response.orderableDbInstanceOptions?.forEach { instanceOption ->
347347
instanceClass = instanceOption.dbInstanceClass.toString()
@@ -365,7 +365,7 @@ suspend fun waitForClusterInstanceReady(dbClusterIdentifierVal: String?) {
365365
dbClusterIdentifier = dbClusterIdentifierVal
366366
}
367367

368-
RdsClient { region = "us-west-2" }.use { rdsClient ->
368+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
369369
while (!instanceReady) {
370370
val response = rdsClient.describeDbClusters(instanceRequest)
371371
response.dbClusters?.forEach { cluster ->
@@ -401,7 +401,7 @@ suspend fun createDBCluster(
401401
masterUserPassword = password
402402
}
403403

404-
RdsClient { region = "us-west-2" }.use { rdsClient ->
404+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
405405
val response = rdsClient.createDbCluster(clusterRequest)
406406
return response.dbCluster?.dbClusterArn
407407
}
@@ -417,7 +417,7 @@ suspend fun getAllowedClusterEngines(dbParameterGroupFamilyVal: String?) {
417417
engine = "aurora-mysql"
418418
}
419419

420-
RdsClient { region = "us-west-2" }.use { rdsClient ->
420+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
421421
val response = rdsClient.describeDbEngineVersions(versionsRequest)
422422
response.dbEngineVersions?.forEach { dbEngine ->
423423
println("The engine version is ${dbEngine.engineVersion}")
@@ -445,7 +445,7 @@ suspend fun modifyDBClusterParas(dClusterGroupName: String?) {
445445
parameters = paraList
446446
}
447447

448-
RdsClient { region = "us-west-2" }.use { rdsClient ->
448+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
449449
val response = rdsClient.modifyDbClusterParameterGroup(groupRequest)
450450
println("The parameter group ${response.dbClusterParameterGroupName} was successfully modified")
451451
}
@@ -470,7 +470,7 @@ suspend fun describeDbClusterParameters(
470470
}
471471
}
472472

473-
RdsClient { region = "us-west-2" }.use { rdsClient ->
473+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
474474
val response = rdsClient.describeDbClusterParameters(dbParameterGroupsRequest)
475475
response.parameters?.forEach { para ->
476476
// Only print out information about either auto_increment_offset or auto_increment_increment.
@@ -497,7 +497,7 @@ suspend fun describeDbClusterParameterGroups(dbClusterGroupName: String?) {
497497
maxRecords = 20
498498
}
499499

500-
RdsClient { region = "us-west-2" }.use { rdsClient ->
500+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
501501
val response = rdsClient.describeDbClusterParameterGroups(groupsRequest)
502502
response.dbClusterParameterGroups?.forEach { group ->
503503
println("The group name is ${group.dbClusterParameterGroupName}")
@@ -519,7 +519,7 @@ suspend fun createDBClusterParameterGroup(
519519
description = "Created by using the AWS SDK for Kotlin"
520520
}
521521

522-
RdsClient { region = "us-west-2" }.use { rdsClient ->
522+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
523523
val response = rdsClient.createDbClusterParameterGroup(groupRequest)
524524
println("The group name is ${response.dbClusterParameterGroup?.dbClusterParameterGroupName}")
525525
}
@@ -535,7 +535,7 @@ suspend fun describeAuroraDBEngines() {
535535
maxRecords = 20
536536
}
537537

538-
RdsClient { region = "us-west-2" }.use { rdsClient ->
538+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
539539
val response = rdsClient.describeDbEngineVersions(engineVersionsRequest)
540540
response.dbEngineVersions?.forEach { engineOb ->
541541
println("The name of the DB parameter group family for the database engine is ${engineOb.dbParameterGroupFamily}")

kotlin/services/rds/src/main/kotlin/com/kotlin/rds/CreateDBInstance.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ suspend fun createDatabaseInstance(
7272
masterUserPassword = masterUserPasswordVal
7373
}
7474

75-
RdsClient { region = "us-west-2" }.use { rdsClient ->
75+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
7676
val response = rdsClient.createDbInstance(instanceRequest)
7777
print("The status is ${response.dbInstance?.dbInstanceStatus}")
7878
}
@@ -90,7 +90,7 @@ suspend fun waitForInstanceReady(dbInstanceIdentifierVal: String?) {
9090
dbInstanceIdentifier = dbInstanceIdentifierVal
9191
}
9292

93-
RdsClient { region = "us-west-2" }.use { rdsClient ->
93+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
9494
while (!instanceReady) {
9595
val response = rdsClient.describeDbInstances(instanceRequest)
9696
val instanceList = response.dbInstances

kotlin/services/rds/src/main/kotlin/com/kotlin/rds/CreateDBSnapshot.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ suspend fun createSnapshot(
4747
dbSnapshotIdentifier = dbSnapshotIdentifierVal
4848
}
4949

50-
RdsClient { region = "us-west-2" }.use { rdsClient ->
50+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
5151
val response = rdsClient.createDbSnapshot(snapshotRequest)
5252
print("The Snapshot id is ${response.dbSnapshot?.dbiResourceId}")
5353
}

kotlin/services/rds/src/main/kotlin/com/kotlin/rds/DeleteDBInstance.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ suspend fun deleteDatabaseInstance(dbInstanceIdentifierVal: String?) {
4343
skipFinalSnapshot = true
4444
}
4545

46-
RdsClient { region = "us-west-2" }.use { rdsClient ->
46+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
4747
val response = rdsClient.deleteDbInstance(deleteDbInstanceRequest)
4848
print("The status of the database is ${response.dbInstance?.dbInstanceStatus}")
4949
}

kotlin/services/rds/src/main/kotlin/com/kotlin/rds/DescribeAccountAttributes.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ suspend fun main() {
2121

2222
// snippet-start:[rds.kotlin.describe_account.main]
2323
suspend fun getAccountAttributes() {
24-
RdsClient { region = "us-west-2" }.use { rdsClient ->
24+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
2525
val response = rdsClient.describeAccountAttributes(DescribeAccountAttributesRequest {})
2626
response.accountQuotas?.forEach { quotas ->
2727
val response = response.accountQuotas

kotlin/services/rds/src/main/kotlin/com/kotlin/rds/DescribeDBInstances.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ suspend fun main() {
2121

2222
// snippet-start:[rds.kotlin.describe_instances.main]
2323
suspend fun describeInstances() {
24-
RdsClient { region = "us-west-2" }.use { rdsClient ->
24+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
2525
val response = rdsClient.describeDbInstances(DescribeDbInstancesRequest {})
2626
response.dbInstances?.forEach { instance ->
2727
println("Instance Identifier is ${instance.dbInstanceIdentifier}")

kotlin/services/rds/src/main/kotlin/com/kotlin/rds/ModifyDBInstance.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ suspend fun updateIntance(
4848
masterUserPassword = masterUserPasswordVal
4949
}
5050

51-
RdsClient { region = "us-west-2" }.use { rdsClient ->
51+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
5252
val instanceResponse = rdsClient.modifyDbInstance(request)
5353
println("The ARN of the modified database is ${instanceResponse.dbInstance?.dbInstanceArn}")
5454
}

kotlin/services/rds/src/main/kotlin/com/kotlin/rds/RDSScenario.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ suspend fun deleteParaGroup(
148148
var didFind: Boolean
149149
var instanceARN: String
150150

151-
RdsClient { region = "us-west-2" }.use { rdsClient ->
151+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
152152
// Make sure that the database has been deleted.
153153
while (!isDataDel) {
154154
val response = rdsClient.describeDbInstances()
@@ -193,7 +193,7 @@ suspend fun deleteDbInstance(dbInstanceIdentifierVal: String) {
193193
skipFinalSnapshot = true
194194
}
195195

196-
RdsClient { region = "us-west-2" }.use { rdsClient ->
196+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
197197
val response = rdsClient.deleteDbInstance(deleteDbInstanceRequest)
198198
print("The status of the database is ${response.dbInstance?.dbInstanceStatus}")
199199
}
@@ -217,7 +217,7 @@ suspend fun waitForSnapshotReady(
217217
}
218218

219219
while (!snapshotReady) {
220-
RdsClient { region = "us-west-2" }.use { rdsClient ->
220+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
221221
val response = rdsClient.describeDbSnapshots(snapshotsRequest)
222222
val snapshotList: List<DbSnapshot>? = response.dbSnapshots
223223
if (snapshotList != null) {
@@ -249,7 +249,7 @@ suspend fun createDbSnapshot(
249249
dbSnapshotIdentifier = dbSnapshotIdentifierVal
250250
}
251251

252-
RdsClient { region = "us-west-2" }.use { rdsClient ->
252+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
253253
val response = rdsClient.createDbSnapshot(snapshotRequest)
254254
print("The Snapshot id is ${response.dbSnapshot?.dbiResourceId}")
255255
}
@@ -269,7 +269,7 @@ suspend fun waitForDbInstanceReady(dbInstanceIdentifierVal: String?) {
269269
}
270270
var endpoint = ""
271271
while (!instanceReady) {
272-
RdsClient { region = "us-west-2" }.use { rdsClient ->
272+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
273273
val response = rdsClient.describeDbInstances(instanceRequest)
274274
val instanceList = response.dbInstances
275275
if (instanceList != null) {
@@ -313,7 +313,7 @@ suspend fun createDatabaseInstance(
313313
masterUserPassword = masterUserPasswordVal
314314
}
315315

316-
RdsClient { region = "us-west-2" }.use { rdsClient ->
316+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
317317
val response = rdsClient.createDbInstance(instanceRequest)
318318
print("The status is ${response.dbInstance?.dbInstanceStatus}")
319319
return response.dbInstance?.dbInstanceArn
@@ -328,7 +328,7 @@ suspend fun getMicroInstances() {
328328
DescribeOrderableDbInstanceOptionsRequest {
329329
engine = "mysql"
330330
}
331-
RdsClient { region = "us-west-2" }.use { rdsClient ->
331+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
332332
val response = rdsClient.describeOrderableDbInstanceOptions(dbInstanceOptionsRequest)
333333
val orderableDBInstances = response.orderableDbInstanceOptions
334334
if (orderableDBInstances != null) {
@@ -349,7 +349,7 @@ suspend fun getAllowedEngines(dbParameterGroupFamilyVal: String?) {
349349
dbParameterGroupFamily = dbParameterGroupFamilyVal
350350
engine = "mysql"
351351
}
352-
RdsClient { region = "us-west-2" }.use { rdsClient ->
352+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
353353
val response = rdsClient.describeDbEngineVersions(versionsRequest)
354354
val dbEngines: List<DbEngineVersion>? = response.dbEngineVersions
355355
if (dbEngines != null) {
@@ -380,7 +380,7 @@ suspend fun modifyDBParas(dbGroupName: String) {
380380
parameters = paraList
381381
}
382382

383-
RdsClient { region = "us-west-2" }.use { rdsClient ->
383+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
384384
val response = rdsClient.modifyDbParameterGroup(groupRequest)
385385
println("The parameter group ${response.dbParameterGroupName} was successfully modified")
386386
}
@@ -405,7 +405,7 @@ suspend fun describeDbParameters(
405405
source = "user"
406406
}
407407
}
408-
RdsClient { region = "us-west-2" }.use { rdsClient ->
408+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
409409
val response = rdsClient.describeDbParameters(dbParameterGroupsRequest)
410410
val dbParameters: List<Parameter>? = response.parameters
411411
var paraName: String
@@ -433,7 +433,7 @@ suspend fun describeDbParameterGroups(dbGroupName: String?) {
433433
dbParameterGroupName = dbGroupName
434434
maxRecords = 20
435435
}
436-
RdsClient { region = "us-west-2" }.use { rdsClient ->
436+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
437437
val response = rdsClient.describeDbParameterGroups(groupsRequest)
438438
val groups = response.dbParameterGroups
439439
if (groups != null) {
@@ -459,7 +459,7 @@ suspend fun createDBParameterGroup(
459459
description = "Created by using the AWS SDK for Kotlin"
460460
}
461461

462-
RdsClient { region = "us-west-2" }.use { rdsClient ->
462+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
463463
val response = rdsClient.createDbParameterGroup(groupRequest)
464464
println("The group name is ${response.dbParameterGroup?.dbParameterGroupName}")
465465
}
@@ -476,7 +476,7 @@ suspend fun describeDBEngines() {
476476
maxRecords = 20
477477
}
478478

479-
RdsClient { region = "us-west-2" }.use { rdsClient ->
479+
RdsClient.fromEnvironment { region = "us-west-2" }.use { rdsClient ->
480480
val response = rdsClient.describeDbEngineVersions(engineVersionsRequest)
481481
val engines: List<DbEngineVersion>? = response.dbEngineVersions
482482

@@ -497,7 +497,7 @@ suspend fun getSecretValues(secretName: String?): String? {
497497
secretId = secretName
498498
}
499499

500-
SecretsManagerClient { region = "us-west-2" }.use { secretsClient ->
500+
SecretsManagerClient.fromEnvironment { region = "us-west-2" }.use { secretsClient ->
501501
val valueResponse = secretsClient.getSecretValue(valueRequest)
502502
return valueResponse.secretString
503503
}

kotlin/services/redshift/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
kotlin("jvm") version "1.9.0"
4+
kotlin("jvm") version "2.1.0"
55
application
66
}
77

@@ -27,7 +27,7 @@ repositories {
2727
}
2828
apply(plugin = "org.jlleitschuh.gradle.ktlint")
2929
dependencies {
30-
implementation(platform("aws.sdk.kotlin:bom:1.3.112"))
30+
implementation(platform("aws.sdk.kotlin:bom:1.4.119"))
3131
implementation("aws.sdk.kotlin:redshift")
3232
implementation("aws.sdk.kotlin:secretsmanager")
3333
implementation("aws.smithy.kotlin:http-client-engine-okhttp")

0 commit comments

Comments
 (0)