We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aa9694 commit 1503f22Copy full SHA for 1503f22
kotlin/services/neptune/src/main/java/com/example/neptune/scenerio/NeptuneScenario.kt
@@ -634,16 +634,14 @@ suspend fun getDefaultVpcId(): String {
634
}
635
636
637
-
638
suspend fun getSubnetIds(vpcId: String): List<String> {
+ val myFilter = Filter {
639
+ name = "vpc-id"
640
+ values = listOf(vpcId)
641
+ }
642
Ec2Client.fromEnvironment { region = "us-east-1" }.use { ec2Client ->
643
val request = DescribeSubnetsRequest {
- filters = listOf(
- Filter {
- name = "vpc-id"
644
- values = listOf(vpcId)
645
- }
646
- )
+ filters = listOf(myFilter)
647
648
val response = ec2Client.describeSubnets(request)
649
return response.subnets?.mapNotNull { it.subnetId } ?: emptyList()
0 commit comments