@@ -83,13 +83,6 @@ class RegionDecorator : ClientCodegenDecorator {
8383 private val envKey = " AWS_REGION" .dq()
8484 private val profileKey = " region" .dq()
8585
86- // Services that have an endpoint ruleset that references the SDK::Region built in, or
87- // that use SigV4, both need a configurable region.
88- private fun usesRegion (codegenContext : ClientCodegenContext ) =
89- codegenContext.getBuiltIn(AwsBuiltIns .REGION ) != null ||
90- ServiceIndex .of(codegenContext.model)
91- .getEffectiveAuthSchemes(codegenContext.serviceShape).containsKey(SigV4Trait .ID )
92-
9386 override fun configCustomizations (
9487 codegenContext : ClientCodegenContext ,
9588 baseCustomizations : List <ConfigCustomization >,
@@ -223,3 +216,14 @@ class RegionProviderConfig(codegenContext: ClientCodegenContext) : ConfigCustomi
223216}
224217
225218fun region (runtimeConfig : RuntimeConfig ) = AwsRuntimeType .awsTypes(runtimeConfig).resolve(" region" )
219+
220+ /* *
221+ * Test if region is used and configured for a model (and available on a service client).
222+ *
223+ * Services that have an endpoint ruleset that references the SDK::Region built in, or
224+ * that use SigV4, both need a configurable region.
225+ */
226+ fun usesRegion (codegenContext : ClientCodegenContext ) =
227+ codegenContext.getBuiltIn(AwsBuiltIns .REGION ) != null ||
228+ ServiceIndex .of(codegenContext.model)
229+ .getEffectiveAuthSchemes(codegenContext.serviceShape).containsKey(SigV4Trait .ID )
0 commit comments