commonMain.aws.sdk.kotlin.services.signer.internal.DefaultEndpointResolver.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signer-jvm Show documentation
Show all versions of signer-jvm Show documentation
The AWS SDK for Kotlin client for signer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.signer.internal
import aws.sdk.kotlin.runtime.ClientException
import aws.sdk.kotlin.runtime.endpoint.AwsEndpoint
import aws.sdk.kotlin.runtime.endpoint.AwsEndpointResolver
import aws.sdk.kotlin.runtime.endpoint.CredentialScope
import aws.sdk.kotlin.runtime.endpoint.internal.EndpointDefinition
import aws.sdk.kotlin.runtime.endpoint.internal.Partition
import aws.sdk.kotlin.runtime.endpoint.internal.resolveEndpoint
internal class DefaultEndpointResolver : AwsEndpointResolver {
override suspend fun resolve(service: String, region: String): AwsEndpoint {
return resolveEndpoint(servicePartitions, region) ?: throw ClientException("unable to resolve endpoint for region: $region")
}
}
private val servicePartitions = listOf(
Partition(
id = "aws",
regionRegex = Regex("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
partitionEndpoint = "",
isRegionalized = true,
defaults = EndpointDefinition(
hostname = "signer.{region}.amazonaws.com",
protocols = listOf("https", ),
signatureVersions = listOf("v4", ),
),
endpoints = mapOf(
)
),
Partition(
id = "aws-cn",
regionRegex = Regex("^cn\\-\\w+\\-\\d+$"),
partitionEndpoint = "",
isRegionalized = true,
defaults = EndpointDefinition(
hostname = "signer.{region}.amazonaws.com.cn",
protocols = listOf("https", ),
signatureVersions = listOf("v4", ),
),
endpoints = mapOf(
)
),
Partition(
id = "aws-iso",
regionRegex = Regex("^us\\-iso\\-\\w+\\-\\d+$"),
partitionEndpoint = "",
isRegionalized = true,
defaults = EndpointDefinition(
hostname = "signer.{region}.c2s.ic.gov",
protocols = listOf("https", ),
signatureVersions = listOf("v4", ),
),
endpoints = mapOf(
)
),
Partition(
id = "aws-iso-b",
regionRegex = Regex("^us\\-isob\\-\\w+\\-\\d+$"),
partitionEndpoint = "",
isRegionalized = true,
defaults = EndpointDefinition(
hostname = "signer.{region}.sc2s.sgov.gov",
protocols = listOf("https", ),
signatureVersions = listOf("v4", ),
),
endpoints = mapOf(
)
),
Partition(
id = "aws-us-gov",
regionRegex = Regex("^us\\-gov\\-\\w+\\-\\d+$"),
partitionEndpoint = "",
isRegionalized = true,
defaults = EndpointDefinition(
hostname = "signer.{region}.amazonaws.com",
protocols = listOf("https", ),
signatureVersions = listOf("v4", ),
),
endpoints = mapOf(
)
),
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy