From 73923416ef2beaefbe7feda0473bc39c734be4b8 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Mon, 1 Nov 2021 10:06:05 -0700 Subject: [PATCH] chore(clients): add config for fips and dualStack endpoint (#2947) --- .../src/AccessAnalyzerClient.ts | 10 ++ .../client-accessanalyzer/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-account/src/AccountClient.ts | 10 ++ clients/client-account/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-account/src/runtimeConfig.ts | 9 +- clients/client-acm-pca/src/ACMPCAClient.ts | 10 ++ clients/client-acm-pca/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-acm-pca/src/runtimeConfig.ts | 9 +- clients/client-acm/src/ACMClient.ts | 10 ++ clients/client-acm/src/endpoints.ts | 7 +- .../client-acm/src/runtimeConfig.browser.ts | 3 + clients/client-acm/src/runtimeConfig.ts | 9 +- .../src/AlexaForBusinessClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-amp/src/AmpClient.ts | 10 ++ clients/client-amp/src/endpoints.ts | 7 +- .../client-amp/src/runtimeConfig.browser.ts | 3 + clients/client-amp/src/runtimeConfig.ts | 9 +- clients/client-amplify/src/AmplifyClient.ts | 10 ++ clients/client-amplify/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-amplify/src/runtimeConfig.ts | 9 +- .../src/AmplifyBackendClient.ts | 10 ++ .../client-amplifybackend/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/APIGatewayClient.ts | 10 ++ clients/client-api-gateway/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-api-gateway/src/runtimeConfig.ts | 9 +- .../src/ApiGatewayManagementApiClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ApiGatewayV2Client.ts | 10 ++ clients/client-apigatewayv2/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-apigatewayv2/src/runtimeConfig.ts | 9 +- clients/client-app-mesh/src/AppMeshClient.ts | 10 ++ clients/client-app-mesh/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-app-mesh/src/runtimeConfig.ts | 9 +- .../client-appconfig/src/AppConfigClient.ts | 10 ++ clients/client-appconfig/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-appconfig/src/runtimeConfig.ts | 9 +- clients/client-appflow/src/AppflowClient.ts | 10 ++ clients/client-appflow/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-appflow/src/runtimeConfig.ts | 9 +- .../src/AppIntegrationsClient.ts | 10 ++ .../client-appintegrations/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ApplicationAutoScalingClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ApplicationDiscoveryServiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ApplicationInsightsClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ApplicationCostProfilerClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-apprunner/src/AppRunnerClient.ts | 10 ++ clients/client-apprunner/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-apprunner/src/runtimeConfig.ts | 9 +- .../client-appstream/src/AppStreamClient.ts | 10 ++ clients/client-appstream/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-appstream/src/runtimeConfig.ts | 9 +- clients/client-appsync/src/AppSyncClient.ts | 10 ++ clients/client-appsync/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-appsync/src/runtimeConfig.ts | 9 +- clients/client-athena/src/AthenaClient.ts | 10 ++ clients/client-athena/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-athena/src/runtimeConfig.ts | 9 +- .../src/AuditManagerClient.ts | 10 ++ clients/client-auditmanager/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-auditmanager/src/runtimeConfig.ts | 9 +- .../src/AutoScalingPlansClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/AutoScalingClient.ts | 10 ++ clients/client-auto-scaling/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-auto-scaling/src/runtimeConfig.ts | 9 +- clients/client-backup/src/BackupClient.ts | 10 ++ clients/client-backup/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-backup/src/runtimeConfig.ts | 9 +- clients/client-batch/src/BatchClient.ts | 10 ++ clients/client-batch/src/endpoints.ts | 7 +- .../client-batch/src/runtimeConfig.browser.ts | 3 + clients/client-batch/src/runtimeConfig.ts | 9 +- clients/client-braket/src/BraketClient.ts | 10 ++ clients/client-braket/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-braket/src/runtimeConfig.ts | 9 +- clients/client-budgets/src/BudgetsClient.ts | 10 ++ clients/client-budgets/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-budgets/src/runtimeConfig.ts | 9 +- .../src/ChimeSDKIdentityClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ChimeSDKMessagingClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-chime/src/ChimeClient.ts | 10 ++ clients/client-chime/src/endpoints.ts | 7 +- .../client-chime/src/runtimeConfig.browser.ts | 3 + clients/client-chime/src/runtimeConfig.ts | 9 +- clients/client-cloud9/src/Cloud9Client.ts | 10 ++ clients/client-cloud9/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-cloud9/src/runtimeConfig.ts | 9 +- .../src/CloudControlClient.ts | 10 ++ clients/client-cloudcontrol/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-cloudcontrol/src/runtimeConfig.ts | 9 +- .../src/CloudDirectoryClient.ts | 10 ++ .../client-clouddirectory/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CloudFormationClient.ts | 10 ++ .../client-cloudformation/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-cloudfront/src/CloudFrontClient.ts | 10 ++ clients/client-cloudfront/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-cloudfront/src/runtimeConfig.ts | 9 +- .../src/CloudHSMV2Client.ts | 10 ++ clients/client-cloudhsm-v2/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-cloudhsm-v2/src/runtimeConfig.ts | 9 +- clients/client-cloudhsm/src/CloudHSMClient.ts | 10 ++ clients/client-cloudhsm/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-cloudhsm/src/runtimeConfig.ts | 9 +- .../src/CloudSearchDomainClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CloudSearchClient.ts | 10 ++ clients/client-cloudsearch/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-cloudsearch/src/runtimeConfig.ts | 9 +- .../client-cloudtrail/src/CloudTrailClient.ts | 10 ++ clients/client-cloudtrail/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-cloudtrail/src/runtimeConfig.ts | 9 +- .../src/CloudWatchEventsClient.ts | 10 ++ .../client-cloudwatch-events/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CloudWatchLogsClient.ts | 10 ++ .../client-cloudwatch-logs/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-cloudwatch/src/CloudWatchClient.ts | 10 ++ clients/client-cloudwatch/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-cloudwatch/src/runtimeConfig.ts | 9 +- .../src/CodeartifactClient.ts | 10 ++ clients/client-codeartifact/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-codeartifact/src/runtimeConfig.ts | 9 +- .../client-codebuild/src/CodeBuildClient.ts | 10 ++ clients/client-codebuild/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-codebuild/src/runtimeConfig.ts | 9 +- .../client-codecommit/src/CodeCommitClient.ts | 10 ++ clients/client-codecommit/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-codecommit/src/runtimeConfig.ts | 9 +- .../client-codedeploy/src/CodeDeployClient.ts | 10 ++ clients/client-codedeploy/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-codedeploy/src/runtimeConfig.ts | 9 +- .../src/CodeGuruReviewerClient.ts | 10 ++ .../client-codeguru-reviewer/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CodeGuruProfilerClient.ts | 10 ++ .../client-codeguruprofiler/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CodePipelineClient.ts | 10 ++ clients/client-codepipeline/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-codepipeline/src/runtimeConfig.ts | 9 +- .../src/CodeStarConnectionsClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CodestarNotificationsClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-codestar/src/CodeStarClient.ts | 10 ++ clients/client-codestar/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-codestar/src/runtimeConfig.ts | 9 +- .../src/CognitoIdentityProviderClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CognitoIdentityClient.ts | 10 ++ .../client-cognito-identity/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CognitoSyncClient.ts | 10 ++ clients/client-cognito-sync/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-cognito-sync/src/runtimeConfig.ts | 9 +- .../client-comprehend/src/ComprehendClient.ts | 10 ++ clients/client-comprehend/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-comprehend/src/runtimeConfig.ts | 9 +- .../src/ComprehendMedicalClient.ts | 10 ++ .../client-comprehendmedical/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ComputeOptimizerClient.ts | 10 ++ .../client-compute-optimizer/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ConfigServiceClient.ts | 10 ++ .../client-config-service/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ConnectContactLensClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-connect/src/ConnectClient.ts | 10 ++ clients/client-connect/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-connect/src/runtimeConfig.ts | 9 +- .../src/ConnectParticipantClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CostAndUsageReportServiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/CostExplorerClient.ts | 10 ++ clients/client-cost-explorer/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-cost-explorer/src/runtimeConfig.ts | 9 +- .../src/CustomerProfilesClient.ts | 10 ++ .../client-customer-profiles/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/DataPipelineClient.ts | 10 ++ clients/client-data-pipeline/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-data-pipeline/src/runtimeConfig.ts | 9 +- .../src/DatabaseMigrationServiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-databrew/src/DataBrewClient.ts | 10 ++ clients/client-databrew/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-databrew/src/runtimeConfig.ts | 9 +- .../src/DataExchangeClient.ts | 10 ++ clients/client-dataexchange/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-dataexchange/src/runtimeConfig.ts | 9 +- clients/client-datasync/src/DataSyncClient.ts | 10 ++ clients/client-datasync/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-datasync/src/runtimeConfig.ts | 9 +- clients/client-dax/src/DAXClient.ts | 10 ++ clients/client-dax/src/endpoints.ts | 7 +- .../client-dax/src/runtimeConfig.browser.ts | 3 + clients/client-dax/src/runtimeConfig.ts | 9 +- .../client-detective/src/DetectiveClient.ts | 10 ++ clients/client-detective/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-detective/src/runtimeConfig.ts | 9 +- .../src/DeviceFarmClient.ts | 10 ++ clients/client-device-farm/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-device-farm/src/runtimeConfig.ts | 9 +- .../src/DevOpsGuruClient.ts | 10 ++ clients/client-devops-guru/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-devops-guru/src/runtimeConfig.ts | 9 +- .../src/DirectConnectClient.ts | 10 ++ .../client-direct-connect/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/DirectoryServiceClient.ts | 10 ++ .../client-directory-service/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-dlm/src/DLMClient.ts | 10 ++ clients/client-dlm/src/endpoints.ts | 7 +- .../client-dlm/src/runtimeConfig.browser.ts | 3 + clients/client-dlm/src/runtimeConfig.ts | 9 +- clients/client-docdb/src/DocDBClient.ts | 10 ++ clients/client-docdb/src/endpoints.ts | 7 +- .../client-docdb/src/runtimeConfig.browser.ts | 3 + clients/client-docdb/src/runtimeConfig.ts | 9 +- .../src/DynamoDBStreamsClient.ts | 10 ++ .../client-dynamodb-streams/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-dynamodb/src/DynamoDBClient.ts | 10 ++ clients/client-dynamodb/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-dynamodb/src/runtimeConfig.ts | 9 +- clients/client-ebs/src/EBSClient.ts | 10 ++ clients/client-ebs/src/endpoints.ts | 7 +- .../client-ebs/src/runtimeConfig.browser.ts | 3 + clients/client-ebs/src/runtimeConfig.ts | 9 +- .../src/EC2InstanceConnectClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-ec2/src/EC2Client.ts | 10 ++ clients/client-ec2/src/endpoints.ts | 7 +- .../client-ec2/src/runtimeConfig.browser.ts | 3 + clients/client-ec2/src/runtimeConfig.ts | 9 +- .../client-ecr-public/src/ECRPUBLICClient.ts | 10 ++ clients/client-ecr-public/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-ecr-public/src/runtimeConfig.ts | 9 +- clients/client-ecr/src/ECRClient.ts | 10 ++ clients/client-ecr/src/endpoints.ts | 7 +- .../client-ecr/src/runtimeConfig.browser.ts | 3 + clients/client-ecr/src/runtimeConfig.ts | 9 +- clients/client-ecs/src/ECSClient.ts | 10 ++ clients/client-ecs/src/endpoints.ts | 7 +- .../client-ecs/src/runtimeConfig.browser.ts | 3 + clients/client-ecs/src/runtimeConfig.ts | 9 +- clients/client-efs/src/EFSClient.ts | 10 ++ clients/client-efs/src/endpoints.ts | 7 +- .../client-efs/src/runtimeConfig.browser.ts | 3 + clients/client-efs/src/runtimeConfig.ts | 9 +- clients/client-eks/src/EKSClient.ts | 10 ++ clients/client-eks/src/endpoints.ts | 7 +- .../client-eks/src/runtimeConfig.browser.ts | 3 + clients/client-eks/src/runtimeConfig.ts | 9 +- .../src/ElasticBeanstalkClient.ts | 10 ++ .../client-elastic-beanstalk/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ElasticInferenceClient.ts | 10 ++ .../client-elastic-inference/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ElasticLoadBalancingV2Client.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ElasticLoadBalancingClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ElasticTranscoderClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ElastiCacheClient.ts | 10 ++ clients/client-elasticache/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-elasticache/src/runtimeConfig.ts | 9 +- .../src/ElasticsearchServiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/EMRContainersClient.ts | 10 ++ .../client-emr-containers/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-emr/src/EMRClient.ts | 10 ++ clients/client-emr/src/endpoints.ts | 7 +- .../client-emr/src/runtimeConfig.browser.ts | 3 + clients/client-emr/src/runtimeConfig.ts | 9 +- .../src/EventBridgeClient.ts | 10 ++ clients/client-eventbridge/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-eventbridge/src/runtimeConfig.ts | 9 +- .../src/FinspaceDataClient.ts | 10 ++ clients/client-finspace-data/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-finspace-data/src/runtimeConfig.ts | 9 +- clients/client-finspace/src/FinspaceClient.ts | 10 ++ clients/client-finspace/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-finspace/src/runtimeConfig.ts | 9 +- clients/client-firehose/src/FirehoseClient.ts | 10 ++ clients/client-firehose/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-firehose/src/runtimeConfig.ts | 9 +- clients/client-fis/src/FisClient.ts | 10 ++ clients/client-fis/src/endpoints.ts | 7 +- .../client-fis/src/runtimeConfig.browser.ts | 3 + clients/client-fis/src/runtimeConfig.ts | 9 +- clients/client-fms/src/FMSClient.ts | 10 ++ clients/client-fms/src/endpoints.ts | 7 +- .../client-fms/src/runtimeConfig.browser.ts | 3 + clients/client-fms/src/runtimeConfig.ts | 9 +- clients/client-forecast/src/ForecastClient.ts | 10 ++ clients/client-forecast/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-forecast/src/runtimeConfig.ts | 9 +- .../src/ForecastqueryClient.ts | 10 ++ clients/client-forecastquery/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-forecastquery/src/runtimeConfig.ts | 9 +- .../src/FraudDetectorClient.ts | 10 ++ clients/client-frauddetector/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-frauddetector/src/runtimeConfig.ts | 9 +- clients/client-fsx/src/FSxClient.ts | 10 ++ clients/client-fsx/src/endpoints.ts | 7 +- .../client-fsx/src/runtimeConfig.browser.ts | 3 + clients/client-fsx/src/runtimeConfig.ts | 9 +- clients/client-gamelift/src/GameLiftClient.ts | 10 ++ clients/client-gamelift/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-gamelift/src/runtimeConfig.ts | 9 +- clients/client-glacier/src/GlacierClient.ts | 10 ++ clients/client-glacier/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-glacier/src/runtimeConfig.ts | 9 +- .../src/GlobalAcceleratorClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-glue/src/GlueClient.ts | 10 ++ clients/client-glue/src/endpoints.ts | 7 +- .../client-glue/src/runtimeConfig.browser.ts | 3 + clients/client-glue/src/runtimeConfig.ts | 9 +- clients/client-grafana/src/GrafanaClient.ts | 10 ++ clients/client-grafana/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-grafana/src/runtimeConfig.ts | 9 +- .../client-greengrass/src/GreengrassClient.ts | 10 ++ clients/client-greengrass/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-greengrass/src/runtimeConfig.ts | 9 +- .../src/GreengrassV2Client.ts | 10 ++ clients/client-greengrassv2/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-greengrassv2/src/runtimeConfig.ts | 9 +- .../src/GroundStationClient.ts | 10 ++ clients/client-groundstation/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-groundstation/src/runtimeConfig.ts | 9 +- .../client-guardduty/src/GuardDutyClient.ts | 10 ++ clients/client-guardduty/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-guardduty/src/runtimeConfig.ts | 9 +- clients/client-health/src/HealthClient.ts | 10 ++ clients/client-health/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-health/src/runtimeConfig.ts | 9 +- .../client-healthlake/src/HealthLakeClient.ts | 10 ++ clients/client-healthlake/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-healthlake/src/runtimeConfig.ts | 9 +- .../client-honeycode/src/HoneycodeClient.ts | 10 ++ clients/client-honeycode/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-honeycode/src/runtimeConfig.ts | 9 +- clients/client-iam/src/IAMClient.ts | 10 ++ clients/client-iam/src/endpoints.ts | 7 +- .../client-iam/src/runtimeConfig.browser.ts | 3 + clients/client-iam/src/runtimeConfig.ts | 9 +- .../src/IdentitystoreClient.ts | 10 ++ clients/client-identitystore/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-identitystore/src/runtimeConfig.ts | 9 +- .../src/ImagebuilderClient.ts | 10 ++ clients/client-imagebuilder/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-imagebuilder/src/runtimeConfig.ts | 9 +- .../client-inspector/src/InspectorClient.ts | 10 ++ clients/client-inspector/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-inspector/src/runtimeConfig.ts | 9 +- .../src/IoT1ClickDevicesServiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/IoT1ClickProjectsClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/IoTDataPlaneClient.ts | 10 ++ .../client-iot-data-plane/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/IoTEventsDataClient.ts | 10 ++ .../client-iot-events-data/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-iot-events/src/IoTEventsClient.ts | 10 ++ clients/client-iot-events/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-iot-events/src/runtimeConfig.ts | 9 +- .../src/IoTJobsDataPlaneClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/IoTWirelessClient.ts | 10 ++ clients/client-iot-wireless/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-iot-wireless/src/runtimeConfig.ts | 9 +- clients/client-iot/src/IoTClient.ts | 10 ++ clients/client-iot/src/endpoints.ts | 7 +- .../client-iot/src/runtimeConfig.browser.ts | 3 + clients/client-iot/src/runtimeConfig.ts | 9 +- .../src/IoTAnalyticsClient.ts | 10 ++ clients/client-iotanalytics/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-iotanalytics/src/runtimeConfig.ts | 9 +- .../src/IotDeviceAdvisorClient.ts | 10 ++ .../client-iotdeviceadvisor/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/IoTFleetHubClient.ts | 10 ++ clients/client-iotfleethub/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-iotfleethub/src/runtimeConfig.ts | 9 +- .../src/IoTSecureTunnelingClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/IoTSiteWiseClient.ts | 10 ++ clients/client-iotsitewise/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-iotsitewise/src/runtimeConfig.ts | 9 +- .../src/IoTThingsGraphClient.ts | 10 ++ .../client-iotthingsgraph/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-ivs/src/IvsClient.ts | 10 ++ clients/client-ivs/src/endpoints.ts | 7 +- .../client-ivs/src/runtimeConfig.browser.ts | 3 + clients/client-ivs/src/runtimeConfig.ts | 9 +- clients/client-kafka/src/KafkaClient.ts | 10 ++ clients/client-kafka/src/endpoints.ts | 7 +- .../client-kafka/src/runtimeConfig.browser.ts | 3 + clients/client-kafka/src/runtimeConfig.ts | 9 +- .../src/KafkaConnectClient.ts | 10 ++ clients/client-kafkaconnect/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-kafkaconnect/src/runtimeConfig.ts | 9 +- clients/client-kendra/src/KendraClient.ts | 10 ++ clients/client-kendra/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-kendra/src/runtimeConfig.ts | 9 +- .../src/KinesisAnalyticsV2Client.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/KinesisAnalyticsClient.ts | 10 ++ .../client-kinesis-analytics/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/KinesisVideoArchivedMediaClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/KinesisVideoMediaClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/KinesisVideoSignalingClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/KinesisVideoClient.ts | 10 ++ clients/client-kinesis-video/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-kinesis-video/src/runtimeConfig.ts | 9 +- clients/client-kinesis/src/KinesisClient.ts | 10 ++ clients/client-kinesis/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-kinesis/src/runtimeConfig.ts | 9 +- clients/client-kms/src/KMSClient.ts | 10 ++ clients/client-kms/src/endpoints.ts | 7 +- .../client-kms/src/runtimeConfig.browser.ts | 3 + clients/client-kms/src/runtimeConfig.ts | 9 +- .../src/LakeFormationClient.ts | 10 ++ clients/client-lakeformation/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-lakeformation/src/runtimeConfig.ts | 9 +- clients/client-lambda/src/LambdaClient.ts | 10 ++ clients/client-lambda/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-lambda/src/runtimeConfig.ts | 9 +- .../src/LexModelBuildingServiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/LexModelsV2Client.ts | 10 ++ clients/client-lex-models-v2/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-lex-models-v2/src/runtimeConfig.ts | 9 +- .../src/LexRuntimeServiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/LexRuntimeV2Client.ts | 10 ++ .../client-lex-runtime-v2/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/LicenseManagerClient.ts | 10 ++ .../client-license-manager/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-lightsail/src/LightsailClient.ts | 10 ++ clients/client-lightsail/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-lightsail/src/runtimeConfig.ts | 9 +- clients/client-location/src/LocationClient.ts | 10 ++ clients/client-location/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-location/src/runtimeConfig.ts | 9 +- .../src/LookoutEquipmentClient.ts | 10 ++ .../client-lookoutequipment/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/LookoutMetricsClient.ts | 10 ++ .../client-lookoutmetrics/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/LookoutVisionClient.ts | 10 ++ clients/client-lookoutvision/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-lookoutvision/src/runtimeConfig.ts | 9 +- .../src/MachineLearningClient.ts | 10 ++ .../client-machine-learning/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-macie/src/MacieClient.ts | 10 ++ clients/client-macie/src/endpoints.ts | 7 +- .../client-macie/src/runtimeConfig.browser.ts | 3 + clients/client-macie/src/runtimeConfig.ts | 9 +- clients/client-macie2/src/Macie2Client.ts | 10 ++ clients/client-macie2/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-macie2/src/runtimeConfig.ts | 9 +- .../src/ManagedBlockchainClient.ts | 10 ++ .../client-managedblockchain/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/MarketplaceCatalogClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/MarketplaceCommerceAnalyticsClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../MarketplaceEntitlementServiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/MarketplaceMeteringClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/MediaConnectClient.ts | 10 ++ clients/client-mediaconnect/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-mediaconnect/src/runtimeConfig.ts | 9 +- .../src/MediaConvertClient.ts | 10 ++ clients/client-mediaconvert/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-mediaconvert/src/runtimeConfig.ts | 9 +- .../client-medialive/src/MediaLiveClient.ts | 10 ++ clients/client-medialive/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-medialive/src/runtimeConfig.ts | 9 +- .../src/MediaPackageVodClient.ts | 10 ++ .../client-mediapackage-vod/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/MediaPackageClient.ts | 10 ++ clients/client-mediapackage/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-mediapackage/src/runtimeConfig.ts | 9 +- .../src/MediaStoreDataClient.ts | 10 ++ .../client-mediastore-data/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-mediastore/src/MediaStoreClient.ts | 10 ++ clients/client-mediastore/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-mediastore/src/runtimeConfig.ts | 9 +- .../src/MediaTailorClient.ts | 10 ++ clients/client-mediatailor/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-mediatailor/src/runtimeConfig.ts | 9 +- clients/client-memorydb/src/MemoryDBClient.ts | 10 ++ clients/client-memorydb/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-memorydb/src/runtimeConfig.ts | 9 +- clients/client-mgn/src/MgnClient.ts | 10 ++ clients/client-mgn/src/endpoints.ts | 7 +- .../client-mgn/src/runtimeConfig.browser.ts | 3 + clients/client-mgn/src/runtimeConfig.ts | 9 +- .../src/MigrationHubClient.ts | 10 ++ clients/client-migration-hub/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-migration-hub/src/runtimeConfig.ts | 9 +- .../src/MigrationHubConfigClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-mobile/src/MobileClient.ts | 10 ++ clients/client-mobile/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-mobile/src/runtimeConfig.ts | 9 +- clients/client-mq/src/MqClient.ts | 10 ++ clients/client-mq/src/endpoints.ts | 7 +- .../client-mq/src/runtimeConfig.browser.ts | 3 + clients/client-mq/src/runtimeConfig.ts | 9 +- clients/client-mturk/src/MTurkClient.ts | 10 ++ clients/client-mturk/src/endpoints.ts | 7 +- .../client-mturk/src/runtimeConfig.browser.ts | 3 + clients/client-mturk/src/runtimeConfig.ts | 9 +- clients/client-mwaa/src/MWAAClient.ts | 10 ++ clients/client-mwaa/src/endpoints.ts | 7 +- .../client-mwaa/src/runtimeConfig.browser.ts | 3 + clients/client-mwaa/src/runtimeConfig.ts | 9 +- clients/client-neptune/src/NeptuneClient.ts | 10 ++ clients/client-neptune/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-neptune/src/runtimeConfig.ts | 9 +- .../src/NetworkFirewallClient.ts | 10 ++ .../client-network-firewall/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/NetworkManagerClient.ts | 10 ++ .../client-networkmanager/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-nimble/src/NimbleClient.ts | 10 ++ clients/client-nimble/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-nimble/src/runtimeConfig.ts | 9 +- .../client-opensearch/src/OpenSearchClient.ts | 10 ++ clients/client-opensearch/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-opensearch/src/runtimeConfig.ts | 9 +- clients/client-opsworks/src/OpsWorksClient.ts | 10 ++ clients/client-opsworks/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-opsworks/src/runtimeConfig.ts | 9 +- .../client-opsworkscm/src/OpsWorksCMClient.ts | 10 ++ clients/client-opsworkscm/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-opsworkscm/src/runtimeConfig.ts | 9 +- .../src/OrganizationsClient.ts | 10 ++ clients/client-organizations/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-organizations/src/runtimeConfig.ts | 9 +- clients/client-outposts/src/OutpostsClient.ts | 10 ++ clients/client-outposts/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-outposts/src/runtimeConfig.ts | 9 +- clients/client-panorama/src/PanoramaClient.ts | 10 ++ clients/client-panorama/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-panorama/src/runtimeConfig.ts | 9 +- .../src/PersonalizeEventsClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/PersonalizeRuntimeClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/PersonalizeClient.ts | 10 ++ clients/client-personalize/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-personalize/src/runtimeConfig.ts | 9 +- clients/client-pi/src/PIClient.ts | 10 ++ clients/client-pi/src/endpoints.ts | 7 +- .../client-pi/src/runtimeConfig.browser.ts | 3 + clients/client-pi/src/runtimeConfig.ts | 9 +- .../src/PinpointEmailClient.ts | 10 ++ .../client-pinpoint-email/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/PinpointSMSVoiceClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-pinpoint/src/PinpointClient.ts | 10 ++ clients/client-pinpoint/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-pinpoint/src/runtimeConfig.ts | 9 +- clients/client-polly/src/PollyClient.ts | 10 ++ clients/client-polly/src/endpoints.ts | 7 +- .../client-polly/src/runtimeConfig.browser.ts | 3 + clients/client-polly/src/runtimeConfig.ts | 9 +- clients/client-pricing/src/PricingClient.ts | 10 ++ clients/client-pricing/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-pricing/src/runtimeConfig.ts | 9 +- clients/client-proton/src/ProtonClient.ts | 10 ++ clients/client-proton/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-proton/src/runtimeConfig.ts | 9 +- .../src/QLDBSessionClient.ts | 10 ++ clients/client-qldb-session/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-qldb-session/src/runtimeConfig.ts | 9 +- clients/client-qldb/src/QLDBClient.ts | 10 ++ clients/client-qldb/src/endpoints.ts | 7 +- .../client-qldb/src/runtimeConfig.browser.ts | 3 + clients/client-qldb/src/runtimeConfig.ts | 9 +- .../client-quicksight/src/QuickSightClient.ts | 10 ++ clients/client-quicksight/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-quicksight/src/runtimeConfig.ts | 9 +- clients/client-ram/src/RAMClient.ts | 10 ++ clients/client-ram/src/endpoints.ts | 7 +- .../client-ram/src/runtimeConfig.browser.ts | 3 + clients/client-ram/src/runtimeConfig.ts | 9 +- clients/client-rds-data/src/RDSDataClient.ts | 10 ++ clients/client-rds-data/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-rds-data/src/runtimeConfig.ts | 9 +- clients/client-rds/src/RDSClient.ts | 10 ++ clients/client-rds/src/endpoints.ts | 7 +- .../client-rds/src/runtimeConfig.browser.ts | 3 + clients/client-rds/src/runtimeConfig.ts | 9 +- .../src/RedshiftDataClient.ts | 10 ++ clients/client-redshift-data/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-redshift-data/src/runtimeConfig.ts | 9 +- clients/client-redshift/src/RedshiftClient.ts | 10 ++ clients/client-redshift/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-redshift/src/runtimeConfig.ts | 9 +- .../src/RekognitionClient.ts | 10 ++ clients/client-rekognition/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-rekognition/src/runtimeConfig.ts | 9 +- .../src/ResourceGroupsTaggingAPIClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ResourceGroupsClient.ts | 10 ++ .../client-resource-groups/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-robomaker/src/RoboMakerClient.ts | 10 ++ clients/client-robomaker/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-robomaker/src/runtimeConfig.ts | 9 +- .../src/Route53DomainsClient.ts | 10 ++ .../client-route-53-domains/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-route-53/src/Route53Client.ts | 10 ++ clients/client-route-53/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-route-53/src/runtimeConfig.ts | 9 +- .../src/Route53RecoveryClusterClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/Route53RecoveryControlConfigClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/Route53RecoveryReadinessClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/Route53ResolverClient.ts | 10 ++ .../client-route53resolver/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-s3-control/src/S3ControlClient.ts | 10 ++ clients/client-s3-control/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-s3-control/src/runtimeConfig.ts | 9 +- clients/client-s3/src/S3Client.ts | 10 ++ clients/client-s3/src/endpoints.ts | 7 +- .../client-s3/src/runtimeConfig.browser.ts | 3 + clients/client-s3/src/runtimeConfig.ts | 9 +- .../client-s3outposts/src/S3OutpostsClient.ts | 10 ++ clients/client-s3outposts/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-s3outposts/src/runtimeConfig.ts | 9 +- .../src/SageMakerA2IRuntimeClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/SagemakerEdgeClient.ts | 10 ++ .../client-sagemaker-edge/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/SageMakerFeatureStoreRuntimeClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/SageMakerRuntimeClient.ts | 10 ++ .../client-sagemaker-runtime/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-sagemaker/src/SageMakerClient.ts | 10 ++ clients/client-sagemaker/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-sagemaker/src/runtimeConfig.ts | 9 +- .../src/SavingsplansClient.ts | 10 ++ clients/client-savingsplans/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-savingsplans/src/runtimeConfig.ts | 9 +- clients/client-schemas/src/SchemasClient.ts | 10 ++ clients/client-schemas/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-schemas/src/runtimeConfig.ts | 9 +- .../src/SecretsManagerClient.ts | 10 ++ .../client-secrets-manager/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/SecurityHubClient.ts | 10 ++ clients/client-securityhub/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-securityhub/src/runtimeConfig.ts | 9 +- .../ServerlessApplicationRepositoryClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ServiceCatalogAppRegistryClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ServiceCatalogClient.ts | 10 ++ .../client-service-catalog/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ServiceQuotasClient.ts | 10 ++ .../client-service-quotas/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/ServiceDiscoveryClient.ts | 10 ++ .../client-servicediscovery/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-ses/src/SESClient.ts | 10 ++ clients/client-ses/src/endpoints.ts | 7 +- .../client-ses/src/runtimeConfig.browser.ts | 3 + clients/client-ses/src/runtimeConfig.ts | 9 +- clients/client-sesv2/src/SESv2Client.ts | 10 ++ clients/client-sesv2/src/endpoints.ts | 7 +- .../client-sesv2/src/runtimeConfig.browser.ts | 3 + clients/client-sesv2/src/runtimeConfig.ts | 9 +- clients/client-sfn/src/SFNClient.ts | 10 ++ clients/client-sfn/src/endpoints.ts | 7 +- .../client-sfn/src/runtimeConfig.browser.ts | 3 + clients/client-sfn/src/runtimeConfig.ts | 9 +- clients/client-shield/src/ShieldClient.ts | 10 ++ clients/client-shield/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-shield/src/runtimeConfig.ts | 9 +- clients/client-signer/src/SignerClient.ts | 10 ++ clients/client-signer/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-signer/src/runtimeConfig.ts | 9 +- clients/client-sms/src/SMSClient.ts | 10 ++ clients/client-sms/src/endpoints.ts | 7 +- .../client-sms/src/runtimeConfig.browser.ts | 3 + clients/client-sms/src/runtimeConfig.ts | 9 +- .../src/SnowDeviceManagementClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-snowball/src/SnowballClient.ts | 10 ++ clients/client-snowball/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-snowball/src/runtimeConfig.ts | 9 +- clients/client-sns/src/SNSClient.ts | 10 ++ clients/client-sns/src/endpoints.ts | 7 +- .../client-sns/src/runtimeConfig.browser.ts | 3 + clients/client-sns/src/runtimeConfig.ts | 9 +- clients/client-sqs/src/SQSClient.ts | 10 ++ clients/client-sqs/src/endpoints.ts | 7 +- .../client-sqs/src/runtimeConfig.browser.ts | 3 + clients/client-sqs/src/runtimeConfig.ts | 9 +- .../src/SSMContactsClient.ts | 10 ++ clients/client-ssm-contacts/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-ssm-contacts/src/runtimeConfig.ts | 9 +- .../src/SSMIncidentsClient.ts | 10 ++ clients/client-ssm-incidents/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-ssm-incidents/src/runtimeConfig.ts | 9 +- clients/client-ssm/src/SSMClient.ts | 10 ++ clients/client-ssm/src/endpoints.ts | 7 +- .../client-ssm/src/runtimeConfig.browser.ts | 3 + clients/client-ssm/src/runtimeConfig.ts | 9 +- .../client-sso-admin/src/SSOAdminClient.ts | 10 ++ clients/client-sso-admin/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-sso-admin/src/runtimeConfig.ts | 9 +- clients/client-sso-oidc/src/SSOOIDCClient.ts | 10 ++ clients/client-sso-oidc/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-sso-oidc/src/runtimeConfig.ts | 9 +- clients/client-sso/src/SSOClient.ts | 10 ++ clients/client-sso/src/endpoints.ts | 7 +- .../client-sso/src/runtimeConfig.browser.ts | 3 + clients/client-sso/src/runtimeConfig.ts | 9 +- .../src/StorageGatewayClient.ts | 10 ++ .../client-storage-gateway/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-sts/src/STSClient.ts | 10 ++ clients/client-sts/src/endpoints.ts | 7 +- .../client-sts/src/runtimeConfig.browser.ts | 3 + clients/client-sts/src/runtimeConfig.ts | 9 +- clients/client-support/src/SupportClient.ts | 10 ++ clients/client-support/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-support/src/runtimeConfig.ts | 9 +- clients/client-swf/src/SWFClient.ts | 10 ++ clients/client-swf/src/endpoints.ts | 7 +- .../client-swf/src/runtimeConfig.browser.ts | 3 + clients/client-swf/src/runtimeConfig.ts | 9 +- .../client-synthetics/src/SyntheticsClient.ts | 10 ++ clients/client-synthetics/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-synthetics/src/runtimeConfig.ts | 9 +- clients/client-textract/src/TextractClient.ts | 10 ++ clients/client-textract/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-textract/src/runtimeConfig.ts | 9 +- .../src/TimestreamQueryClient.ts | 10 ++ .../client-timestream-query/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/TimestreamWriteClient.ts | 10 ++ .../client-timestream-write/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/TranscribeStreamingClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-transcribe/src/TranscribeClient.ts | 10 ++ clients/client-transcribe/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-transcribe/src/runtimeConfig.ts | 9 +- clients/client-transfer/src/TransferClient.ts | 10 ++ clients/client-transfer/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-transfer/src/runtimeConfig.ts | 9 +- .../client-translate/src/TranslateClient.ts | 10 ++ clients/client-translate/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-translate/src/runtimeConfig.ts | 9 +- clients/client-voice-id/src/VoiceIDClient.ts | 10 ++ clients/client-voice-id/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-voice-id/src/runtimeConfig.ts | 9 +- .../src/WAFRegionalClient.ts | 10 ++ clients/client-waf-regional/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-waf-regional/src/runtimeConfig.ts | 9 +- clients/client-waf/src/WAFClient.ts | 10 ++ clients/client-waf/src/endpoints.ts | 7 +- .../client-waf/src/runtimeConfig.browser.ts | 3 + clients/client-waf/src/runtimeConfig.ts | 9 +- clients/client-wafv2/src/WAFV2Client.ts | 10 ++ clients/client-wafv2/src/endpoints.ts | 7 +- .../client-wafv2/src/runtimeConfig.browser.ts | 3 + clients/client-wafv2/src/runtimeConfig.ts | 9 +- .../src/WellArchitectedClient.ts | 10 ++ .../client-wellarchitected/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- clients/client-wisdom/src/WisdomClient.ts | 10 ++ clients/client-wisdom/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-wisdom/src/runtimeConfig.ts | 9 +- clients/client-workdocs/src/WorkDocsClient.ts | 10 ++ clients/client-workdocs/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-workdocs/src/runtimeConfig.ts | 9 +- clients/client-worklink/src/WorkLinkClient.ts | 10 ++ clients/client-worklink/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-worklink/src/runtimeConfig.ts | 9 +- clients/client-workmail/src/WorkMailClient.ts | 10 ++ clients/client-workmail/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + clients/client-workmail/src/runtimeConfig.ts | 9 +- .../src/WorkMailMessageFlowClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../client-workspaces/src/WorkSpacesClient.ts | 10 ++ clients/client-workspaces/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../client-workspaces/src/runtimeConfig.ts | 9 +- clients/client-xray/src/XRayClient.ts | 10 ++ clients/client-xray/src/endpoints.ts | 7 +- .../client-xray/src/runtimeConfig.browser.ts | 3 + clients/client-xray/src/runtimeConfig.ts | 9 +- .../codegen/AddClientRuntimeConfig.java | 46 +++++- .../typescript/codegen/EndpointGenerator.java | 4 +- packages/config-resolver/package.json | 12 +- ...eUseDualstackEndpointConfigOptions.spec.ts | 51 +++++++ .../NodeUseDualstackEndpointConfigOptions.ts | 13 ++ .../NodeUseFipsEndpointConfigOptions.spec.ts | 51 +++++++ .../NodeUseFipsEndpointConfigOptions.ts | 13 ++ .../src/endpointsConfig/index.ts | 2 + .../resolveCustomEndpointsConfig.ts | 3 + .../endpointsConfig/resolveEndpointsConfig.ts | 25 +++- .../utils/normalizeBoolean.spec.ts | 13 ++ .../endpointsConfig/utils/normalizeBoolean.ts | 10 ++ .../src/bucketEndpointMiddleware.spec.ts | 3 +- .../src/bucketEndpointMiddleware.ts | 134 ++++++++++-------- .../src/configurations.ts | 14 +- .../src/configurations.ts | 12 +- .../parse-outpost-arnables.ts | 3 +- .../process-arnables-plugin/plugin.spec.ts | 8 +- packages/types/src/util.ts | 18 ++- .../aws-echo-service/src/EchoServiceClient.ts | 10 ++ .../src/runtimeConfig.browser.ts | 3 + private/aws-echo-service/src/runtimeConfig.ts | 6 + .../src/EC2ProtocolClient.ts | 10 ++ .../aws-protocoltests-ec2/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 6 + .../src/JSONRPC10Client.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 6 + .../src/JsonProtocolClient.ts | 10 ++ .../aws-protocoltests-json/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 9 +- .../src/QueryProtocolClient.ts | 10 ++ .../aws-protocoltests-query/src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 6 + .../src/RestJsonProtocolClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 6 + .../src/RestXmlProtocolClient.ts | 10 ++ .../src/endpoints.ts | 7 +- .../src/runtimeConfig.browser.ts | 3 + .../src/runtimeConfig.ts | 6 + 1182 files changed, 7885 insertions(+), 964 deletions(-) create mode 100644 packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.spec.ts create mode 100644 packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts create mode 100644 packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.spec.ts create mode 100644 packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts create mode 100644 packages/config-resolver/src/endpointsConfig/utils/normalizeBoolean.spec.ts create mode 100644 packages/config-resolver/src/endpointsConfig/utils/normalizeBoolean.ts diff --git a/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts b/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts index 36975bc48f50..79a53161f483 100644 --- a/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts +++ b/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts @@ -245,6 +245,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-accessanalyzer/src/endpoints.ts b/clients/client-accessanalyzer/src/endpoints.ts index 487beabc6c6a..0e6190851fe7 100644 --- a/clients/client-accessanalyzer/src/endpoints.ts +++ b/clients/client-accessanalyzer/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "access-analyzer", diff --git a/clients/client-accessanalyzer/src/runtimeConfig.browser.ts b/clients/client-accessanalyzer/src/runtimeConfig.browser.ts index 520e198ca4ae..d518edbbddff 100644 --- a/clients/client-accessanalyzer/src/runtimeConfig.browser.ts +++ b/clients/client-accessanalyzer/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AccessAnalyzerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-accessanalyzer/src/runtimeConfig.ts b/clients/client-accessanalyzer/src/runtimeConfig.ts index 5bd046aaa70d..b496cb62535c 100644 --- a/clients/client-accessanalyzer/src/runtimeConfig.ts +++ b/clients/client-accessanalyzer/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AccessAnalyzerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-account/src/AccountClient.ts b/clients/client-account/src/AccountClient.ts index 29bb05885049..154baaa2bc42 100644 --- a/clients/client-account/src/AccountClient.ts +++ b/clients/client-account/src/AccountClient.ts @@ -155,6 +155,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-account/src/endpoints.ts b/clients/client-account/src/endpoints.ts index 4b678778fc7b..c93574f9b789 100644 --- a/clients/client-account/src/endpoints.ts +++ b/clients/client-account/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-cn-global": { @@ -63,7 +63,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "account", diff --git a/clients/client-account/src/runtimeConfig.browser.ts b/clients/client-account/src/runtimeConfig.browser.ts index 685ffeb17693..2d0eb68fcd76 100644 --- a/clients/client-account/src/runtimeConfig.browser.ts +++ b/clients/client-account/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AccountClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-account/src/runtimeConfig.ts b/clients/client-account/src/runtimeConfig.ts index 01170102c054..a2e7f54e5573 100644 --- a/clients/client-account/src/runtimeConfig.ts +++ b/clients/client-account/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AccountClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-acm-pca/src/ACMPCAClient.ts b/clients/client-acm-pca/src/ACMPCAClient.ts index 54794828b1e7..0145896bfafa 100644 --- a/clients/client-acm-pca/src/ACMPCAClient.ts +++ b/clients/client-acm-pca/src/ACMPCAClient.ts @@ -245,6 +245,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-acm-pca/src/endpoints.ts b/clients/client-acm-pca/src/endpoints.ts index 81f5c1676c1e..6b8d92b74700 100644 --- a/clients/client-acm-pca/src/endpoints.ts +++ b/clients/client-acm-pca/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "acm-pca", diff --git a/clients/client-acm-pca/src/runtimeConfig.browser.ts b/clients/client-acm-pca/src/runtimeConfig.browser.ts index 9d68d81d1f88..005529787e9b 100644 --- a/clients/client-acm-pca/src/runtimeConfig.browser.ts +++ b/clients/client-acm-pca/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ACMPCAClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-acm-pca/src/runtimeConfig.ts b/clients/client-acm-pca/src/runtimeConfig.ts index 7093e9a7247b..bafa81ccd7bc 100644 --- a/clients/client-acm-pca/src/runtimeConfig.ts +++ b/clients/client-acm-pca/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ACMPCAClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-acm/src/ACMClient.ts b/clients/client-acm/src/ACMClient.ts index 1362e2623734..a3bbead5202c 100644 --- a/clients/client-acm/src/ACMClient.ts +++ b/clients/client-acm/src/ACMClient.ts @@ -206,6 +206,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-acm/src/endpoints.ts b/clients/client-acm/src/endpoints.ts index 81cb8b1f0ec8..db4fdce82be0 100644 --- a/clients/client-acm/src/endpoints.ts +++ b/clients/client-acm/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "ca-central-1-fips": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "acm", diff --git a/clients/client-acm/src/runtimeConfig.browser.ts b/clients/client-acm/src/runtimeConfig.browser.ts index be0ae3672337..2017144d369c 100644 --- a/clients/client-acm/src/runtimeConfig.browser.ts +++ b/clients/client-acm/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ACMClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-acm/src/runtimeConfig.ts b/clients/client-acm/src/runtimeConfig.ts index 56837bccf645..dfadda2039ab 100644 --- a/clients/client-acm/src/runtimeConfig.ts +++ b/clients/client-acm/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ACMClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-alexa-for-business/src/AlexaForBusinessClient.ts b/clients/client-alexa-for-business/src/AlexaForBusinessClient.ts index e3ed3cdd1d1c..f500905d3381 100644 --- a/clients/client-alexa-for-business/src/AlexaForBusinessClient.ts +++ b/clients/client-alexa-for-business/src/AlexaForBusinessClient.ts @@ -533,6 +533,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-alexa-for-business/src/endpoints.ts b/clients/client-alexa-for-business/src/endpoints.ts index dfb03b3501f8..312316dc95e9 100644 --- a/clients/client-alexa-for-business/src/endpoints.ts +++ b/clients/client-alexa-for-business/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "a4b", diff --git a/clients/client-alexa-for-business/src/runtimeConfig.browser.ts b/clients/client-alexa-for-business/src/runtimeConfig.browser.ts index e258fae76aa2..f562d287da5f 100644 --- a/clients/client-alexa-for-business/src/runtimeConfig.browser.ts +++ b/clients/client-alexa-for-business/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AlexaForBusinessClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-alexa-for-business/src/runtimeConfig.ts b/clients/client-alexa-for-business/src/runtimeConfig.ts index e7ecf121b04a..009c9ea7f120 100644 --- a/clients/client-alexa-for-business/src/runtimeConfig.ts +++ b/clients/client-alexa-for-business/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AlexaForBusinessClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-amp/src/AmpClient.ts b/clients/client-amp/src/AmpClient.ts index db7baf48880f..17a980bb64ba 100644 --- a/clients/client-amp/src/AmpClient.ts +++ b/clients/client-amp/src/AmpClient.ts @@ -221,6 +221,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-amp/src/endpoints.ts b/clients/client-amp/src/endpoints.ts index 7a114a225547..bed7fdb85681 100644 --- a/clients/client-amp/src/endpoints.ts +++ b/clients/client-amp/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "aps", diff --git a/clients/client-amp/src/runtimeConfig.browser.ts b/clients/client-amp/src/runtimeConfig.browser.ts index 2a761d1c4b52..ebfb8002051f 100644 --- a/clients/client-amp/src/runtimeConfig.browser.ts +++ b/clients/client-amp/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AmpClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-amp/src/runtimeConfig.ts b/clients/client-amp/src/runtimeConfig.ts index bf81c833c473..f6b42dc75179 100644 --- a/clients/client-amp/src/runtimeConfig.ts +++ b/clients/client-amp/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AmpClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-amplify/src/AmplifyClient.ts b/clients/client-amplify/src/AmplifyClient.ts index d665c679c9ca..29c24e7cc745 100644 --- a/clients/client-amplify/src/AmplifyClient.ts +++ b/clients/client-amplify/src/AmplifyClient.ts @@ -278,6 +278,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-amplify/src/endpoints.ts b/clients/client-amplify/src/endpoints.ts index 5401279d67f4..f79e5caa8ea4 100644 --- a/clients/client-amplify/src/endpoints.ts +++ b/clients/client-amplify/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "amplify", diff --git a/clients/client-amplify/src/runtimeConfig.browser.ts b/clients/client-amplify/src/runtimeConfig.browser.ts index 2233408ae847..838061ce6a42 100644 --- a/clients/client-amplify/src/runtimeConfig.browser.ts +++ b/clients/client-amplify/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AmplifyClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-amplify/src/runtimeConfig.ts b/clients/client-amplify/src/runtimeConfig.ts index fa694b3c4043..789cdbea1558 100644 --- a/clients/client-amplify/src/runtimeConfig.ts +++ b/clients/client-amplify/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AmplifyClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-amplifybackend/src/AmplifyBackendClient.ts b/clients/client-amplifybackend/src/AmplifyBackendClient.ts index b4ef0d0bf603..cbaa54558159 100644 --- a/clients/client-amplifybackend/src/AmplifyBackendClient.ts +++ b/clients/client-amplifybackend/src/AmplifyBackendClient.ts @@ -227,6 +227,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-amplifybackend/src/endpoints.ts b/clients/client-amplifybackend/src/endpoints.ts index 471b1c49372b..5cbe440e1420 100644 --- a/clients/client-amplifybackend/src/endpoints.ts +++ b/clients/client-amplifybackend/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "amplifybackend", diff --git a/clients/client-amplifybackend/src/runtimeConfig.browser.ts b/clients/client-amplifybackend/src/runtimeConfig.browser.ts index 18352498d100..6b41937f1d9a 100644 --- a/clients/client-amplifybackend/src/runtimeConfig.browser.ts +++ b/clients/client-amplifybackend/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AmplifyBackendClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-amplifybackend/src/runtimeConfig.ts b/clients/client-amplifybackend/src/runtimeConfig.ts index a37665e485a0..6c0fdc96782f 100644 --- a/clients/client-amplifybackend/src/runtimeConfig.ts +++ b/clients/client-amplifybackend/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AmplifyBackendClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-api-gateway/src/APIGatewayClient.ts b/clients/client-api-gateway/src/APIGatewayClient.ts index 900c1ec43538..a37cb94f7ca5 100644 --- a/clients/client-api-gateway/src/APIGatewayClient.ts +++ b/clients/client-api-gateway/src/APIGatewayClient.ts @@ -606,6 +606,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-api-gateway/src/endpoints.ts b/clients/client-api-gateway/src/endpoints.ts index 82c8d93f071d..d3b2a173eb4a 100644 --- a/clients/client-api-gateway/src/endpoints.ts +++ b/clients/client-api-gateway/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "apigateway", diff --git a/clients/client-api-gateway/src/runtimeConfig.browser.ts b/clients/client-api-gateway/src/runtimeConfig.browser.ts index 488660b38f84..a6a3f0630e5a 100644 --- a/clients/client-api-gateway/src/runtimeConfig.browser.ts +++ b/clients/client-api-gateway/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: APIGatewayClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-api-gateway/src/runtimeConfig.ts b/clients/client-api-gateway/src/runtimeConfig.ts index 53a03a6f552b..5177a0449c57 100644 --- a/clients/client-api-gateway/src/runtimeConfig.ts +++ b/clients/client-api-gateway/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: APIGatewayClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApiClient.ts b/clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApiClient.ts index 3bbdbf2803ef..48b7a286a872 100644 --- a/clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApiClient.ts +++ b/clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApiClient.ts @@ -143,6 +143,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-apigatewaymanagementapi/src/endpoints.ts b/clients/client-apigatewaymanagementapi/src/endpoints.ts index 5ce5cb67cf34..2a1bee1c6fa6 100644 --- a/clients/client-apigatewaymanagementapi/src/endpoints.ts +++ b/clients/client-apigatewaymanagementapi/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "execute-api", diff --git a/clients/client-apigatewaymanagementapi/src/runtimeConfig.browser.ts b/clients/client-apigatewaymanagementapi/src/runtimeConfig.browser.ts index 4d8f7920a802..6dc6fa5a8b70 100644 --- a/clients/client-apigatewaymanagementapi/src/runtimeConfig.browser.ts +++ b/clients/client-apigatewaymanagementapi/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ApiGatewayManagementApiClientConfig) => retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-apigatewaymanagementapi/src/runtimeConfig.ts b/clients/client-apigatewaymanagementapi/src/runtimeConfig.ts index 67a6cd62799a..ec30596c6086 100644 --- a/clients/client-apigatewaymanagementapi/src/runtimeConfig.ts +++ b/clients/client-apigatewaymanagementapi/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ApiGatewayManagementApiClientConfig) => retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-apigatewayv2/src/ApiGatewayV2Client.ts b/clients/client-apigatewayv2/src/ApiGatewayV2Client.ts index 4a30b82c2f41..3c9f448368c9 100644 --- a/clients/client-apigatewayv2/src/ApiGatewayV2Client.ts +++ b/clients/client-apigatewayv2/src/ApiGatewayV2Client.ts @@ -392,6 +392,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-apigatewayv2/src/endpoints.ts b/clients/client-apigatewayv2/src/endpoints.ts index 82c8d93f071d..d3b2a173eb4a 100644 --- a/clients/client-apigatewayv2/src/endpoints.ts +++ b/clients/client-apigatewayv2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "apigateway", diff --git a/clients/client-apigatewayv2/src/runtimeConfig.browser.ts b/clients/client-apigatewayv2/src/runtimeConfig.browser.ts index 1685be6afcf9..a67e55c95a19 100644 --- a/clients/client-apigatewayv2/src/runtimeConfig.browser.ts +++ b/clients/client-apigatewayv2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ApiGatewayV2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-apigatewayv2/src/runtimeConfig.ts b/clients/client-apigatewayv2/src/runtimeConfig.ts index 11b4c0826856..04e60e51428b 100644 --- a/clients/client-apigatewayv2/src/runtimeConfig.ts +++ b/clients/client-apigatewayv2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ApiGatewayV2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-app-mesh/src/AppMeshClient.ts b/clients/client-app-mesh/src/AppMeshClient.ts index e4453fbfaf8c..0e7e85484746 100644 --- a/clients/client-app-mesh/src/AppMeshClient.ts +++ b/clients/client-app-mesh/src/AppMeshClient.ts @@ -302,6 +302,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-app-mesh/src/endpoints.ts b/clients/client-app-mesh/src/endpoints.ts index e224066247b5..db0abc8e8352 100644 --- a/clients/client-app-mesh/src/endpoints.ts +++ b/clients/client-app-mesh/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "appmesh", diff --git a/clients/client-app-mesh/src/runtimeConfig.browser.ts b/clients/client-app-mesh/src/runtimeConfig.browser.ts index 4bdff5208dd9..903fceccb3a8 100644 --- a/clients/client-app-mesh/src/runtimeConfig.browser.ts +++ b/clients/client-app-mesh/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AppMeshClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-app-mesh/src/runtimeConfig.ts b/clients/client-app-mesh/src/runtimeConfig.ts index a94f077ba0e5..dfd0428b892e 100644 --- a/clients/client-app-mesh/src/runtimeConfig.ts +++ b/clients/client-app-mesh/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AppMeshClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appconfig/src/AppConfigClient.ts b/clients/client-appconfig/src/AppConfigClient.ts index d811b3dd7cd1..2e5adb51fd3f 100644 --- a/clients/client-appconfig/src/AppConfigClient.ts +++ b/clients/client-appconfig/src/AppConfigClient.ts @@ -284,6 +284,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-appconfig/src/endpoints.ts b/clients/client-appconfig/src/endpoints.ts index 88c9e789a61c..6826ebf5d1d5 100644 --- a/clients/client-appconfig/src/endpoints.ts +++ b/clients/client-appconfig/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "appconfig", diff --git a/clients/client-appconfig/src/runtimeConfig.browser.ts b/clients/client-appconfig/src/runtimeConfig.browser.ts index d4f3d29adf9a..f7f4c7c84304 100644 --- a/clients/client-appconfig/src/runtimeConfig.browser.ts +++ b/clients/client-appconfig/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AppConfigClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appconfig/src/runtimeConfig.ts b/clients/client-appconfig/src/runtimeConfig.ts index 4acca9ccf541..c8d69aee6e79 100644 --- a/clients/client-appconfig/src/runtimeConfig.ts +++ b/clients/client-appconfig/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AppConfigClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appflow/src/AppflowClient.ts b/clients/client-appflow/src/AppflowClient.ts index 6cc053f2fdf7..c6657fa6154f 100644 --- a/clients/client-appflow/src/AppflowClient.ts +++ b/clients/client-appflow/src/AppflowClient.ts @@ -215,6 +215,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-appflow/src/endpoints.ts b/clients/client-appflow/src/endpoints.ts index 1e67a005ae12..c683cd88bb8d 100644 --- a/clients/client-appflow/src/endpoints.ts +++ b/clients/client-appflow/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "appflow", diff --git a/clients/client-appflow/src/runtimeConfig.browser.ts b/clients/client-appflow/src/runtimeConfig.browser.ts index 80fc2e4d5a64..03419574e44b 100644 --- a/clients/client-appflow/src/runtimeConfig.browser.ts +++ b/clients/client-appflow/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AppflowClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appflow/src/runtimeConfig.ts b/clients/client-appflow/src/runtimeConfig.ts index 2f8980c7346d..0119239b562a 100644 --- a/clients/client-appflow/src/runtimeConfig.ts +++ b/clients/client-appflow/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AppflowClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appintegrations/src/AppIntegrationsClient.ts b/clients/client-appintegrations/src/AppIntegrationsClient.ts index 3944f078c269..813d737ccc4e 100644 --- a/clients/client-appintegrations/src/AppIntegrationsClient.ts +++ b/clients/client-appintegrations/src/AppIntegrationsClient.ts @@ -218,6 +218,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-appintegrations/src/endpoints.ts b/clients/client-appintegrations/src/endpoints.ts index 011537b5e949..8f6276261695 100644 --- a/clients/client-appintegrations/src/endpoints.ts +++ b/clients/client-appintegrations/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "app-integrations", diff --git a/clients/client-appintegrations/src/runtimeConfig.browser.ts b/clients/client-appintegrations/src/runtimeConfig.browser.ts index d96cbe313a16..63a3536037d3 100644 --- a/clients/client-appintegrations/src/runtimeConfig.browser.ts +++ b/clients/client-appintegrations/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AppIntegrationsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appintegrations/src/runtimeConfig.ts b/clients/client-appintegrations/src/runtimeConfig.ts index cd217b493ed4..ddbae2dde210 100644 --- a/clients/client-appintegrations/src/runtimeConfig.ts +++ b/clients/client-appintegrations/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AppIntegrationsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts b/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts index 3dbc921238a1..13c698aeb0ab 100644 --- a/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts +++ b/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts @@ -191,6 +191,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-application-auto-scaling/src/endpoints.ts b/clients/client-application-auto-scaling/src/endpoints.ts index 63dbcaeceb55..48f574d26417 100644 --- a/clients/client-application-auto-scaling/src/endpoints.ts +++ b/clients/client-application-auto-scaling/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "application-autoscaling", diff --git a/clients/client-application-auto-scaling/src/runtimeConfig.browser.ts b/clients/client-application-auto-scaling/src/runtimeConfig.browser.ts index ea4698566ae1..46608db240f4 100644 --- a/clients/client-application-auto-scaling/src/runtimeConfig.browser.ts +++ b/clients/client-application-auto-scaling/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ApplicationAutoScalingClientConfig) => retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-application-auto-scaling/src/runtimeConfig.ts b/clients/client-application-auto-scaling/src/runtimeConfig.ts index fe1feb4ccb2b..2296900e8d5a 100644 --- a/clients/client-application-auto-scaling/src/runtimeConfig.ts +++ b/clients/client-application-auto-scaling/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ApplicationAutoScalingClientConfig) => retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-application-discovery-service/src/ApplicationDiscoveryServiceClient.ts b/clients/client-application-discovery-service/src/ApplicationDiscoveryServiceClient.ts index 23a60bf9bd54..98afd44a04df 100644 --- a/clients/client-application-discovery-service/src/ApplicationDiscoveryServiceClient.ts +++ b/clients/client-application-discovery-service/src/ApplicationDiscoveryServiceClient.ts @@ -257,6 +257,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-application-discovery-service/src/endpoints.ts b/clients/client-application-discovery-service/src/endpoints.ts index dc271502929e..25377a553723 100644 --- a/clients/client-application-discovery-service/src/endpoints.ts +++ b/clients/client-application-discovery-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "discovery", diff --git a/clients/client-application-discovery-service/src/runtimeConfig.browser.ts b/clients/client-application-discovery-service/src/runtimeConfig.browser.ts index 06313d5b8a41..23c31806a969 100644 --- a/clients/client-application-discovery-service/src/runtimeConfig.browser.ts +++ b/clients/client-application-discovery-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ApplicationDiscoveryServiceClientConfig retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-application-discovery-service/src/runtimeConfig.ts b/clients/client-application-discovery-service/src/runtimeConfig.ts index a57d0c7aaccc..5f1229c3ed5e 100644 --- a/clients/client-application-discovery-service/src/runtimeConfig.ts +++ b/clients/client-application-discovery-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ApplicationDiscoveryServiceClientConfig retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-application-insights/src/ApplicationInsightsClient.ts b/clients/client-application-insights/src/ApplicationInsightsClient.ts index bb1b47826758..52c9115e1348 100644 --- a/clients/client-application-insights/src/ApplicationInsightsClient.ts +++ b/clients/client-application-insights/src/ApplicationInsightsClient.ts @@ -242,6 +242,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-application-insights/src/endpoints.ts b/clients/client-application-insights/src/endpoints.ts index dae12612bd6e..172b4909ce42 100644 --- a/clients/client-application-insights/src/endpoints.ts +++ b/clients/client-application-insights/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-gov-east-1": { @@ -62,7 +62,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "applicationinsights", diff --git a/clients/client-application-insights/src/runtimeConfig.browser.ts b/clients/client-application-insights/src/runtimeConfig.browser.ts index a4fde9a9f6d8..80de27da567e 100644 --- a/clients/client-application-insights/src/runtimeConfig.browser.ts +++ b/clients/client-application-insights/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ApplicationInsightsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-application-insights/src/runtimeConfig.ts b/clients/client-application-insights/src/runtimeConfig.ts index bc57db443b5f..3b0086f0496d 100644 --- a/clients/client-application-insights/src/runtimeConfig.ts +++ b/clients/client-application-insights/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ApplicationInsightsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-applicationcostprofiler/src/ApplicationCostProfilerClient.ts b/clients/client-applicationcostprofiler/src/ApplicationCostProfilerClient.ts index 21c6e47308ce..889c5d5ebd3e 100644 --- a/clients/client-applicationcostprofiler/src/ApplicationCostProfilerClient.ts +++ b/clients/client-applicationcostprofiler/src/ApplicationCostProfilerClient.ts @@ -173,6 +173,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-applicationcostprofiler/src/endpoints.ts b/clients/client-applicationcostprofiler/src/endpoints.ts index 3f05a7f56078..e6d1f1d99102 100644 --- a/clients/client-applicationcostprofiler/src/endpoints.ts +++ b/clients/client-applicationcostprofiler/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "application-cost-profiler", diff --git a/clients/client-applicationcostprofiler/src/runtimeConfig.browser.ts b/clients/client-applicationcostprofiler/src/runtimeConfig.browser.ts index 2d944fa7c10c..be36fe3dea20 100644 --- a/clients/client-applicationcostprofiler/src/runtimeConfig.browser.ts +++ b/clients/client-applicationcostprofiler/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ApplicationCostProfilerClientConfig) => retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-applicationcostprofiler/src/runtimeConfig.ts b/clients/client-applicationcostprofiler/src/runtimeConfig.ts index ff55b1691b64..2c46404768e9 100644 --- a/clients/client-applicationcostprofiler/src/runtimeConfig.ts +++ b/clients/client-applicationcostprofiler/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ApplicationCostProfilerClientConfig) => retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-apprunner/src/AppRunnerClient.ts b/clients/client-apprunner/src/AppRunnerClient.ts index 6705387f001e..4bb0e9ca9312 100644 --- a/clients/client-apprunner/src/AppRunnerClient.ts +++ b/clients/client-apprunner/src/AppRunnerClient.ts @@ -227,6 +227,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-apprunner/src/endpoints.ts b/clients/client-apprunner/src/endpoints.ts index ced654b65aa6..ad80ac1888b7 100644 --- a/clients/client-apprunner/src/endpoints.ts +++ b/clients/client-apprunner/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "apprunner", diff --git a/clients/client-apprunner/src/runtimeConfig.browser.ts b/clients/client-apprunner/src/runtimeConfig.browser.ts index c7081a75b62a..7753a45fdbb1 100644 --- a/clients/client-apprunner/src/runtimeConfig.browser.ts +++ b/clients/client-apprunner/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AppRunnerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-apprunner/src/runtimeConfig.ts b/clients/client-apprunner/src/runtimeConfig.ts index 799061f35b5f..4ef35ffcce90 100644 --- a/clients/client-apprunner/src/runtimeConfig.ts +++ b/clients/client-apprunner/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AppRunnerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appstream/src/AppStreamClient.ts b/clients/client-appstream/src/AppStreamClient.ts index 7ae6fc9b71ec..92de685b61e2 100644 --- a/clients/client-appstream/src/AppStreamClient.ts +++ b/clients/client-appstream/src/AppStreamClient.ts @@ -335,6 +335,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-appstream/src/endpoints.ts b/clients/client-appstream/src/endpoints.ts index a007ac13ad8f..c715246df1a3 100644 --- a/clients/client-appstream/src/endpoints.ts +++ b/clients/client-appstream/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { fips: { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "appstream", diff --git a/clients/client-appstream/src/runtimeConfig.browser.ts b/clients/client-appstream/src/runtimeConfig.browser.ts index 4de2215fcb86..804d679a70a1 100644 --- a/clients/client-appstream/src/runtimeConfig.browser.ts +++ b/clients/client-appstream/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AppStreamClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appstream/src/runtimeConfig.ts b/clients/client-appstream/src/runtimeConfig.ts index c625d3ee4c56..f28be44af1df 100644 --- a/clients/client-appstream/src/runtimeConfig.ts +++ b/clients/client-appstream/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AppStreamClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appsync/src/AppSyncClient.ts b/clients/client-appsync/src/AppSyncClient.ts index 8fe2f56c066a..bc5824483eec 100644 --- a/clients/client-appsync/src/AppSyncClient.ts +++ b/clients/client-appsync/src/AppSyncClient.ts @@ -275,6 +275,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-appsync/src/endpoints.ts b/clients/client-appsync/src/endpoints.ts index dbf7426ab32b..71fec4dc1b5d 100644 --- a/clients/client-appsync/src/endpoints.ts +++ b/clients/client-appsync/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "appsync", diff --git a/clients/client-appsync/src/runtimeConfig.browser.ts b/clients/client-appsync/src/runtimeConfig.browser.ts index a139236711d9..3aa1ada180a7 100644 --- a/clients/client-appsync/src/runtimeConfig.browser.ts +++ b/clients/client-appsync/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AppSyncClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-appsync/src/runtimeConfig.ts b/clients/client-appsync/src/runtimeConfig.ts index ad56c0fd4644..08369d237890 100644 --- a/clients/client-appsync/src/runtimeConfig.ts +++ b/clients/client-appsync/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AppSyncClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-athena/src/AthenaClient.ts b/clients/client-athena/src/AthenaClient.ts index 80ab8118e580..2004f96c3ffd 100644 --- a/clients/client-athena/src/AthenaClient.ts +++ b/clients/client-athena/src/AthenaClient.ts @@ -266,6 +266,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-athena/src/endpoints.ts b/clients/client-athena/src/endpoints.ts index ba6c118a6f84..c05f4dfe1a71 100644 --- a/clients/client-athena/src/endpoints.ts +++ b/clients/client-athena/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "athena", diff --git a/clients/client-athena/src/runtimeConfig.browser.ts b/clients/client-athena/src/runtimeConfig.browser.ts index f9b8fdfbfcc9..ca3e794dac97 100644 --- a/clients/client-athena/src/runtimeConfig.browser.ts +++ b/clients/client-athena/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AthenaClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-athena/src/runtimeConfig.ts b/clients/client-athena/src/runtimeConfig.ts index e02cbb03aa53..3b82b1d815d8 100644 --- a/clients/client-athena/src/runtimeConfig.ts +++ b/clients/client-athena/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AthenaClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-auditmanager/src/AuditManagerClient.ts b/clients/client-auditmanager/src/AuditManagerClient.ts index 4042010d5f24..1cd8f39b3064 100644 --- a/clients/client-auditmanager/src/AuditManagerClient.ts +++ b/clients/client-auditmanager/src/AuditManagerClient.ts @@ -398,6 +398,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-auditmanager/src/endpoints.ts b/clients/client-auditmanager/src/endpoints.ts index 1b4719e37930..7eb0ff43eb40 100644 --- a/clients/client-auditmanager/src/endpoints.ts +++ b/clients/client-auditmanager/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "auditmanager", diff --git a/clients/client-auditmanager/src/runtimeConfig.browser.ts b/clients/client-auditmanager/src/runtimeConfig.browser.ts index a4aab5f72006..93fdbe5cdd93 100644 --- a/clients/client-auditmanager/src/runtimeConfig.browser.ts +++ b/clients/client-auditmanager/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AuditManagerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-auditmanager/src/runtimeConfig.ts b/clients/client-auditmanager/src/runtimeConfig.ts index fe190504d28a..7a5e7c56b18a 100644 --- a/clients/client-auditmanager/src/runtimeConfig.ts +++ b/clients/client-auditmanager/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AuditManagerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-auto-scaling-plans/src/AutoScalingPlansClient.ts b/clients/client-auto-scaling-plans/src/AutoScalingPlansClient.ts index d8a66cb3c29f..61ecab8d8bc0 100644 --- a/clients/client-auto-scaling-plans/src/AutoScalingPlansClient.ts +++ b/clients/client-auto-scaling-plans/src/AutoScalingPlansClient.ts @@ -164,6 +164,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-auto-scaling-plans/src/endpoints.ts b/clients/client-auto-scaling-plans/src/endpoints.ts index 1b5d623df7d4..212e18b7035b 100644 --- a/clients/client-auto-scaling-plans/src/endpoints.ts +++ b/clients/client-auto-scaling-plans/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "autoscaling-plans", diff --git a/clients/client-auto-scaling-plans/src/runtimeConfig.browser.ts b/clients/client-auto-scaling-plans/src/runtimeConfig.browser.ts index 2f9208e5ba78..008130669352 100644 --- a/clients/client-auto-scaling-plans/src/runtimeConfig.browser.ts +++ b/clients/client-auto-scaling-plans/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AutoScalingPlansClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-auto-scaling-plans/src/runtimeConfig.ts b/clients/client-auto-scaling-plans/src/runtimeConfig.ts index 32c57c69e5cd..00232380bba9 100644 --- a/clients/client-auto-scaling-plans/src/runtimeConfig.ts +++ b/clients/client-auto-scaling-plans/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AutoScalingPlansClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-auto-scaling/src/AutoScalingClient.ts b/clients/client-auto-scaling/src/AutoScalingClient.ts index b8fadfda239e..1261b684af72 100644 --- a/clients/client-auto-scaling/src/AutoScalingClient.ts +++ b/clients/client-auto-scaling/src/AutoScalingClient.ts @@ -446,6 +446,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-auto-scaling/src/endpoints.ts b/clients/client-auto-scaling/src/endpoints.ts index 8e9e423caa4d..a504848103d2 100644 --- a/clients/client-auto-scaling/src/endpoints.ts +++ b/clients/client-auto-scaling/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "autoscaling", diff --git a/clients/client-auto-scaling/src/runtimeConfig.browser.ts b/clients/client-auto-scaling/src/runtimeConfig.browser.ts index 5afe377243ae..850a4c0f9ea1 100644 --- a/clients/client-auto-scaling/src/runtimeConfig.browser.ts +++ b/clients/client-auto-scaling/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: AutoScalingClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-auto-scaling/src/runtimeConfig.ts b/clients/client-auto-scaling/src/runtimeConfig.ts index 16d604877c4f..700d0e5b4ee7 100644 --- a/clients/client-auto-scaling/src/runtimeConfig.ts +++ b/clients/client-auto-scaling/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: AutoScalingClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-backup/src/BackupClient.ts b/clients/client-backup/src/BackupClient.ts index 245728db3f36..743f65cffbdf 100644 --- a/clients/client-backup/src/BackupClient.ts +++ b/clients/client-backup/src/BackupClient.ts @@ -428,6 +428,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-backup/src/endpoints.ts b/clients/client-backup/src/endpoints.ts index 8ecf3d5c948f..4d8b1dd11c16 100644 --- a/clients/client-backup/src/endpoints.ts +++ b/clients/client-backup/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "backup", diff --git a/clients/client-backup/src/runtimeConfig.browser.ts b/clients/client-backup/src/runtimeConfig.browser.ts index 214e372c9e86..461a751acf40 100644 --- a/clients/client-backup/src/runtimeConfig.browser.ts +++ b/clients/client-backup/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: BackupClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-backup/src/runtimeConfig.ts b/clients/client-backup/src/runtimeConfig.ts index a70402002246..445a9e11b0ec 100644 --- a/clients/client-backup/src/runtimeConfig.ts +++ b/clients/client-backup/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: BackupClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-batch/src/BatchClient.ts b/clients/client-batch/src/BatchClient.ts index 2e1e0fab7901..840600681ba9 100644 --- a/clients/client-batch/src/BatchClient.ts +++ b/clients/client-batch/src/BatchClient.ts @@ -218,6 +218,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-batch/src/endpoints.ts b/clients/client-batch/src/endpoints.ts index df4fe3075392..3f3811b624c7 100644 --- a/clients/client-batch/src/endpoints.ts +++ b/clients/client-batch/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "batch", diff --git a/clients/client-batch/src/runtimeConfig.browser.ts b/clients/client-batch/src/runtimeConfig.browser.ts index 5aeb30dfe87e..ebab4971f910 100644 --- a/clients/client-batch/src/runtimeConfig.browser.ts +++ b/clients/client-batch/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: BatchClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-batch/src/runtimeConfig.ts b/clients/client-batch/src/runtimeConfig.ts index a9af405d49ba..d52879264ea2 100644 --- a/clients/client-batch/src/runtimeConfig.ts +++ b/clients/client-batch/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: BatchClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-braket/src/BraketClient.ts b/clients/client-braket/src/BraketClient.ts index c8f975b8cded..a8548cd0ad8f 100644 --- a/clients/client-braket/src/BraketClient.ts +++ b/clients/client-braket/src/BraketClient.ts @@ -167,6 +167,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-braket/src/endpoints.ts b/clients/client-braket/src/endpoints.ts index fd20212cb8ba..bae22003b956 100644 --- a/clients/client-braket/src/endpoints.ts +++ b/clients/client-braket/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "braket", diff --git a/clients/client-braket/src/runtimeConfig.browser.ts b/clients/client-braket/src/runtimeConfig.browser.ts index b9792bc59b45..9876a0103f7c 100644 --- a/clients/client-braket/src/runtimeConfig.browser.ts +++ b/clients/client-braket/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: BraketClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-braket/src/runtimeConfig.ts b/clients/client-braket/src/runtimeConfig.ts index ffd6d1d48a25..10944080781c 100644 --- a/clients/client-braket/src/runtimeConfig.ts +++ b/clients/client-braket/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: BraketClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-budgets/src/BudgetsClient.ts b/clients/client-budgets/src/BudgetsClient.ts index 8756ba1dcac6..19bb0db8ea33 100644 --- a/clients/client-budgets/src/BudgetsClient.ts +++ b/clients/client-budgets/src/BudgetsClient.ts @@ -227,6 +227,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-budgets/src/endpoints.ts b/clients/client-budgets/src/endpoints.ts index f748d847f413..610ad8cd3fc6 100644 --- a/clients/client-budgets/src/endpoints.ts +++ b/clients/client-budgets/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-cn-global": { @@ -63,7 +63,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "budgets", diff --git a/clients/client-budgets/src/runtimeConfig.browser.ts b/clients/client-budgets/src/runtimeConfig.browser.ts index bda1cb317ca9..ea4b33095a5f 100644 --- a/clients/client-budgets/src/runtimeConfig.browser.ts +++ b/clients/client-budgets/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: BudgetsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-budgets/src/runtimeConfig.ts b/clients/client-budgets/src/runtimeConfig.ts index d80ef86244d6..23cc9dab2659 100644 --- a/clients/client-budgets/src/runtimeConfig.ts +++ b/clients/client-budgets/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: BudgetsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-chime-sdk-identity/src/ChimeSDKIdentityClient.ts b/clients/client-chime-sdk-identity/src/ChimeSDKIdentityClient.ts index 1c365f4864e4..786d2d1d25ad 100644 --- a/clients/client-chime-sdk-identity/src/ChimeSDKIdentityClient.ts +++ b/clients/client-chime-sdk-identity/src/ChimeSDKIdentityClient.ts @@ -263,6 +263,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-chime-sdk-identity/src/endpoints.ts b/clients/client-chime-sdk-identity/src/endpoints.ts index b1c573a0c81a..b988a789d669 100644 --- a/clients/client-chime-sdk-identity/src/endpoints.ts +++ b/clients/client-chime-sdk-identity/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "chime", diff --git a/clients/client-chime-sdk-identity/src/runtimeConfig.browser.ts b/clients/client-chime-sdk-identity/src/runtimeConfig.browser.ts index 936a97ac954a..7c1e130d2670 100644 --- a/clients/client-chime-sdk-identity/src/runtimeConfig.browser.ts +++ b/clients/client-chime-sdk-identity/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ChimeSDKIdentityClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-chime-sdk-identity/src/runtimeConfig.ts b/clients/client-chime-sdk-identity/src/runtimeConfig.ts index e5ece91f8e10..c28c4cda331b 100644 --- a/clients/client-chime-sdk-identity/src/runtimeConfig.ts +++ b/clients/client-chime-sdk-identity/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ChimeSDKIdentityClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts b/clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts index 545cd4195210..4825eefb9290 100644 --- a/clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts +++ b/clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts @@ -356,6 +356,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-chime-sdk-messaging/src/endpoints.ts b/clients/client-chime-sdk-messaging/src/endpoints.ts index 3839d57fc9a5..09fbedb60168 100644 --- a/clients/client-chime-sdk-messaging/src/endpoints.ts +++ b/clients/client-chime-sdk-messaging/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "chime", diff --git a/clients/client-chime-sdk-messaging/src/runtimeConfig.browser.ts b/clients/client-chime-sdk-messaging/src/runtimeConfig.browser.ts index 83af90270291..50b1bcce5eef 100644 --- a/clients/client-chime-sdk-messaging/src/runtimeConfig.browser.ts +++ b/clients/client-chime-sdk-messaging/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ChimeSDKMessagingClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-chime-sdk-messaging/src/runtimeConfig.ts b/clients/client-chime-sdk-messaging/src/runtimeConfig.ts index b1c229b38c72..61f4895f014b 100644 --- a/clients/client-chime-sdk-messaging/src/runtimeConfig.ts +++ b/clients/client-chime-sdk-messaging/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ChimeSDKMessagingClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-chime/src/ChimeClient.ts b/clients/client-chime/src/ChimeClient.ts index d62c6a709d71..3693bb7efaf2 100644 --- a/clients/client-chime/src/ChimeClient.ts +++ b/clients/client-chime/src/ChimeClient.ts @@ -1049,6 +1049,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-chime/src/endpoints.ts b/clients/client-chime/src/endpoints.ts index 45f3323d7486..fe61b8b138fc 100644 --- a/clients/client-chime/src/endpoints.ts +++ b/clients/client-chime/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-global": { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "chime", diff --git a/clients/client-chime/src/runtimeConfig.browser.ts b/clients/client-chime/src/runtimeConfig.browser.ts index a3cab2e39cd0..32e1a367f4ae 100644 --- a/clients/client-chime/src/runtimeConfig.browser.ts +++ b/clients/client-chime/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ChimeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-chime/src/runtimeConfig.ts b/clients/client-chime/src/runtimeConfig.ts index d0449c0e0244..a26361732edc 100644 --- a/clients/client-chime/src/runtimeConfig.ts +++ b/clients/client-chime/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ChimeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloud9/src/Cloud9Client.ts b/clients/client-cloud9/src/Cloud9Client.ts index b948e988c9a5..1a212cb6087f 100644 --- a/clients/client-cloud9/src/Cloud9Client.ts +++ b/clients/client-cloud9/src/Cloud9Client.ts @@ -200,6 +200,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloud9/src/endpoints.ts b/clients/client-cloud9/src/endpoints.ts index 51b4e581ebdd..d7be70294796 100644 --- a/clients/client-cloud9/src/endpoints.ts +++ b/clients/client-cloud9/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloud9", diff --git a/clients/client-cloud9/src/runtimeConfig.browser.ts b/clients/client-cloud9/src/runtimeConfig.browser.ts index 8753f98b4259..7fdb5da0bbcf 100644 --- a/clients/client-cloud9/src/runtimeConfig.browser.ts +++ b/clients/client-cloud9/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: Cloud9ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloud9/src/runtimeConfig.ts b/clients/client-cloud9/src/runtimeConfig.ts index 993f196e24d0..ca539a2c3397 100644 --- a/clients/client-cloud9/src/runtimeConfig.ts +++ b/clients/client-cloud9/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: Cloud9ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudcontrol/src/CloudControlClient.ts b/clients/client-cloudcontrol/src/CloudControlClient.ts index 9d5be36d13bd..8b0949af1584 100644 --- a/clients/client-cloudcontrol/src/CloudControlClient.ts +++ b/clients/client-cloudcontrol/src/CloudControlClient.ts @@ -170,6 +170,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudcontrol/src/endpoints.ts b/clients/client-cloudcontrol/src/endpoints.ts index bae4496c14a3..cd2b61b42c12 100644 --- a/clients/client-cloudcontrol/src/endpoints.ts +++ b/clients/client-cloudcontrol/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloudcontrolapi", diff --git a/clients/client-cloudcontrol/src/runtimeConfig.browser.ts b/clients/client-cloudcontrol/src/runtimeConfig.browser.ts index 1dc7d8af21fc..f5a5b81c8690 100644 --- a/clients/client-cloudcontrol/src/runtimeConfig.browser.ts +++ b/clients/client-cloudcontrol/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudControlClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudcontrol/src/runtimeConfig.ts b/clients/client-cloudcontrol/src/runtimeConfig.ts index 78fcc2b2c04a..604d74991033 100644 --- a/clients/client-cloudcontrol/src/runtimeConfig.ts +++ b/clients/client-cloudcontrol/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudControlClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-clouddirectory/src/CloudDirectoryClient.ts b/clients/client-clouddirectory/src/CloudDirectoryClient.ts index ce39d5dc65cd..4fd8bf928bcb 100644 --- a/clients/client-clouddirectory/src/CloudDirectoryClient.ts +++ b/clients/client-clouddirectory/src/CloudDirectoryClient.ts @@ -413,6 +413,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-clouddirectory/src/endpoints.ts b/clients/client-clouddirectory/src/endpoints.ts index 5a264c1c593a..b2c14497a010 100644 --- a/clients/client-clouddirectory/src/endpoints.ts +++ b/clients/client-clouddirectory/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "clouddirectory", diff --git a/clients/client-clouddirectory/src/runtimeConfig.browser.ts b/clients/client-clouddirectory/src/runtimeConfig.browser.ts index c60a0de81f81..233b98a1d345 100644 --- a/clients/client-clouddirectory/src/runtimeConfig.browser.ts +++ b/clients/client-clouddirectory/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudDirectoryClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-clouddirectory/src/runtimeConfig.ts b/clients/client-clouddirectory/src/runtimeConfig.ts index dcf92d33ba6b..3bfc2a75c712 100644 --- a/clients/client-clouddirectory/src/runtimeConfig.ts +++ b/clients/client-clouddirectory/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudDirectoryClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudformation/src/CloudFormationClient.ts b/clients/client-cloudformation/src/CloudFormationClient.ts index 2b2f38920169..3b2d7af4c5d3 100644 --- a/clients/client-cloudformation/src/CloudFormationClient.ts +++ b/clients/client-cloudformation/src/CloudFormationClient.ts @@ -410,6 +410,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudformation/src/endpoints.ts b/clients/client-cloudformation/src/endpoints.ts index 385fcde6c721..8c4235eb4357 100644 --- a/clients/client-cloudformation/src/endpoints.ts +++ b/clients/client-cloudformation/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloudformation", diff --git a/clients/client-cloudformation/src/runtimeConfig.browser.ts b/clients/client-cloudformation/src/runtimeConfig.browser.ts index 64ba0bf5a86d..14214e88ec9f 100644 --- a/clients/client-cloudformation/src/runtimeConfig.browser.ts +++ b/clients/client-cloudformation/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudFormationClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudformation/src/runtimeConfig.ts b/clients/client-cloudformation/src/runtimeConfig.ts index 8810c6dcf099..cfb8936f014a 100644 --- a/clients/client-cloudformation/src/runtimeConfig.ts +++ b/clients/client-cloudformation/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudFormationClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudfront/src/CloudFrontClient.ts b/clients/client-cloudfront/src/CloudFrontClient.ts index 401d79b62050..10e4cb9ceb9a 100644 --- a/clients/client-cloudfront/src/CloudFrontClient.ts +++ b/clients/client-cloudfront/src/CloudFrontClient.ts @@ -539,6 +539,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudfront/src/endpoints.ts b/clients/client-cloudfront/src/endpoints.ts index fd46a6a36272..3e80d1c41462 100644 --- a/clients/client-cloudfront/src/endpoints.ts +++ b/clients/client-cloudfront/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-cn-global": { @@ -63,7 +63,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloudfront", diff --git a/clients/client-cloudfront/src/runtimeConfig.browser.ts b/clients/client-cloudfront/src/runtimeConfig.browser.ts index 3e5ccc8c9f2f..bf6380db8aec 100644 --- a/clients/client-cloudfront/src/runtimeConfig.browser.ts +++ b/clients/client-cloudfront/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudFrontClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudfront/src/runtimeConfig.ts b/clients/client-cloudfront/src/runtimeConfig.ts index 41cb7b85b056..772d23e3b4bd 100644 --- a/clients/client-cloudfront/src/runtimeConfig.ts +++ b/clients/client-cloudfront/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudFrontClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudhsm-v2/src/CloudHSMV2Client.ts b/clients/client-cloudhsm-v2/src/CloudHSMV2Client.ts index 169c5dca6e73..55f22a939954 100644 --- a/clients/client-cloudhsm-v2/src/CloudHSMV2Client.ts +++ b/clients/client-cloudhsm-v2/src/CloudHSMV2Client.ts @@ -185,6 +185,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudhsm-v2/src/endpoints.ts b/clients/client-cloudhsm-v2/src/endpoints.ts index a1488a16a2b3..2aa5db953e78 100644 --- a/clients/client-cloudhsm-v2/src/endpoints.ts +++ b/clients/client-cloudhsm-v2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloudhsm", diff --git a/clients/client-cloudhsm-v2/src/runtimeConfig.browser.ts b/clients/client-cloudhsm-v2/src/runtimeConfig.browser.ts index 948393312acb..d5fd63954d9a 100644 --- a/clients/client-cloudhsm-v2/src/runtimeConfig.browser.ts +++ b/clients/client-cloudhsm-v2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudHSMV2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudhsm-v2/src/runtimeConfig.ts b/clients/client-cloudhsm-v2/src/runtimeConfig.ts index c087265f0d7f..fd000a329e4e 100644 --- a/clients/client-cloudhsm-v2/src/runtimeConfig.ts +++ b/clients/client-cloudhsm-v2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudHSMV2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudhsm/src/CloudHSMClient.ts b/clients/client-cloudhsm/src/CloudHSMClient.ts index 67ce0dae615c..0a12406c9ff2 100644 --- a/clients/client-cloudhsm/src/CloudHSMClient.ts +++ b/clients/client-cloudhsm/src/CloudHSMClient.ts @@ -203,6 +203,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudhsm/src/endpoints.ts b/clients/client-cloudhsm/src/endpoints.ts index 7214a86d32a1..baf20b34f919 100644 --- a/clients/client-cloudhsm/src/endpoints.ts +++ b/clients/client-cloudhsm/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloudhsm", diff --git a/clients/client-cloudhsm/src/runtimeConfig.browser.ts b/clients/client-cloudhsm/src/runtimeConfig.browser.ts index 8fbdab0270a5..b327be74bf9b 100644 --- a/clients/client-cloudhsm/src/runtimeConfig.browser.ts +++ b/clients/client-cloudhsm/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudHSMClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudhsm/src/runtimeConfig.ts b/clients/client-cloudhsm/src/runtimeConfig.ts index da5e0a6e5ab4..e555fc1c330c 100644 --- a/clients/client-cloudhsm/src/runtimeConfig.ts +++ b/clients/client-cloudhsm/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudHSMClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudsearch-domain/src/CloudSearchDomainClient.ts b/clients/client-cloudsearch-domain/src/CloudSearchDomainClient.ts index 5d679db6b78b..5b422a26c1f9 100644 --- a/clients/client-cloudsearch-domain/src/CloudSearchDomainClient.ts +++ b/clients/client-cloudsearch-domain/src/CloudSearchDomainClient.ts @@ -140,6 +140,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudsearch-domain/src/endpoints.ts b/clients/client-cloudsearch-domain/src/endpoints.ts index 73751fa1f8c8..a5fafa221b2f 100644 --- a/clients/client-cloudsearch-domain/src/endpoints.ts +++ b/clients/client-cloudsearch-domain/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloudsearch", diff --git a/clients/client-cloudsearch-domain/src/runtimeConfig.browser.ts b/clients/client-cloudsearch-domain/src/runtimeConfig.browser.ts index 3e3ff501919a..4a52d4754928 100644 --- a/clients/client-cloudsearch-domain/src/runtimeConfig.browser.ts +++ b/clients/client-cloudsearch-domain/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudSearchDomainClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudsearch-domain/src/runtimeConfig.ts b/clients/client-cloudsearch-domain/src/runtimeConfig.ts index 121396931990..9b29ee3be6e3 100644 --- a/clients/client-cloudsearch-domain/src/runtimeConfig.ts +++ b/clients/client-cloudsearch-domain/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudSearchDomainClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudsearch/src/CloudSearchClient.ts b/clients/client-cloudsearch/src/CloudSearchClient.ts index fe0c5451a044..38ad819a27d7 100644 --- a/clients/client-cloudsearch/src/CloudSearchClient.ts +++ b/clients/client-cloudsearch/src/CloudSearchClient.ts @@ -254,6 +254,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudsearch/src/endpoints.ts b/clients/client-cloudsearch/src/endpoints.ts index a1fa705303d7..0334106b9e81 100644 --- a/clients/client-cloudsearch/src/endpoints.ts +++ b/clients/client-cloudsearch/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloudsearch", diff --git a/clients/client-cloudsearch/src/runtimeConfig.browser.ts b/clients/client-cloudsearch/src/runtimeConfig.browser.ts index 24aeeff76a7d..16f586ca74b6 100644 --- a/clients/client-cloudsearch/src/runtimeConfig.browser.ts +++ b/clients/client-cloudsearch/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudSearchClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudsearch/src/runtimeConfig.ts b/clients/client-cloudsearch/src/runtimeConfig.ts index 28ef1dd25489..1bc2ce986112 100644 --- a/clients/client-cloudsearch/src/runtimeConfig.ts +++ b/clients/client-cloudsearch/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudSearchClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudtrail/src/CloudTrailClient.ts b/clients/client-cloudtrail/src/CloudTrailClient.ts index a254fc618f66..b6aeadcddebc 100644 --- a/clients/client-cloudtrail/src/CloudTrailClient.ts +++ b/clients/client-cloudtrail/src/CloudTrailClient.ts @@ -197,6 +197,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudtrail/src/endpoints.ts b/clients/client-cloudtrail/src/endpoints.ts index f964f1ecccc4..89e8bc2c7454 100644 --- a/clients/client-cloudtrail/src/endpoints.ts +++ b/clients/client-cloudtrail/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cloudtrail", diff --git a/clients/client-cloudtrail/src/runtimeConfig.browser.ts b/clients/client-cloudtrail/src/runtimeConfig.browser.ts index 526b3c536947..4c027f21c555 100644 --- a/clients/client-cloudtrail/src/runtimeConfig.browser.ts +++ b/clients/client-cloudtrail/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudTrailClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudtrail/src/runtimeConfig.ts b/clients/client-cloudtrail/src/runtimeConfig.ts index 9b389126658e..4ecfda14ec8e 100644 --- a/clients/client-cloudtrail/src/runtimeConfig.ts +++ b/clients/client-cloudtrail/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudTrailClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudwatch-events/src/CloudWatchEventsClient.ts b/clients/client-cloudwatch-events/src/CloudWatchEventsClient.ts index 2cc8560bea4e..022a031c3317 100644 --- a/clients/client-cloudwatch-events/src/CloudWatchEventsClient.ts +++ b/clients/client-cloudwatch-events/src/CloudWatchEventsClient.ts @@ -338,6 +338,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudwatch-events/src/endpoints.ts b/clients/client-cloudwatch-events/src/endpoints.ts index 65fcfebb54ac..29477f977b97 100644 --- a/clients/client-cloudwatch-events/src/endpoints.ts +++ b/clients/client-cloudwatch-events/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "events", diff --git a/clients/client-cloudwatch-events/src/runtimeConfig.browser.ts b/clients/client-cloudwatch-events/src/runtimeConfig.browser.ts index aefcf0af8eb9..1b9ee6b9af68 100644 --- a/clients/client-cloudwatch-events/src/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch-events/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudWatchEventsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudwatch-events/src/runtimeConfig.ts b/clients/client-cloudwatch-events/src/runtimeConfig.ts index 57901de85bb9..306ef0f93907 100644 --- a/clients/client-cloudwatch-events/src/runtimeConfig.ts +++ b/clients/client-cloudwatch-events/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudWatchEventsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts b/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts index e90b371e94c2..0427357e8e92 100644 --- a/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts +++ b/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts @@ -299,6 +299,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudwatch-logs/src/endpoints.ts b/clients/client-cloudwatch-logs/src/endpoints.ts index 653d5653ff00..2d69eae2ba21 100644 --- a/clients/client-cloudwatch-logs/src/endpoints.ts +++ b/clients/client-cloudwatch-logs/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "logs", diff --git a/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts b/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts index 5eeb07fd37a3..c6efb3fc4696 100644 --- a/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudWatchLogsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudwatch-logs/src/runtimeConfig.ts b/clients/client-cloudwatch-logs/src/runtimeConfig.ts index b69cfa244af6..e74384d8ac8e 100644 --- a/clients/client-cloudwatch-logs/src/runtimeConfig.ts +++ b/clients/client-cloudwatch-logs/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudWatchLogsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudwatch/src/CloudWatchClient.ts b/clients/client-cloudwatch/src/CloudWatchClient.ts index 77f96e111a8f..8c308635328a 100644 --- a/clients/client-cloudwatch/src/CloudWatchClient.ts +++ b/clients/client-cloudwatch/src/CloudWatchClient.ts @@ -278,6 +278,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cloudwatch/src/endpoints.ts b/clients/client-cloudwatch/src/endpoints.ts index e307896369c0..c5fff4e12972 100644 --- a/clients/client-cloudwatch/src/endpoints.ts +++ b/clients/client-cloudwatch/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "monitoring", diff --git a/clients/client-cloudwatch/src/runtimeConfig.browser.ts b/clients/client-cloudwatch/src/runtimeConfig.browser.ts index 2c7c02e5b357..4edae20aa411 100644 --- a/clients/client-cloudwatch/src/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CloudWatchClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cloudwatch/src/runtimeConfig.ts b/clients/client-cloudwatch/src/runtimeConfig.ts index 0679078674bf..223f46e59db8 100644 --- a/clients/client-cloudwatch/src/runtimeConfig.ts +++ b/clients/client-cloudwatch/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CloudWatchClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codeartifact/src/CodeartifactClient.ts b/clients/client-codeartifact/src/CodeartifactClient.ts index 64d2481da5ec..7148ae53967d 100644 --- a/clients/client-codeartifact/src/CodeartifactClient.ts +++ b/clients/client-codeartifact/src/CodeartifactClient.ts @@ -305,6 +305,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codeartifact/src/endpoints.ts b/clients/client-codeartifact/src/endpoints.ts index 8c318047d02c..24f6fc4d7490 100644 --- a/clients/client-codeartifact/src/endpoints.ts +++ b/clients/client-codeartifact/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codeartifact", diff --git a/clients/client-codeartifact/src/runtimeConfig.browser.ts b/clients/client-codeartifact/src/runtimeConfig.browser.ts index fc524a4569a6..c87df4b2e597 100644 --- a/clients/client-codeartifact/src/runtimeConfig.browser.ts +++ b/clients/client-codeartifact/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodeartifactClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codeartifact/src/runtimeConfig.ts b/clients/client-codeartifact/src/runtimeConfig.ts index 65ee96e2fa70..25eea7cd07ae 100644 --- a/clients/client-codeartifact/src/runtimeConfig.ts +++ b/clients/client-codeartifact/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodeartifactClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codebuild/src/CodeBuildClient.ts b/clients/client-codebuild/src/CodeBuildClient.ts index 2f86846f1db3..9af24f09c17a 100644 --- a/clients/client-codebuild/src/CodeBuildClient.ts +++ b/clients/client-codebuild/src/CodeBuildClient.ts @@ -317,6 +317,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codebuild/src/endpoints.ts b/clients/client-codebuild/src/endpoints.ts index d51bfdb8368a..9f6ce950bc55 100644 --- a/clients/client-codebuild/src/endpoints.ts +++ b/clients/client-codebuild/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codebuild", diff --git a/clients/client-codebuild/src/runtimeConfig.browser.ts b/clients/client-codebuild/src/runtimeConfig.browser.ts index 9f35e13e1341..83d9b0a62f73 100644 --- a/clients/client-codebuild/src/runtimeConfig.browser.ts +++ b/clients/client-codebuild/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodeBuildClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codebuild/src/runtimeConfig.ts b/clients/client-codebuild/src/runtimeConfig.ts index f4c6597b6b86..91291b7602a5 100644 --- a/clients/client-codebuild/src/runtimeConfig.ts +++ b/clients/client-codebuild/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodeBuildClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codecommit/src/CodeCommitClient.ts b/clients/client-codecommit/src/CodeCommitClient.ts index e29639596cf3..9fdd69b68fba 100644 --- a/clients/client-codecommit/src/CodeCommitClient.ts +++ b/clients/client-codecommit/src/CodeCommitClient.ts @@ -512,6 +512,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codecommit/src/endpoints.ts b/clients/client-codecommit/src/endpoints.ts index 1e5555c568d8..512a1173e42b 100644 --- a/clients/client-codecommit/src/endpoints.ts +++ b/clients/client-codecommit/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { fips: { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codecommit", diff --git a/clients/client-codecommit/src/runtimeConfig.browser.ts b/clients/client-codecommit/src/runtimeConfig.browser.ts index 20707df48856..aabd7d859f63 100644 --- a/clients/client-codecommit/src/runtimeConfig.browser.ts +++ b/clients/client-codecommit/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodeCommitClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codecommit/src/runtimeConfig.ts b/clients/client-codecommit/src/runtimeConfig.ts index 1386ebe1a339..1da7d7e247ad 100644 --- a/clients/client-codecommit/src/runtimeConfig.ts +++ b/clients/client-codecommit/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodeCommitClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codedeploy/src/CodeDeployClient.ts b/clients/client-codedeploy/src/CodeDeployClient.ts index 48b64f211244..ebe465cdd06f 100644 --- a/clients/client-codedeploy/src/CodeDeployClient.ts +++ b/clients/client-codedeploy/src/CodeDeployClient.ts @@ -380,6 +380,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codedeploy/src/endpoints.ts b/clients/client-codedeploy/src/endpoints.ts index 698cb082ffa4..0a8606aad6a5 100644 --- a/clients/client-codedeploy/src/endpoints.ts +++ b/clients/client-codedeploy/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codedeploy", diff --git a/clients/client-codedeploy/src/runtimeConfig.browser.ts b/clients/client-codedeploy/src/runtimeConfig.browser.ts index 90e8bf92b7b2..3c237d4fa7b1 100644 --- a/clients/client-codedeploy/src/runtimeConfig.browser.ts +++ b/clients/client-codedeploy/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodeDeployClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codedeploy/src/runtimeConfig.ts b/clients/client-codedeploy/src/runtimeConfig.ts index 3b2ab1e9c8ac..aa8c74f9d90d 100644 --- a/clients/client-codedeploy/src/runtimeConfig.ts +++ b/clients/client-codedeploy/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodeDeployClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codeguru-reviewer/src/CodeGuruReviewerClient.ts b/clients/client-codeguru-reviewer/src/CodeGuruReviewerClient.ts index 50ee480e5b26..5fad0b57cf04 100644 --- a/clients/client-codeguru-reviewer/src/CodeGuruReviewerClient.ts +++ b/clients/client-codeguru-reviewer/src/CodeGuruReviewerClient.ts @@ -206,6 +206,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codeguru-reviewer/src/endpoints.ts b/clients/client-codeguru-reviewer/src/endpoints.ts index e15c0206b753..c0f6b3feb5cd 100644 --- a/clients/client-codeguru-reviewer/src/endpoints.ts +++ b/clients/client-codeguru-reviewer/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codeguru-reviewer", diff --git a/clients/client-codeguru-reviewer/src/runtimeConfig.browser.ts b/clients/client-codeguru-reviewer/src/runtimeConfig.browser.ts index c1174a06a8cf..18cb737a0628 100644 --- a/clients/client-codeguru-reviewer/src/runtimeConfig.browser.ts +++ b/clients/client-codeguru-reviewer/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodeGuruReviewerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codeguru-reviewer/src/runtimeConfig.ts b/clients/client-codeguru-reviewer/src/runtimeConfig.ts index 02d547fd8c7f..c1bc216b9860 100644 --- a/clients/client-codeguru-reviewer/src/runtimeConfig.ts +++ b/clients/client-codeguru-reviewer/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodeGuruReviewerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codeguruprofiler/src/CodeGuruProfilerClient.ts b/clients/client-codeguruprofiler/src/CodeGuruProfilerClient.ts index 7166b8c8953e..48390f0960a6 100644 --- a/clients/client-codeguruprofiler/src/CodeGuruProfilerClient.ts +++ b/clients/client-codeguruprofiler/src/CodeGuruProfilerClient.ts @@ -242,6 +242,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codeguruprofiler/src/endpoints.ts b/clients/client-codeguruprofiler/src/endpoints.ts index cbb92922fac4..55a48f772249 100644 --- a/clients/client-codeguruprofiler/src/endpoints.ts +++ b/clients/client-codeguruprofiler/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codeguru-profiler", diff --git a/clients/client-codeguruprofiler/src/runtimeConfig.browser.ts b/clients/client-codeguruprofiler/src/runtimeConfig.browser.ts index 75ce0d221693..4d0f04e48e95 100644 --- a/clients/client-codeguruprofiler/src/runtimeConfig.browser.ts +++ b/clients/client-codeguruprofiler/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodeGuruProfilerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codeguruprofiler/src/runtimeConfig.ts b/clients/client-codeguruprofiler/src/runtimeConfig.ts index a4bb96b4adc5..505a2bf915b3 100644 --- a/clients/client-codeguruprofiler/src/runtimeConfig.ts +++ b/clients/client-codeguruprofiler/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodeGuruProfilerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codepipeline/src/CodePipelineClient.ts b/clients/client-codepipeline/src/CodePipelineClient.ts index d3284f428df6..e2f8604d76ad 100644 --- a/clients/client-codepipeline/src/CodePipelineClient.ts +++ b/clients/client-codepipeline/src/CodePipelineClient.ts @@ -314,6 +314,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codepipeline/src/endpoints.ts b/clients/client-codepipeline/src/endpoints.ts index 22d6329761bc..a7d3f5b62e13 100644 --- a/clients/client-codepipeline/src/endpoints.ts +++ b/clients/client-codepipeline/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -83,7 +83,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codepipeline", diff --git a/clients/client-codepipeline/src/runtimeConfig.browser.ts b/clients/client-codepipeline/src/runtimeConfig.browser.ts index 09c9020a863f..98133e0e6f75 100644 --- a/clients/client-codepipeline/src/runtimeConfig.browser.ts +++ b/clients/client-codepipeline/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodePipelineClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codepipeline/src/runtimeConfig.ts b/clients/client-codepipeline/src/runtimeConfig.ts index 66749737f728..6a2acaf5e5d9 100644 --- a/clients/client-codepipeline/src/runtimeConfig.ts +++ b/clients/client-codepipeline/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodePipelineClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codestar-connections/src/CodeStarConnectionsClient.ts b/clients/client-codestar-connections/src/CodeStarConnectionsClient.ts index 8d65b59f1370..c65f549ed220 100644 --- a/clients/client-codestar-connections/src/CodeStarConnectionsClient.ts +++ b/clients/client-codestar-connections/src/CodeStarConnectionsClient.ts @@ -176,6 +176,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codestar-connections/src/endpoints.ts b/clients/client-codestar-connections/src/endpoints.ts index bae97a6db70d..83e5333c7c5a 100644 --- a/clients/client-codestar-connections/src/endpoints.ts +++ b/clients/client-codestar-connections/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codestar-connections", diff --git a/clients/client-codestar-connections/src/runtimeConfig.browser.ts b/clients/client-codestar-connections/src/runtimeConfig.browser.ts index 5e7a14ec501e..72d4085ac685 100644 --- a/clients/client-codestar-connections/src/runtimeConfig.browser.ts +++ b/clients/client-codestar-connections/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodeStarConnectionsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codestar-connections/src/runtimeConfig.ts b/clients/client-codestar-connections/src/runtimeConfig.ts index 518d09b93ea9..c63e86263152 100644 --- a/clients/client-codestar-connections/src/runtimeConfig.ts +++ b/clients/client-codestar-connections/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodeStarConnectionsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codestar-notifications/src/CodestarNotificationsClient.ts b/clients/client-codestar-notifications/src/CodestarNotificationsClient.ts index 65a5ea13b522..93ffa684dfb6 100644 --- a/clients/client-codestar-notifications/src/CodestarNotificationsClient.ts +++ b/clients/client-codestar-notifications/src/CodestarNotificationsClient.ts @@ -194,6 +194,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codestar-notifications/src/endpoints.ts b/clients/client-codestar-notifications/src/endpoints.ts index ed39cdb4b8d3..5a8db830c7a8 100644 --- a/clients/client-codestar-notifications/src/endpoints.ts +++ b/clients/client-codestar-notifications/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codestar-notifications", diff --git a/clients/client-codestar-notifications/src/runtimeConfig.browser.ts b/clients/client-codestar-notifications/src/runtimeConfig.browser.ts index f4f8f69098d8..553a616d83fb 100644 --- a/clients/client-codestar-notifications/src/runtimeConfig.browser.ts +++ b/clients/client-codestar-notifications/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodestarNotificationsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codestar-notifications/src/runtimeConfig.ts b/clients/client-codestar-notifications/src/runtimeConfig.ts index 5ef151429fe8..2f6dfeb798be 100644 --- a/clients/client-codestar-notifications/src/runtimeConfig.ts +++ b/clients/client-codestar-notifications/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodestarNotificationsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codestar/src/CodeStarClient.ts b/clients/client-codestar/src/CodeStarClient.ts index e76a792e8c99..7aa2abb0f5b9 100644 --- a/clients/client-codestar/src/CodeStarClient.ts +++ b/clients/client-codestar/src/CodeStarClient.ts @@ -200,6 +200,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-codestar/src/endpoints.ts b/clients/client-codestar/src/endpoints.ts index 36be2dc425fc..6d9ad7812336 100644 --- a/clients/client-codestar/src/endpoints.ts +++ b/clients/client-codestar/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "codestar", diff --git a/clients/client-codestar/src/runtimeConfig.browser.ts b/clients/client-codestar/src/runtimeConfig.browser.ts index 68dea38b957b..7d609e03eaff 100644 --- a/clients/client-codestar/src/runtimeConfig.browser.ts +++ b/clients/client-codestar/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CodeStarClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-codestar/src/runtimeConfig.ts b/clients/client-codestar/src/runtimeConfig.ts index 518796eb2d87..b33c6533c8fb 100644 --- a/clients/client-codestar/src/runtimeConfig.ts +++ b/clients/client-codestar/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CodeStarClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts b/clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts index b86b8438be30..ae6bb347e53f 100644 --- a/clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts +++ b/clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts @@ -603,6 +603,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cognito-identity-provider/src/endpoints.ts b/clients/client-cognito-identity-provider/src/endpoints.ts index 88b9db2f029d..79d1f845f86b 100644 --- a/clients/client-cognito-identity-provider/src/endpoints.ts +++ b/clients/client-cognito-identity-provider/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -78,7 +78,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cognito-idp", diff --git a/clients/client-cognito-identity-provider/src/runtimeConfig.browser.ts b/clients/client-cognito-identity-provider/src/runtimeConfig.browser.ts index 13e7335c560b..5e8d090b786d 100644 --- a/clients/client-cognito-identity-provider/src/runtimeConfig.browser.ts +++ b/clients/client-cognito-identity-provider/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CognitoIdentityProviderClientConfig) => retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cognito-identity-provider/src/runtimeConfig.ts b/clients/client-cognito-identity-provider/src/runtimeConfig.ts index 1a500cbbf8e5..bc6bc96201a9 100644 --- a/clients/client-cognito-identity-provider/src/runtimeConfig.ts +++ b/clients/client-cognito-identity-provider/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CognitoIdentityProviderClientConfig) => retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cognito-identity/src/CognitoIdentityClient.ts b/clients/client-cognito-identity/src/CognitoIdentityClient.ts index cf4baa721e42..4412d52679ff 100644 --- a/clients/client-cognito-identity/src/CognitoIdentityClient.ts +++ b/clients/client-cognito-identity/src/CognitoIdentityClient.ts @@ -234,6 +234,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cognito-identity/src/endpoints.ts b/clients/client-cognito-identity/src/endpoints.ts index bd08234ecf8a..24851318d907 100644 --- a/clients/client-cognito-identity/src/endpoints.ts +++ b/clients/client-cognito-identity/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -73,7 +73,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cognito-identity", diff --git a/clients/client-cognito-identity/src/runtimeConfig.browser.ts b/clients/client-cognito-identity/src/runtimeConfig.browser.ts index 3d7de245f44e..b736b9ffb28a 100644 --- a/clients/client-cognito-identity/src/runtimeConfig.browser.ts +++ b/clients/client-cognito-identity/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CognitoIdentityClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cognito-identity/src/runtimeConfig.ts b/clients/client-cognito-identity/src/runtimeConfig.ts index b8cbbf460409..c04aeda3a08d 100644 --- a/clients/client-cognito-identity/src/runtimeConfig.ts +++ b/clients/client-cognito-identity/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CognitoIdentityClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cognito-sync/src/CognitoSyncClient.ts b/clients/client-cognito-sync/src/CognitoSyncClient.ts index 49b6db125b9d..57127b80dc8e 100644 --- a/clients/client-cognito-sync/src/CognitoSyncClient.ts +++ b/clients/client-cognito-sync/src/CognitoSyncClient.ts @@ -209,6 +209,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cognito-sync/src/endpoints.ts b/clients/client-cognito-sync/src/endpoints.ts index 492913e2481b..cd6143f65d5b 100644 --- a/clients/client-cognito-sync/src/endpoints.ts +++ b/clients/client-cognito-sync/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cognito-sync", diff --git a/clients/client-cognito-sync/src/runtimeConfig.browser.ts b/clients/client-cognito-sync/src/runtimeConfig.browser.ts index 8595c5569fba..6e562c1cc8c0 100644 --- a/clients/client-cognito-sync/src/runtimeConfig.browser.ts +++ b/clients/client-cognito-sync/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CognitoSyncClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cognito-sync/src/runtimeConfig.ts b/clients/client-cognito-sync/src/runtimeConfig.ts index 06ec666d6135..ca607758512a 100644 --- a/clients/client-cognito-sync/src/runtimeConfig.ts +++ b/clients/client-cognito-sync/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CognitoSyncClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-comprehend/src/ComprehendClient.ts b/clients/client-comprehend/src/ComprehendClient.ts index ec900cfa7086..a3b3461b5870 100644 --- a/clients/client-comprehend/src/ComprehendClient.ts +++ b/clients/client-comprehend/src/ComprehendClient.ts @@ -473,6 +473,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-comprehend/src/endpoints.ts b/clients/client-comprehend/src/endpoints.ts index 03dd7006a7ac..c5f2783e6244 100644 --- a/clients/client-comprehend/src/endpoints.ts +++ b/clients/client-comprehend/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -73,7 +73,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "comprehend", diff --git a/clients/client-comprehend/src/runtimeConfig.browser.ts b/clients/client-comprehend/src/runtimeConfig.browser.ts index f0f5fb872052..14054ed298f4 100644 --- a/clients/client-comprehend/src/runtimeConfig.browser.ts +++ b/clients/client-comprehend/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ComprehendClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-comprehend/src/runtimeConfig.ts b/clients/client-comprehend/src/runtimeConfig.ts index 7d822e7c412f..5a800f27da54 100644 --- a/clients/client-comprehend/src/runtimeConfig.ts +++ b/clients/client-comprehend/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ComprehendClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-comprehendmedical/src/ComprehendMedicalClient.ts b/clients/client-comprehendmedical/src/ComprehendMedicalClient.ts index 469a4b31bccc..8b87e96ea614 100644 --- a/clients/client-comprehendmedical/src/ComprehendMedicalClient.ts +++ b/clients/client-comprehendmedical/src/ComprehendMedicalClient.ts @@ -248,6 +248,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-comprehendmedical/src/endpoints.ts b/clients/client-comprehendmedical/src/endpoints.ts index 9b25d15a6983..42f77c1e30d0 100644 --- a/clients/client-comprehendmedical/src/endpoints.ts +++ b/clients/client-comprehendmedical/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -73,7 +73,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "comprehendmedical", diff --git a/clients/client-comprehendmedical/src/runtimeConfig.browser.ts b/clients/client-comprehendmedical/src/runtimeConfig.browser.ts index eb7744556a22..935e2005ea40 100644 --- a/clients/client-comprehendmedical/src/runtimeConfig.browser.ts +++ b/clients/client-comprehendmedical/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ComprehendMedicalClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-comprehendmedical/src/runtimeConfig.ts b/clients/client-comprehendmedical/src/runtimeConfig.ts index 309f7795911a..3a02b2349e0b 100644 --- a/clients/client-comprehendmedical/src/runtimeConfig.ts +++ b/clients/client-comprehendmedical/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ComprehendMedicalClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts b/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts index 4df616ada4ac..ec7e99f2fd86 100644 --- a/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts +++ b/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts @@ -221,6 +221,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-compute-optimizer/src/endpoints.ts b/clients/client-compute-optimizer/src/endpoints.ts index 0cc403c1ef0a..4b9ecadfe581 100644 --- a/clients/client-compute-optimizer/src/endpoints.ts +++ b/clients/client-compute-optimizer/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "compute-optimizer", diff --git a/clients/client-compute-optimizer/src/runtimeConfig.browser.ts b/clients/client-compute-optimizer/src/runtimeConfig.browser.ts index 6d87dcc953a5..e40d2850e9dd 100644 --- a/clients/client-compute-optimizer/src/runtimeConfig.browser.ts +++ b/clients/client-compute-optimizer/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ComputeOptimizerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-compute-optimizer/src/runtimeConfig.ts b/clients/client-compute-optimizer/src/runtimeConfig.ts index 13269e3fed52..f9a40eab3540 100644 --- a/clients/client-compute-optimizer/src/runtimeConfig.ts +++ b/clients/client-compute-optimizer/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ComputeOptimizerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-config-service/src/ConfigServiceClient.ts b/clients/client-config-service/src/ConfigServiceClient.ts index 3ed566a9f739..e9390a65dee6 100644 --- a/clients/client-config-service/src/ConfigServiceClient.ts +++ b/clients/client-config-service/src/ConfigServiceClient.ts @@ -617,6 +617,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-config-service/src/endpoints.ts b/clients/client-config-service/src/endpoints.ts index dab68293dde7..f929863efac8 100644 --- a/clients/client-config-service/src/endpoints.ts +++ b/clients/client-config-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "config", diff --git a/clients/client-config-service/src/runtimeConfig.browser.ts b/clients/client-config-service/src/runtimeConfig.browser.ts index 089e2573c581..17c09c7d2a74 100644 --- a/clients/client-config-service/src/runtimeConfig.browser.ts +++ b/clients/client-config-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ConfigServiceClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-config-service/src/runtimeConfig.ts b/clients/client-config-service/src/runtimeConfig.ts index 9122560d79af..110d11fe2968 100644 --- a/clients/client-config-service/src/runtimeConfig.ts +++ b/clients/client-config-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ConfigServiceClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-connect-contact-lens/src/ConnectContactLensClient.ts b/clients/client-connect-contact-lens/src/ConnectContactLensClient.ts index 532d9e863fbf..8d5663fc2899 100644 --- a/clients/client-connect-contact-lens/src/ConnectContactLensClient.ts +++ b/clients/client-connect-contact-lens/src/ConnectContactLensClient.ts @@ -141,6 +141,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-connect-contact-lens/src/endpoints.ts b/clients/client-connect-contact-lens/src/endpoints.ts index 8921a3e55e54..bf4b457eaf8d 100644 --- a/clients/client-connect-contact-lens/src/endpoints.ts +++ b/clients/client-connect-contact-lens/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "connect", diff --git a/clients/client-connect-contact-lens/src/runtimeConfig.browser.ts b/clients/client-connect-contact-lens/src/runtimeConfig.browser.ts index 828da79e54bc..3b36f93f9942 100644 --- a/clients/client-connect-contact-lens/src/runtimeConfig.browser.ts +++ b/clients/client-connect-contact-lens/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ConnectContactLensClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-connect-contact-lens/src/runtimeConfig.ts b/clients/client-connect-contact-lens/src/runtimeConfig.ts index 1358217df62d..c6a07e1fb932 100644 --- a/clients/client-connect-contact-lens/src/runtimeConfig.ts +++ b/clients/client-connect-contact-lens/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ConnectContactLensClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-connect/src/ConnectClient.ts b/clients/client-connect/src/ConnectClient.ts index e7331b89a017..26ac34e7d3d5 100644 --- a/clients/client-connect/src/ConnectClient.ts +++ b/clients/client-connect/src/ConnectClient.ts @@ -671,6 +671,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-connect/src/endpoints.ts b/clients/client-connect/src/endpoints.ts index 1ac5ee2aacd3..dc6eb6f8261f 100644 --- a/clients/client-connect/src/endpoints.ts +++ b/clients/client-connect/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "connect", diff --git a/clients/client-connect/src/runtimeConfig.browser.ts b/clients/client-connect/src/runtimeConfig.browser.ts index a8954eb2f47c..93612efa10bc 100644 --- a/clients/client-connect/src/runtimeConfig.browser.ts +++ b/clients/client-connect/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ConnectClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-connect/src/runtimeConfig.ts b/clients/client-connect/src/runtimeConfig.ts index 4bed981800a6..b77a4d9c7e45 100644 --- a/clients/client-connect/src/runtimeConfig.ts +++ b/clients/client-connect/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ConnectClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-connectparticipant/src/ConnectParticipantClient.ts b/clients/client-connectparticipant/src/ConnectParticipantClient.ts index 89903c93484c..8e35ca39302d 100644 --- a/clients/client-connectparticipant/src/ConnectParticipantClient.ts +++ b/clients/client-connectparticipant/src/ConnectParticipantClient.ts @@ -179,6 +179,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-connectparticipant/src/endpoints.ts b/clients/client-connectparticipant/src/endpoints.ts index c3a1785f252b..d7e6741e3030 100644 --- a/clients/client-connectparticipant/src/endpoints.ts +++ b/clients/client-connectparticipant/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "execute-api", diff --git a/clients/client-connectparticipant/src/runtimeConfig.browser.ts b/clients/client-connectparticipant/src/runtimeConfig.browser.ts index f07ad1c08bda..fc85d793f1ab 100644 --- a/clients/client-connectparticipant/src/runtimeConfig.browser.ts +++ b/clients/client-connectparticipant/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ConnectParticipantClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-connectparticipant/src/runtimeConfig.ts b/clients/client-connectparticipant/src/runtimeConfig.ts index 5249c09c6be0..52018c0284dd 100644 --- a/clients/client-connectparticipant/src/runtimeConfig.ts +++ b/clients/client-connectparticipant/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ConnectParticipantClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cost-and-usage-report-service/src/CostAndUsageReportServiceClient.ts b/clients/client-cost-and-usage-report-service/src/CostAndUsageReportServiceClient.ts index ddca7d53225a..66afb18f99d1 100644 --- a/clients/client-cost-and-usage-report-service/src/CostAndUsageReportServiceClient.ts +++ b/clients/client-cost-and-usage-report-service/src/CostAndUsageReportServiceClient.ts @@ -161,6 +161,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cost-and-usage-report-service/src/endpoints.ts b/clients/client-cost-and-usage-report-service/src/endpoints.ts index 8cbbf39bc8c3..313d62962221 100644 --- a/clients/client-cost-and-usage-report-service/src/endpoints.ts +++ b/clients/client-cost-and-usage-report-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "cur", diff --git a/clients/client-cost-and-usage-report-service/src/runtimeConfig.browser.ts b/clients/client-cost-and-usage-report-service/src/runtimeConfig.browser.ts index 5c220fce4c0d..984182c67ebd 100644 --- a/clients/client-cost-and-usage-report-service/src/runtimeConfig.browser.ts +++ b/clients/client-cost-and-usage-report-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CostAndUsageReportServiceClientConfig) retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cost-and-usage-report-service/src/runtimeConfig.ts b/clients/client-cost-and-usage-report-service/src/runtimeConfig.ts index f0859a41bbe7..277664b35368 100644 --- a/clients/client-cost-and-usage-report-service/src/runtimeConfig.ts +++ b/clients/client-cost-and-usage-report-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CostAndUsageReportServiceClientConfig) retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cost-explorer/src/CostExplorerClient.ts b/clients/client-cost-explorer/src/CostExplorerClient.ts index 9618cd5ccf5c..a5cf8bfdfd24 100644 --- a/clients/client-cost-explorer/src/CostExplorerClient.ts +++ b/clients/client-cost-explorer/src/CostExplorerClient.ts @@ -293,6 +293,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-cost-explorer/src/endpoints.ts b/clients/client-cost-explorer/src/endpoints.ts index 7560a48e2f86..39f99b0ea433 100644 --- a/clients/client-cost-explorer/src/endpoints.ts +++ b/clients/client-cost-explorer/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-cn-global": { @@ -63,7 +63,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ce", diff --git a/clients/client-cost-explorer/src/runtimeConfig.browser.ts b/clients/client-cost-explorer/src/runtimeConfig.browser.ts index 59fc6cba7cdc..3dcdfafa6ddc 100644 --- a/clients/client-cost-explorer/src/runtimeConfig.browser.ts +++ b/clients/client-cost-explorer/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CostExplorerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-cost-explorer/src/runtimeConfig.ts b/clients/client-cost-explorer/src/runtimeConfig.ts index fc1392cbf66f..77e1818f2771 100644 --- a/clients/client-cost-explorer/src/runtimeConfig.ts +++ b/clients/client-cost-explorer/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CostExplorerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-customer-profiles/src/CustomerProfilesClient.ts b/clients/client-customer-profiles/src/CustomerProfilesClient.ts index 8de4ef7c02c2..a190ab182d38 100644 --- a/clients/client-customer-profiles/src/CustomerProfilesClient.ts +++ b/clients/client-customer-profiles/src/CustomerProfilesClient.ts @@ -254,6 +254,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-customer-profiles/src/endpoints.ts b/clients/client-customer-profiles/src/endpoints.ts index 53c7f0cd6972..7ffe7324cdbc 100644 --- a/clients/client-customer-profiles/src/endpoints.ts +++ b/clients/client-customer-profiles/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "profile", diff --git a/clients/client-customer-profiles/src/runtimeConfig.browser.ts b/clients/client-customer-profiles/src/runtimeConfig.browser.ts index 6b4025b8c260..eb98f59a8182 100644 --- a/clients/client-customer-profiles/src/runtimeConfig.browser.ts +++ b/clients/client-customer-profiles/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: CustomerProfilesClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-customer-profiles/src/runtimeConfig.ts b/clients/client-customer-profiles/src/runtimeConfig.ts index 8270d76b85fb..5e9e47761b4c 100644 --- a/clients/client-customer-profiles/src/runtimeConfig.ts +++ b/clients/client-customer-profiles/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: CustomerProfilesClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-data-pipeline/src/DataPipelineClient.ts b/clients/client-data-pipeline/src/DataPipelineClient.ts index e835c0126987..4f510f786994 100644 --- a/clients/client-data-pipeline/src/DataPipelineClient.ts +++ b/clients/client-data-pipeline/src/DataPipelineClient.ts @@ -206,6 +206,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-data-pipeline/src/endpoints.ts b/clients/client-data-pipeline/src/endpoints.ts index 173d88b99d0a..b6f20685f3a8 100644 --- a/clients/client-data-pipeline/src/endpoints.ts +++ b/clients/client-data-pipeline/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "datapipeline", diff --git a/clients/client-data-pipeline/src/runtimeConfig.browser.ts b/clients/client-data-pipeline/src/runtimeConfig.browser.ts index 810647a06703..e3a5bcfe79f8 100644 --- a/clients/client-data-pipeline/src/runtimeConfig.browser.ts +++ b/clients/client-data-pipeline/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DataPipelineClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-data-pipeline/src/runtimeConfig.ts b/clients/client-data-pipeline/src/runtimeConfig.ts index 498fb94b455e..e6e733ba5dbf 100644 --- a/clients/client-data-pipeline/src/runtimeConfig.ts +++ b/clients/client-data-pipeline/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DataPipelineClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-database-migration-service/src/DatabaseMigrationServiceClient.ts b/clients/client-database-migration-service/src/DatabaseMigrationServiceClient.ts index fa8d42e7393a..1126f4e97e94 100644 --- a/clients/client-database-migration-service/src/DatabaseMigrationServiceClient.ts +++ b/clients/client-database-migration-service/src/DatabaseMigrationServiceClient.ts @@ -428,6 +428,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-database-migration-service/src/endpoints.ts b/clients/client-database-migration-service/src/endpoints.ts index 21b5c73bd4bb..cf3bcc457add 100644 --- a/clients/client-database-migration-service/src/endpoints.ts +++ b/clients/client-database-migration-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "dms-fips": { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "dms", diff --git a/clients/client-database-migration-service/src/runtimeConfig.browser.ts b/clients/client-database-migration-service/src/runtimeConfig.browser.ts index 6bbf66324556..5ed9aabdc8f2 100644 --- a/clients/client-database-migration-service/src/runtimeConfig.browser.ts +++ b/clients/client-database-migration-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DatabaseMigrationServiceClientConfig) = retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-database-migration-service/src/runtimeConfig.ts b/clients/client-database-migration-service/src/runtimeConfig.ts index 59bae52ebe18..264d2e8a9e97 100644 --- a/clients/client-database-migration-service/src/runtimeConfig.ts +++ b/clients/client-database-migration-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DatabaseMigrationServiceClientConfig) = retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-databrew/src/DataBrewClient.ts b/clients/client-databrew/src/DataBrewClient.ts index 7a3d64fef390..9668643c0b46 100644 --- a/clients/client-databrew/src/DataBrewClient.ts +++ b/clients/client-databrew/src/DataBrewClient.ts @@ -269,6 +269,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-databrew/src/endpoints.ts b/clients/client-databrew/src/endpoints.ts index ef09b0cc69e6..cee4c5575b89 100644 --- a/clients/client-databrew/src/endpoints.ts +++ b/clients/client-databrew/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "databrew", diff --git a/clients/client-databrew/src/runtimeConfig.browser.ts b/clients/client-databrew/src/runtimeConfig.browser.ts index 46a845691993..603ea8e2c1ad 100644 --- a/clients/client-databrew/src/runtimeConfig.browser.ts +++ b/clients/client-databrew/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DataBrewClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-databrew/src/runtimeConfig.ts b/clients/client-databrew/src/runtimeConfig.ts index 31e286697a99..8e96d10a5dec 100644 --- a/clients/client-databrew/src/runtimeConfig.ts +++ b/clients/client-databrew/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DataBrewClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dataexchange/src/DataExchangeClient.ts b/clients/client-dataexchange/src/DataExchangeClient.ts index 21cf42dd3fe1..bb8338c3b107 100644 --- a/clients/client-dataexchange/src/DataExchangeClient.ts +++ b/clients/client-dataexchange/src/DataExchangeClient.ts @@ -224,6 +224,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-dataexchange/src/endpoints.ts b/clients/client-dataexchange/src/endpoints.ts index b611501277a1..fd195f136aba 100644 --- a/clients/client-dataexchange/src/endpoints.ts +++ b/clients/client-dataexchange/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "dataexchange", diff --git a/clients/client-dataexchange/src/runtimeConfig.browser.ts b/clients/client-dataexchange/src/runtimeConfig.browser.ts index d2478c863167..7272508ba6c5 100644 --- a/clients/client-dataexchange/src/runtimeConfig.browser.ts +++ b/clients/client-dataexchange/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DataExchangeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dataexchange/src/runtimeConfig.ts b/clients/client-dataexchange/src/runtimeConfig.ts index 15246a3dae09..04da9a0682a3 100644 --- a/clients/client-dataexchange/src/runtimeConfig.ts +++ b/clients/client-dataexchange/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DataExchangeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-datasync/src/DataSyncClient.ts b/clients/client-datasync/src/DataSyncClient.ts index 5525849f3eef..836f8926391d 100644 --- a/clients/client-datasync/src/DataSyncClient.ts +++ b/clients/client-datasync/src/DataSyncClient.ts @@ -278,6 +278,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-datasync/src/endpoints.ts b/clients/client-datasync/src/endpoints.ts index 60659795d384..b48b25f20654 100644 --- a/clients/client-datasync/src/endpoints.ts +++ b/clients/client-datasync/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "datasync", diff --git a/clients/client-datasync/src/runtimeConfig.browser.ts b/clients/client-datasync/src/runtimeConfig.browser.ts index 4082a16ed924..7bcb717187ca 100644 --- a/clients/client-datasync/src/runtimeConfig.browser.ts +++ b/clients/client-datasync/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DataSyncClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-datasync/src/runtimeConfig.ts b/clients/client-datasync/src/runtimeConfig.ts index 4175061b2d32..a8d7e104a15e 100644 --- a/clients/client-datasync/src/runtimeConfig.ts +++ b/clients/client-datasync/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DataSyncClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dax/src/DAXClient.ts b/clients/client-dax/src/DAXClient.ts index f846d28f7851..e4f49f8def3d 100644 --- a/clients/client-dax/src/DAXClient.ts +++ b/clients/client-dax/src/DAXClient.ts @@ -224,6 +224,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-dax/src/endpoints.ts b/clients/client-dax/src/endpoints.ts index 22c10aeab79c..b8f8aa295e8f 100644 --- a/clients/client-dax/src/endpoints.ts +++ b/clients/client-dax/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "dax", diff --git a/clients/client-dax/src/runtimeConfig.browser.ts b/clients/client-dax/src/runtimeConfig.browser.ts index c02d050dc088..993554d5316a 100644 --- a/clients/client-dax/src/runtimeConfig.browser.ts +++ b/clients/client-dax/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DAXClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dax/src/runtimeConfig.ts b/clients/client-dax/src/runtimeConfig.ts index 6ebb90ec444c..e6904d1fc978 100644 --- a/clients/client-dax/src/runtimeConfig.ts +++ b/clients/client-dax/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DAXClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-detective/src/DetectiveClient.ts b/clients/client-detective/src/DetectiveClient.ts index 9328e4c934b8..d9458bbc8995 100644 --- a/clients/client-detective/src/DetectiveClient.ts +++ b/clients/client-detective/src/DetectiveClient.ts @@ -191,6 +191,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-detective/src/endpoints.ts b/clients/client-detective/src/endpoints.ts index 005146c4869e..d7b4a6468acf 100644 --- a/clients/client-detective/src/endpoints.ts +++ b/clients/client-detective/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "detective", diff --git a/clients/client-detective/src/runtimeConfig.browser.ts b/clients/client-detective/src/runtimeConfig.browser.ts index 9d6588533f4a..4b42f484d270 100644 --- a/clients/client-detective/src/runtimeConfig.browser.ts +++ b/clients/client-detective/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DetectiveClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-detective/src/runtimeConfig.ts b/clients/client-detective/src/runtimeConfig.ts index 9f039fbb6d1e..32bfa4bc5bab 100644 --- a/clients/client-detective/src/runtimeConfig.ts +++ b/clients/client-detective/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DetectiveClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-device-farm/src/DeviceFarmClient.ts b/clients/client-device-farm/src/DeviceFarmClient.ts index 4238e3f98a6d..8c5e571ca7c6 100644 --- a/clients/client-device-farm/src/DeviceFarmClient.ts +++ b/clients/client-device-farm/src/DeviceFarmClient.ts @@ -464,6 +464,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-device-farm/src/endpoints.ts b/clients/client-device-farm/src/endpoints.ts index fe23a593d19b..0e9e59665679 100644 --- a/clients/client-device-farm/src/endpoints.ts +++ b/clients/client-device-farm/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "devicefarm", diff --git a/clients/client-device-farm/src/runtimeConfig.browser.ts b/clients/client-device-farm/src/runtimeConfig.browser.ts index 90a4b86f88a4..23e16a1de720 100644 --- a/clients/client-device-farm/src/runtimeConfig.browser.ts +++ b/clients/client-device-farm/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DeviceFarmClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-device-farm/src/runtimeConfig.ts b/clients/client-device-farm/src/runtimeConfig.ts index ab0490b2a163..a8781803ebb9 100644 --- a/clients/client-device-farm/src/runtimeConfig.ts +++ b/clients/client-device-farm/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DeviceFarmClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-devops-guru/src/DevOpsGuruClient.ts b/clients/client-devops-guru/src/DevOpsGuruClient.ts index 1d2600d55915..fc38ff6a45d0 100644 --- a/clients/client-devops-guru/src/DevOpsGuruClient.ts +++ b/clients/client-devops-guru/src/DevOpsGuruClient.ts @@ -239,6 +239,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-devops-guru/src/endpoints.ts b/clients/client-devops-guru/src/endpoints.ts index 8d092f9aa2a8..e7da8c661637 100644 --- a/clients/client-devops-guru/src/endpoints.ts +++ b/clients/client-devops-guru/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "devops-guru", diff --git a/clients/client-devops-guru/src/runtimeConfig.browser.ts b/clients/client-devops-guru/src/runtimeConfig.browser.ts index 9240e2d442b4..9672b5bf0f72 100644 --- a/clients/client-devops-guru/src/runtimeConfig.browser.ts +++ b/clients/client-devops-guru/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DevOpsGuruClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-devops-guru/src/runtimeConfig.ts b/clients/client-devops-guru/src/runtimeConfig.ts index a5b0943f5617..b2e957fc4fd1 100644 --- a/clients/client-devops-guru/src/runtimeConfig.ts +++ b/clients/client-devops-guru/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DevOpsGuruClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-direct-connect/src/DirectConnectClient.ts b/clients/client-direct-connect/src/DirectConnectClient.ts index 8ee21cb78861..da566d12d2fc 100644 --- a/clients/client-direct-connect/src/DirectConnectClient.ts +++ b/clients/client-direct-connect/src/DirectConnectClient.ts @@ -461,6 +461,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-direct-connect/src/endpoints.ts b/clients/client-direct-connect/src/endpoints.ts index dafb32b154de..2508887731b4 100644 --- a/clients/client-direct-connect/src/endpoints.ts +++ b/clients/client-direct-connect/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "directconnect", diff --git a/clients/client-direct-connect/src/runtimeConfig.browser.ts b/clients/client-direct-connect/src/runtimeConfig.browser.ts index 79a6b72e5975..55962180e47f 100644 --- a/clients/client-direct-connect/src/runtimeConfig.browser.ts +++ b/clients/client-direct-connect/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DirectConnectClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-direct-connect/src/runtimeConfig.ts b/clients/client-direct-connect/src/runtimeConfig.ts index 2f4094b21962..9c266f9286fa 100644 --- a/clients/client-direct-connect/src/runtimeConfig.ts +++ b/clients/client-direct-connect/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DirectConnectClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-directory-service/src/DirectoryServiceClient.ts b/clients/client-directory-service/src/DirectoryServiceClient.ts index 6e2a71fdd7d6..28f9d9cc47aa 100644 --- a/clients/client-directory-service/src/DirectoryServiceClient.ts +++ b/clients/client-directory-service/src/DirectoryServiceClient.ts @@ -410,6 +410,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-directory-service/src/endpoints.ts b/clients/client-directory-service/src/endpoints.ts index 13d59f2b3159..902fe3fe9966 100644 --- a/clients/client-directory-service/src/endpoints.ts +++ b/clients/client-directory-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ds", diff --git a/clients/client-directory-service/src/runtimeConfig.browser.ts b/clients/client-directory-service/src/runtimeConfig.browser.ts index 98b966b8aba4..b813a4d22490 100644 --- a/clients/client-directory-service/src/runtimeConfig.browser.ts +++ b/clients/client-directory-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DirectoryServiceClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-directory-service/src/runtimeConfig.ts b/clients/client-directory-service/src/runtimeConfig.ts index d420eba34bd2..1214e80a0b23 100644 --- a/clients/client-directory-service/src/runtimeConfig.ts +++ b/clients/client-directory-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DirectoryServiceClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dlm/src/DLMClient.ts b/clients/client-dlm/src/DLMClient.ts index dfebcc5a47f9..b1cba99caf1e 100644 --- a/clients/client-dlm/src/DLMClient.ts +++ b/clients/client-dlm/src/DLMClient.ts @@ -176,6 +176,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-dlm/src/endpoints.ts b/clients/client-dlm/src/endpoints.ts index 1ec8eeb576ae..a97e382e7a26 100644 --- a/clients/client-dlm/src/endpoints.ts +++ b/clients/client-dlm/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "dlm", diff --git a/clients/client-dlm/src/runtimeConfig.browser.ts b/clients/client-dlm/src/runtimeConfig.browser.ts index bdfa7bcf4965..6806d6d7f0bd 100644 --- a/clients/client-dlm/src/runtimeConfig.browser.ts +++ b/clients/client-dlm/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DLMClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dlm/src/runtimeConfig.ts b/clients/client-dlm/src/runtimeConfig.ts index 1a27be7f7cf2..bd44ef7ef298 100644 --- a/clients/client-dlm/src/runtimeConfig.ts +++ b/clients/client-dlm/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DLMClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-docdb/src/DocDBClient.ts b/clients/client-docdb/src/DocDBClient.ts index 122233341c65..3264d96ac68a 100644 --- a/clients/client-docdb/src/DocDBClient.ts +++ b/clients/client-docdb/src/DocDBClient.ts @@ -416,6 +416,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-docdb/src/endpoints.ts b/clients/client-docdb/src/endpoints.ts index d1ea2a09c219..8033fe8df7f7 100644 --- a/clients/client-docdb/src/endpoints.ts +++ b/clients/client-docdb/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "rds-fips.ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "rds", diff --git a/clients/client-docdb/src/runtimeConfig.browser.ts b/clients/client-docdb/src/runtimeConfig.browser.ts index 05fc6067dde5..41087020b427 100644 --- a/clients/client-docdb/src/runtimeConfig.browser.ts +++ b/clients/client-docdb/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DocDBClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-docdb/src/runtimeConfig.ts b/clients/client-docdb/src/runtimeConfig.ts index 3a488e4adeb8..70a92a3e335d 100644 --- a/clients/client-docdb/src/runtimeConfig.ts +++ b/clients/client-docdb/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DocDBClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dynamodb-streams/src/DynamoDBStreamsClient.ts b/clients/client-dynamodb-streams/src/DynamoDBStreamsClient.ts index a363f7b04b89..5340a50603e0 100644 --- a/clients/client-dynamodb-streams/src/DynamoDBStreamsClient.ts +++ b/clients/client-dynamodb-streams/src/DynamoDBStreamsClient.ts @@ -149,6 +149,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-dynamodb-streams/src/endpoints.ts b/clients/client-dynamodb-streams/src/endpoints.ts index e7d8db489ace..c9839030ed23 100644 --- a/clients/client-dynamodb-streams/src/endpoints.ts +++ b/clients/client-dynamodb-streams/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "ca-central-1-fips": { @@ -92,7 +92,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "dynamodb", diff --git a/clients/client-dynamodb-streams/src/runtimeConfig.browser.ts b/clients/client-dynamodb-streams/src/runtimeConfig.browser.ts index 2b820f4e71e8..4cd0b6d25713 100644 --- a/clients/client-dynamodb-streams/src/runtimeConfig.browser.ts +++ b/clients/client-dynamodb-streams/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: DynamoDBStreamsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dynamodb-streams/src/runtimeConfig.ts b/clients/client-dynamodb-streams/src/runtimeConfig.ts index 90b3eb051f6b..3aa980521dd5 100644 --- a/clients/client-dynamodb-streams/src/runtimeConfig.ts +++ b/clients/client-dynamodb-streams/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: DynamoDBStreamsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dynamodb/src/DynamoDBClient.ts b/clients/client-dynamodb/src/DynamoDBClient.ts index 2444d6907a2c..fed0668aaafc 100644 --- a/clients/client-dynamodb/src/DynamoDBClient.ts +++ b/clients/client-dynamodb/src/DynamoDBClient.ts @@ -347,6 +347,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-dynamodb/src/endpoints.ts b/clients/client-dynamodb/src/endpoints.ts index 888f13e83d4b..b1fa57a95435 100644 --- a/clients/client-dynamodb/src/endpoints.ts +++ b/clients/client-dynamodb/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "ca-central-1-fips": { @@ -92,7 +92,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "dynamodb", diff --git a/clients/client-dynamodb/src/runtimeConfig.browser.ts b/clients/client-dynamodb/src/runtimeConfig.browser.ts index 0326c8695a7f..f1088b900a7c 100644 --- a/clients/client-dynamodb/src/runtimeConfig.browser.ts +++ b/clients/client-dynamodb/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -36,6 +37,8 @@ export const getRuntimeConfig = (config: DynamoDBClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-dynamodb/src/runtimeConfig.ts b/clients/client-dynamodb/src/runtimeConfig.ts index 9db5bd40de83..4cfa3368b04d 100644 --- a/clients/client-dynamodb/src/runtimeConfig.ts +++ b/clients/client-dynamodb/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS } from "@aws-sdk/middleware-endpoint-discovery"; @@ -43,6 +48,8 @@ export const getRuntimeConfig = (config: DynamoDBClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ebs/src/EBSClient.ts b/clients/client-ebs/src/EBSClient.ts index 788779e56f1a..36578da1121c 100644 --- a/clients/client-ebs/src/EBSClient.ts +++ b/clients/client-ebs/src/EBSClient.ts @@ -155,6 +155,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ebs/src/endpoints.ts b/clients/client-ebs/src/endpoints.ts index 003d4a9fe3b4..4f560105d61e 100644 --- a/clients/client-ebs/src/endpoints.ts +++ b/clients/client-ebs/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -79,7 +79,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ebs", diff --git a/clients/client-ebs/src/runtimeConfig.browser.ts b/clients/client-ebs/src/runtimeConfig.browser.ts index b3e5c60e6fce..b79f632da8a4 100644 --- a/clients/client-ebs/src/runtimeConfig.browser.ts +++ b/clients/client-ebs/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: EBSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ebs/src/runtimeConfig.ts b/clients/client-ebs/src/runtimeConfig.ts index 13f556efd0ec..fd16179ac221 100644 --- a/clients/client-ebs/src/runtimeConfig.ts +++ b/clients/client-ebs/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: EBSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts b/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts index 2e033cfa4264..aa7a61d39538 100644 --- a/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts +++ b/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts @@ -142,6 +142,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ec2-instance-connect/src/endpoints.ts b/clients/client-ec2-instance-connect/src/endpoints.ts index 23b3dd06ddb1..c21795d600aa 100644 --- a/clients/client-ec2-instance-connect/src/endpoints.ts +++ b/clients/client-ec2-instance-connect/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ec2-instance-connect", diff --git a/clients/client-ec2-instance-connect/src/runtimeConfig.browser.ts b/clients/client-ec2-instance-connect/src/runtimeConfig.browser.ts index 87a3ec4e6abf..939ea62eea88 100644 --- a/clients/client-ec2-instance-connect/src/runtimeConfig.browser.ts +++ b/clients/client-ec2-instance-connect/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: EC2InstanceConnectClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ec2-instance-connect/src/runtimeConfig.ts b/clients/client-ec2-instance-connect/src/runtimeConfig.ts index 51d29f80eaf0..f9b423b29c45 100644 --- a/clients/client-ec2-instance-connect/src/runtimeConfig.ts +++ b/clients/client-ec2-instance-connect/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: EC2InstanceConnectClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ec2/src/EC2Client.ts b/clients/client-ec2/src/EC2Client.ts index cb738a20013d..ae0dc162a0fa 100644 --- a/clients/client-ec2/src/EC2Client.ts +++ b/clients/client-ec2/src/EC2Client.ts @@ -2672,6 +2672,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ec2/src/endpoints.ts b/clients/client-ec2/src/endpoints.ts index 9843e07b5524..6e22730f96a6 100644 --- a/clients/client-ec2/src/endpoints.ts +++ b/clients/client-ec2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ec2", diff --git a/clients/client-ec2/src/runtimeConfig.browser.ts b/clients/client-ec2/src/runtimeConfig.browser.ts index 6a3a248c1ae6..5e5a9927c14d 100644 --- a/clients/client-ec2/src/runtimeConfig.browser.ts +++ b/clients/client-ec2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: EC2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ec2/src/runtimeConfig.ts b/clients/client-ec2/src/runtimeConfig.ts index 79d7da97d84a..cafc1b1a4c2a 100644 --- a/clients/client-ec2/src/runtimeConfig.ts +++ b/clients/client-ec2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: EC2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ecr-public/src/ECRPUBLICClient.ts b/clients/client-ecr-public/src/ECRPUBLICClient.ts index 7f34f32883ea..90551030503a 100644 --- a/clients/client-ecr-public/src/ECRPUBLICClient.ts +++ b/clients/client-ecr-public/src/ECRPUBLICClient.ts @@ -245,6 +245,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ecr-public/src/endpoints.ts b/clients/client-ecr-public/src/endpoints.ts index da19fd857571..d891f1a5c011 100644 --- a/clients/client-ecr-public/src/endpoints.ts +++ b/clients/client-ecr-public/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ecr-public", diff --git a/clients/client-ecr-public/src/runtimeConfig.browser.ts b/clients/client-ecr-public/src/runtimeConfig.browser.ts index 7da388b31f6a..fcf74d09de8b 100644 --- a/clients/client-ecr-public/src/runtimeConfig.browser.ts +++ b/clients/client-ecr-public/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ECRPUBLICClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ecr-public/src/runtimeConfig.ts b/clients/client-ecr-public/src/runtimeConfig.ts index 7d6bcd6859e4..7ad11bed7491 100644 --- a/clients/client-ecr-public/src/runtimeConfig.ts +++ b/clients/client-ecr-public/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ECRPUBLICClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ecr/src/ECRClient.ts b/clients/client-ecr/src/ECRClient.ts index ae9a6d7b307c..0f414965b515 100644 --- a/clients/client-ecr/src/ECRClient.ts +++ b/clients/client-ecr/src/ECRClient.ts @@ -299,6 +299,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ecr/src/endpoints.ts b/clients/client-ecr/src/endpoints.ts index e01c81607424..d2b20bfc84c3 100644 --- a/clients/client-ecr/src/endpoints.ts +++ b/clients/client-ecr/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "af-south-1": { @@ -229,7 +229,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ecr", diff --git a/clients/client-ecr/src/runtimeConfig.browser.ts b/clients/client-ecr/src/runtimeConfig.browser.ts index 8ee11d439ded..91cd8e0622b1 100644 --- a/clients/client-ecr/src/runtimeConfig.browser.ts +++ b/clients/client-ecr/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ECRClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ecr/src/runtimeConfig.ts b/clients/client-ecr/src/runtimeConfig.ts index a81812d2eb7b..feca80bde91f 100644 --- a/clients/client-ecr/src/runtimeConfig.ts +++ b/clients/client-ecr/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ECRClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ecs/src/ECSClient.ts b/clients/client-ecs/src/ECSClient.ts index 291bb7303c10..272faee3f9f0 100644 --- a/clients/client-ecs/src/ECSClient.ts +++ b/clients/client-ecs/src/ECSClient.ts @@ -371,6 +371,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ecs/src/endpoints.ts b/clients/client-ecs/src/endpoints.ts index 1cfce674f6fd..37cdb7b8a793 100644 --- a/clients/client-ecs/src/endpoints.ts +++ b/clients/client-ecs/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ecs", diff --git a/clients/client-ecs/src/runtimeConfig.browser.ts b/clients/client-ecs/src/runtimeConfig.browser.ts index d825c2cec9dd..8f04ca4aadef 100644 --- a/clients/client-ecs/src/runtimeConfig.browser.ts +++ b/clients/client-ecs/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ECSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ecs/src/runtimeConfig.ts b/clients/client-ecs/src/runtimeConfig.ts index fca51fa85289..01e6fe3ae0ca 100644 --- a/clients/client-ecs/src/runtimeConfig.ts +++ b/clients/client-ecs/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ECSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-efs/src/EFSClient.ts b/clients/client-efs/src/EFSClient.ts index ff65555e386b..6ec515666513 100644 --- a/clients/client-efs/src/EFSClient.ts +++ b/clients/client-efs/src/EFSClient.ts @@ -260,6 +260,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-efs/src/endpoints.ts b/clients/client-efs/src/endpoints.ts index c3313c0bd42d..d56e11f352bd 100644 --- a/clients/client-efs/src/endpoints.ts +++ b/clients/client-efs/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-af-south-1": { @@ -179,7 +179,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "elasticfilesystem", diff --git a/clients/client-efs/src/runtimeConfig.browser.ts b/clients/client-efs/src/runtimeConfig.browser.ts index b39caaa44ddb..f74779984f67 100644 --- a/clients/client-efs/src/runtimeConfig.browser.ts +++ b/clients/client-efs/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: EFSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-efs/src/runtimeConfig.ts b/clients/client-efs/src/runtimeConfig.ts index 816675849137..0dfbcda60345 100644 --- a/clients/client-efs/src/runtimeConfig.ts +++ b/clients/client-efs/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: EFSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-eks/src/EKSClient.ts b/clients/client-eks/src/EKSClient.ts index d1654b89b46a..c39cdcd0c748 100644 --- a/clients/client-eks/src/EKSClient.ts +++ b/clients/client-eks/src/EKSClient.ts @@ -284,6 +284,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-eks/src/endpoints.ts b/clients/client-eks/src/endpoints.ts index c4a309d4066d..c1a764998552 100644 --- a/clients/client-eks/src/endpoints.ts +++ b/clients/client-eks/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "eks", diff --git a/clients/client-eks/src/runtimeConfig.browser.ts b/clients/client-eks/src/runtimeConfig.browser.ts index c0e619241898..553cb5282c40 100644 --- a/clients/client-eks/src/runtimeConfig.browser.ts +++ b/clients/client-eks/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: EKSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-eks/src/runtimeConfig.ts b/clients/client-eks/src/runtimeConfig.ts index 53963a00b7b6..33fa9ee94ec9 100644 --- a/clients/client-eks/src/runtimeConfig.ts +++ b/clients/client-eks/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: EKSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-beanstalk/src/ElasticBeanstalkClient.ts b/clients/client-elastic-beanstalk/src/ElasticBeanstalkClient.ts index 87c8d07226ef..f984da5dd3a2 100644 --- a/clients/client-elastic-beanstalk/src/ElasticBeanstalkClient.ts +++ b/clients/client-elastic-beanstalk/src/ElasticBeanstalkClient.ts @@ -395,6 +395,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-elastic-beanstalk/src/endpoints.ts b/clients/client-elastic-beanstalk/src/endpoints.ts index 930d21c565c1..6cb0a7e1b4af 100644 --- a/clients/client-elastic-beanstalk/src/endpoints.ts +++ b/clients/client-elastic-beanstalk/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "elasticbeanstalk", diff --git a/clients/client-elastic-beanstalk/src/runtimeConfig.browser.ts b/clients/client-elastic-beanstalk/src/runtimeConfig.browser.ts index 92b661bc913d..cd1619a716da 100644 --- a/clients/client-elastic-beanstalk/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-beanstalk/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ElasticBeanstalkClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-beanstalk/src/runtimeConfig.ts b/clients/client-elastic-beanstalk/src/runtimeConfig.ts index 3b711aab2e06..4653fde19945 100644 --- a/clients/client-elastic-beanstalk/src/runtimeConfig.ts +++ b/clients/client-elastic-beanstalk/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ElasticBeanstalkClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-inference/src/ElasticInferenceClient.ts b/clients/client-elastic-inference/src/ElasticInferenceClient.ts index aae4a4c447e8..6365e144a3c1 100644 --- a/clients/client-elastic-inference/src/ElasticInferenceClient.ts +++ b/clients/client-elastic-inference/src/ElasticInferenceClient.ts @@ -167,6 +167,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-elastic-inference/src/endpoints.ts b/clients/client-elastic-inference/src/endpoints.ts index 10c3454804f7..38015723b879 100644 --- a/clients/client-elastic-inference/src/endpoints.ts +++ b/clients/client-elastic-inference/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "ap-northeast-1": { @@ -72,7 +72,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "elastic-inference", diff --git a/clients/client-elastic-inference/src/runtimeConfig.browser.ts b/clients/client-elastic-inference/src/runtimeConfig.browser.ts index 7123290b21c7..0529b12fc652 100644 --- a/clients/client-elastic-inference/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-inference/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ElasticInferenceClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-inference/src/runtimeConfig.ts b/clients/client-elastic-inference/src/runtimeConfig.ts index 5f8e6cb6b344..f7962022399c 100644 --- a/clients/client-elastic-inference/src/runtimeConfig.ts +++ b/clients/client-elastic-inference/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ElasticInferenceClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts b/clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts index 33e25018833e..e915578e9b16 100644 --- a/clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts +++ b/clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts @@ -275,6 +275,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-elastic-load-balancing-v2/src/endpoints.ts b/clients/client-elastic-load-balancing-v2/src/endpoints.ts index 74b3a3791487..ea17fc023c2d 100644 --- a/clients/client-elastic-load-balancing-v2/src/endpoints.ts +++ b/clients/client-elastic-load-balancing-v2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "elasticloadbalancing", diff --git a/clients/client-elastic-load-balancing-v2/src/runtimeConfig.browser.ts b/clients/client-elastic-load-balancing-v2/src/runtimeConfig.browser.ts index c046b49a59c7..ac968962caf4 100644 --- a/clients/client-elastic-load-balancing-v2/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-load-balancing-v2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ElasticLoadBalancingV2ClientConfig) => retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-load-balancing-v2/src/runtimeConfig.ts b/clients/client-elastic-load-balancing-v2/src/runtimeConfig.ts index 37d9c1394e42..b28f64f099d0 100644 --- a/clients/client-elastic-load-balancing-v2/src/runtimeConfig.ts +++ b/clients/client-elastic-load-balancing-v2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ElasticLoadBalancingV2ClientConfig) => retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-load-balancing/src/ElasticLoadBalancingClient.ts b/clients/client-elastic-load-balancing/src/ElasticLoadBalancingClient.ts index eb1cb6778ad3..9cea36078bba 100644 --- a/clients/client-elastic-load-balancing/src/ElasticLoadBalancingClient.ts +++ b/clients/client-elastic-load-balancing/src/ElasticLoadBalancingClient.ts @@ -296,6 +296,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-elastic-load-balancing/src/endpoints.ts b/clients/client-elastic-load-balancing/src/endpoints.ts index 74b3a3791487..ea17fc023c2d 100644 --- a/clients/client-elastic-load-balancing/src/endpoints.ts +++ b/clients/client-elastic-load-balancing/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "elasticloadbalancing", diff --git a/clients/client-elastic-load-balancing/src/runtimeConfig.browser.ts b/clients/client-elastic-load-balancing/src/runtimeConfig.browser.ts index 9ff3f2c2b4ef..d9f2dd323522 100644 --- a/clients/client-elastic-load-balancing/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-load-balancing/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ElasticLoadBalancingClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-load-balancing/src/runtimeConfig.ts b/clients/client-elastic-load-balancing/src/runtimeConfig.ts index aa5c5c92f380..0df0b649d420 100644 --- a/clients/client-elastic-load-balancing/src/runtimeConfig.ts +++ b/clients/client-elastic-load-balancing/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ElasticLoadBalancingClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-transcoder/src/ElasticTranscoderClient.ts b/clients/client-elastic-transcoder/src/ElasticTranscoderClient.ts index 3b936e1e41ee..84588cc10684 100644 --- a/clients/client-elastic-transcoder/src/ElasticTranscoderClient.ts +++ b/clients/client-elastic-transcoder/src/ElasticTranscoderClient.ts @@ -194,6 +194,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-elastic-transcoder/src/endpoints.ts b/clients/client-elastic-transcoder/src/endpoints.ts index dff2c2e54e84..29bb2de8d945 100644 --- a/clients/client-elastic-transcoder/src/endpoints.ts +++ b/clients/client-elastic-transcoder/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "elastictranscoder", diff --git a/clients/client-elastic-transcoder/src/runtimeConfig.browser.ts b/clients/client-elastic-transcoder/src/runtimeConfig.browser.ts index e51b0dbcf372..ba3c09454ab6 100644 --- a/clients/client-elastic-transcoder/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-transcoder/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ElasticTranscoderClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elastic-transcoder/src/runtimeConfig.ts b/clients/client-elastic-transcoder/src/runtimeConfig.ts index fe60b87c5240..cbfc7ac8c16d 100644 --- a/clients/client-elastic-transcoder/src/runtimeConfig.ts +++ b/clients/client-elastic-transcoder/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ElasticTranscoderClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elasticache/src/ElastiCacheClient.ts b/clients/client-elasticache/src/ElastiCacheClient.ts index a3cb4a2acfdd..4f9e6db5e51e 100644 --- a/clients/client-elasticache/src/ElastiCacheClient.ts +++ b/clients/client-elasticache/src/ElastiCacheClient.ts @@ -464,6 +464,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-elasticache/src/endpoints.ts b/clients/client-elasticache/src/endpoints.ts index 57002284c7c9..0f079a63e858 100644 --- a/clients/client-elasticache/src/endpoints.ts +++ b/clients/client-elasticache/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { fips: { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "elasticache", diff --git a/clients/client-elasticache/src/runtimeConfig.browser.ts b/clients/client-elasticache/src/runtimeConfig.browser.ts index f68d9e36902c..a0046ec7493e 100644 --- a/clients/client-elasticache/src/runtimeConfig.browser.ts +++ b/clients/client-elasticache/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ElastiCacheClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elasticache/src/runtimeConfig.ts b/clients/client-elasticache/src/runtimeConfig.ts index 7f36be2f39c0..8b33bf048625 100644 --- a/clients/client-elasticache/src/runtimeConfig.ts +++ b/clients/client-elasticache/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ElastiCacheClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts b/clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts index bc08720e85a6..d3d056fc5c28 100644 --- a/clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts +++ b/clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts @@ -341,6 +341,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-elasticsearch-service/src/endpoints.ts b/clients/client-elasticsearch-service/src/endpoints.ts index b682e53831be..4042a8f4e918 100644 --- a/clients/client-elasticsearch-service/src/endpoints.ts +++ b/clients/client-elasticsearch-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { fips: { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "es", diff --git a/clients/client-elasticsearch-service/src/runtimeConfig.browser.ts b/clients/client-elasticsearch-service/src/runtimeConfig.browser.ts index 62faa601518e..21bb2e57fa6f 100644 --- a/clients/client-elasticsearch-service/src/runtimeConfig.browser.ts +++ b/clients/client-elasticsearch-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ElasticsearchServiceClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-elasticsearch-service/src/runtimeConfig.ts b/clients/client-elasticsearch-service/src/runtimeConfig.ts index e71435d3918d..2f963b1f813a 100644 --- a/clients/client-elasticsearch-service/src/runtimeConfig.ts +++ b/clients/client-elasticsearch-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ElasticsearchServiceClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-emr-containers/src/EMRContainersClient.ts b/clients/client-emr-containers/src/EMRContainersClient.ts index 4e9855d2ceca..0cf57c1386aa 100644 --- a/clients/client-emr-containers/src/EMRContainersClient.ts +++ b/clients/client-emr-containers/src/EMRContainersClient.ts @@ -209,6 +209,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-emr-containers/src/endpoints.ts b/clients/client-emr-containers/src/endpoints.ts index 3c27cb837c81..74da35c041b3 100644 --- a/clients/client-emr-containers/src/endpoints.ts +++ b/clients/client-emr-containers/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -79,7 +79,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "emr-containers", diff --git a/clients/client-emr-containers/src/runtimeConfig.browser.ts b/clients/client-emr-containers/src/runtimeConfig.browser.ts index 3208209ccad5..ebdc27477043 100644 --- a/clients/client-emr-containers/src/runtimeConfig.browser.ts +++ b/clients/client-emr-containers/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: EMRContainersClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-emr-containers/src/runtimeConfig.ts b/clients/client-emr-containers/src/runtimeConfig.ts index d12529f9ca21..b2cbeb66275a 100644 --- a/clients/client-emr-containers/src/runtimeConfig.ts +++ b/clients/client-emr-containers/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: EMRContainersClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-emr/src/EMRClient.ts b/clients/client-emr/src/EMRClient.ts index 376acfc0945a..19091b0a3174 100644 --- a/clients/client-emr/src/EMRClient.ts +++ b/clients/client-emr/src/EMRClient.ts @@ -380,6 +380,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-emr/src/endpoints.ts b/clients/client-emr/src/endpoints.ts index 7819aba1ee38..6d1f13b80279 100644 --- a/clients/client-emr/src/endpoints.ts +++ b/clients/client-emr/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "elasticmapreduce", diff --git a/clients/client-emr/src/runtimeConfig.browser.ts b/clients/client-emr/src/runtimeConfig.browser.ts index 8a7d2465624c..d1d06a752e29 100644 --- a/clients/client-emr/src/runtimeConfig.browser.ts +++ b/clients/client-emr/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: EMRClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-emr/src/runtimeConfig.ts b/clients/client-emr/src/runtimeConfig.ts index 23d0dbc899f5..18c38ef2cef9 100644 --- a/clients/client-emr/src/runtimeConfig.ts +++ b/clients/client-emr/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: EMRClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-eventbridge/src/EventBridgeClient.ts b/clients/client-eventbridge/src/EventBridgeClient.ts index ed5b3ba5866d..0e508488f20f 100644 --- a/clients/client-eventbridge/src/EventBridgeClient.ts +++ b/clients/client-eventbridge/src/EventBridgeClient.ts @@ -338,6 +338,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-eventbridge/src/endpoints.ts b/clients/client-eventbridge/src/endpoints.ts index 65fcfebb54ac..29477f977b97 100644 --- a/clients/client-eventbridge/src/endpoints.ts +++ b/clients/client-eventbridge/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "events", diff --git a/clients/client-eventbridge/src/runtimeConfig.browser.ts b/clients/client-eventbridge/src/runtimeConfig.browser.ts index 9db7490cb837..310303850fda 100644 --- a/clients/client-eventbridge/src/runtimeConfig.browser.ts +++ b/clients/client-eventbridge/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: EventBridgeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-eventbridge/src/runtimeConfig.ts b/clients/client-eventbridge/src/runtimeConfig.ts index 8a19742195dc..776bcd820a1c 100644 --- a/clients/client-eventbridge/src/runtimeConfig.ts +++ b/clients/client-eventbridge/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: EventBridgeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-finspace-data/src/FinspaceDataClient.ts b/clients/client-finspace-data/src/FinspaceDataClient.ts index dd74c37bb59d..f9595464ea19 100644 --- a/clients/client-finspace-data/src/FinspaceDataClient.ts +++ b/clients/client-finspace-data/src/FinspaceDataClient.ts @@ -149,6 +149,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-finspace-data/src/endpoints.ts b/clients/client-finspace-data/src/endpoints.ts index 436c15b0efa2..713e4989dd09 100644 --- a/clients/client-finspace-data/src/endpoints.ts +++ b/clients/client-finspace-data/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "finspace-api", diff --git a/clients/client-finspace-data/src/runtimeConfig.browser.ts b/clients/client-finspace-data/src/runtimeConfig.browser.ts index 3ccd11b955ac..f9b1fc51a716 100644 --- a/clients/client-finspace-data/src/runtimeConfig.browser.ts +++ b/clients/client-finspace-data/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: FinspaceDataClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-finspace-data/src/runtimeConfig.ts b/clients/client-finspace-data/src/runtimeConfig.ts index 27b3beef3f97..887e3d791c79 100644 --- a/clients/client-finspace-data/src/runtimeConfig.ts +++ b/clients/client-finspace-data/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: FinspaceDataClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-finspace/src/FinspaceClient.ts b/clients/client-finspace/src/FinspaceClient.ts index 3854067c1fb7..96cb8b92ec53 100644 --- a/clients/client-finspace/src/FinspaceClient.ts +++ b/clients/client-finspace/src/FinspaceClient.ts @@ -164,6 +164,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-finspace/src/endpoints.ts b/clients/client-finspace/src/endpoints.ts index 05ba867ec574..348bbb586b10 100644 --- a/clients/client-finspace/src/endpoints.ts +++ b/clients/client-finspace/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "finspace", diff --git a/clients/client-finspace/src/runtimeConfig.browser.ts b/clients/client-finspace/src/runtimeConfig.browser.ts index 9b0f7a56e2ab..583d8af4062a 100644 --- a/clients/client-finspace/src/runtimeConfig.browser.ts +++ b/clients/client-finspace/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: FinspaceClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-finspace/src/runtimeConfig.ts b/clients/client-finspace/src/runtimeConfig.ts index 718edb00e4e4..b8928e5a13d3 100644 --- a/clients/client-finspace/src/runtimeConfig.ts +++ b/clients/client-finspace/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: FinspaceClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-firehose/src/FirehoseClient.ts b/clients/client-firehose/src/FirehoseClient.ts index a2104a1ac9d6..f38c759b6976 100644 --- a/clients/client-firehose/src/FirehoseClient.ts +++ b/clients/client-firehose/src/FirehoseClient.ts @@ -197,6 +197,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-firehose/src/endpoints.ts b/clients/client-firehose/src/endpoints.ts index 9398deb342b4..12bcaba0b166 100644 --- a/clients/client-firehose/src/endpoints.ts +++ b/clients/client-firehose/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "firehose", diff --git a/clients/client-firehose/src/runtimeConfig.browser.ts b/clients/client-firehose/src/runtimeConfig.browser.ts index e9650b8a16f2..2deb24cdf4e8 100644 --- a/clients/client-firehose/src/runtimeConfig.browser.ts +++ b/clients/client-firehose/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: FirehoseClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-firehose/src/runtimeConfig.ts b/clients/client-firehose/src/runtimeConfig.ts index 5f025b62e1b9..42642f26a2d9 100644 --- a/clients/client-firehose/src/runtimeConfig.ts +++ b/clients/client-firehose/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: FirehoseClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-fis/src/FisClient.ts b/clients/client-fis/src/FisClient.ts index 7bd03025cfa1..2620f2290056 100644 --- a/clients/client-fis/src/FisClient.ts +++ b/clients/client-fis/src/FisClient.ts @@ -197,6 +197,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-fis/src/endpoints.ts b/clients/client-fis/src/endpoints.ts index 021347e48465..2dfb68524ef4 100644 --- a/clients/client-fis/src/endpoints.ts +++ b/clients/client-fis/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "fis", diff --git a/clients/client-fis/src/runtimeConfig.browser.ts b/clients/client-fis/src/runtimeConfig.browser.ts index 6d8edfa9af1a..00c1494338b7 100644 --- a/clients/client-fis/src/runtimeConfig.browser.ts +++ b/clients/client-fis/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: FisClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-fis/src/runtimeConfig.ts b/clients/client-fis/src/runtimeConfig.ts index a433685c8190..924d34ab94d0 100644 --- a/clients/client-fis/src/runtimeConfig.ts +++ b/clients/client-fis/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: FisClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-fms/src/FMSClient.ts b/clients/client-fms/src/FMSClient.ts index f77ec26f66c5..2540c048df1e 100644 --- a/clients/client-fms/src/FMSClient.ts +++ b/clients/client-fms/src/FMSClient.ts @@ -248,6 +248,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-fms/src/endpoints.ts b/clients/client-fms/src/endpoints.ts index 22112eb64bb7..b69b67327c9d 100644 --- a/clients/client-fms/src/endpoints.ts +++ b/clients/client-fms/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-af-south-1": { @@ -157,7 +157,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "fms", diff --git a/clients/client-fms/src/runtimeConfig.browser.ts b/clients/client-fms/src/runtimeConfig.browser.ts index 071a799d194c..79cb6cb3d74d 100644 --- a/clients/client-fms/src/runtimeConfig.browser.ts +++ b/clients/client-fms/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: FMSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-fms/src/runtimeConfig.ts b/clients/client-fms/src/runtimeConfig.ts index 02abc9b03137..9dcbc2af57f4 100644 --- a/clients/client-fms/src/runtimeConfig.ts +++ b/clients/client-fms/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: FMSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-forecast/src/ForecastClient.ts b/clients/client-forecast/src/ForecastClient.ts index e3edfa387637..f5e2575a1839 100644 --- a/clients/client-forecast/src/ForecastClient.ts +++ b/clients/client-forecast/src/ForecastClient.ts @@ -284,6 +284,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-forecast/src/endpoints.ts b/clients/client-forecast/src/endpoints.ts index cc657d80edee..ecb42c5c9072 100644 --- a/clients/client-forecast/src/endpoints.ts +++ b/clients/client-forecast/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -69,7 +69,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "forecast", diff --git a/clients/client-forecast/src/runtimeConfig.browser.ts b/clients/client-forecast/src/runtimeConfig.browser.ts index 05d393271820..b9c60b2bd4f9 100644 --- a/clients/client-forecast/src/runtimeConfig.browser.ts +++ b/clients/client-forecast/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ForecastClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-forecast/src/runtimeConfig.ts b/clients/client-forecast/src/runtimeConfig.ts index 090dc7f9b9c3..5245a22b2be6 100644 --- a/clients/client-forecast/src/runtimeConfig.ts +++ b/clients/client-forecast/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ForecastClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-forecastquery/src/ForecastqueryClient.ts b/clients/client-forecastquery/src/ForecastqueryClient.ts index 063c44fe394e..55c72807dc95 100644 --- a/clients/client-forecastquery/src/ForecastqueryClient.ts +++ b/clients/client-forecastquery/src/ForecastqueryClient.ts @@ -138,6 +138,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-forecastquery/src/endpoints.ts b/clients/client-forecastquery/src/endpoints.ts index e982dc0d4db2..448f7572374b 100644 --- a/clients/client-forecastquery/src/endpoints.ts +++ b/clients/client-forecastquery/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -69,7 +69,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "forecast", diff --git a/clients/client-forecastquery/src/runtimeConfig.browser.ts b/clients/client-forecastquery/src/runtimeConfig.browser.ts index 8a4d9313deb1..904ad20612a7 100644 --- a/clients/client-forecastquery/src/runtimeConfig.browser.ts +++ b/clients/client-forecastquery/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ForecastqueryClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-forecastquery/src/runtimeConfig.ts b/clients/client-forecastquery/src/runtimeConfig.ts index e9ec1ef90efc..e269a1e70d3e 100644 --- a/clients/client-forecastquery/src/runtimeConfig.ts +++ b/clients/client-forecastquery/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ForecastqueryClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-frauddetector/src/FraudDetectorClient.ts b/clients/client-frauddetector/src/FraudDetectorClient.ts index 66317f0b49f1..9f427aa7e9d2 100644 --- a/clients/client-frauddetector/src/FraudDetectorClient.ts +++ b/clients/client-frauddetector/src/FraudDetectorClient.ts @@ -398,6 +398,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-frauddetector/src/endpoints.ts b/clients/client-frauddetector/src/endpoints.ts index 4ed80976cbb2..944affde588b 100644 --- a/clients/client-frauddetector/src/endpoints.ts +++ b/clients/client-frauddetector/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "frauddetector", diff --git a/clients/client-frauddetector/src/runtimeConfig.browser.ts b/clients/client-frauddetector/src/runtimeConfig.browser.ts index d6f61ce57248..e4a43a91a8c1 100644 --- a/clients/client-frauddetector/src/runtimeConfig.browser.ts +++ b/clients/client-frauddetector/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: FraudDetectorClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-frauddetector/src/runtimeConfig.ts b/clients/client-frauddetector/src/runtimeConfig.ts index 7d6570034f2d..4e0be3fd4243 100644 --- a/clients/client-frauddetector/src/runtimeConfig.ts +++ b/clients/client-frauddetector/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: FraudDetectorClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-fsx/src/FSxClient.ts b/clients/client-fsx/src/FSxClient.ts index 0c747bef3615..2a054f975bae 100644 --- a/clients/client-fsx/src/FSxClient.ts +++ b/clients/client-fsx/src/FSxClient.ts @@ -260,6 +260,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-fsx/src/endpoints.ts b/clients/client-fsx/src/endpoints.ts index 110366bfdaf4..22e06563e083 100644 --- a/clients/client-fsx/src/endpoints.ts +++ b/clients/client-fsx/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-prod-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "fsx", diff --git a/clients/client-fsx/src/runtimeConfig.browser.ts b/clients/client-fsx/src/runtimeConfig.browser.ts index 09c4857d2569..b8840755c0b5 100644 --- a/clients/client-fsx/src/runtimeConfig.browser.ts +++ b/clients/client-fsx/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: FSxClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-fsx/src/runtimeConfig.ts b/clients/client-fsx/src/runtimeConfig.ts index 7022cf28da6f..a5b8f0aee2d2 100644 --- a/clients/client-fsx/src/runtimeConfig.ts +++ b/clients/client-fsx/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: FSxClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-gamelift/src/GameLiftClient.ts b/clients/client-gamelift/src/GameLiftClient.ts index 8f7d736adda6..3980517b57a5 100644 --- a/clients/client-gamelift/src/GameLiftClient.ts +++ b/clients/client-gamelift/src/GameLiftClient.ts @@ -593,6 +593,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-gamelift/src/endpoints.ts b/clients/client-gamelift/src/endpoints.ts index 51bab7db7081..12ee60bfbb43 100644 --- a/clients/client-gamelift/src/endpoints.ts +++ b/clients/client-gamelift/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "gamelift", diff --git a/clients/client-gamelift/src/runtimeConfig.browser.ts b/clients/client-gamelift/src/runtimeConfig.browser.ts index aa5d454a709a..28ed639d7431 100644 --- a/clients/client-gamelift/src/runtimeConfig.browser.ts +++ b/clients/client-gamelift/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: GameLiftClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-gamelift/src/runtimeConfig.ts b/clients/client-gamelift/src/runtimeConfig.ts index f2ecdb52af17..dd82255fcd52 100644 --- a/clients/client-gamelift/src/runtimeConfig.ts +++ b/clients/client-gamelift/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: GameLiftClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-glacier/src/GlacierClient.ts b/clients/client-glacier/src/GlacierClient.ts index b9869bae1865..5d47cf9c8383 100644 --- a/clients/client-glacier/src/GlacierClient.ts +++ b/clients/client-glacier/src/GlacierClient.ts @@ -286,6 +286,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-glacier/src/endpoints.ts b/clients/client-glacier/src/endpoints.ts index 19ccd6352a6c..434fe0f0aaf7 100644 --- a/clients/client-glacier/src/endpoints.ts +++ b/clients/client-glacier/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "glacier", diff --git a/clients/client-glacier/src/runtimeConfig.browser.ts b/clients/client-glacier/src/runtimeConfig.browser.ts index 042a0a091e43..353418568b9b 100644 --- a/clients/client-glacier/src/runtimeConfig.browser.ts +++ b/clients/client-glacier/src/runtimeConfig.browser.ts @@ -3,6 +3,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; import { bodyChecksumGenerator } from "@aws-sdk/body-checksum-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -37,6 +38,8 @@ export const getRuntimeConfig = (config: GlacierClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-glacier/src/runtimeConfig.ts b/clients/client-glacier/src/runtimeConfig.ts index 9bf5f017a955..33ba1a2c2369 100644 --- a/clients/client-glacier/src/runtimeConfig.ts +++ b/clients/client-glacier/src/runtimeConfig.ts @@ -3,7 +3,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { bodyChecksumGenerator } from "@aws-sdk/body-checksum-node"; import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -42,6 +47,8 @@ export const getRuntimeConfig = (config: GlacierClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts b/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts index 6c0d1b0ceb07..7676a6d8946f 100644 --- a/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts +++ b/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts @@ -371,6 +371,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-global-accelerator/src/endpoints.ts b/clients/client-global-accelerator/src/endpoints.ts index 2669806437aa..dc37417613de 100644 --- a/clients/client-global-accelerator/src/endpoints.ts +++ b/clients/client-global-accelerator/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "globalaccelerator", diff --git a/clients/client-global-accelerator/src/runtimeConfig.browser.ts b/clients/client-global-accelerator/src/runtimeConfig.browser.ts index 8effacc3ee6d..1b69efb59763 100644 --- a/clients/client-global-accelerator/src/runtimeConfig.browser.ts +++ b/clients/client-global-accelerator/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: GlobalAcceleratorClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-global-accelerator/src/runtimeConfig.ts b/clients/client-global-accelerator/src/runtimeConfig.ts index 5e9532571a09..4c85484ff998 100644 --- a/clients/client-global-accelerator/src/runtimeConfig.ts +++ b/clients/client-global-accelerator/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: GlobalAcceleratorClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-glue/src/GlueClient.ts b/clients/client-glue/src/GlueClient.ts index f878f3018c4e..9dfdef316a4e 100644 --- a/clients/client-glue/src/GlueClient.ts +++ b/clients/client-glue/src/GlueClient.ts @@ -776,6 +776,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-glue/src/endpoints.ts b/clients/client-glue/src/endpoints.ts index 44721f874b90..d5e94d5865fb 100644 --- a/clients/client-glue/src/endpoints.ts +++ b/clients/client-glue/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "glue", diff --git a/clients/client-glue/src/runtimeConfig.browser.ts b/clients/client-glue/src/runtimeConfig.browser.ts index 2a76b9c1505c..2982907635ad 100644 --- a/clients/client-glue/src/runtimeConfig.browser.ts +++ b/clients/client-glue/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: GlueClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-glue/src/runtimeConfig.ts b/clients/client-glue/src/runtimeConfig.ts index 6383857a68e5..f524c3bf3a14 100644 --- a/clients/client-glue/src/runtimeConfig.ts +++ b/clients/client-glue/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: GlueClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-grafana/src/GrafanaClient.ts b/clients/client-grafana/src/GrafanaClient.ts index 5b5c084a4f47..a2981558a16e 100644 --- a/clients/client-grafana/src/GrafanaClient.ts +++ b/clients/client-grafana/src/GrafanaClient.ts @@ -179,6 +179,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-grafana/src/endpoints.ts b/clients/client-grafana/src/endpoints.ts index e4b0adb4e401..91d839c94d74 100644 --- a/clients/client-grafana/src/endpoints.ts +++ b/clients/client-grafana/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "ap-northeast-1": { @@ -94,7 +94,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "grafana", diff --git a/clients/client-grafana/src/runtimeConfig.browser.ts b/clients/client-grafana/src/runtimeConfig.browser.ts index af3776989af8..ed4c95fa4d4f 100644 --- a/clients/client-grafana/src/runtimeConfig.browser.ts +++ b/clients/client-grafana/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: GrafanaClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-grafana/src/runtimeConfig.ts b/clients/client-grafana/src/runtimeConfig.ts index dae6954f8484..5f38e78521b7 100644 --- a/clients/client-grafana/src/runtimeConfig.ts +++ b/clients/client-grafana/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: GrafanaClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-greengrass/src/GreengrassClient.ts b/clients/client-greengrass/src/GreengrassClient.ts index 1eb0ad6ac218..26867a73b5a3 100644 --- a/clients/client-greengrass/src/GreengrassClient.ts +++ b/clients/client-greengrass/src/GreengrassClient.ts @@ -641,6 +641,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-greengrass/src/endpoints.ts b/clients/client-greengrass/src/endpoints.ts index 081bb5577d7e..de25d3f5a2e4 100644 --- a/clients/client-greengrass/src/endpoints.ts +++ b/clients/client-greengrass/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "dataplane-us-gov-east-1": { @@ -80,7 +80,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "greengrass", diff --git a/clients/client-greengrass/src/runtimeConfig.browser.ts b/clients/client-greengrass/src/runtimeConfig.browser.ts index 8faf49ddb653..537bc8ac9567 100644 --- a/clients/client-greengrass/src/runtimeConfig.browser.ts +++ b/clients/client-greengrass/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: GreengrassClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-greengrass/src/runtimeConfig.ts b/clients/client-greengrass/src/runtimeConfig.ts index 1cfc9afde92a..cfe439680401 100644 --- a/clients/client-greengrass/src/runtimeConfig.ts +++ b/clients/client-greengrass/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: GreengrassClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-greengrassv2/src/GreengrassV2Client.ts b/clients/client-greengrassv2/src/GreengrassV2Client.ts index 3236c79a898a..5b10ec439aa5 100644 --- a/clients/client-greengrassv2/src/GreengrassV2Client.ts +++ b/clients/client-greengrassv2/src/GreengrassV2Client.ts @@ -236,6 +236,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-greengrassv2/src/endpoints.ts b/clients/client-greengrassv2/src/endpoints.ts index 081bb5577d7e..de25d3f5a2e4 100644 --- a/clients/client-greengrassv2/src/endpoints.ts +++ b/clients/client-greengrassv2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "dataplane-us-gov-east-1": { @@ -80,7 +80,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "greengrass", diff --git a/clients/client-greengrassv2/src/runtimeConfig.browser.ts b/clients/client-greengrassv2/src/runtimeConfig.browser.ts index d921dd94901c..8a5b15637398 100644 --- a/clients/client-greengrassv2/src/runtimeConfig.browser.ts +++ b/clients/client-greengrassv2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: GreengrassV2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-greengrassv2/src/runtimeConfig.ts b/clients/client-greengrassv2/src/runtimeConfig.ts index 368b31b55bda..d23f767a64f9 100644 --- a/clients/client-greengrassv2/src/runtimeConfig.ts +++ b/clients/client-greengrassv2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: GreengrassV2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-groundstation/src/GroundStationClient.ts b/clients/client-groundstation/src/GroundStationClient.ts index 4e08bbc12adb..aa4a2ae5d266 100644 --- a/clients/client-groundstation/src/GroundStationClient.ts +++ b/clients/client-groundstation/src/GroundStationClient.ts @@ -239,6 +239,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-groundstation/src/endpoints.ts b/clients/client-groundstation/src/endpoints.ts index fd25a84ee044..7d84b83f7fd2 100644 --- a/clients/client-groundstation/src/endpoints.ts +++ b/clients/client-groundstation/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -69,7 +69,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "groundstation", diff --git a/clients/client-groundstation/src/runtimeConfig.browser.ts b/clients/client-groundstation/src/runtimeConfig.browser.ts index d5e1e31088d3..61596f9d0d10 100644 --- a/clients/client-groundstation/src/runtimeConfig.browser.ts +++ b/clients/client-groundstation/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: GroundStationClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-groundstation/src/runtimeConfig.ts b/clients/client-groundstation/src/runtimeConfig.ts index 05ac5f5b00bf..bb601a7fa432 100644 --- a/clients/client-groundstation/src/runtimeConfig.ts +++ b/clients/client-groundstation/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: GroundStationClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-guardduty/src/GuardDutyClient.ts b/clients/client-guardduty/src/GuardDutyClient.ts index ca9f06034c02..70e2c4e00563 100644 --- a/clients/client-guardduty/src/GuardDutyClient.ts +++ b/clients/client-guardduty/src/GuardDutyClient.ts @@ -383,6 +383,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-guardduty/src/endpoints.ts b/clients/client-guardduty/src/endpoints.ts index 9aa49dd5e5de..25cb3ced8972 100644 --- a/clients/client-guardduty/src/endpoints.ts +++ b/clients/client-guardduty/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "guardduty", diff --git a/clients/client-guardduty/src/runtimeConfig.browser.ts b/clients/client-guardduty/src/runtimeConfig.browser.ts index a35d88df3762..fb4774b8f299 100644 --- a/clients/client-guardduty/src/runtimeConfig.browser.ts +++ b/clients/client-guardduty/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: GuardDutyClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-guardduty/src/runtimeConfig.ts b/clients/client-guardduty/src/runtimeConfig.ts index 7a9e8def4fe5..9ebcaf3d8575 100644 --- a/clients/client-guardduty/src/runtimeConfig.ts +++ b/clients/client-guardduty/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: GuardDutyClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-health/src/HealthClient.ts b/clients/client-health/src/HealthClient.ts index eb506de1f0e5..8c14909e7cdb 100644 --- a/clients/client-health/src/HealthClient.ts +++ b/clients/client-health/src/HealthClient.ts @@ -209,6 +209,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-health/src/endpoints.ts b/clients/client-health/src/endpoints.ts index 7175eea6007e..bbb9dcc18557 100644 --- a/clients/client-health/src/endpoints.ts +++ b/clients/client-health/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-2": { @@ -63,7 +63,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "health", diff --git a/clients/client-health/src/runtimeConfig.browser.ts b/clients/client-health/src/runtimeConfig.browser.ts index 51c2f82c33d8..3b87523669ce 100644 --- a/clients/client-health/src/runtimeConfig.browser.ts +++ b/clients/client-health/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: HealthClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-health/src/runtimeConfig.ts b/clients/client-health/src/runtimeConfig.ts index 3aaed5e0bfab..b6bf1365d898 100644 --- a/clients/client-health/src/runtimeConfig.ts +++ b/clients/client-health/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: HealthClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-healthlake/src/HealthLakeClient.ts b/clients/client-healthlake/src/HealthLakeClient.ts index 8983b3568dae..b95e9aa488f2 100644 --- a/clients/client-healthlake/src/HealthLakeClient.ts +++ b/clients/client-healthlake/src/HealthLakeClient.ts @@ -194,6 +194,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-healthlake/src/endpoints.ts b/clients/client-healthlake/src/endpoints.ts index aa67727afc7a..bf4361818da5 100644 --- a/clients/client-healthlake/src/endpoints.ts +++ b/clients/client-healthlake/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "healthlake", diff --git a/clients/client-healthlake/src/runtimeConfig.browser.ts b/clients/client-healthlake/src/runtimeConfig.browser.ts index 8cb91b43de56..56c969eaccff 100644 --- a/clients/client-healthlake/src/runtimeConfig.browser.ts +++ b/clients/client-healthlake/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: HealthLakeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-healthlake/src/runtimeConfig.ts b/clients/client-healthlake/src/runtimeConfig.ts index c2ba0319d708..f1229c048c5a 100644 --- a/clients/client-healthlake/src/runtimeConfig.ts +++ b/clients/client-healthlake/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: HealthLakeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-honeycode/src/HoneycodeClient.ts b/clients/client-honeycode/src/HoneycodeClient.ts index 281572c57786..6186d5412056 100644 --- a/clients/client-honeycode/src/HoneycodeClient.ts +++ b/clients/client-honeycode/src/HoneycodeClient.ts @@ -194,6 +194,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-honeycode/src/endpoints.ts b/clients/client-honeycode/src/endpoints.ts index 70cd4492db5b..019bbe57cdf1 100644 --- a/clients/client-honeycode/src/endpoints.ts +++ b/clients/client-honeycode/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "honeycode", diff --git a/clients/client-honeycode/src/runtimeConfig.browser.ts b/clients/client-honeycode/src/runtimeConfig.browser.ts index f19c0bc10310..12429f51a148 100644 --- a/clients/client-honeycode/src/runtimeConfig.browser.ts +++ b/clients/client-honeycode/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: HoneycodeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-honeycode/src/runtimeConfig.ts b/clients/client-honeycode/src/runtimeConfig.ts index 6bee162048fc..5c0d60782717 100644 --- a/clients/client-honeycode/src/runtimeConfig.ts +++ b/clients/client-honeycode/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: HoneycodeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iam/src/IAMClient.ts b/clients/client-iam/src/IAMClient.ts index aeef2897ed2d..2dcd2a2aab32 100644 --- a/clients/client-iam/src/IAMClient.ts +++ b/clients/client-iam/src/IAMClient.ts @@ -836,6 +836,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iam/src/endpoints.ts b/clients/client-iam/src/endpoints.ts index 11a3989153d7..f15dbb9440ea 100644 --- a/clients/client-iam/src/endpoints.ts +++ b/clients/client-iam/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-cn-global": { @@ -84,7 +84,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iam", diff --git a/clients/client-iam/src/runtimeConfig.browser.ts b/clients/client-iam/src/runtimeConfig.browser.ts index cdbbad0b69df..74ed42784a6b 100644 --- a/clients/client-iam/src/runtimeConfig.browser.ts +++ b/clients/client-iam/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IAMClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iam/src/runtimeConfig.ts b/clients/client-iam/src/runtimeConfig.ts index 843a2c3ebe4d..3a2fefa17294 100644 --- a/clients/client-iam/src/runtimeConfig.ts +++ b/clients/client-iam/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IAMClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-identitystore/src/IdentitystoreClient.ts b/clients/client-identitystore/src/IdentitystoreClient.ts index 00f3d0538a38..5d22bd65c179 100644 --- a/clients/client-identitystore/src/IdentitystoreClient.ts +++ b/clients/client-identitystore/src/IdentitystoreClient.ts @@ -149,6 +149,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-identitystore/src/endpoints.ts b/clients/client-identitystore/src/endpoints.ts index 879e286537bd..d9f5ddf22952 100644 --- a/clients/client-identitystore/src/endpoints.ts +++ b/clients/client-identitystore/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-gov-west-1": { @@ -58,7 +58,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "identitystore", diff --git a/clients/client-identitystore/src/runtimeConfig.browser.ts b/clients/client-identitystore/src/runtimeConfig.browser.ts index 4b12b16dcaf5..f8016a54fc9d 100644 --- a/clients/client-identitystore/src/runtimeConfig.browser.ts +++ b/clients/client-identitystore/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IdentitystoreClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-identitystore/src/runtimeConfig.ts b/clients/client-identitystore/src/runtimeConfig.ts index f0a661ba3b94..578ed99f7199 100644 --- a/clients/client-identitystore/src/runtimeConfig.ts +++ b/clients/client-identitystore/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IdentitystoreClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-imagebuilder/src/ImagebuilderClient.ts b/clients/client-imagebuilder/src/ImagebuilderClient.ts index 6d902a2af3e3..e830635a95ae 100644 --- a/clients/client-imagebuilder/src/ImagebuilderClient.ts +++ b/clients/client-imagebuilder/src/ImagebuilderClient.ts @@ -362,6 +362,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-imagebuilder/src/endpoints.ts b/clients/client-imagebuilder/src/endpoints.ts index d4bc3dcc3bbe..e5b54aac8966 100644 --- a/clients/client-imagebuilder/src/endpoints.ts +++ b/clients/client-imagebuilder/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "imagebuilder", diff --git a/clients/client-imagebuilder/src/runtimeConfig.browser.ts b/clients/client-imagebuilder/src/runtimeConfig.browser.ts index ea1801871268..8ee2c3d83106 100644 --- a/clients/client-imagebuilder/src/runtimeConfig.browser.ts +++ b/clients/client-imagebuilder/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ImagebuilderClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-imagebuilder/src/runtimeConfig.ts b/clients/client-imagebuilder/src/runtimeConfig.ts index fd196e2b6d8c..1c06c6739d06 100644 --- a/clients/client-imagebuilder/src/runtimeConfig.ts +++ b/clients/client-imagebuilder/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ImagebuilderClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-inspector/src/InspectorClient.ts b/clients/client-inspector/src/InspectorClient.ts index b8be7b9a6387..f4945eeba453 100644 --- a/clients/client-inspector/src/InspectorClient.ts +++ b/clients/client-inspector/src/InspectorClient.ts @@ -326,6 +326,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-inspector/src/endpoints.ts b/clients/client-inspector/src/endpoints.ts index 918525761386..42ed08a322e4 100644 --- a/clients/client-inspector/src/endpoints.ts +++ b/clients/client-inspector/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "inspector", diff --git a/clients/client-inspector/src/runtimeConfig.browser.ts b/clients/client-inspector/src/runtimeConfig.browser.ts index 2f7f7f4acbac..32c48beeaa00 100644 --- a/clients/client-inspector/src/runtimeConfig.browser.ts +++ b/clients/client-inspector/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: InspectorClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-inspector/src/runtimeConfig.ts b/clients/client-inspector/src/runtimeConfig.ts index 7f4944f48a5f..a890e93c45ba 100644 --- a/clients/client-inspector/src/runtimeConfig.ts +++ b/clients/client-inspector/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: InspectorClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-1click-devices-service/src/IoT1ClickDevicesServiceClient.ts b/clients/client-iot-1click-devices-service/src/IoT1ClickDevicesServiceClient.ts index 591ce3caea66..b0493145b012 100644 --- a/clients/client-iot-1click-devices-service/src/IoT1ClickDevicesServiceClient.ts +++ b/clients/client-iot-1click-devices-service/src/IoT1ClickDevicesServiceClient.ts @@ -188,6 +188,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iot-1click-devices-service/src/endpoints.ts b/clients/client-iot-1click-devices-service/src/endpoints.ts index fd3b7071952d..b23abc203938 100644 --- a/clients/client-iot-1click-devices-service/src/endpoints.ts +++ b/clients/client-iot-1click-devices-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iot1click", diff --git a/clients/client-iot-1click-devices-service/src/runtimeConfig.browser.ts b/clients/client-iot-1click-devices-service/src/runtimeConfig.browser.ts index 7964cf7668a8..ce35eaf23082 100644 --- a/clients/client-iot-1click-devices-service/src/runtimeConfig.browser.ts +++ b/clients/client-iot-1click-devices-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoT1ClickDevicesServiceClientConfig) => retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-1click-devices-service/src/runtimeConfig.ts b/clients/client-iot-1click-devices-service/src/runtimeConfig.ts index c29f9bf0ccdb..9211a28ba577 100644 --- a/clients/client-iot-1click-devices-service/src/runtimeConfig.ts +++ b/clients/client-iot-1click-devices-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoT1ClickDevicesServiceClientConfig) => retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-1click-projects/src/IoT1ClickProjectsClient.ts b/clients/client-iot-1click-projects/src/IoT1ClickProjectsClient.ts index a1180d47f496..128b6ee60840 100644 --- a/clients/client-iot-1click-projects/src/IoT1ClickProjectsClient.ts +++ b/clients/client-iot-1click-projects/src/IoT1ClickProjectsClient.ts @@ -197,6 +197,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iot-1click-projects/src/endpoints.ts b/clients/client-iot-1click-projects/src/endpoints.ts index 3eb3c308c7fd..d53a80fc2ea6 100644 --- a/clients/client-iot-1click-projects/src/endpoints.ts +++ b/clients/client-iot-1click-projects/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iot1click", diff --git a/clients/client-iot-1click-projects/src/runtimeConfig.browser.ts b/clients/client-iot-1click-projects/src/runtimeConfig.browser.ts index 3098b9a229b9..affaccbdb792 100644 --- a/clients/client-iot-1click-projects/src/runtimeConfig.browser.ts +++ b/clients/client-iot-1click-projects/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoT1ClickProjectsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-1click-projects/src/runtimeConfig.ts b/clients/client-iot-1click-projects/src/runtimeConfig.ts index ed157068a13e..b4de55b91c85 100644 --- a/clients/client-iot-1click-projects/src/runtimeConfig.ts +++ b/clients/client-iot-1click-projects/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoT1ClickProjectsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-data-plane/src/IoTDataPlaneClient.ts b/clients/client-iot-data-plane/src/IoTDataPlaneClient.ts index 37e223d530df..c9b76c2e1557 100644 --- a/clients/client-iot-data-plane/src/IoTDataPlaneClient.ts +++ b/clients/client-iot-data-plane/src/IoTDataPlaneClient.ts @@ -164,6 +164,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iot-data-plane/src/endpoints.ts b/clients/client-iot-data-plane/src/endpoints.ts index 4a56b4c6417f..5b1549ebb2b3 100644 --- a/clients/client-iot-data-plane/src/endpoints.ts +++ b/clients/client-iot-data-plane/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotdata", diff --git a/clients/client-iot-data-plane/src/runtimeConfig.browser.ts b/clients/client-iot-data-plane/src/runtimeConfig.browser.ts index 4d5c2a90257e..500d6a4ee927 100644 --- a/clients/client-iot-data-plane/src/runtimeConfig.browser.ts +++ b/clients/client-iot-data-plane/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTDataPlaneClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-data-plane/src/runtimeConfig.ts b/clients/client-iot-data-plane/src/runtimeConfig.ts index 9e1192e24cd9..7d4d4eaa1be1 100644 --- a/clients/client-iot-data-plane/src/runtimeConfig.ts +++ b/clients/client-iot-data-plane/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTDataPlaneClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-events-data/src/IoTEventsDataClient.ts b/clients/client-iot-events-data/src/IoTEventsDataClient.ts index 1e9ae45f1268..9a1119b48144 100644 --- a/clients/client-iot-events-data/src/IoTEventsDataClient.ts +++ b/clients/client-iot-events-data/src/IoTEventsDataClient.ts @@ -176,6 +176,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iot-events-data/src/endpoints.ts b/clients/client-iot-events-data/src/endpoints.ts index 5fa307100c6b..34befd3539d3 100644 --- a/clients/client-iot-events-data/src/endpoints.ts +++ b/clients/client-iot-events-data/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ioteventsdata", diff --git a/clients/client-iot-events-data/src/runtimeConfig.browser.ts b/clients/client-iot-events-data/src/runtimeConfig.browser.ts index e36077f908a5..c8aee4eb4ad1 100644 --- a/clients/client-iot-events-data/src/runtimeConfig.browser.ts +++ b/clients/client-iot-events-data/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTEventsDataClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-events-data/src/runtimeConfig.ts b/clients/client-iot-events-data/src/runtimeConfig.ts index 6e7ca97ca78d..453dba0aa97b 100644 --- a/clients/client-iot-events-data/src/runtimeConfig.ts +++ b/clients/client-iot-events-data/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTEventsDataClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-events/src/IoTEventsClient.ts b/clients/client-iot-events/src/IoTEventsClient.ts index 8d9a7dcf2ec9..2b285f1d43d7 100644 --- a/clients/client-iot-events/src/IoTEventsClient.ts +++ b/clients/client-iot-events/src/IoTEventsClient.ts @@ -248,6 +248,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iot-events/src/endpoints.ts b/clients/client-iot-events/src/endpoints.ts index 77bac0ff9d81..445c43b98d69 100644 --- a/clients/client-iot-events/src/endpoints.ts +++ b/clients/client-iot-events/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotevents", diff --git a/clients/client-iot-events/src/runtimeConfig.browser.ts b/clients/client-iot-events/src/runtimeConfig.browser.ts index d7aceacdcd05..66edf74fdf40 100644 --- a/clients/client-iot-events/src/runtimeConfig.browser.ts +++ b/clients/client-iot-events/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTEventsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-events/src/runtimeConfig.ts b/clients/client-iot-events/src/runtimeConfig.ts index 303f65c8fa83..d5eab3489884 100644 --- a/clients/client-iot-events/src/runtimeConfig.ts +++ b/clients/client-iot-events/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTEventsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-jobs-data-plane/src/IoTJobsDataPlaneClient.ts b/clients/client-iot-jobs-data-plane/src/IoTJobsDataPlaneClient.ts index f265a06748ab..465488b7463c 100644 --- a/clients/client-iot-jobs-data-plane/src/IoTJobsDataPlaneClient.ts +++ b/clients/client-iot-jobs-data-plane/src/IoTJobsDataPlaneClient.ts @@ -158,6 +158,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iot-jobs-data-plane/src/endpoints.ts b/clients/client-iot-jobs-data-plane/src/endpoints.ts index 2c130d448e8b..aae166095ad9 100644 --- a/clients/client-iot-jobs-data-plane/src/endpoints.ts +++ b/clients/client-iot-jobs-data-plane/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iot-jobs-data", diff --git a/clients/client-iot-jobs-data-plane/src/runtimeConfig.browser.ts b/clients/client-iot-jobs-data-plane/src/runtimeConfig.browser.ts index 82915d453d40..10051075b74d 100644 --- a/clients/client-iot-jobs-data-plane/src/runtimeConfig.browser.ts +++ b/clients/client-iot-jobs-data-plane/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTJobsDataPlaneClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-jobs-data-plane/src/runtimeConfig.ts b/clients/client-iot-jobs-data-plane/src/runtimeConfig.ts index eb6a52bdf2cb..b786b8e10792 100644 --- a/clients/client-iot-jobs-data-plane/src/runtimeConfig.ts +++ b/clients/client-iot-jobs-data-plane/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTJobsDataPlaneClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-wireless/src/IoTWirelessClient.ts b/clients/client-iot-wireless/src/IoTWirelessClient.ts index 2942736be611..4fd6274f9070 100644 --- a/clients/client-iot-wireless/src/IoTWirelessClient.ts +++ b/clients/client-iot-wireless/src/IoTWirelessClient.ts @@ -434,6 +434,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iot-wireless/src/endpoints.ts b/clients/client-iot-wireless/src/endpoints.ts index c590a5409acf..72daa9372a76 100644 --- a/clients/client-iot-wireless/src/endpoints.ts +++ b/clients/client-iot-wireless/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotwireless", diff --git a/clients/client-iot-wireless/src/runtimeConfig.browser.ts b/clients/client-iot-wireless/src/runtimeConfig.browser.ts index 12f009d6caea..13804fc9cc72 100644 --- a/clients/client-iot-wireless/src/runtimeConfig.browser.ts +++ b/clients/client-iot-wireless/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTWirelessClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot-wireless/src/runtimeConfig.ts b/clients/client-iot-wireless/src/runtimeConfig.ts index b2eb9b43089e..91ddffb5ea12 100644 --- a/clients/client-iot-wireless/src/runtimeConfig.ts +++ b/clients/client-iot-wireless/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTWirelessClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot/src/IoTClient.ts b/clients/client-iot/src/IoTClient.ts index 42428476103b..2da5bb030fe7 100644 --- a/clients/client-iot/src/IoTClient.ts +++ b/clients/client-iot/src/IoTClient.ts @@ -1247,6 +1247,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iot/src/endpoints.ts b/clients/client-iot/src/endpoints.ts index c03bcf0ba2aa..d03e34703307 100644 --- a/clients/client-iot/src/endpoints.ts +++ b/clients/client-iot/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "execute-api", diff --git a/clients/client-iot/src/runtimeConfig.browser.ts b/clients/client-iot/src/runtimeConfig.browser.ts index c75f60f13518..15316b7baa28 100644 --- a/clients/client-iot/src/runtimeConfig.browser.ts +++ b/clients/client-iot/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iot/src/runtimeConfig.ts b/clients/client-iot/src/runtimeConfig.ts index 1d50618b6b5c..eca8c19666f4 100644 --- a/clients/client-iot/src/runtimeConfig.ts +++ b/clients/client-iot/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotanalytics/src/IoTAnalyticsClient.ts b/clients/client-iotanalytics/src/IoTAnalyticsClient.ts index e13909c4acfa..9d96de5b572a 100644 --- a/clients/client-iotanalytics/src/IoTAnalyticsClient.ts +++ b/clients/client-iotanalytics/src/IoTAnalyticsClient.ts @@ -263,6 +263,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iotanalytics/src/endpoints.ts b/clients/client-iotanalytics/src/endpoints.ts index 59d07ca7f4b8..3a7dfa9a29e2 100644 --- a/clients/client-iotanalytics/src/endpoints.ts +++ b/clients/client-iotanalytics/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotanalytics", diff --git a/clients/client-iotanalytics/src/runtimeConfig.browser.ts b/clients/client-iotanalytics/src/runtimeConfig.browser.ts index 8d57d4167882..d0e267af53f1 100644 --- a/clients/client-iotanalytics/src/runtimeConfig.browser.ts +++ b/clients/client-iotanalytics/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTAnalyticsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotanalytics/src/runtimeConfig.ts b/clients/client-iotanalytics/src/runtimeConfig.ts index b90539a5f464..fdc659c2a793 100644 --- a/clients/client-iotanalytics/src/runtimeConfig.ts +++ b/clients/client-iotanalytics/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTAnalyticsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts b/clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts index 85c61d4c075e..16a1e14a1ddb 100644 --- a/clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts +++ b/clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts @@ -191,6 +191,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iotdeviceadvisor/src/endpoints.ts b/clients/client-iotdeviceadvisor/src/endpoints.ts index 3950d073f235..d5fab7b01197 100644 --- a/clients/client-iotdeviceadvisor/src/endpoints.ts +++ b/clients/client-iotdeviceadvisor/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotdeviceadvisor", diff --git a/clients/client-iotdeviceadvisor/src/runtimeConfig.browser.ts b/clients/client-iotdeviceadvisor/src/runtimeConfig.browser.ts index 92c029e72e44..4c236f149f4c 100644 --- a/clients/client-iotdeviceadvisor/src/runtimeConfig.browser.ts +++ b/clients/client-iotdeviceadvisor/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IotDeviceAdvisorClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotdeviceadvisor/src/runtimeConfig.ts b/clients/client-iotdeviceadvisor/src/runtimeConfig.ts index 0620640973a5..5c1b5d5e94d8 100644 --- a/clients/client-iotdeviceadvisor/src/runtimeConfig.ts +++ b/clients/client-iotdeviceadvisor/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IotDeviceAdvisorClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotfleethub/src/IoTFleetHubClient.ts b/clients/client-iotfleethub/src/IoTFleetHubClient.ts index 321326305474..c2495c9cdd20 100644 --- a/clients/client-iotfleethub/src/IoTFleetHubClient.ts +++ b/clients/client-iotfleethub/src/IoTFleetHubClient.ts @@ -167,6 +167,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iotfleethub/src/endpoints.ts b/clients/client-iotfleethub/src/endpoints.ts index 4514cc998432..4f6400fc4db0 100644 --- a/clients/client-iotfleethub/src/endpoints.ts +++ b/clients/client-iotfleethub/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -74,7 +74,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotfleethub", diff --git a/clients/client-iotfleethub/src/runtimeConfig.browser.ts b/clients/client-iotfleethub/src/runtimeConfig.browser.ts index 8cbb9e4364ef..bb4f1e0d867c 100644 --- a/clients/client-iotfleethub/src/runtimeConfig.browser.ts +++ b/clients/client-iotfleethub/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTFleetHubClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotfleethub/src/runtimeConfig.ts b/clients/client-iotfleethub/src/runtimeConfig.ts index ebf10eac9441..8e36231f0c21 100644 --- a/clients/client-iotfleethub/src/runtimeConfig.ts +++ b/clients/client-iotfleethub/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTFleetHubClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotsecuretunneling/src/IoTSecureTunnelingClient.ts b/clients/client-iotsecuretunneling/src/IoTSecureTunnelingClient.ts index cbf3a27f8d80..88e9f01fe4c9 100644 --- a/clients/client-iotsecuretunneling/src/IoTSecureTunnelingClient.ts +++ b/clients/client-iotsecuretunneling/src/IoTSecureTunnelingClient.ts @@ -161,6 +161,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iotsecuretunneling/src/endpoints.ts b/clients/client-iotsecuretunneling/src/endpoints.ts index 70afc8c9efcb..edb1bdc68323 100644 --- a/clients/client-iotsecuretunneling/src/endpoints.ts +++ b/clients/client-iotsecuretunneling/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotsecuredtunneling", diff --git a/clients/client-iotsecuretunneling/src/runtimeConfig.browser.ts b/clients/client-iotsecuretunneling/src/runtimeConfig.browser.ts index 75d8ed99c452..74451bd89b01 100644 --- a/clients/client-iotsecuretunneling/src/runtimeConfig.browser.ts +++ b/clients/client-iotsecuretunneling/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTSecureTunnelingClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotsecuretunneling/src/runtimeConfig.ts b/clients/client-iotsecuretunneling/src/runtimeConfig.ts index 6133f63b9e1f..46f5c8448b3d 100644 --- a/clients/client-iotsecuretunneling/src/runtimeConfig.ts +++ b/clients/client-iotsecuretunneling/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTSecureTunnelingClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotsitewise/src/IoTSiteWiseClient.ts b/clients/client-iotsitewise/src/IoTSiteWiseClient.ts index c34a36e1b8f1..44675c90e9c9 100644 --- a/clients/client-iotsitewise/src/IoTSiteWiseClient.ts +++ b/clients/client-iotsitewise/src/IoTSiteWiseClient.ts @@ -377,6 +377,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iotsitewise/src/endpoints.ts b/clients/client-iotsitewise/src/endpoints.ts index 844351847365..b32f8fc82eb5 100644 --- a/clients/client-iotsitewise/src/endpoints.ts +++ b/clients/client-iotsitewise/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotsitewise", diff --git a/clients/client-iotsitewise/src/runtimeConfig.browser.ts b/clients/client-iotsitewise/src/runtimeConfig.browser.ts index 29568f72c529..f78c18ffb1a0 100644 --- a/clients/client-iotsitewise/src/runtimeConfig.browser.ts +++ b/clients/client-iotsitewise/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTSiteWiseClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotsitewise/src/runtimeConfig.ts b/clients/client-iotsitewise/src/runtimeConfig.ts index 73f4e684e671..72b49482c75f 100644 --- a/clients/client-iotsitewise/src/runtimeConfig.ts +++ b/clients/client-iotsitewise/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTSiteWiseClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotthingsgraph/src/IoTThingsGraphClient.ts b/clients/client-iotthingsgraph/src/IoTThingsGraphClient.ts index b7d10f32d570..14f3c9ad1bca 100644 --- a/clients/client-iotthingsgraph/src/IoTThingsGraphClient.ts +++ b/clients/client-iotthingsgraph/src/IoTThingsGraphClient.ts @@ -305,6 +305,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-iotthingsgraph/src/endpoints.ts b/clients/client-iotthingsgraph/src/endpoints.ts index e701dd69075f..9139e8642994 100644 --- a/clients/client-iotthingsgraph/src/endpoints.ts +++ b/clients/client-iotthingsgraph/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "iotthingsgraph", diff --git a/clients/client-iotthingsgraph/src/runtimeConfig.browser.ts b/clients/client-iotthingsgraph/src/runtimeConfig.browser.ts index 6e83576e657e..e7f4729f522a 100644 --- a/clients/client-iotthingsgraph/src/runtimeConfig.browser.ts +++ b/clients/client-iotthingsgraph/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IoTThingsGraphClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-iotthingsgraph/src/runtimeConfig.ts b/clients/client-iotthingsgraph/src/runtimeConfig.ts index 284c31572420..711a62dacd80 100644 --- a/clients/client-iotthingsgraph/src/runtimeConfig.ts +++ b/clients/client-iotthingsgraph/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IoTThingsGraphClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ivs/src/IvsClient.ts b/clients/client-ivs/src/IvsClient.ts index 7545717c8577..afff1cafc37c 100644 --- a/clients/client-ivs/src/IvsClient.ts +++ b/clients/client-ivs/src/IvsClient.ts @@ -239,6 +239,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ivs/src/endpoints.ts b/clients/client-ivs/src/endpoints.ts index 1b333aa968ce..8847c87b6ada 100644 --- a/clients/client-ivs/src/endpoints.ts +++ b/clients/client-ivs/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ivs", diff --git a/clients/client-ivs/src/runtimeConfig.browser.ts b/clients/client-ivs/src/runtimeConfig.browser.ts index 026e408e40f2..f4233056eeb9 100644 --- a/clients/client-ivs/src/runtimeConfig.browser.ts +++ b/clients/client-ivs/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: IvsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ivs/src/runtimeConfig.ts b/clients/client-ivs/src/runtimeConfig.ts index 65b2d7592b63..815bd53ab81d 100644 --- a/clients/client-ivs/src/runtimeConfig.ts +++ b/clients/client-ivs/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: IvsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kafka/src/KafkaClient.ts b/clients/client-kafka/src/KafkaClient.ts index 1997302e2c36..76d6c9089012 100644 --- a/clients/client-kafka/src/KafkaClient.ts +++ b/clients/client-kafka/src/KafkaClient.ts @@ -278,6 +278,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kafka/src/endpoints.ts b/clients/client-kafka/src/endpoints.ts index 918585051bcb..fbcf02204619 100644 --- a/clients/client-kafka/src/endpoints.ts +++ b/clients/client-kafka/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kafka", diff --git a/clients/client-kafka/src/runtimeConfig.browser.ts b/clients/client-kafka/src/runtimeConfig.browser.ts index 0ced4be64c1e..31cbe30a4a22 100644 --- a/clients/client-kafka/src/runtimeConfig.browser.ts +++ b/clients/client-kafka/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KafkaClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kafka/src/runtimeConfig.ts b/clients/client-kafka/src/runtimeConfig.ts index da639222e953..2fcf98b2e2c7 100644 --- a/clients/client-kafka/src/runtimeConfig.ts +++ b/clients/client-kafka/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KafkaClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kafkaconnect/src/KafkaConnectClient.ts b/clients/client-kafkaconnect/src/KafkaConnectClient.ts index 58796ee1ddb2..2594d68c6f79 100644 --- a/clients/client-kafkaconnect/src/KafkaConnectClient.ts +++ b/clients/client-kafkaconnect/src/KafkaConnectClient.ts @@ -182,6 +182,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kafkaconnect/src/endpoints.ts b/clients/client-kafkaconnect/src/endpoints.ts index 4af12c5f00bd..a49af3b2151e 100644 --- a/clients/client-kafkaconnect/src/endpoints.ts +++ b/clients/client-kafkaconnect/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kafkaconnect", diff --git a/clients/client-kafkaconnect/src/runtimeConfig.browser.ts b/clients/client-kafkaconnect/src/runtimeConfig.browser.ts index 99f20464620b..769b94990c45 100644 --- a/clients/client-kafkaconnect/src/runtimeConfig.browser.ts +++ b/clients/client-kafkaconnect/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KafkaConnectClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kafkaconnect/src/runtimeConfig.ts b/clients/client-kafkaconnect/src/runtimeConfig.ts index 71d9b28e8ff5..4f1708442bd4 100644 --- a/clients/client-kafkaconnect/src/runtimeConfig.ts +++ b/clients/client-kafkaconnect/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KafkaConnectClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kendra/src/KendraClient.ts b/clients/client-kendra/src/KendraClient.ts index e6a977d7ade0..795d2539d4eb 100644 --- a/clients/client-kendra/src/KendraClient.ts +++ b/clients/client-kendra/src/KendraClient.ts @@ -323,6 +323,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kendra/src/endpoints.ts b/clients/client-kendra/src/endpoints.ts index 4f0ae4899f8d..b5746e068885 100644 --- a/clients/client-kendra/src/endpoints.ts +++ b/clients/client-kendra/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -73,7 +73,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kendra", diff --git a/clients/client-kendra/src/runtimeConfig.browser.ts b/clients/client-kendra/src/runtimeConfig.browser.ts index 3916490fefe3..fa489244ee5f 100644 --- a/clients/client-kendra/src/runtimeConfig.browser.ts +++ b/clients/client-kendra/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KendraClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kendra/src/runtimeConfig.ts b/clients/client-kendra/src/runtimeConfig.ts index 0b05be2e10ad..9c4dc8ffccf9 100644 --- a/clients/client-kendra/src/runtimeConfig.ts +++ b/clients/client-kendra/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KendraClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-analytics-v2/src/KinesisAnalyticsV2Client.ts b/clients/client-kinesis-analytics-v2/src/KinesisAnalyticsV2Client.ts index a573c0f84e70..9d54c0747396 100644 --- a/clients/client-kinesis-analytics-v2/src/KinesisAnalyticsV2Client.ts +++ b/clients/client-kinesis-analytics-v2/src/KinesisAnalyticsV2Client.ts @@ -299,6 +299,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kinesis-analytics-v2/src/endpoints.ts b/clients/client-kinesis-analytics-v2/src/endpoints.ts index 4b0fec194fab..18fa326b08f0 100644 --- a/clients/client-kinesis-analytics-v2/src/endpoints.ts +++ b/clients/client-kinesis-analytics-v2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kinesisanalytics", diff --git a/clients/client-kinesis-analytics-v2/src/runtimeConfig.browser.ts b/clients/client-kinesis-analytics-v2/src/runtimeConfig.browser.ts index 4bf84a8306d3..e9c83e004296 100644 --- a/clients/client-kinesis-analytics-v2/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-analytics-v2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KinesisAnalyticsV2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-analytics-v2/src/runtimeConfig.ts b/clients/client-kinesis-analytics-v2/src/runtimeConfig.ts index a1a5e0c94bc4..513e91ed776d 100644 --- a/clients/client-kinesis-analytics-v2/src/runtimeConfig.ts +++ b/clients/client-kinesis-analytics-v2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KinesisAnalyticsV2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-analytics/src/KinesisAnalyticsClient.ts b/clients/client-kinesis-analytics/src/KinesisAnalyticsClient.ts index 57f5db1ae46c..bcdc6709deb8 100644 --- a/clients/client-kinesis-analytics/src/KinesisAnalyticsClient.ts +++ b/clients/client-kinesis-analytics/src/KinesisAnalyticsClient.ts @@ -233,6 +233,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kinesis-analytics/src/endpoints.ts b/clients/client-kinesis-analytics/src/endpoints.ts index 4b0fec194fab..18fa326b08f0 100644 --- a/clients/client-kinesis-analytics/src/endpoints.ts +++ b/clients/client-kinesis-analytics/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kinesisanalytics", diff --git a/clients/client-kinesis-analytics/src/runtimeConfig.browser.ts b/clients/client-kinesis-analytics/src/runtimeConfig.browser.ts index 388a6954d397..8249e837235a 100644 --- a/clients/client-kinesis-analytics/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-analytics/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KinesisAnalyticsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-analytics/src/runtimeConfig.ts b/clients/client-kinesis-analytics/src/runtimeConfig.ts index f480b8b03cf8..4d2a4cebbf2a 100644 --- a/clients/client-kinesis-analytics/src/runtimeConfig.ts +++ b/clients/client-kinesis-analytics/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KinesisAnalyticsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-video-archived-media/src/KinesisVideoArchivedMediaClient.ts b/clients/client-kinesis-video-archived-media/src/KinesisVideoArchivedMediaClient.ts index 56067cd37d42..3a99fbce4726 100644 --- a/clients/client-kinesis-video-archived-media/src/KinesisVideoArchivedMediaClient.ts +++ b/clients/client-kinesis-video-archived-media/src/KinesisVideoArchivedMediaClient.ts @@ -161,6 +161,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kinesis-video-archived-media/src/endpoints.ts b/clients/client-kinesis-video-archived-media/src/endpoints.ts index 85db15fb72c6..1462ba68a137 100644 --- a/clients/client-kinesis-video-archived-media/src/endpoints.ts +++ b/clients/client-kinesis-video-archived-media/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kinesisvideo", diff --git a/clients/client-kinesis-video-archived-media/src/runtimeConfig.browser.ts b/clients/client-kinesis-video-archived-media/src/runtimeConfig.browser.ts index b52c4d44ccb6..e0fb59d21fa2 100644 --- a/clients/client-kinesis-video-archived-media/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-archived-media/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KinesisVideoArchivedMediaClientConfig) retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-video-archived-media/src/runtimeConfig.ts b/clients/client-kinesis-video-archived-media/src/runtimeConfig.ts index 877348a78896..6d76bc96e3f1 100644 --- a/clients/client-kinesis-video-archived-media/src/runtimeConfig.ts +++ b/clients/client-kinesis-video-archived-media/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KinesisVideoArchivedMediaClientConfig) retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-video-media/src/KinesisVideoMediaClient.ts b/clients/client-kinesis-video-media/src/KinesisVideoMediaClient.ts index 953c334dbf09..b670471313f4 100644 --- a/clients/client-kinesis-video-media/src/KinesisVideoMediaClient.ts +++ b/clients/client-kinesis-video-media/src/KinesisVideoMediaClient.ts @@ -138,6 +138,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kinesis-video-media/src/endpoints.ts b/clients/client-kinesis-video-media/src/endpoints.ts index 85db15fb72c6..1462ba68a137 100644 --- a/clients/client-kinesis-video-media/src/endpoints.ts +++ b/clients/client-kinesis-video-media/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kinesisvideo", diff --git a/clients/client-kinesis-video-media/src/runtimeConfig.browser.ts b/clients/client-kinesis-video-media/src/runtimeConfig.browser.ts index 60309d86edf8..e1c7a39de26f 100644 --- a/clients/client-kinesis-video-media/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-media/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KinesisVideoMediaClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-video-media/src/runtimeConfig.ts b/clients/client-kinesis-video-media/src/runtimeConfig.ts index 40d4b24c1665..8d009e9e618e 100644 --- a/clients/client-kinesis-video-media/src/runtimeConfig.ts +++ b/clients/client-kinesis-video-media/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KinesisVideoMediaClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-video-signaling/src/KinesisVideoSignalingClient.ts b/clients/client-kinesis-video-signaling/src/KinesisVideoSignalingClient.ts index 7da2f48b157b..8d7a858e279c 100644 --- a/clients/client-kinesis-video-signaling/src/KinesisVideoSignalingClient.ts +++ b/clients/client-kinesis-video-signaling/src/KinesisVideoSignalingClient.ts @@ -148,6 +148,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kinesis-video-signaling/src/endpoints.ts b/clients/client-kinesis-video-signaling/src/endpoints.ts index 85db15fb72c6..1462ba68a137 100644 --- a/clients/client-kinesis-video-signaling/src/endpoints.ts +++ b/clients/client-kinesis-video-signaling/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kinesisvideo", diff --git a/clients/client-kinesis-video-signaling/src/runtimeConfig.browser.ts b/clients/client-kinesis-video-signaling/src/runtimeConfig.browser.ts index 66fe3be3e77f..d540eed75b41 100644 --- a/clients/client-kinesis-video-signaling/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-signaling/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KinesisVideoSignalingClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-video-signaling/src/runtimeConfig.ts b/clients/client-kinesis-video-signaling/src/runtimeConfig.ts index 542b5586f332..b4bb1d08acc6 100644 --- a/clients/client-kinesis-video-signaling/src/runtimeConfig.ts +++ b/clients/client-kinesis-video-signaling/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KinesisVideoSignalingClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-video/src/KinesisVideoClient.ts b/clients/client-kinesis-video/src/KinesisVideoClient.ts index 0d16a80cf903..a472b28b4f1e 100644 --- a/clients/client-kinesis-video/src/KinesisVideoClient.ts +++ b/clients/client-kinesis-video/src/KinesisVideoClient.ts @@ -218,6 +218,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kinesis-video/src/endpoints.ts b/clients/client-kinesis-video/src/endpoints.ts index 85db15fb72c6..1462ba68a137 100644 --- a/clients/client-kinesis-video/src/endpoints.ts +++ b/clients/client-kinesis-video/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kinesisvideo", diff --git a/clients/client-kinesis-video/src/runtimeConfig.browser.ts b/clients/client-kinesis-video/src/runtimeConfig.browser.ts index 736fed01fbe2..56ea40998440 100644 --- a/clients/client-kinesis-video/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KinesisVideoClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis-video/src/runtimeConfig.ts b/clients/client-kinesis-video/src/runtimeConfig.ts index 2b6c0f2a3048..2343ae2abcf9 100644 --- a/clients/client-kinesis-video/src/runtimeConfig.ts +++ b/clients/client-kinesis-video/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KinesisVideoClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis/src/KinesisClient.ts b/clients/client-kinesis/src/KinesisClient.ts index deb063180da0..942a2094cf08 100644 --- a/clients/client-kinesis/src/KinesisClient.ts +++ b/clients/client-kinesis/src/KinesisClient.ts @@ -263,6 +263,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kinesis/src/endpoints.ts b/clients/client-kinesis/src/endpoints.ts index 2c5bfc811f42..1a2b2b57048c 100644 --- a/clients/client-kinesis/src/endpoints.ts +++ b/clients/client-kinesis/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kinesis", diff --git a/clients/client-kinesis/src/runtimeConfig.browser.ts b/clients/client-kinesis/src/runtimeConfig.browser.ts index cc2eabc7cb76..19cdde4d5466 100644 --- a/clients/client-kinesis/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; @@ -37,6 +38,8 @@ export const getRuntimeConfig = (config: KinesisClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kinesis/src/runtimeConfig.ts b/clients/client-kinesis/src/runtimeConfig.ts index 045ff67ae6e5..0907c971196c 100644 --- a/clients/client-kinesis/src/runtimeConfig.ts +++ b/clients/client-kinesis/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-node"; import { Hash } from "@aws-sdk/hash-node"; @@ -42,6 +47,8 @@ export const getRuntimeConfig = (config: KinesisClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kms/src/KMSClient.ts b/clients/client-kms/src/KMSClient.ts index 5976cc11f4e9..452c75e33343 100644 --- a/clients/client-kms/src/KMSClient.ts +++ b/clients/client-kms/src/KMSClient.ts @@ -329,6 +329,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-kms/src/endpoints.ts b/clients/client-kms/src/endpoints.ts index 2936f1058ef0..a073f48763cb 100644 --- a/clients/client-kms/src/endpoints.ts +++ b/clients/client-kms/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { ProdFips: { @@ -58,7 +58,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "kms", diff --git a/clients/client-kms/src/runtimeConfig.browser.ts b/clients/client-kms/src/runtimeConfig.browser.ts index cc8102543ae2..307ab2d60f5b 100644 --- a/clients/client-kms/src/runtimeConfig.browser.ts +++ b/clients/client-kms/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: KMSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-kms/src/runtimeConfig.ts b/clients/client-kms/src/runtimeConfig.ts index d795732ef97c..5d157c57dd95 100644 --- a/clients/client-kms/src/runtimeConfig.ts +++ b/clients/client-kms/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: KMSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lakeformation/src/LakeFormationClient.ts b/clients/client-lakeformation/src/LakeFormationClient.ts index 6a080c9f66d5..fba9973cd3b5 100644 --- a/clients/client-lakeformation/src/LakeFormationClient.ts +++ b/clients/client-lakeformation/src/LakeFormationClient.ts @@ -233,6 +233,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lakeformation/src/endpoints.ts b/clients/client-lakeformation/src/endpoints.ts index df5ad94dd4e2..26998ff9ca18 100644 --- a/clients/client-lakeformation/src/endpoints.ts +++ b/clients/client-lakeformation/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -78,7 +78,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lakeformation", diff --git a/clients/client-lakeformation/src/runtimeConfig.browser.ts b/clients/client-lakeformation/src/runtimeConfig.browser.ts index 5e7b4c685adc..87761d3525fd 100644 --- a/clients/client-lakeformation/src/runtimeConfig.browser.ts +++ b/clients/client-lakeformation/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LakeFormationClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lakeformation/src/runtimeConfig.ts b/clients/client-lakeformation/src/runtimeConfig.ts index 21bf25987dcd..b0aad255da6f 100644 --- a/clients/client-lakeformation/src/runtimeConfig.ts +++ b/clients/client-lakeformation/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LakeFormationClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lambda/src/LambdaClient.ts b/clients/client-lambda/src/LambdaClient.ts index 7853af4a8739..de17e940f8ae 100644 --- a/clients/client-lambda/src/LambdaClient.ts +++ b/clients/client-lambda/src/LambdaClient.ts @@ -413,6 +413,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lambda/src/endpoints.ts b/clients/client-lambda/src/endpoints.ts index d7455427a906..e346bb99e91a 100644 --- a/clients/client-lambda/src/endpoints.ts +++ b/clients/client-lambda/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lambda", diff --git a/clients/client-lambda/src/runtimeConfig.browser.ts b/clients/client-lambda/src/runtimeConfig.browser.ts index dc30f9379696..b87a60e32aae 100644 --- a/clients/client-lambda/src/runtimeConfig.browser.ts +++ b/clients/client-lambda/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LambdaClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lambda/src/runtimeConfig.ts b/clients/client-lambda/src/runtimeConfig.ts index f62d6399faf0..fc4e7c56801c 100644 --- a/clients/client-lambda/src/runtimeConfig.ts +++ b/clients/client-lambda/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LambdaClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lex-model-building-service/src/LexModelBuildingServiceClient.ts b/clients/client-lex-model-building-service/src/LexModelBuildingServiceClient.ts index e9d6cb380af8..052951c54d55 100644 --- a/clients/client-lex-model-building-service/src/LexModelBuildingServiceClient.ts +++ b/clients/client-lex-model-building-service/src/LexModelBuildingServiceClient.ts @@ -293,6 +293,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lex-model-building-service/src/endpoints.ts b/clients/client-lex-model-building-service/src/endpoints.ts index 41c1e259b61a..0f8f21ac0380 100644 --- a/clients/client-lex-model-building-service/src/endpoints.ts +++ b/clients/client-lex-model-building-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -68,7 +68,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lex", diff --git a/clients/client-lex-model-building-service/src/runtimeConfig.browser.ts b/clients/client-lex-model-building-service/src/runtimeConfig.browser.ts index 274c8d2e9a5c..96befbae5b0f 100644 --- a/clients/client-lex-model-building-service/src/runtimeConfig.browser.ts +++ b/clients/client-lex-model-building-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LexModelBuildingServiceClientConfig) => retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lex-model-building-service/src/runtimeConfig.ts b/clients/client-lex-model-building-service/src/runtimeConfig.ts index b96925495356..ebb1079b4bb3 100644 --- a/clients/client-lex-model-building-service/src/runtimeConfig.ts +++ b/clients/client-lex-model-building-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LexModelBuildingServiceClientConfig) => retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lex-models-v2/src/LexModelsV2Client.ts b/clients/client-lex-models-v2/src/LexModelsV2Client.ts index a6303b822bf3..b0907bb77abf 100644 --- a/clients/client-lex-models-v2/src/LexModelsV2Client.ts +++ b/clients/client-lex-models-v2/src/LexModelsV2Client.ts @@ -338,6 +338,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lex-models-v2/src/endpoints.ts b/clients/client-lex-models-v2/src/endpoints.ts index 2b348da74242..264972112f16 100644 --- a/clients/client-lex-models-v2/src/endpoints.ts +++ b/clients/client-lex-models-v2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lex", diff --git a/clients/client-lex-models-v2/src/runtimeConfig.browser.ts b/clients/client-lex-models-v2/src/runtimeConfig.browser.ts index 2e0c581d56d4..f28821230f84 100644 --- a/clients/client-lex-models-v2/src/runtimeConfig.browser.ts +++ b/clients/client-lex-models-v2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LexModelsV2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lex-models-v2/src/runtimeConfig.ts b/clients/client-lex-models-v2/src/runtimeConfig.ts index e27428bed8f5..b6a3a6a45030 100644 --- a/clients/client-lex-models-v2/src/runtimeConfig.ts +++ b/clients/client-lex-models-v2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LexModelsV2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lex-runtime-service/src/LexRuntimeServiceClient.ts b/clients/client-lex-runtime-service/src/LexRuntimeServiceClient.ts index 8c144c58a610..f72d49b061ea 100644 --- a/clients/client-lex-runtime-service/src/LexRuntimeServiceClient.ts +++ b/clients/client-lex-runtime-service/src/LexRuntimeServiceClient.ts @@ -152,6 +152,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lex-runtime-service/src/endpoints.ts b/clients/client-lex-runtime-service/src/endpoints.ts index 86072320870f..71a0a9ce2eb5 100644 --- a/clients/client-lex-runtime-service/src/endpoints.ts +++ b/clients/client-lex-runtime-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -68,7 +68,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lex", diff --git a/clients/client-lex-runtime-service/src/runtimeConfig.browser.ts b/clients/client-lex-runtime-service/src/runtimeConfig.browser.ts index 2f2d62ab59ed..1c3343e5fd77 100644 --- a/clients/client-lex-runtime-service/src/runtimeConfig.browser.ts +++ b/clients/client-lex-runtime-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LexRuntimeServiceClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lex-runtime-service/src/runtimeConfig.ts b/clients/client-lex-runtime-service/src/runtimeConfig.ts index cd98a80c0112..b439277611b0 100644 --- a/clients/client-lex-runtime-service/src/runtimeConfig.ts +++ b/clients/client-lex-runtime-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LexRuntimeServiceClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lex-runtime-v2/src/LexRuntimeV2Client.ts b/clients/client-lex-runtime-v2/src/LexRuntimeV2Client.ts index 05205200ead5..8e814cc37d0c 100644 --- a/clients/client-lex-runtime-v2/src/LexRuntimeV2Client.ts +++ b/clients/client-lex-runtime-v2/src/LexRuntimeV2Client.ts @@ -167,6 +167,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lex-runtime-v2/src/endpoints.ts b/clients/client-lex-runtime-v2/src/endpoints.ts index 44871334e8ff..e0fdf1dc793f 100644 --- a/clients/client-lex-runtime-v2/src/endpoints.ts +++ b/clients/client-lex-runtime-v2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lex", diff --git a/clients/client-lex-runtime-v2/src/runtimeConfig.browser.ts b/clients/client-lex-runtime-v2/src/runtimeConfig.browser.ts index c6cfda2d3ff1..053f4941da3f 100644 --- a/clients/client-lex-runtime-v2/src/runtimeConfig.browser.ts +++ b/clients/client-lex-runtime-v2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidFunction, invalidProvider } from "@aws-sdk/invalid-dependency"; @@ -40,6 +41,8 @@ export const getRuntimeConfig = (config: LexRuntimeV2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lex-runtime-v2/src/runtimeConfig.ts b/clients/client-lex-runtime-v2/src/runtimeConfig.ts index be08b76870ed..854a7b3dbeea 100644 --- a/clients/client-lex-runtime-v2/src/runtimeConfig.ts +++ b/clients/client-lex-runtime-v2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { eventStreamPayloadHandlerProvider } from "@aws-sdk/eventstream-handler-node"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-node"; @@ -44,6 +49,8 @@ export const getRuntimeConfig = (config: LexRuntimeV2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-license-manager/src/LicenseManagerClient.ts b/clients/client-license-manager/src/LicenseManagerClient.ts index 9ef1dc3c4472..81eaf5c31ebc 100644 --- a/clients/client-license-manager/src/LicenseManagerClient.ts +++ b/clients/client-license-manager/src/LicenseManagerClient.ts @@ -362,6 +362,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-license-manager/src/endpoints.ts b/clients/client-license-manager/src/endpoints.ts index 96941d2628b3..cb8664373f15 100644 --- a/clients/client-license-manager/src/endpoints.ts +++ b/clients/client-license-manager/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "license-manager", diff --git a/clients/client-license-manager/src/runtimeConfig.browser.ts b/clients/client-license-manager/src/runtimeConfig.browser.ts index c2c6bb65adb9..3d776967d6fb 100644 --- a/clients/client-license-manager/src/runtimeConfig.browser.ts +++ b/clients/client-license-manager/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LicenseManagerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-license-manager/src/runtimeConfig.ts b/clients/client-license-manager/src/runtimeConfig.ts index 2666448172da..ec537fc77b52 100644 --- a/clients/client-license-manager/src/runtimeConfig.ts +++ b/clients/client-license-manager/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LicenseManagerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lightsail/src/LightsailClient.ts b/clients/client-lightsail/src/LightsailClient.ts index eb86bc984885..5f5172524ffe 100644 --- a/clients/client-lightsail/src/LightsailClient.ts +++ b/clients/client-lightsail/src/LightsailClient.ts @@ -821,6 +821,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lightsail/src/endpoints.ts b/clients/client-lightsail/src/endpoints.ts index b5ae64afaed1..21572d762b83 100644 --- a/clients/client-lightsail/src/endpoints.ts +++ b/clients/client-lightsail/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lightsail", diff --git a/clients/client-lightsail/src/runtimeConfig.browser.ts b/clients/client-lightsail/src/runtimeConfig.browser.ts index d54627b81457..f5fb48c5a3a1 100644 --- a/clients/client-lightsail/src/runtimeConfig.browser.ts +++ b/clients/client-lightsail/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LightsailClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lightsail/src/runtimeConfig.ts b/clients/client-lightsail/src/runtimeConfig.ts index 880512e9b2f3..a8907c4c4b04 100644 --- a/clients/client-lightsail/src/runtimeConfig.ts +++ b/clients/client-lightsail/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LightsailClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-location/src/LocationClient.ts b/clients/client-location/src/LocationClient.ts index 1a47eb2d76bf..68aa88cb8a47 100644 --- a/clients/client-location/src/LocationClient.ts +++ b/clients/client-location/src/LocationClient.ts @@ -359,6 +359,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-location/src/endpoints.ts b/clients/client-location/src/endpoints.ts index 795b6e6f87fb..3d2a6f172001 100644 --- a/clients/client-location/src/endpoints.ts +++ b/clients/client-location/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "geo", diff --git a/clients/client-location/src/runtimeConfig.browser.ts b/clients/client-location/src/runtimeConfig.browser.ts index a0a45907eceb..b3e47de68c77 100644 --- a/clients/client-location/src/runtimeConfig.browser.ts +++ b/clients/client-location/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LocationClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-location/src/runtimeConfig.ts b/clients/client-location/src/runtimeConfig.ts index 60017b2b403b..8b8f3d782869 100644 --- a/clients/client-location/src/runtimeConfig.ts +++ b/clients/client-location/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LocationClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lookoutequipment/src/LookoutEquipmentClient.ts b/clients/client-lookoutequipment/src/LookoutEquipmentClient.ts index d0498401327e..4574883ffa02 100644 --- a/clients/client-lookoutequipment/src/LookoutEquipmentClient.ts +++ b/clients/client-lookoutequipment/src/LookoutEquipmentClient.ts @@ -239,6 +239,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lookoutequipment/src/endpoints.ts b/clients/client-lookoutequipment/src/endpoints.ts index 60448c8c4a0e..f385887b948a 100644 --- a/clients/client-lookoutequipment/src/endpoints.ts +++ b/clients/client-lookoutequipment/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lookoutequipment", diff --git a/clients/client-lookoutequipment/src/runtimeConfig.browser.ts b/clients/client-lookoutequipment/src/runtimeConfig.browser.ts index b548d2caae1e..4c5134db0c61 100644 --- a/clients/client-lookoutequipment/src/runtimeConfig.browser.ts +++ b/clients/client-lookoutequipment/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LookoutEquipmentClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lookoutequipment/src/runtimeConfig.ts b/clients/client-lookoutequipment/src/runtimeConfig.ts index 509123cbbd72..fd573dfb76c0 100644 --- a/clients/client-lookoutequipment/src/runtimeConfig.ts +++ b/clients/client-lookoutequipment/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LookoutEquipmentClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lookoutmetrics/src/LookoutMetricsClient.ts b/clients/client-lookoutmetrics/src/LookoutMetricsClient.ts index d9510f0be289..40ec646eef72 100644 --- a/clients/client-lookoutmetrics/src/LookoutMetricsClient.ts +++ b/clients/client-lookoutmetrics/src/LookoutMetricsClient.ts @@ -245,6 +245,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lookoutmetrics/src/endpoints.ts b/clients/client-lookoutmetrics/src/endpoints.ts index 0ad6ba2279e3..330606fce2f0 100644 --- a/clients/client-lookoutmetrics/src/endpoints.ts +++ b/clients/client-lookoutmetrics/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lookoutmetrics", diff --git a/clients/client-lookoutmetrics/src/runtimeConfig.browser.ts b/clients/client-lookoutmetrics/src/runtimeConfig.browser.ts index a04372884718..79e8f8ffb6ed 100644 --- a/clients/client-lookoutmetrics/src/runtimeConfig.browser.ts +++ b/clients/client-lookoutmetrics/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LookoutMetricsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lookoutmetrics/src/runtimeConfig.ts b/clients/client-lookoutmetrics/src/runtimeConfig.ts index 7b1995d4009b..86c0309070f7 100644 --- a/clients/client-lookoutmetrics/src/runtimeConfig.ts +++ b/clients/client-lookoutmetrics/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LookoutMetricsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lookoutvision/src/LookoutVisionClient.ts b/clients/client-lookoutvision/src/LookoutVisionClient.ts index 7a02eb163dc5..d5a800da8319 100644 --- a/clients/client-lookoutvision/src/LookoutVisionClient.ts +++ b/clients/client-lookoutvision/src/LookoutVisionClient.ts @@ -200,6 +200,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-lookoutvision/src/endpoints.ts b/clients/client-lookoutvision/src/endpoints.ts index de0216ff69c1..e9e6a3825b63 100644 --- a/clients/client-lookoutvision/src/endpoints.ts +++ b/clients/client-lookoutvision/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "lookoutvision", diff --git a/clients/client-lookoutvision/src/runtimeConfig.browser.ts b/clients/client-lookoutvision/src/runtimeConfig.browser.ts index 6a0253b2254b..909d88a1b5d8 100644 --- a/clients/client-lookoutvision/src/runtimeConfig.browser.ts +++ b/clients/client-lookoutvision/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: LookoutVisionClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-lookoutvision/src/runtimeConfig.ts b/clients/client-lookoutvision/src/runtimeConfig.ts index 2cd934e3ac38..c3cd6cd067dc 100644 --- a/clients/client-lookoutvision/src/runtimeConfig.ts +++ b/clients/client-lookoutvision/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: LookoutVisionClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-machine-learning/src/MachineLearningClient.ts b/clients/client-machine-learning/src/MachineLearningClient.ts index 49989f9e9a1e..7bc3c596c29d 100644 --- a/clients/client-machine-learning/src/MachineLearningClient.ts +++ b/clients/client-machine-learning/src/MachineLearningClient.ts @@ -254,6 +254,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-machine-learning/src/endpoints.ts b/clients/client-machine-learning/src/endpoints.ts index 712a04049e71..abe2353e4525 100644 --- a/clients/client-machine-learning/src/endpoints.ts +++ b/clients/client-machine-learning/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "machinelearning", diff --git a/clients/client-machine-learning/src/runtimeConfig.browser.ts b/clients/client-machine-learning/src/runtimeConfig.browser.ts index e3d5e0491b1c..183a5b886a9d 100644 --- a/clients/client-machine-learning/src/runtimeConfig.browser.ts +++ b/clients/client-machine-learning/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MachineLearningClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-machine-learning/src/runtimeConfig.ts b/clients/client-machine-learning/src/runtimeConfig.ts index 80ae841e83de..d94a67a68e61 100644 --- a/clients/client-machine-learning/src/runtimeConfig.ts +++ b/clients/client-machine-learning/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MachineLearningClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-macie/src/MacieClient.ts b/clients/client-macie/src/MacieClient.ts index daecf0fb8263..f3365619c72d 100644 --- a/clients/client-macie/src/MacieClient.ts +++ b/clients/client-macie/src/MacieClient.ts @@ -170,6 +170,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-macie/src/endpoints.ts b/clients/client-macie/src/endpoints.ts index b8c396bb5110..2391d025a16b 100644 --- a/clients/client-macie/src/endpoints.ts +++ b/clients/client-macie/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -64,7 +64,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "macie", diff --git a/clients/client-macie/src/runtimeConfig.browser.ts b/clients/client-macie/src/runtimeConfig.browser.ts index 3770c7b8662c..fce0268489ef 100644 --- a/clients/client-macie/src/runtimeConfig.browser.ts +++ b/clients/client-macie/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MacieClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-macie/src/runtimeConfig.ts b/clients/client-macie/src/runtimeConfig.ts index 17e62fc54379..fb78c0415247 100644 --- a/clients/client-macie/src/runtimeConfig.ts +++ b/clients/client-macie/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MacieClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-macie2/src/Macie2Client.ts b/clients/client-macie2/src/Macie2Client.ts index 6b7c633f53a0..34ccae660137 100644 --- a/clients/client-macie2/src/Macie2Client.ts +++ b/clients/client-macie2/src/Macie2Client.ts @@ -407,6 +407,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-macie2/src/endpoints.ts b/clients/client-macie2/src/endpoints.ts index 58bb2a2c16c3..3b967d2f88e5 100644 --- a/clients/client-macie2/src/endpoints.ts +++ b/clients/client-macie2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -74,7 +74,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "macie2", diff --git a/clients/client-macie2/src/runtimeConfig.browser.ts b/clients/client-macie2/src/runtimeConfig.browser.ts index 2c47ca2eb004..a8fe44e3d101 100644 --- a/clients/client-macie2/src/runtimeConfig.browser.ts +++ b/clients/client-macie2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: Macie2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-macie2/src/runtimeConfig.ts b/clients/client-macie2/src/runtimeConfig.ts index 388ece68d43c..707a9ef26e08 100644 --- a/clients/client-macie2/src/runtimeConfig.ts +++ b/clients/client-macie2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: Macie2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-managedblockchain/src/ManagedBlockchainClient.ts b/clients/client-managedblockchain/src/ManagedBlockchainClient.ts index a1486d84f17f..80de3ec1dbc6 100644 --- a/clients/client-managedblockchain/src/ManagedBlockchainClient.ts +++ b/clients/client-managedblockchain/src/ManagedBlockchainClient.ts @@ -209,6 +209,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-managedblockchain/src/endpoints.ts b/clients/client-managedblockchain/src/endpoints.ts index 0756e9a5c27a..8f7275c4885d 100644 --- a/clients/client-managedblockchain/src/endpoints.ts +++ b/clients/client-managedblockchain/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "managedblockchain", diff --git a/clients/client-managedblockchain/src/runtimeConfig.browser.ts b/clients/client-managedblockchain/src/runtimeConfig.browser.ts index 59320b745085..8f94987f329f 100644 --- a/clients/client-managedblockchain/src/runtimeConfig.browser.ts +++ b/clients/client-managedblockchain/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ManagedBlockchainClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-managedblockchain/src/runtimeConfig.ts b/clients/client-managedblockchain/src/runtimeConfig.ts index 8028a8c52ee0..7baadbab192e 100644 --- a/clients/client-managedblockchain/src/runtimeConfig.ts +++ b/clients/client-managedblockchain/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ManagedBlockchainClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts b/clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts index ca7103103517..6671fcea73df 100644 --- a/clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts +++ b/clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts @@ -155,6 +155,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-marketplace-catalog/src/endpoints.ts b/clients/client-marketplace-catalog/src/endpoints.ts index ca1caeaf924a..96084089d17c 100644 --- a/clients/client-marketplace-catalog/src/endpoints.ts +++ b/clients/client-marketplace-catalog/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "aws-marketplace", diff --git a/clients/client-marketplace-catalog/src/runtimeConfig.browser.ts b/clients/client-marketplace-catalog/src/runtimeConfig.browser.ts index 960881337490..9071983e4586 100644 --- a/clients/client-marketplace-catalog/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-catalog/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MarketplaceCatalogClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-marketplace-catalog/src/runtimeConfig.ts b/clients/client-marketplace-catalog/src/runtimeConfig.ts index 127c70dddf9d..f614ade150e2 100644 --- a/clients/client-marketplace-catalog/src/runtimeConfig.ts +++ b/clients/client-marketplace-catalog/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MarketplaceCatalogClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-marketplace-commerce-analytics/src/MarketplaceCommerceAnalyticsClient.ts b/clients/client-marketplace-commerce-analytics/src/MarketplaceCommerceAnalyticsClient.ts index 9322da3f8ab9..213713fdfe86 100644 --- a/clients/client-marketplace-commerce-analytics/src/MarketplaceCommerceAnalyticsClient.ts +++ b/clients/client-marketplace-commerce-analytics/src/MarketplaceCommerceAnalyticsClient.ts @@ -142,6 +142,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-marketplace-commerce-analytics/src/endpoints.ts b/clients/client-marketplace-commerce-analytics/src/endpoints.ts index 8df1077e70ed..5a951649ae35 100644 --- a/clients/client-marketplace-commerce-analytics/src/endpoints.ts +++ b/clients/client-marketplace-commerce-analytics/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "marketplacecommerceanalytics", diff --git a/clients/client-marketplace-commerce-analytics/src/runtimeConfig.browser.ts b/clients/client-marketplace-commerce-analytics/src/runtimeConfig.browser.ts index 51f2102cfc79..af814fe82ea6 100644 --- a/clients/client-marketplace-commerce-analytics/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-commerce-analytics/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MarketplaceCommerceAnalyticsClientConfi retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-marketplace-commerce-analytics/src/runtimeConfig.ts b/clients/client-marketplace-commerce-analytics/src/runtimeConfig.ts index 02155966fe8d..c6d4299930ae 100644 --- a/clients/client-marketplace-commerce-analytics/src/runtimeConfig.ts +++ b/clients/client-marketplace-commerce-analytics/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MarketplaceCommerceAnalyticsClientConfi retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-marketplace-entitlement-service/src/MarketplaceEntitlementServiceClient.ts b/clients/client-marketplace-entitlement-service/src/MarketplaceEntitlementServiceClient.ts index 5af35ab39090..576c1d376a98 100644 --- a/clients/client-marketplace-entitlement-service/src/MarketplaceEntitlementServiceClient.ts +++ b/clients/client-marketplace-entitlement-service/src/MarketplaceEntitlementServiceClient.ts @@ -138,6 +138,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-marketplace-entitlement-service/src/endpoints.ts b/clients/client-marketplace-entitlement-service/src/endpoints.ts index 9eee07668ce6..c04835e4eab6 100644 --- a/clients/client-marketplace-entitlement-service/src/endpoints.ts +++ b/clients/client-marketplace-entitlement-service/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "aws-marketplace", diff --git a/clients/client-marketplace-entitlement-service/src/runtimeConfig.browser.ts b/clients/client-marketplace-entitlement-service/src/runtimeConfig.browser.ts index e091bea91f80..aac7b0f94b2f 100644 --- a/clients/client-marketplace-entitlement-service/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-entitlement-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MarketplaceEntitlementServiceClientConf retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-marketplace-entitlement-service/src/runtimeConfig.ts b/clients/client-marketplace-entitlement-service/src/runtimeConfig.ts index edcf14b2cac0..d8f20603ff7a 100644 --- a/clients/client-marketplace-entitlement-service/src/runtimeConfig.ts +++ b/clients/client-marketplace-entitlement-service/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MarketplaceEntitlementServiceClientConf retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-marketplace-metering/src/MarketplaceMeteringClient.ts b/clients/client-marketplace-metering/src/MarketplaceMeteringClient.ts index 0c2c39ac943b..f94f4cbf819e 100644 --- a/clients/client-marketplace-metering/src/MarketplaceMeteringClient.ts +++ b/clients/client-marketplace-metering/src/MarketplaceMeteringClient.ts @@ -149,6 +149,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-marketplace-metering/src/endpoints.ts b/clients/client-marketplace-metering/src/endpoints.ts index a96f82e58e64..36973e51d7fc 100644 --- a/clients/client-marketplace-metering/src/endpoints.ts +++ b/clients/client-marketplace-metering/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "aws-marketplace", diff --git a/clients/client-marketplace-metering/src/runtimeConfig.browser.ts b/clients/client-marketplace-metering/src/runtimeConfig.browser.ts index c93fa3341469..92945836914e 100644 --- a/clients/client-marketplace-metering/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-metering/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MarketplaceMeteringClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-marketplace-metering/src/runtimeConfig.ts b/clients/client-marketplace-metering/src/runtimeConfig.ts index 15c3e2fdbcd0..7fec397b8d95 100644 --- a/clients/client-marketplace-metering/src/runtimeConfig.ts +++ b/clients/client-marketplace-metering/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MarketplaceMeteringClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediaconnect/src/MediaConnectClient.ts b/clients/client-mediaconnect/src/MediaConnectClient.ts index c15ccbbfcd5f..fb83addfaa6b 100644 --- a/clients/client-mediaconnect/src/MediaConnectClient.ts +++ b/clients/client-mediaconnect/src/MediaConnectClient.ts @@ -257,6 +257,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mediaconnect/src/endpoints.ts b/clients/client-mediaconnect/src/endpoints.ts index 77061028c2e7..c0426b9050cf 100644 --- a/clients/client-mediaconnect/src/endpoints.ts +++ b/clients/client-mediaconnect/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mediaconnect", diff --git a/clients/client-mediaconnect/src/runtimeConfig.browser.ts b/clients/client-mediaconnect/src/runtimeConfig.browser.ts index 90d9ba5747c4..8ed76f66dcac 100644 --- a/clients/client-mediaconnect/src/runtimeConfig.browser.ts +++ b/clients/client-mediaconnect/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MediaConnectClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediaconnect/src/runtimeConfig.ts b/clients/client-mediaconnect/src/runtimeConfig.ts index 70d3806046b8..671bcdd2d22a 100644 --- a/clients/client-mediaconnect/src/runtimeConfig.ts +++ b/clients/client-mediaconnect/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MediaConnectClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediaconvert/src/MediaConvertClient.ts b/clients/client-mediaconvert/src/MediaConvertClient.ts index 48d78a75ec0a..1593e31d9540 100644 --- a/clients/client-mediaconvert/src/MediaConvertClient.ts +++ b/clients/client-mediaconvert/src/MediaConvertClient.ts @@ -230,6 +230,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mediaconvert/src/endpoints.ts b/clients/client-mediaconvert/src/endpoints.ts index e3c13447fd78..dd20646c94f3 100644 --- a/clients/client-mediaconvert/src/endpoints.ts +++ b/clients/client-mediaconvert/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "cn-northwest-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mediaconvert", diff --git a/clients/client-mediaconvert/src/runtimeConfig.browser.ts b/clients/client-mediaconvert/src/runtimeConfig.browser.ts index 8c26598bc342..ab44926f46e6 100644 --- a/clients/client-mediaconvert/src/runtimeConfig.browser.ts +++ b/clients/client-mediaconvert/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MediaConvertClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediaconvert/src/runtimeConfig.ts b/clients/client-mediaconvert/src/runtimeConfig.ts index 69d426e5a07a..72726c36c871 100644 --- a/clients/client-mediaconvert/src/runtimeConfig.ts +++ b/clients/client-mediaconvert/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MediaConvertClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-medialive/src/MediaLiveClient.ts b/clients/client-medialive/src/MediaLiveClient.ts index 107c7400338e..29105fac20b5 100644 --- a/clients/client-medialive/src/MediaLiveClient.ts +++ b/clients/client-medialive/src/MediaLiveClient.ts @@ -368,6 +368,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-medialive/src/endpoints.ts b/clients/client-medialive/src/endpoints.ts index 30d293ba4a51..873e493bb893 100644 --- a/clients/client-medialive/src/endpoints.ts +++ b/clients/client-medialive/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -69,7 +69,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "medialive", diff --git a/clients/client-medialive/src/runtimeConfig.browser.ts b/clients/client-medialive/src/runtimeConfig.browser.ts index 22a5be45a2a6..95995b472885 100644 --- a/clients/client-medialive/src/runtimeConfig.browser.ts +++ b/clients/client-medialive/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MediaLiveClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-medialive/src/runtimeConfig.ts b/clients/client-medialive/src/runtimeConfig.ts index f5f0273aa571..7744a53a1eb8 100644 --- a/clients/client-medialive/src/runtimeConfig.ts +++ b/clients/client-medialive/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MediaLiveClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediapackage-vod/src/MediaPackageVodClient.ts b/clients/client-mediapackage-vod/src/MediaPackageVodClient.ts index 411c26a65a8d..25c1271b20dc 100644 --- a/clients/client-mediapackage-vod/src/MediaPackageVodClient.ts +++ b/clients/client-mediapackage-vod/src/MediaPackageVodClient.ts @@ -218,6 +218,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mediapackage-vod/src/endpoints.ts b/clients/client-mediapackage-vod/src/endpoints.ts index e51c1381737c..05435a84abeb 100644 --- a/clients/client-mediapackage-vod/src/endpoints.ts +++ b/clients/client-mediapackage-vod/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mediapackage-vod", diff --git a/clients/client-mediapackage-vod/src/runtimeConfig.browser.ts b/clients/client-mediapackage-vod/src/runtimeConfig.browser.ts index a314f70fe371..94598c32566f 100644 --- a/clients/client-mediapackage-vod/src/runtimeConfig.browser.ts +++ b/clients/client-mediapackage-vod/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MediaPackageVodClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediapackage-vod/src/runtimeConfig.ts b/clients/client-mediapackage-vod/src/runtimeConfig.ts index ff7ba879ef41..bceb295851d7 100644 --- a/clients/client-mediapackage-vod/src/runtimeConfig.ts +++ b/clients/client-mediapackage-vod/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MediaPackageVodClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediapackage/src/MediaPackageClient.ts b/clients/client-mediapackage/src/MediaPackageClient.ts index 8d8c957983ea..d42e928c2161 100644 --- a/clients/client-mediapackage/src/MediaPackageClient.ts +++ b/clients/client-mediapackage/src/MediaPackageClient.ts @@ -218,6 +218,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mediapackage/src/endpoints.ts b/clients/client-mediapackage/src/endpoints.ts index 21d31aa98f2c..96ce70783baa 100644 --- a/clients/client-mediapackage/src/endpoints.ts +++ b/clients/client-mediapackage/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mediapackage", diff --git a/clients/client-mediapackage/src/runtimeConfig.browser.ts b/clients/client-mediapackage/src/runtimeConfig.browser.ts index 813f71f990e5..77a34f20485f 100644 --- a/clients/client-mediapackage/src/runtimeConfig.browser.ts +++ b/clients/client-mediapackage/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MediaPackageClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediapackage/src/runtimeConfig.ts b/clients/client-mediapackage/src/runtimeConfig.ts index a7edcf91502d..7e10b249aef6 100644 --- a/clients/client-mediapackage/src/runtimeConfig.ts +++ b/clients/client-mediapackage/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MediaPackageClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediastore-data/src/MediaStoreDataClient.ts b/clients/client-mediastore-data/src/MediaStoreDataClient.ts index 69c51647ed39..df7d08b3916f 100644 --- a/clients/client-mediastore-data/src/MediaStoreDataClient.ts +++ b/clients/client-mediastore-data/src/MediaStoreDataClient.ts @@ -152,6 +152,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mediastore-data/src/endpoints.ts b/clients/client-mediastore-data/src/endpoints.ts index 7944787c36ca..28c0137e549e 100644 --- a/clients/client-mediastore-data/src/endpoints.ts +++ b/clients/client-mediastore-data/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mediastore", diff --git a/clients/client-mediastore-data/src/runtimeConfig.browser.ts b/clients/client-mediastore-data/src/runtimeConfig.browser.ts index 6d4a625d6a37..ea1fbc833b84 100644 --- a/clients/client-mediastore-data/src/runtimeConfig.browser.ts +++ b/clients/client-mediastore-data/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MediaStoreDataClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediastore-data/src/runtimeConfig.ts b/clients/client-mediastore-data/src/runtimeConfig.ts index 31d71fe70f50..c616abd1aa17 100644 --- a/clients/client-mediastore-data/src/runtimeConfig.ts +++ b/clients/client-mediastore-data/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MediaStoreDataClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediastore/src/MediaStoreClient.ts b/clients/client-mediastore/src/MediaStoreClient.ts index c28571ec3bdc..1fc6d1ff4a1b 100644 --- a/clients/client-mediastore/src/MediaStoreClient.ts +++ b/clients/client-mediastore/src/MediaStoreClient.ts @@ -209,6 +209,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mediastore/src/endpoints.ts b/clients/client-mediastore/src/endpoints.ts index 55e48b6a5823..a6fbf2cd7bcd 100644 --- a/clients/client-mediastore/src/endpoints.ts +++ b/clients/client-mediastore/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mediastore", diff --git a/clients/client-mediastore/src/runtimeConfig.browser.ts b/clients/client-mediastore/src/runtimeConfig.browser.ts index 3c65c223b725..f11fa37c1172 100644 --- a/clients/client-mediastore/src/runtimeConfig.browser.ts +++ b/clients/client-mediastore/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MediaStoreClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediastore/src/runtimeConfig.ts b/clients/client-mediastore/src/runtimeConfig.ts index 6b242c31342b..c7c18178afbd 100644 --- a/clients/client-mediastore/src/runtimeConfig.ts +++ b/clients/client-mediastore/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MediaStoreClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediatailor/src/MediaTailorClient.ts b/clients/client-mediatailor/src/MediaTailorClient.ts index ac17f2b5362a..2daa995751f7 100644 --- a/clients/client-mediatailor/src/MediaTailorClient.ts +++ b/clients/client-mediatailor/src/MediaTailorClient.ts @@ -296,6 +296,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mediatailor/src/endpoints.ts b/clients/client-mediatailor/src/endpoints.ts index 9612482d4b0c..121ec8016bab 100644 --- a/clients/client-mediatailor/src/endpoints.ts +++ b/clients/client-mediatailor/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mediatailor", diff --git a/clients/client-mediatailor/src/runtimeConfig.browser.ts b/clients/client-mediatailor/src/runtimeConfig.browser.ts index fb33503c1a53..f5d2f2008c48 100644 --- a/clients/client-mediatailor/src/runtimeConfig.browser.ts +++ b/clients/client-mediatailor/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MediaTailorClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mediatailor/src/runtimeConfig.ts b/clients/client-mediatailor/src/runtimeConfig.ts index 393a2a059f54..7d889d0b2b97 100644 --- a/clients/client-mediatailor/src/runtimeConfig.ts +++ b/clients/client-mediatailor/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MediaTailorClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-memorydb/src/MemoryDBClient.ts b/clients/client-memorydb/src/MemoryDBClient.ts index c41e4c00de9a..2e417e971456 100644 --- a/clients/client-memorydb/src/MemoryDBClient.ts +++ b/clients/client-memorydb/src/MemoryDBClient.ts @@ -269,6 +269,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-memorydb/src/endpoints.ts b/clients/client-memorydb/src/endpoints.ts index cd09922f96a1..329552b056aa 100644 --- a/clients/client-memorydb/src/endpoints.ts +++ b/clients/client-memorydb/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "memorydb", diff --git a/clients/client-memorydb/src/runtimeConfig.browser.ts b/clients/client-memorydb/src/runtimeConfig.browser.ts index 578631d8e12b..ce879e9aa0e3 100644 --- a/clients/client-memorydb/src/runtimeConfig.browser.ts +++ b/clients/client-memorydb/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MemoryDBClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-memorydb/src/runtimeConfig.ts b/clients/client-memorydb/src/runtimeConfig.ts index daa07996ecc6..efa0bb16b4ad 100644 --- a/clients/client-memorydb/src/runtimeConfig.ts +++ b/clients/client-memorydb/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MemoryDBClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mgn/src/MgnClient.ts b/clients/client-mgn/src/MgnClient.ts index 74dab893e50f..7378b8024427 100644 --- a/clients/client-mgn/src/MgnClient.ts +++ b/clients/client-mgn/src/MgnClient.ts @@ -257,6 +257,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mgn/src/endpoints.ts b/clients/client-mgn/src/endpoints.ts index 9abb55ab8e2b..eb10dc42d61c 100644 --- a/clients/client-mgn/src/endpoints.ts +++ b/clients/client-mgn/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mgn", diff --git a/clients/client-mgn/src/runtimeConfig.browser.ts b/clients/client-mgn/src/runtimeConfig.browser.ts index 7e087e489fc8..02f261396952 100644 --- a/clients/client-mgn/src/runtimeConfig.browser.ts +++ b/clients/client-mgn/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MgnClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mgn/src/runtimeConfig.ts b/clients/client-mgn/src/runtimeConfig.ts index d3c0464326f1..75ac798a7e59 100644 --- a/clients/client-mgn/src/runtimeConfig.ts +++ b/clients/client-mgn/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MgnClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-migration-hub/src/MigrationHubClient.ts b/clients/client-migration-hub/src/MigrationHubClient.ts index 2216b024e6e0..a075ce629fce 100644 --- a/clients/client-migration-hub/src/MigrationHubClient.ts +++ b/clients/client-migration-hub/src/MigrationHubClient.ts @@ -236,6 +236,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-migration-hub/src/endpoints.ts b/clients/client-migration-hub/src/endpoints.ts index 633cfad07b6c..bf77f04962ed 100644 --- a/clients/client-migration-hub/src/endpoints.ts +++ b/clients/client-migration-hub/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mgh", diff --git a/clients/client-migration-hub/src/runtimeConfig.browser.ts b/clients/client-migration-hub/src/runtimeConfig.browser.ts index 29ff606461a6..30ce492c897a 100644 --- a/clients/client-migration-hub/src/runtimeConfig.browser.ts +++ b/clients/client-migration-hub/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MigrationHubClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-migration-hub/src/runtimeConfig.ts b/clients/client-migration-hub/src/runtimeConfig.ts index ee8fa8f8f8cf..462c9758a767 100644 --- a/clients/client-migration-hub/src/runtimeConfig.ts +++ b/clients/client-migration-hub/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MigrationHubClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts b/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts index 5f7c26219f37..65022cfe155c 100644 --- a/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts +++ b/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts @@ -152,6 +152,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-migrationhub-config/src/endpoints.ts b/clients/client-migrationhub-config/src/endpoints.ts index df31ed29b9b3..21c25a84b28f 100644 --- a/clients/client-migrationhub-config/src/endpoints.ts +++ b/clients/client-migrationhub-config/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mgh", diff --git a/clients/client-migrationhub-config/src/runtimeConfig.browser.ts b/clients/client-migrationhub-config/src/runtimeConfig.browser.ts index 7ef28fabedbc..a1e8e985ef6d 100644 --- a/clients/client-migrationhub-config/src/runtimeConfig.browser.ts +++ b/clients/client-migrationhub-config/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MigrationHubConfigClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-migrationhub-config/src/runtimeConfig.ts b/clients/client-migrationhub-config/src/runtimeConfig.ts index f7e6599ab55b..4a7421c7f8c3 100644 --- a/clients/client-migrationhub-config/src/runtimeConfig.ts +++ b/clients/client-migrationhub-config/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MigrationHubConfigClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mobile/src/MobileClient.ts b/clients/client-mobile/src/MobileClient.ts index 093cba908d81..c5fe8ebf2862 100644 --- a/clients/client-mobile/src/MobileClient.ts +++ b/clients/client-mobile/src/MobileClient.ts @@ -164,6 +164,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mobile/src/endpoints.ts b/clients/client-mobile/src/endpoints.ts index df56c68ba1c3..7cc5d8d83929 100644 --- a/clients/client-mobile/src/endpoints.ts +++ b/clients/client-mobile/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "awsmobilehubservice", diff --git a/clients/client-mobile/src/runtimeConfig.browser.ts b/clients/client-mobile/src/runtimeConfig.browser.ts index 5d35b110fecb..9fa7a8feb68e 100644 --- a/clients/client-mobile/src/runtimeConfig.browser.ts +++ b/clients/client-mobile/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MobileClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mobile/src/runtimeConfig.ts b/clients/client-mobile/src/runtimeConfig.ts index 4f0e837dbc6b..6dd1604bef4b 100644 --- a/clients/client-mobile/src/runtimeConfig.ts +++ b/clients/client-mobile/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MobileClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mq/src/MqClient.ts b/clients/client-mq/src/MqClient.ts index 0b46c27b19c1..43655c759fcc 100644 --- a/clients/client-mq/src/MqClient.ts +++ b/clients/client-mq/src/MqClient.ts @@ -224,6 +224,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mq/src/endpoints.ts b/clients/client-mq/src/endpoints.ts index 7a347edcdf6f..b76c720abd49 100644 --- a/clients/client-mq/src/endpoints.ts +++ b/clients/client-mq/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mq", diff --git a/clients/client-mq/src/runtimeConfig.browser.ts b/clients/client-mq/src/runtimeConfig.browser.ts index 40b1e6fe57b8..fc635327513d 100644 --- a/clients/client-mq/src/runtimeConfig.browser.ts +++ b/clients/client-mq/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MqClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mq/src/runtimeConfig.ts b/clients/client-mq/src/runtimeConfig.ts index e422337129aa..2f61f0b7881f 100644 --- a/clients/client-mq/src/runtimeConfig.ts +++ b/clients/client-mq/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MqClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mturk/src/MTurkClient.ts b/clients/client-mturk/src/MTurkClient.ts index 581fb31c902e..5196d7d91fe3 100644 --- a/clients/client-mturk/src/MTurkClient.ts +++ b/clients/client-mturk/src/MTurkClient.ts @@ -317,6 +317,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mturk/src/endpoints.ts b/clients/client-mturk/src/endpoints.ts index 0f472fabd389..d2b66e659233 100644 --- a/clients/client-mturk/src/endpoints.ts +++ b/clients/client-mturk/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { sandbox: { @@ -58,7 +58,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mturk-requester", diff --git a/clients/client-mturk/src/runtimeConfig.browser.ts b/clients/client-mturk/src/runtimeConfig.browser.ts index ed2ac7df5a4c..e47b5ff53562 100644 --- a/clients/client-mturk/src/runtimeConfig.browser.ts +++ b/clients/client-mturk/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MTurkClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mturk/src/runtimeConfig.ts b/clients/client-mturk/src/runtimeConfig.ts index 249926e1b10c..bd0ba35824eb 100644 --- a/clients/client-mturk/src/runtimeConfig.ts +++ b/clients/client-mturk/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MTurkClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mwaa/src/MWAAClient.ts b/clients/client-mwaa/src/MWAAClient.ts index 77e750905342..7558d75cd1a7 100644 --- a/clients/client-mwaa/src/MWAAClient.ts +++ b/clients/client-mwaa/src/MWAAClient.ts @@ -176,6 +176,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-mwaa/src/endpoints.ts b/clients/client-mwaa/src/endpoints.ts index df4961fb648d..fbc8d3dce68d 100644 --- a/clients/client-mwaa/src/endpoints.ts +++ b/clients/client-mwaa/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "airflow", diff --git a/clients/client-mwaa/src/runtimeConfig.browser.ts b/clients/client-mwaa/src/runtimeConfig.browser.ts index 3c14e6366a75..4c1d1359f555 100644 --- a/clients/client-mwaa/src/runtimeConfig.browser.ts +++ b/clients/client-mwaa/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: MWAAClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-mwaa/src/runtimeConfig.ts b/clients/client-mwaa/src/runtimeConfig.ts index 8e2620284e7f..540981dd13d0 100644 --- a/clients/client-mwaa/src/runtimeConfig.ts +++ b/clients/client-mwaa/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: MWAAClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-neptune/src/NeptuneClient.ts b/clients/client-neptune/src/NeptuneClient.ts index 3a8dd708cccc..39837cc27142 100644 --- a/clients/client-neptune/src/NeptuneClient.ts +++ b/clients/client-neptune/src/NeptuneClient.ts @@ -473,6 +473,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-neptune/src/endpoints.ts b/clients/client-neptune/src/endpoints.ts index d1ea2a09c219..8033fe8df7f7 100644 --- a/clients/client-neptune/src/endpoints.ts +++ b/clients/client-neptune/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "rds-fips.ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "rds", diff --git a/clients/client-neptune/src/runtimeConfig.browser.ts b/clients/client-neptune/src/runtimeConfig.browser.ts index 1ac86b7de72a..c3519158d239 100644 --- a/clients/client-neptune/src/runtimeConfig.browser.ts +++ b/clients/client-neptune/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: NeptuneClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-neptune/src/runtimeConfig.ts b/clients/client-neptune/src/runtimeConfig.ts index 73c4084906a5..3f576caf3a12 100644 --- a/clients/client-neptune/src/runtimeConfig.ts +++ b/clients/client-neptune/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: NeptuneClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-network-firewall/src/NetworkFirewallClient.ts b/clients/client-network-firewall/src/NetworkFirewallClient.ts index 65ae282ca586..4142e927d989 100644 --- a/clients/client-network-firewall/src/NetworkFirewallClient.ts +++ b/clients/client-network-firewall/src/NetworkFirewallClient.ts @@ -272,6 +272,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-network-firewall/src/endpoints.ts b/clients/client-network-firewall/src/endpoints.ts index aec8272595da..ef2695b25fa6 100644 --- a/clients/client-network-firewall/src/endpoints.ts +++ b/clients/client-network-firewall/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "network-firewall", diff --git a/clients/client-network-firewall/src/runtimeConfig.browser.ts b/clients/client-network-firewall/src/runtimeConfig.browser.ts index 8f9d2b57d979..4eb3b1185710 100644 --- a/clients/client-network-firewall/src/runtimeConfig.browser.ts +++ b/clients/client-network-firewall/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: NetworkFirewallClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-network-firewall/src/runtimeConfig.ts b/clients/client-network-firewall/src/runtimeConfig.ts index 9e7261b7529c..28b15386c2f1 100644 --- a/clients/client-network-firewall/src/runtimeConfig.ts +++ b/clients/client-network-firewall/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: NetworkFirewallClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-networkmanager/src/NetworkManagerClient.ts b/clients/client-networkmanager/src/NetworkManagerClient.ts index 91be92be7557..00780743497f 100644 --- a/clients/client-networkmanager/src/NetworkManagerClient.ts +++ b/clients/client-networkmanager/src/NetworkManagerClient.ts @@ -287,6 +287,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-networkmanager/src/endpoints.ts b/clients/client-networkmanager/src/endpoints.ts index 937203e11771..b68df2c25380 100644 --- a/clients/client-networkmanager/src/endpoints.ts +++ b/clients/client-networkmanager/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "networkmanager", diff --git a/clients/client-networkmanager/src/runtimeConfig.browser.ts b/clients/client-networkmanager/src/runtimeConfig.browser.ts index dfc5280932ce..d0cfc052723a 100644 --- a/clients/client-networkmanager/src/runtimeConfig.browser.ts +++ b/clients/client-networkmanager/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: NetworkManagerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-networkmanager/src/runtimeConfig.ts b/clients/client-networkmanager/src/runtimeConfig.ts index 9aaae811d3fd..41de84fe9485 100644 --- a/clients/client-networkmanager/src/runtimeConfig.ts +++ b/clients/client-networkmanager/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: NetworkManagerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-nimble/src/NimbleClient.ts b/clients/client-nimble/src/NimbleClient.ts index ee65e4f31960..975f35805d25 100644 --- a/clients/client-nimble/src/NimbleClient.ts +++ b/clients/client-nimble/src/NimbleClient.ts @@ -353,6 +353,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-nimble/src/endpoints.ts b/clients/client-nimble/src/endpoints.ts index e1287d3bee8c..0e24103f56e9 100644 --- a/clients/client-nimble/src/endpoints.ts +++ b/clients/client-nimble/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "nimble", diff --git a/clients/client-nimble/src/runtimeConfig.browser.ts b/clients/client-nimble/src/runtimeConfig.browser.ts index 919bbdc1db01..8b0c8d14d682 100644 --- a/clients/client-nimble/src/runtimeConfig.browser.ts +++ b/clients/client-nimble/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: NimbleClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-nimble/src/runtimeConfig.ts b/clients/client-nimble/src/runtimeConfig.ts index 58c405026896..ab3e8d91e93d 100644 --- a/clients/client-nimble/src/runtimeConfig.ts +++ b/clients/client-nimble/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: NimbleClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-opensearch/src/OpenSearchClient.ts b/clients/client-opensearch/src/OpenSearchClient.ts index 6a4f47a0b9c0..0bda2e88ea86 100644 --- a/clients/client-opensearch/src/OpenSearchClient.ts +++ b/clients/client-opensearch/src/OpenSearchClient.ts @@ -314,6 +314,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-opensearch/src/endpoints.ts b/clients/client-opensearch/src/endpoints.ts index b682e53831be..4042a8f4e918 100644 --- a/clients/client-opensearch/src/endpoints.ts +++ b/clients/client-opensearch/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { fips: { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "es", diff --git a/clients/client-opensearch/src/runtimeConfig.browser.ts b/clients/client-opensearch/src/runtimeConfig.browser.ts index 9f0959837e71..78366d2a543a 100644 --- a/clients/client-opensearch/src/runtimeConfig.browser.ts +++ b/clients/client-opensearch/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: OpenSearchClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-opensearch/src/runtimeConfig.ts b/clients/client-opensearch/src/runtimeConfig.ts index fc25d8b71ade..dce0ffc8f038 100644 --- a/clients/client-opensearch/src/runtimeConfig.ts +++ b/clients/client-opensearch/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: OpenSearchClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-opsworks/src/OpsWorksClient.ts b/clients/client-opsworks/src/OpsWorksClient.ts index b1895e67719b..63c5f1a4cdc6 100644 --- a/clients/client-opsworks/src/OpsWorksClient.ts +++ b/clients/client-opsworks/src/OpsWorksClient.ts @@ -437,6 +437,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-opsworks/src/endpoints.ts b/clients/client-opsworks/src/endpoints.ts index c4a707e372a0..a7a5933ddad4 100644 --- a/clients/client-opsworks/src/endpoints.ts +++ b/clients/client-opsworks/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "opsworks", diff --git a/clients/client-opsworks/src/runtimeConfig.browser.ts b/clients/client-opsworks/src/runtimeConfig.browser.ts index 1fe61d72cdc2..92ea2bf3ccb4 100644 --- a/clients/client-opsworks/src/runtimeConfig.browser.ts +++ b/clients/client-opsworks/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: OpsWorksClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-opsworks/src/runtimeConfig.ts b/clients/client-opsworks/src/runtimeConfig.ts index 554d00f77692..bdeaab19e223 100644 --- a/clients/client-opsworks/src/runtimeConfig.ts +++ b/clients/client-opsworks/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: OpsWorksClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-opsworkscm/src/OpsWorksCMClient.ts b/clients/client-opsworkscm/src/OpsWorksCMClient.ts index f0ff9fb2b556..71d477f4b293 100644 --- a/clients/client-opsworkscm/src/OpsWorksCMClient.ts +++ b/clients/client-opsworkscm/src/OpsWorksCMClient.ts @@ -209,6 +209,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-opsworkscm/src/endpoints.ts b/clients/client-opsworkscm/src/endpoints.ts index d29e5ca9e7d5..9a817e5579f6 100644 --- a/clients/client-opsworkscm/src/endpoints.ts +++ b/clients/client-opsworkscm/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "opsworks-cm", diff --git a/clients/client-opsworkscm/src/runtimeConfig.browser.ts b/clients/client-opsworkscm/src/runtimeConfig.browser.ts index e31f36f0b9cd..cb32530f3ff4 100644 --- a/clients/client-opsworkscm/src/runtimeConfig.browser.ts +++ b/clients/client-opsworkscm/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: OpsWorksCMClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-opsworkscm/src/runtimeConfig.ts b/clients/client-opsworkscm/src/runtimeConfig.ts index ca4f0f9d7e1d..427db5b45d19 100644 --- a/clients/client-opsworkscm/src/runtimeConfig.ts +++ b/clients/client-opsworkscm/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: OpsWorksCMClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-organizations/src/OrganizationsClient.ts b/clients/client-organizations/src/OrganizationsClient.ts index 2e6444e1cc04..e8b5ada73a97 100644 --- a/clients/client-organizations/src/OrganizationsClient.ts +++ b/clients/client-organizations/src/OrganizationsClient.ts @@ -365,6 +365,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-organizations/src/endpoints.ts b/clients/client-organizations/src/endpoints.ts index ca60f976b7e8..3d5896c1708c 100644 --- a/clients/client-organizations/src/endpoints.ts +++ b/clients/client-organizations/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-cn-global": { @@ -76,7 +76,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "organizations", diff --git a/clients/client-organizations/src/runtimeConfig.browser.ts b/clients/client-organizations/src/runtimeConfig.browser.ts index ec53a99a498b..9e6fbb99d8d1 100644 --- a/clients/client-organizations/src/runtimeConfig.browser.ts +++ b/clients/client-organizations/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: OrganizationsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-organizations/src/runtimeConfig.ts b/clients/client-organizations/src/runtimeConfig.ts index 318e2970f416..75caf52f29c9 100644 --- a/clients/client-organizations/src/runtimeConfig.ts +++ b/clients/client-organizations/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: OrganizationsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-outposts/src/OutpostsClient.ts b/clients/client-outposts/src/OutpostsClient.ts index d669e4e65d43..1ce599665110 100644 --- a/clients/client-outposts/src/OutpostsClient.ts +++ b/clients/client-outposts/src/OutpostsClient.ts @@ -176,6 +176,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-outposts/src/endpoints.ts b/clients/client-outposts/src/endpoints.ts index af145b69537a..de969ad49780 100644 --- a/clients/client-outposts/src/endpoints.ts +++ b/clients/client-outposts/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "outposts", diff --git a/clients/client-outposts/src/runtimeConfig.browser.ts b/clients/client-outposts/src/runtimeConfig.browser.ts index 17c3259c3bd7..bbb53a9002b4 100644 --- a/clients/client-outposts/src/runtimeConfig.browser.ts +++ b/clients/client-outposts/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: OutpostsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-outposts/src/runtimeConfig.ts b/clients/client-outposts/src/runtimeConfig.ts index 350ab7132e38..4fae4ebd4021 100644 --- a/clients/client-outposts/src/runtimeConfig.ts +++ b/clients/client-outposts/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: OutpostsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-panorama/src/PanoramaClient.ts b/clients/client-panorama/src/PanoramaClient.ts index 551ee1de4e21..0cd68c02ebdb 100644 --- a/clients/client-panorama/src/PanoramaClient.ts +++ b/clients/client-panorama/src/PanoramaClient.ts @@ -293,6 +293,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-panorama/src/endpoints.ts b/clients/client-panorama/src/endpoints.ts index 2c7660dd8b2e..9c75b80878cb 100644 --- a/clients/client-panorama/src/endpoints.ts +++ b/clients/client-panorama/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "panorama", diff --git a/clients/client-panorama/src/runtimeConfig.browser.ts b/clients/client-panorama/src/runtimeConfig.browser.ts index 44dc9c40fa2c..63016f6729e9 100644 --- a/clients/client-panorama/src/runtimeConfig.browser.ts +++ b/clients/client-panorama/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PanoramaClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-panorama/src/runtimeConfig.ts b/clients/client-panorama/src/runtimeConfig.ts index 5f0380bb11b7..953a3d3ce987 100644 --- a/clients/client-panorama/src/runtimeConfig.ts +++ b/clients/client-panorama/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PanoramaClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-personalize-events/src/PersonalizeEventsClient.ts b/clients/client-personalize-events/src/PersonalizeEventsClient.ts index 34bc7da1dd51..3b557a0c87f7 100644 --- a/clients/client-personalize-events/src/PersonalizeEventsClient.ts +++ b/clients/client-personalize-events/src/PersonalizeEventsClient.ts @@ -140,6 +140,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-personalize-events/src/endpoints.ts b/clients/client-personalize-events/src/endpoints.ts index d544ee4f3c62..37d9feed92b8 100644 --- a/clients/client-personalize-events/src/endpoints.ts +++ b/clients/client-personalize-events/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "personalize", diff --git a/clients/client-personalize-events/src/runtimeConfig.browser.ts b/clients/client-personalize-events/src/runtimeConfig.browser.ts index 99a54c5a0561..035025e7931a 100644 --- a/clients/client-personalize-events/src/runtimeConfig.browser.ts +++ b/clients/client-personalize-events/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PersonalizeEventsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-personalize-events/src/runtimeConfig.ts b/clients/client-personalize-events/src/runtimeConfig.ts index aeea61c80cd1..5e74a64bb9ec 100644 --- a/clients/client-personalize-events/src/runtimeConfig.ts +++ b/clients/client-personalize-events/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PersonalizeEventsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-personalize-runtime/src/PersonalizeRuntimeClient.ts b/clients/client-personalize-runtime/src/PersonalizeRuntimeClient.ts index 23d934753bd1..6ed7157ea01f 100644 --- a/clients/client-personalize-runtime/src/PersonalizeRuntimeClient.ts +++ b/clients/client-personalize-runtime/src/PersonalizeRuntimeClient.ts @@ -142,6 +142,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-personalize-runtime/src/endpoints.ts b/clients/client-personalize-runtime/src/endpoints.ts index fc2b4dff7e28..58a6846f48e1 100644 --- a/clients/client-personalize-runtime/src/endpoints.ts +++ b/clients/client-personalize-runtime/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "personalize", diff --git a/clients/client-personalize-runtime/src/runtimeConfig.browser.ts b/clients/client-personalize-runtime/src/runtimeConfig.browser.ts index 32d6160a87d9..f21199d5bbcf 100644 --- a/clients/client-personalize-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-personalize-runtime/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PersonalizeRuntimeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-personalize-runtime/src/runtimeConfig.ts b/clients/client-personalize-runtime/src/runtimeConfig.ts index fb8734f23f5f..1fce5faca344 100644 --- a/clients/client-personalize-runtime/src/runtimeConfig.ts +++ b/clients/client-personalize-runtime/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PersonalizeRuntimeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-personalize/src/PersonalizeClient.ts b/clients/client-personalize/src/PersonalizeClient.ts index 933d7219dc77..b99dbb931fee 100644 --- a/clients/client-personalize/src/PersonalizeClient.ts +++ b/clients/client-personalize/src/PersonalizeClient.ts @@ -326,6 +326,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-personalize/src/endpoints.ts b/clients/client-personalize/src/endpoints.ts index 35e837268258..bc11eefa7d52 100644 --- a/clients/client-personalize/src/endpoints.ts +++ b/clients/client-personalize/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "personalize", diff --git a/clients/client-personalize/src/runtimeConfig.browser.ts b/clients/client-personalize/src/runtimeConfig.browser.ts index 56b9f37100cd..73cb917a4252 100644 --- a/clients/client-personalize/src/runtimeConfig.browser.ts +++ b/clients/client-personalize/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PersonalizeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-personalize/src/runtimeConfig.ts b/clients/client-personalize/src/runtimeConfig.ts index 36f56e24daf7..a2ed67e7e2ef 100644 --- a/clients/client-personalize/src/runtimeConfig.ts +++ b/clients/client-personalize/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PersonalizeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pi/src/PIClient.ts b/clients/client-pi/src/PIClient.ts index 01489ff770db..c1d1ec2319c0 100644 --- a/clients/client-pi/src/PIClient.ts +++ b/clients/client-pi/src/PIClient.ts @@ -152,6 +152,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-pi/src/endpoints.ts b/clients/client-pi/src/endpoints.ts index f4a376b88cb0..36fa00d15b3e 100644 --- a/clients/client-pi/src/endpoints.ts +++ b/clients/client-pi/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "pi", diff --git a/clients/client-pi/src/runtimeConfig.browser.ts b/clients/client-pi/src/runtimeConfig.browser.ts index cb1a97d38e1a..b6396f9be009 100644 --- a/clients/client-pi/src/runtimeConfig.browser.ts +++ b/clients/client-pi/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PIClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pi/src/runtimeConfig.ts b/clients/client-pi/src/runtimeConfig.ts index 360277c244ae..131990d8fb2a 100644 --- a/clients/client-pi/src/runtimeConfig.ts +++ b/clients/client-pi/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PIClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pinpoint-email/src/PinpointEmailClient.ts b/clients/client-pinpoint-email/src/PinpointEmailClient.ts index da3da3288428..fa4006e99a5f 100644 --- a/clients/client-pinpoint-email/src/PinpointEmailClient.ts +++ b/clients/client-pinpoint-email/src/PinpointEmailClient.ts @@ -368,6 +368,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-pinpoint-email/src/endpoints.ts b/clients/client-pinpoint-email/src/endpoints.ts index 7e35e642de08..fd64fb343c7f 100644 --- a/clients/client-pinpoint-email/src/endpoints.ts +++ b/clients/client-pinpoint-email/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-gov-west-1": { @@ -58,7 +58,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ses", diff --git a/clients/client-pinpoint-email/src/runtimeConfig.browser.ts b/clients/client-pinpoint-email/src/runtimeConfig.browser.ts index 2932655dd131..d528dbec17f7 100644 --- a/clients/client-pinpoint-email/src/runtimeConfig.browser.ts +++ b/clients/client-pinpoint-email/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PinpointEmailClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pinpoint-email/src/runtimeConfig.ts b/clients/client-pinpoint-email/src/runtimeConfig.ts index 3580ab2982bb..eb6ce86f0fdf 100644 --- a/clients/client-pinpoint-email/src/runtimeConfig.ts +++ b/clients/client-pinpoint-email/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PinpointEmailClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pinpoint-sms-voice/src/PinpointSMSVoiceClient.ts b/clients/client-pinpoint-sms-voice/src/PinpointSMSVoiceClient.ts index fc82195af689..cd5394a10f2a 100644 --- a/clients/client-pinpoint-sms-voice/src/PinpointSMSVoiceClient.ts +++ b/clients/client-pinpoint-sms-voice/src/PinpointSMSVoiceClient.ts @@ -182,6 +182,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-pinpoint-sms-voice/src/endpoints.ts b/clients/client-pinpoint-sms-voice/src/endpoints.ts index 1cdb265708b0..e64c42f116f1 100644 --- a/clients/client-pinpoint-sms-voice/src/endpoints.ts +++ b/clients/client-pinpoint-sms-voice/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sms-voice", diff --git a/clients/client-pinpoint-sms-voice/src/runtimeConfig.browser.ts b/clients/client-pinpoint-sms-voice/src/runtimeConfig.browser.ts index c964c802622a..15575111e765 100644 --- a/clients/client-pinpoint-sms-voice/src/runtimeConfig.browser.ts +++ b/clients/client-pinpoint-sms-voice/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PinpointSMSVoiceClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pinpoint-sms-voice/src/runtimeConfig.ts b/clients/client-pinpoint-sms-voice/src/runtimeConfig.ts index 3390705c3aee..2321c0f85a0b 100644 --- a/clients/client-pinpoint-sms-voice/src/runtimeConfig.ts +++ b/clients/client-pinpoint-sms-voice/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PinpointSMSVoiceClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pinpoint/src/PinpointClient.ts b/clients/client-pinpoint/src/PinpointClient.ts index 5656de95e2d0..764e46b7f672 100644 --- a/clients/client-pinpoint/src/PinpointClient.ts +++ b/clients/client-pinpoint/src/PinpointClient.ts @@ -605,6 +605,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-pinpoint/src/endpoints.ts b/clients/client-pinpoint/src/endpoints.ts index ef0ae060ff62..9bac44694cc2 100644 --- a/clients/client-pinpoint/src/endpoints.ts +++ b/clients/client-pinpoint/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -80,7 +80,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "mobiletargeting", diff --git a/clients/client-pinpoint/src/runtimeConfig.browser.ts b/clients/client-pinpoint/src/runtimeConfig.browser.ts index 30a3b600e95c..7019b778ebe2 100644 --- a/clients/client-pinpoint/src/runtimeConfig.browser.ts +++ b/clients/client-pinpoint/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PinpointClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pinpoint/src/runtimeConfig.ts b/clients/client-pinpoint/src/runtimeConfig.ts index 067cb49cbb78..bdccd466416f 100644 --- a/clients/client-pinpoint/src/runtimeConfig.ts +++ b/clients/client-pinpoint/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PinpointClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-polly/src/PollyClient.ts b/clients/client-polly/src/PollyClient.ts index 4f6c07619857..fc7b699e6769 100644 --- a/clients/client-polly/src/PollyClient.ts +++ b/clients/client-polly/src/PollyClient.ts @@ -173,6 +173,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-polly/src/endpoints.ts b/clients/client-polly/src/endpoints.ts index a76af10a8425..d6a93265e77a 100644 --- a/clients/client-polly/src/endpoints.ts +++ b/clients/client-polly/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -78,7 +78,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "polly", diff --git a/clients/client-polly/src/runtimeConfig.browser.ts b/clients/client-polly/src/runtimeConfig.browser.ts index 84157d4294e2..805e07b173cf 100644 --- a/clients/client-polly/src/runtimeConfig.browser.ts +++ b/clients/client-polly/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PollyClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-polly/src/runtimeConfig.ts b/clients/client-polly/src/runtimeConfig.ts index c13743d91085..9f170320d174 100644 --- a/clients/client-polly/src/runtimeConfig.ts +++ b/clients/client-polly/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PollyClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pricing/src/PricingClient.ts b/clients/client-pricing/src/PricingClient.ts index 75e93e1e0e6c..caf25a07bac5 100644 --- a/clients/client-pricing/src/PricingClient.ts +++ b/clients/client-pricing/src/PricingClient.ts @@ -143,6 +143,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-pricing/src/endpoints.ts b/clients/client-pricing/src/endpoints.ts index 3732ee042227..87d4373eab25 100644 --- a/clients/client-pricing/src/endpoints.ts +++ b/clients/client-pricing/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "pricing", diff --git a/clients/client-pricing/src/runtimeConfig.browser.ts b/clients/client-pricing/src/runtimeConfig.browser.ts index 0b8086dad4d6..6248519291cc 100644 --- a/clients/client-pricing/src/runtimeConfig.browser.ts +++ b/clients/client-pricing/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: PricingClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-pricing/src/runtimeConfig.ts b/clients/client-pricing/src/runtimeConfig.ts index c4256a595acc..f1d24351436a 100644 --- a/clients/client-pricing/src/runtimeConfig.ts +++ b/clients/client-pricing/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: PricingClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-proton/src/ProtonClient.ts b/clients/client-proton/src/ProtonClient.ts index 0e77584b0ebb..68195cee00b1 100644 --- a/clients/client-proton/src/ProtonClient.ts +++ b/clients/client-proton/src/ProtonClient.ts @@ -386,6 +386,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-proton/src/endpoints.ts b/clients/client-proton/src/endpoints.ts index d6fa05ba2a86..247c2a7d6b4c 100644 --- a/clients/client-proton/src/endpoints.ts +++ b/clients/client-proton/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "proton", diff --git a/clients/client-proton/src/runtimeConfig.browser.ts b/clients/client-proton/src/runtimeConfig.browser.ts index fdcecb19b75d..d7d46275bd3d 100644 --- a/clients/client-proton/src/runtimeConfig.browser.ts +++ b/clients/client-proton/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ProtonClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-proton/src/runtimeConfig.ts b/clients/client-proton/src/runtimeConfig.ts index d9a8b4b2e826..0baa38661859 100644 --- a/clients/client-proton/src/runtimeConfig.ts +++ b/clients/client-proton/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ProtonClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-qldb-session/src/QLDBSessionClient.ts b/clients/client-qldb-session/src/QLDBSessionClient.ts index aefd08854e64..e05e132b0ced 100644 --- a/clients/client-qldb-session/src/QLDBSessionClient.ts +++ b/clients/client-qldb-session/src/QLDBSessionClient.ts @@ -138,6 +138,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-qldb-session/src/endpoints.ts b/clients/client-qldb-session/src/endpoints.ts index 000a7b977f30..20923707f13a 100644 --- a/clients/client-qldb-session/src/endpoints.ts +++ b/clients/client-qldb-session/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -69,7 +69,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "qldb", diff --git a/clients/client-qldb-session/src/runtimeConfig.browser.ts b/clients/client-qldb-session/src/runtimeConfig.browser.ts index ed3e7a3dacd1..0ed939d1a239 100644 --- a/clients/client-qldb-session/src/runtimeConfig.browser.ts +++ b/clients/client-qldb-session/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: QLDBSessionClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-qldb-session/src/runtimeConfig.ts b/clients/client-qldb-session/src/runtimeConfig.ts index c1a83d148fd0..cd6eb43a6477 100644 --- a/clients/client-qldb-session/src/runtimeConfig.ts +++ b/clients/client-qldb-session/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: QLDBSessionClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-qldb/src/QLDBClient.ts b/clients/client-qldb/src/QLDBClient.ts index 74ef166fc7c7..39794a9409c5 100644 --- a/clients/client-qldb/src/QLDBClient.ts +++ b/clients/client-qldb/src/QLDBClient.ts @@ -224,6 +224,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-qldb/src/endpoints.ts b/clients/client-qldb/src/endpoints.ts index 086b16d1d0b6..21947d0c3a12 100644 --- a/clients/client-qldb/src/endpoints.ts +++ b/clients/client-qldb/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -69,7 +69,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "qldb", diff --git a/clients/client-qldb/src/runtimeConfig.browser.ts b/clients/client-qldb/src/runtimeConfig.browser.ts index 9c548fa3963d..8c811e9681ac 100644 --- a/clients/client-qldb/src/runtimeConfig.browser.ts +++ b/clients/client-qldb/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: QLDBClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-qldb/src/runtimeConfig.ts b/clients/client-qldb/src/runtimeConfig.ts index 73fbb5ec8829..7911df47a861 100644 --- a/clients/client-qldb/src/runtimeConfig.ts +++ b/clients/client-qldb/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: QLDBClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-quicksight/src/QuickSightClient.ts b/clients/client-quicksight/src/QuickSightClient.ts index 760f2b5816ea..5a5fa78e56af 100644 --- a/clients/client-quicksight/src/QuickSightClient.ts +++ b/clients/client-quicksight/src/QuickSightClient.ts @@ -623,6 +623,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-quicksight/src/endpoints.ts b/clients/client-quicksight/src/endpoints.ts index 7bb60b95e3d2..aadfeb68bd13 100644 --- a/clients/client-quicksight/src/endpoints.ts +++ b/clients/client-quicksight/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -54,7 +54,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "quicksight", diff --git a/clients/client-quicksight/src/runtimeConfig.browser.ts b/clients/client-quicksight/src/runtimeConfig.browser.ts index 58863d68818f..8263f3f45107 100644 --- a/clients/client-quicksight/src/runtimeConfig.browser.ts +++ b/clients/client-quicksight/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: QuickSightClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-quicksight/src/runtimeConfig.ts b/clients/client-quicksight/src/runtimeConfig.ts index 24c4b7ed5a77..df3f5a4b4e20 100644 --- a/clients/client-quicksight/src/runtimeConfig.ts +++ b/clients/client-quicksight/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: QuickSightClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ram/src/RAMClient.ts b/clients/client-ram/src/RAMClient.ts index 57093ff450d4..481b2ae7b070 100644 --- a/clients/client-ram/src/RAMClient.ts +++ b/clients/client-ram/src/RAMClient.ts @@ -257,6 +257,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ram/src/endpoints.ts b/clients/client-ram/src/endpoints.ts index 8a2a295b2231..c001a7b7fa95 100644 --- a/clients/client-ram/src/endpoints.ts +++ b/clients/client-ram/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ram", diff --git a/clients/client-ram/src/runtimeConfig.browser.ts b/clients/client-ram/src/runtimeConfig.browser.ts index e632279fca17..1b0f61c40c48 100644 --- a/clients/client-ram/src/runtimeConfig.browser.ts +++ b/clients/client-ram/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: RAMClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ram/src/runtimeConfig.ts b/clients/client-ram/src/runtimeConfig.ts index 3109d39b411b..57c1a55b4a3e 100644 --- a/clients/client-ram/src/runtimeConfig.ts +++ b/clients/client-ram/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: RAMClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-rds-data/src/RDSDataClient.ts b/clients/client-rds-data/src/RDSDataClient.ts index 02b29106f600..7123e69e92a2 100644 --- a/clients/client-rds-data/src/RDSDataClient.ts +++ b/clients/client-rds-data/src/RDSDataClient.ts @@ -161,6 +161,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-rds-data/src/endpoints.ts b/clients/client-rds-data/src/endpoints.ts index 93b10378c1a1..d017013776cf 100644 --- a/clients/client-rds-data/src/endpoints.ts +++ b/clients/client-rds-data/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "rds-data", diff --git a/clients/client-rds-data/src/runtimeConfig.browser.ts b/clients/client-rds-data/src/runtimeConfig.browser.ts index 3c7fa194df8c..8bbf17beff7a 100644 --- a/clients/client-rds-data/src/runtimeConfig.browser.ts +++ b/clients/client-rds-data/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: RDSDataClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-rds-data/src/runtimeConfig.ts b/clients/client-rds-data/src/runtimeConfig.ts index e4289e066f0d..5820af891957 100644 --- a/clients/client-rds-data/src/runtimeConfig.ts +++ b/clients/client-rds-data/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: RDSDataClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-rds/src/RDSClient.ts b/clients/client-rds/src/RDSClient.ts index 931e46aa4305..9f743c5a19f4 100644 --- a/clients/client-rds/src/RDSClient.ts +++ b/clients/client-rds/src/RDSClient.ts @@ -872,6 +872,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-rds/src/endpoints.ts b/clients/client-rds/src/endpoints.ts index d1ea2a09c219..8033fe8df7f7 100644 --- a/clients/client-rds/src/endpoints.ts +++ b/clients/client-rds/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "rds-fips.ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "rds", diff --git a/clients/client-rds/src/runtimeConfig.browser.ts b/clients/client-rds/src/runtimeConfig.browser.ts index 00ae53249930..2ce8f80dc3e8 100644 --- a/clients/client-rds/src/runtimeConfig.browser.ts +++ b/clients/client-rds/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: RDSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-rds/src/runtimeConfig.ts b/clients/client-rds/src/runtimeConfig.ts index 53e1f4943357..b0e5b83aaca1 100644 --- a/clients/client-rds/src/runtimeConfig.ts +++ b/clients/client-rds/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: RDSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-redshift-data/src/RedshiftDataClient.ts b/clients/client-redshift-data/src/RedshiftDataClient.ts index 5281d7ca158c..b2def116b1bb 100644 --- a/clients/client-redshift-data/src/RedshiftDataClient.ts +++ b/clients/client-redshift-data/src/RedshiftDataClient.ts @@ -170,6 +170,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-redshift-data/src/endpoints.ts b/clients/client-redshift-data/src/endpoints.ts index 09438420ee9f..ad7eac42a8a3 100644 --- a/clients/client-redshift-data/src/endpoints.ts +++ b/clients/client-redshift-data/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "redshift-data", diff --git a/clients/client-redshift-data/src/runtimeConfig.browser.ts b/clients/client-redshift-data/src/runtimeConfig.browser.ts index 9dd5a4c6af2a..701344206b2d 100644 --- a/clients/client-redshift-data/src/runtimeConfig.browser.ts +++ b/clients/client-redshift-data/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: RedshiftDataClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-redshift-data/src/runtimeConfig.ts b/clients/client-redshift-data/src/runtimeConfig.ts index 6bb6ea60ff88..b7e299ca026b 100644 --- a/clients/client-redshift-data/src/runtimeConfig.ts +++ b/clients/client-redshift-data/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: RedshiftDataClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-redshift/src/RedshiftClient.ts b/clients/client-redshift/src/RedshiftClient.ts index 7a960f8895d2..ab8cd965e440 100644 --- a/clients/client-redshift/src/RedshiftClient.ts +++ b/clients/client-redshift/src/RedshiftClient.ts @@ -752,6 +752,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-redshift/src/endpoints.ts b/clients/client-redshift/src/endpoints.ts index db23c3e9f05d..eeca0ebbc815 100644 --- a/clients/client-redshift/src/endpoints.ts +++ b/clients/client-redshift/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "redshift", diff --git a/clients/client-redshift/src/runtimeConfig.browser.ts b/clients/client-redshift/src/runtimeConfig.browser.ts index 08b421e10efb..5b82b94088af 100644 --- a/clients/client-redshift/src/runtimeConfig.browser.ts +++ b/clients/client-redshift/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: RedshiftClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-redshift/src/runtimeConfig.ts b/clients/client-redshift/src/runtimeConfig.ts index 13a223a981a5..5e6ac975aef8 100644 --- a/clients/client-redshift/src/runtimeConfig.ts +++ b/clients/client-redshift/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: RedshiftClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-rekognition/src/RekognitionClient.ts b/clients/client-rekognition/src/RekognitionClient.ts index 5212922810fd..e3a8bcef1d26 100644 --- a/clients/client-rekognition/src/RekognitionClient.ts +++ b/clients/client-rekognition/src/RekognitionClient.ts @@ -356,6 +356,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-rekognition/src/endpoints.ts b/clients/client-rekognition/src/endpoints.ts index b7494bc37162..85552784669a 100644 --- a/clients/client-rekognition/src/endpoints.ts +++ b/clients/client-rekognition/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "rekognition-fips.ca-central-1": { @@ -83,7 +83,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "rekognition", diff --git a/clients/client-rekognition/src/runtimeConfig.browser.ts b/clients/client-rekognition/src/runtimeConfig.browser.ts index 27d95aeec024..760cb1a704b5 100644 --- a/clients/client-rekognition/src/runtimeConfig.browser.ts +++ b/clients/client-rekognition/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: RekognitionClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-rekognition/src/runtimeConfig.ts b/clients/client-rekognition/src/runtimeConfig.ts index 3e95aa105e7c..1f01621917db 100644 --- a/clients/client-rekognition/src/runtimeConfig.ts +++ b/clients/client-rekognition/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: RekognitionClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPIClient.ts b/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPIClient.ts index c13c25c2ab66..0b9916e8f9e5 100644 --- a/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPIClient.ts +++ b/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPIClient.ts @@ -170,6 +170,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-resource-groups-tagging-api/src/endpoints.ts b/clients/client-resource-groups-tagging-api/src/endpoints.ts index 7ec8379d3223..4fdf98d3a27e 100644 --- a/clients/client-resource-groups-tagging-api/src/endpoints.ts +++ b/clients/client-resource-groups-tagging-api/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "tagging", diff --git a/clients/client-resource-groups-tagging-api/src/runtimeConfig.browser.ts b/clients/client-resource-groups-tagging-api/src/runtimeConfig.browser.ts index 4ec0ec9a6e43..f68716749629 100644 --- a/clients/client-resource-groups-tagging-api/src/runtimeConfig.browser.ts +++ b/clients/client-resource-groups-tagging-api/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ResourceGroupsTaggingAPIClientConfig) = retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-resource-groups-tagging-api/src/runtimeConfig.ts b/clients/client-resource-groups-tagging-api/src/runtimeConfig.ts index c6f414e23667..4848a2119773 100644 --- a/clients/client-resource-groups-tagging-api/src/runtimeConfig.ts +++ b/clients/client-resource-groups-tagging-api/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ResourceGroupsTaggingAPIClientConfig) = retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-resource-groups/src/ResourceGroupsClient.ts b/clients/client-resource-groups/src/ResourceGroupsClient.ts index 9ee7c9c051df..1c7e90d87f8f 100644 --- a/clients/client-resource-groups/src/ResourceGroupsClient.ts +++ b/clients/client-resource-groups/src/ResourceGroupsClient.ts @@ -191,6 +191,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-resource-groups/src/endpoints.ts b/clients/client-resource-groups/src/endpoints.ts index d9faa6c7e664..a9f0251fd4c7 100644 --- a/clients/client-resource-groups/src/endpoints.ts +++ b/clients/client-resource-groups/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "resource-groups", diff --git a/clients/client-resource-groups/src/runtimeConfig.browser.ts b/clients/client-resource-groups/src/runtimeConfig.browser.ts index f47828be463e..f4229e447a1e 100644 --- a/clients/client-resource-groups/src/runtimeConfig.browser.ts +++ b/clients/client-resource-groups/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ResourceGroupsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-resource-groups/src/runtimeConfig.ts b/clients/client-resource-groups/src/runtimeConfig.ts index 42bf220affda..4344c6f83d31 100644 --- a/clients/client-resource-groups/src/runtimeConfig.ts +++ b/clients/client-resource-groups/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ResourceGroupsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-robomaker/src/RoboMakerClient.ts b/clients/client-robomaker/src/RoboMakerClient.ts index 520d6459cf0f..2b4bf82c4173 100644 --- a/clients/client-robomaker/src/RoboMakerClient.ts +++ b/clients/client-robomaker/src/RoboMakerClient.ts @@ -422,6 +422,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-robomaker/src/endpoints.ts b/clients/client-robomaker/src/endpoints.ts index 5e1dc3d31eb3..05951bdbc7e0 100644 --- a/clients/client-robomaker/src/endpoints.ts +++ b/clients/client-robomaker/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "robomaker", diff --git a/clients/client-robomaker/src/runtimeConfig.browser.ts b/clients/client-robomaker/src/runtimeConfig.browser.ts index 553cf76bcb77..1021f7683c2e 100644 --- a/clients/client-robomaker/src/runtimeConfig.browser.ts +++ b/clients/client-robomaker/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: RoboMakerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-robomaker/src/runtimeConfig.ts b/clients/client-robomaker/src/runtimeConfig.ts index 92c60b72268b..c0412d67ba8c 100644 --- a/clients/client-robomaker/src/runtimeConfig.ts +++ b/clients/client-robomaker/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: RoboMakerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route-53-domains/src/Route53DomainsClient.ts b/clients/client-route-53-domains/src/Route53DomainsClient.ts index 786e7416dd40..cb7488e2e095 100644 --- a/clients/client-route-53-domains/src/Route53DomainsClient.ts +++ b/clients/client-route-53-domains/src/Route53DomainsClient.ts @@ -278,6 +278,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-route-53-domains/src/endpoints.ts b/clients/client-route-53-domains/src/endpoints.ts index 451423ae6454..91ddd5db1b06 100644 --- a/clients/client-route-53-domains/src/endpoints.ts +++ b/clients/client-route-53-domains/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "route53domains", diff --git a/clients/client-route-53-domains/src/runtimeConfig.browser.ts b/clients/client-route-53-domains/src/runtimeConfig.browser.ts index 6eea662b1e5d..9b98bd54ab83 100644 --- a/clients/client-route-53-domains/src/runtimeConfig.browser.ts +++ b/clients/client-route-53-domains/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: Route53DomainsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route-53-domains/src/runtimeConfig.ts b/clients/client-route-53-domains/src/runtimeConfig.ts index 6331cf7dda89..410064cdca12 100644 --- a/clients/client-route-53-domains/src/runtimeConfig.ts +++ b/clients/client-route-53-domains/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: Route53DomainsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route-53/src/Route53Client.ts b/clients/client-route-53/src/Route53Client.ts index 32b6eb8324ea..f348d62f2f08 100644 --- a/clients/client-route-53/src/Route53Client.ts +++ b/clients/client-route-53/src/Route53Client.ts @@ -464,6 +464,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-route-53/src/endpoints.ts b/clients/client-route-53/src/endpoints.ts index eb9526070023..63aa81981d72 100644 --- a/clients/client-route-53/src/endpoints.ts +++ b/clients/client-route-53/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-cn-global": { @@ -84,7 +84,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "route53", diff --git a/clients/client-route-53/src/runtimeConfig.browser.ts b/clients/client-route-53/src/runtimeConfig.browser.ts index 222838eef194..1f70e21fff46 100644 --- a/clients/client-route-53/src/runtimeConfig.browser.ts +++ b/clients/client-route-53/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: Route53ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route-53/src/runtimeConfig.ts b/clients/client-route-53/src/runtimeConfig.ts index 7621d4ca6936..7109fe954d3d 100644 --- a/clients/client-route-53/src/runtimeConfig.ts +++ b/clients/client-route-53/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: Route53ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route53-recovery-cluster/src/Route53RecoveryClusterClient.ts b/clients/client-route53-recovery-cluster/src/Route53RecoveryClusterClient.ts index 9e1c17efb6bb..f81c4c20c4f8 100644 --- a/clients/client-route53-recovery-cluster/src/Route53RecoveryClusterClient.ts +++ b/clients/client-route53-recovery-cluster/src/Route53RecoveryClusterClient.ts @@ -155,6 +155,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-route53-recovery-cluster/src/endpoints.ts b/clients/client-route53-recovery-cluster/src/endpoints.ts index 78c318f1cbc2..952e8dfad184 100644 --- a/clients/client-route53-recovery-cluster/src/endpoints.ts +++ b/clients/client-route53-recovery-cluster/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "route53-recovery-cluster", diff --git a/clients/client-route53-recovery-cluster/src/runtimeConfig.browser.ts b/clients/client-route53-recovery-cluster/src/runtimeConfig.browser.ts index 9c4140adfcb7..8a008a7adf03 100644 --- a/clients/client-route53-recovery-cluster/src/runtimeConfig.browser.ts +++ b/clients/client-route53-recovery-cluster/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: Route53RecoveryClusterClientConfig) => retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route53-recovery-cluster/src/runtimeConfig.ts b/clients/client-route53-recovery-cluster/src/runtimeConfig.ts index 0c68fcc201ac..953465d465c6 100644 --- a/clients/client-route53-recovery-cluster/src/runtimeConfig.ts +++ b/clients/client-route53-recovery-cluster/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: Route53RecoveryClusterClientConfig) => retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route53-recovery-control-config/src/Route53RecoveryControlConfigClient.ts b/clients/client-route53-recovery-control-config/src/Route53RecoveryControlConfigClient.ts index 681cb35c2d9e..624226a77d48 100644 --- a/clients/client-route53-recovery-control-config/src/Route53RecoveryControlConfigClient.ts +++ b/clients/client-route53-recovery-control-config/src/Route53RecoveryControlConfigClient.ts @@ -218,6 +218,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-route53-recovery-control-config/src/endpoints.ts b/clients/client-route53-recovery-control-config/src/endpoints.ts index bc2a796a6c05..7592ba72a136 100644 --- a/clients/client-route53-recovery-control-config/src/endpoints.ts +++ b/clients/client-route53-recovery-control-config/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-global": { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "route53-recovery-control-config", diff --git a/clients/client-route53-recovery-control-config/src/runtimeConfig.browser.ts b/clients/client-route53-recovery-control-config/src/runtimeConfig.browser.ts index 1f5c9deb2c64..89fec32e7bfb 100644 --- a/clients/client-route53-recovery-control-config/src/runtimeConfig.browser.ts +++ b/clients/client-route53-recovery-control-config/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: Route53RecoveryControlConfigClientConfi retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route53-recovery-control-config/src/runtimeConfig.ts b/clients/client-route53-recovery-control-config/src/runtimeConfig.ts index bf7eae9b3dbe..31c7724b6363 100644 --- a/clients/client-route53-recovery-control-config/src/runtimeConfig.ts +++ b/clients/client-route53-recovery-control-config/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: Route53RecoveryControlConfigClientConfi retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route53-recovery-readiness/src/Route53RecoveryReadinessClient.ts b/clients/client-route53-recovery-readiness/src/Route53RecoveryReadinessClient.ts index ffab0ab17054..19161ca97cd5 100644 --- a/clients/client-route53-recovery-readiness/src/Route53RecoveryReadinessClient.ts +++ b/clients/client-route53-recovery-readiness/src/Route53RecoveryReadinessClient.ts @@ -281,6 +281,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-route53-recovery-readiness/src/endpoints.ts b/clients/client-route53-recovery-readiness/src/endpoints.ts index 75c06ec7db94..e3e6873c9e83 100644 --- a/clients/client-route53-recovery-readiness/src/endpoints.ts +++ b/clients/client-route53-recovery-readiness/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "route53-recovery-readiness", diff --git a/clients/client-route53-recovery-readiness/src/runtimeConfig.browser.ts b/clients/client-route53-recovery-readiness/src/runtimeConfig.browser.ts index 3d06e276f2c5..08fe684e5c9b 100644 --- a/clients/client-route53-recovery-readiness/src/runtimeConfig.browser.ts +++ b/clients/client-route53-recovery-readiness/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: Route53RecoveryReadinessClientConfig) = retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route53-recovery-readiness/src/runtimeConfig.ts b/clients/client-route53-recovery-readiness/src/runtimeConfig.ts index 65548132e85d..cbf5e98e0670 100644 --- a/clients/client-route53-recovery-readiness/src/runtimeConfig.ts +++ b/clients/client-route53-recovery-readiness/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: Route53RecoveryReadinessClientConfig) = retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route53resolver/src/Route53ResolverClient.ts b/clients/client-route53resolver/src/Route53ResolverClient.ts index c584d13826ca..7eff8cfc889c 100644 --- a/clients/client-route53resolver/src/Route53ResolverClient.ts +++ b/clients/client-route53resolver/src/Route53ResolverClient.ts @@ -476,6 +476,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-route53resolver/src/endpoints.ts b/clients/client-route53resolver/src/endpoints.ts index 418adbfaf47a..d89457960450 100644 --- a/clients/client-route53resolver/src/endpoints.ts +++ b/clients/client-route53resolver/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "route53resolver", diff --git a/clients/client-route53resolver/src/runtimeConfig.browser.ts b/clients/client-route53resolver/src/runtimeConfig.browser.ts index ae4c2c1f336f..79a89eddf4bb 100644 --- a/clients/client-route53resolver/src/runtimeConfig.browser.ts +++ b/clients/client-route53resolver/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: Route53ResolverClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-route53resolver/src/runtimeConfig.ts b/clients/client-route53resolver/src/runtimeConfig.ts index e890348a1cb5..adb4ee10a39d 100644 --- a/clients/client-route53resolver/src/runtimeConfig.ts +++ b/clients/client-route53resolver/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: Route53ResolverClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-s3-control/src/S3ControlClient.ts b/clients/client-s3-control/src/S3ControlClient.ts index 4acf320efee0..1b4cdc0dfed2 100644 --- a/clients/client-s3-control/src/S3ControlClient.ts +++ b/clients/client-s3-control/src/S3ControlClient.ts @@ -426,6 +426,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-s3-control/src/endpoints.ts b/clients/client-s3-control/src/endpoints.ts index 3c0e697dcfda..84e4f55ec78f 100644 --- a/clients/client-s3-control/src/endpoints.ts +++ b/clients/client-s3-control/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "ap-northeast-1": { @@ -171,7 +171,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "s3", diff --git a/clients/client-s3-control/src/runtimeConfig.browser.ts b/clients/client-s3-control/src/runtimeConfig.browser.ts index 62ecc76ae8f6..d8ccba0012b6 100644 --- a/clients/client-s3-control/src/runtimeConfig.browser.ts +++ b/clients/client-s3-control/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { blobHasher as streamHasher } from "@aws-sdk/hash-blob-browser"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; @@ -39,6 +40,8 @@ export const getRuntimeConfig = (config: S3ControlClientConfig) => { sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, streamHasher: config?.streamHasher ?? streamHasher, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-s3-control/src/runtimeConfig.ts b/clients/client-s3-control/src/runtimeConfig.ts index fba4648f0244..5aa8f45af838 100644 --- a/clients/client-s3-control/src/runtimeConfig.ts +++ b/clients/client-s3-control/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { fileStreamHasher as streamHasher } from "@aws-sdk/hash-stream-node"; @@ -44,6 +49,8 @@ export const getRuntimeConfig = (config: S3ControlClientConfig) => { sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, streamHasher: config?.streamHasher ?? streamHasher, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-s3/src/S3Client.ts b/clients/client-s3/src/S3Client.ts index ef693b5e471b..71d99fb03408 100644 --- a/clients/client-s3/src/S3Client.ts +++ b/clients/client-s3/src/S3Client.ts @@ -581,6 +581,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-s3/src/endpoints.ts b/clients/client-s3/src/endpoints.ts index 8d26ce2d5535..ebea3379289f 100644 --- a/clients/client-s3/src/endpoints.ts +++ b/clients/client-s3/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "accesspoint-af-south-1": { @@ -228,7 +228,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "s3", diff --git a/clients/client-s3/src/runtimeConfig.browser.ts b/clients/client-s3/src/runtimeConfig.browser.ts index 35ded8520fbf..0f5bfc37e837 100644 --- a/clients/client-s3/src/runtimeConfig.browser.ts +++ b/clients/client-s3/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { blobHasher as streamHasher } from "@aws-sdk/hash-blob-browser"; @@ -41,6 +42,8 @@ export const getRuntimeConfig = (config: S3ClientConfig) => { sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, streamHasher: config?.streamHasher ?? streamHasher, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-s3/src/runtimeConfig.ts b/clients/client-s3/src/runtimeConfig.ts index 15d331e6d3ba..3b073a628803 100644 --- a/clients/client-s3/src/runtimeConfig.ts +++ b/clients/client-s3/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-node"; import { Hash } from "@aws-sdk/hash-node"; @@ -48,6 +53,8 @@ export const getRuntimeConfig = (config: S3ClientConfig) => { streamCollector: config?.streamCollector ?? streamCollector, streamHasher: config?.streamHasher ?? streamHasher, useArnRegion: config?.useArnRegion ?? loadNodeConfig(NODE_USE_ARN_REGION_CONFIG_OPTIONS), + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-s3outposts/src/S3OutpostsClient.ts b/clients/client-s3outposts/src/S3OutpostsClient.ts index 27c6eca92b2f..5e896924b23d 100644 --- a/clients/client-s3outposts/src/S3OutpostsClient.ts +++ b/clients/client-s3outposts/src/S3OutpostsClient.ts @@ -140,6 +140,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-s3outposts/src/endpoints.ts b/clients/client-s3outposts/src/endpoints.ts index 6a0e9d0a2fae..db082a629cc8 100644 --- a/clients/client-s3outposts/src/endpoints.ts +++ b/clients/client-s3outposts/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "s3-outposts", diff --git a/clients/client-s3outposts/src/runtimeConfig.browser.ts b/clients/client-s3outposts/src/runtimeConfig.browser.ts index a7cd4a63dcc9..ed26780d3e0e 100644 --- a/clients/client-s3outposts/src/runtimeConfig.browser.ts +++ b/clients/client-s3outposts/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: S3OutpostsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-s3outposts/src/runtimeConfig.ts b/clients/client-s3outposts/src/runtimeConfig.ts index 0e92daa0e10e..5a6b84965154 100644 --- a/clients/client-s3outposts/src/runtimeConfig.ts +++ b/clients/client-s3outposts/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: S3OutpostsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker-a2i-runtime/src/SageMakerA2IRuntimeClient.ts b/clients/client-sagemaker-a2i-runtime/src/SageMakerA2IRuntimeClient.ts index bd51c8fda1e5..02abf166d5ac 100644 --- a/clients/client-sagemaker-a2i-runtime/src/SageMakerA2IRuntimeClient.ts +++ b/clients/client-sagemaker-a2i-runtime/src/SageMakerA2IRuntimeClient.ts @@ -152,6 +152,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sagemaker-a2i-runtime/src/endpoints.ts b/clients/client-sagemaker-a2i-runtime/src/endpoints.ts index 53a1b470754c..6deba417c267 100644 --- a/clients/client-sagemaker-a2i-runtime/src/endpoints.ts +++ b/clients/client-sagemaker-a2i-runtime/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sagemaker", diff --git a/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.browser.ts b/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.browser.ts index a3f026123c8f..ce27079d27e9 100644 --- a/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SageMakerA2IRuntimeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.ts b/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.ts index 2db8d97ba1c7..68a2184074a0 100644 --- a/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.ts +++ b/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SageMakerA2IRuntimeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker-edge/src/SagemakerEdgeClient.ts b/clients/client-sagemaker-edge/src/SagemakerEdgeClient.ts index ff45014e7bf3..6fa9a1819729 100644 --- a/clients/client-sagemaker-edge/src/SagemakerEdgeClient.ts +++ b/clients/client-sagemaker-edge/src/SagemakerEdgeClient.ts @@ -142,6 +142,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sagemaker-edge/src/endpoints.ts b/clients/client-sagemaker-edge/src/endpoints.ts index b36e6104c4e9..a8ac2f954ff9 100644 --- a/clients/client-sagemaker-edge/src/endpoints.ts +++ b/clients/client-sagemaker-edge/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sagemaker", diff --git a/clients/client-sagemaker-edge/src/runtimeConfig.browser.ts b/clients/client-sagemaker-edge/src/runtimeConfig.browser.ts index 11a644ca4acf..e7d2f148e2a9 100644 --- a/clients/client-sagemaker-edge/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-edge/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SagemakerEdgeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker-edge/src/runtimeConfig.ts b/clients/client-sagemaker-edge/src/runtimeConfig.ts index ab6901571d30..492cbc1a1409 100644 --- a/clients/client-sagemaker-edge/src/runtimeConfig.ts +++ b/clients/client-sagemaker-edge/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SagemakerEdgeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker-featurestore-runtime/src/SageMakerFeatureStoreRuntimeClient.ts b/clients/client-sagemaker-featurestore-runtime/src/SageMakerFeatureStoreRuntimeClient.ts index 5f2de1b316ca..3b0a9e7a3dc5 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/SageMakerFeatureStoreRuntimeClient.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/SageMakerFeatureStoreRuntimeClient.ts @@ -149,6 +149,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sagemaker-featurestore-runtime/src/endpoints.ts b/clients/client-sagemaker-featurestore-runtime/src/endpoints.ts index 275f91080b31..d929887f5a26 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/endpoints.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sagemaker", diff --git a/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.browser.ts b/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.browser.ts index 655c6e061b84..a82a59393c6c 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SageMakerFeatureStoreRuntimeClientConfi retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.ts b/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.ts index d10d12d15cfa..aa0b23311a07 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SageMakerFeatureStoreRuntimeClientConfi retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker-runtime/src/SageMakerRuntimeClient.ts b/clients/client-sagemaker-runtime/src/SageMakerRuntimeClient.ts index 43f300bc3969..37ad833e7676 100644 --- a/clients/client-sagemaker-runtime/src/SageMakerRuntimeClient.ts +++ b/clients/client-sagemaker-runtime/src/SageMakerRuntimeClient.ts @@ -142,6 +142,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sagemaker-runtime/src/endpoints.ts b/clients/client-sagemaker-runtime/src/endpoints.ts index 53e4fd657fe0..be6d80980b00 100644 --- a/clients/client-sagemaker-runtime/src/endpoints.ts +++ b/clients/client-sagemaker-runtime/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -78,7 +78,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sagemaker", diff --git a/clients/client-sagemaker-runtime/src/runtimeConfig.browser.ts b/clients/client-sagemaker-runtime/src/runtimeConfig.browser.ts index 131e7a99a589..d4ea35aeb5dd 100644 --- a/clients/client-sagemaker-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-runtime/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SageMakerRuntimeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker-runtime/src/runtimeConfig.ts b/clients/client-sagemaker-runtime/src/runtimeConfig.ts index da6668caf5c2..5467222d612d 100644 --- a/clients/client-sagemaker-runtime/src/runtimeConfig.ts +++ b/clients/client-sagemaker-runtime/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SageMakerRuntimeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker/src/SageMakerClient.ts b/clients/client-sagemaker/src/SageMakerClient.ts index 386bc55e28d0..b5a3f0ce50da 100644 --- a/clients/client-sagemaker/src/SageMakerClient.ts +++ b/clients/client-sagemaker/src/SageMakerClient.ts @@ -1220,6 +1220,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sagemaker/src/endpoints.ts b/clients/client-sagemaker/src/endpoints.ts index 2efcac442f37..ff199bcd7789 100644 --- a/clients/client-sagemaker/src/endpoints.ts +++ b/clients/client-sagemaker/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sagemaker", diff --git a/clients/client-sagemaker/src/runtimeConfig.browser.ts b/clients/client-sagemaker/src/runtimeConfig.browser.ts index ea80b206f8ea..2710825b6c25 100644 --- a/clients/client-sagemaker/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SageMakerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sagemaker/src/runtimeConfig.ts b/clients/client-sagemaker/src/runtimeConfig.ts index f2f450c06000..bdc87f37ec3f 100644 --- a/clients/client-sagemaker/src/runtimeConfig.ts +++ b/clients/client-sagemaker/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SageMakerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-savingsplans/src/SavingsplansClient.ts b/clients/client-savingsplans/src/SavingsplansClient.ts index 1f00e68db93e..d9259255c93c 100644 --- a/clients/client-savingsplans/src/SavingsplansClient.ts +++ b/clients/client-savingsplans/src/SavingsplansClient.ts @@ -182,6 +182,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-savingsplans/src/endpoints.ts b/clients/client-savingsplans/src/endpoints.ts index 29799d001c7a..111921d464bc 100644 --- a/clients/client-savingsplans/src/endpoints.ts +++ b/clients/client-savingsplans/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-global": { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "savingsplans", diff --git a/clients/client-savingsplans/src/runtimeConfig.browser.ts b/clients/client-savingsplans/src/runtimeConfig.browser.ts index 86608b053faa..985fffb522ed 100644 --- a/clients/client-savingsplans/src/runtimeConfig.browser.ts +++ b/clients/client-savingsplans/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SavingsplansClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-savingsplans/src/runtimeConfig.ts b/clients/client-savingsplans/src/runtimeConfig.ts index 350604e77502..93a9430d5939 100644 --- a/clients/client-savingsplans/src/runtimeConfig.ts +++ b/clients/client-savingsplans/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SavingsplansClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-schemas/src/SchemasClient.ts b/clients/client-schemas/src/SchemasClient.ts index 554b8b87cd51..6f566592c00b 100644 --- a/clients/client-schemas/src/SchemasClient.ts +++ b/clients/client-schemas/src/SchemasClient.ts @@ -248,6 +248,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-schemas/src/endpoints.ts b/clients/client-schemas/src/endpoints.ts index de0715686f8c..1d551384a525 100644 --- a/clients/client-schemas/src/endpoints.ts +++ b/clients/client-schemas/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "schemas", diff --git a/clients/client-schemas/src/runtimeConfig.browser.ts b/clients/client-schemas/src/runtimeConfig.browser.ts index 1e0d873091fe..12a177fb66b5 100644 --- a/clients/client-schemas/src/runtimeConfig.browser.ts +++ b/clients/client-schemas/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SchemasClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-schemas/src/runtimeConfig.ts b/clients/client-schemas/src/runtimeConfig.ts index b62f4b8905df..dec799329802 100644 --- a/clients/client-schemas/src/runtimeConfig.ts +++ b/clients/client-schemas/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SchemasClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-secrets-manager/src/SecretsManagerClient.ts b/clients/client-secrets-manager/src/SecretsManagerClient.ts index 4917b4d7362b..5d3ad7ba0bff 100644 --- a/clients/client-secrets-manager/src/SecretsManagerClient.ts +++ b/clients/client-secrets-manager/src/SecretsManagerClient.ts @@ -224,6 +224,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-secrets-manager/src/endpoints.ts b/clients/client-secrets-manager/src/endpoints.ts index b133d0fd233d..0ed701184fc6 100644 --- a/clients/client-secrets-manager/src/endpoints.ts +++ b/clients/client-secrets-manager/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "secretsmanager", diff --git a/clients/client-secrets-manager/src/runtimeConfig.browser.ts b/clients/client-secrets-manager/src/runtimeConfig.browser.ts index b48678595755..cb05763269c5 100644 --- a/clients/client-secrets-manager/src/runtimeConfig.browser.ts +++ b/clients/client-secrets-manager/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SecretsManagerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-secrets-manager/src/runtimeConfig.ts b/clients/client-secrets-manager/src/runtimeConfig.ts index 70db2dbce9df..9c1c18e6b09c 100644 --- a/clients/client-secrets-manager/src/runtimeConfig.ts +++ b/clients/client-secrets-manager/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SecretsManagerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-securityhub/src/SecurityHubClient.ts b/clients/client-securityhub/src/SecurityHubClient.ts index c723e89f1052..222e937fb161 100644 --- a/clients/client-securityhub/src/SecurityHubClient.ts +++ b/clients/client-securityhub/src/SecurityHubClient.ts @@ -392,6 +392,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-securityhub/src/endpoints.ts b/clients/client-securityhub/src/endpoints.ts index d7d58c139080..f3d813ebed8b 100644 --- a/clients/client-securityhub/src/endpoints.ts +++ b/clients/client-securityhub/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "securityhub", diff --git a/clients/client-securityhub/src/runtimeConfig.browser.ts b/clients/client-securityhub/src/runtimeConfig.browser.ts index dc90aa5bb1b7..f076a7e9343d 100644 --- a/clients/client-securityhub/src/runtimeConfig.browser.ts +++ b/clients/client-securityhub/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SecurityHubClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-securityhub/src/runtimeConfig.ts b/clients/client-securityhub/src/runtimeConfig.ts index c8b67f8fb9a1..33e3a68605d5 100644 --- a/clients/client-securityhub/src/runtimeConfig.ts +++ b/clients/client-securityhub/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SecurityHubClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-serverlessapplicationrepository/src/ServerlessApplicationRepositoryClient.ts b/clients/client-serverlessapplicationrepository/src/ServerlessApplicationRepositoryClient.ts index 99b7460910a0..41948a19b7d2 100644 --- a/clients/client-serverlessapplicationrepository/src/ServerlessApplicationRepositoryClient.ts +++ b/clients/client-serverlessapplicationrepository/src/ServerlessApplicationRepositoryClient.ts @@ -203,6 +203,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-serverlessapplicationrepository/src/endpoints.ts b/clients/client-serverlessapplicationrepository/src/endpoints.ts index c8bdcacd02eb..c5378361a43b 100644 --- a/clients/client-serverlessapplicationrepository/src/endpoints.ts +++ b/clients/client-serverlessapplicationrepository/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-gov-east-1": { @@ -62,7 +62,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "serverlessrepo", diff --git a/clients/client-serverlessapplicationrepository/src/runtimeConfig.browser.ts b/clients/client-serverlessapplicationrepository/src/runtimeConfig.browser.ts index 3208c583bb8e..f3afb643f1df 100644 --- a/clients/client-serverlessapplicationrepository/src/runtimeConfig.browser.ts +++ b/clients/client-serverlessapplicationrepository/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ServerlessApplicationRepositoryClientCo retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-serverlessapplicationrepository/src/runtimeConfig.ts b/clients/client-serverlessapplicationrepository/src/runtimeConfig.ts index db0c4b2f5a88..915e42d18d8b 100644 --- a/clients/client-serverlessapplicationrepository/src/runtimeConfig.ts +++ b/clients/client-serverlessapplicationrepository/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ServerlessApplicationRepositoryClientCo retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts b/clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts index 0e94c67c1071..3a9503ba983b 100644 --- a/clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts +++ b/clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts @@ -233,6 +233,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-service-catalog-appregistry/src/endpoints.ts b/clients/client-service-catalog-appregistry/src/endpoints.ts index 3b1b1d44d5cc..886288086efa 100644 --- a/clients/client-service-catalog-appregistry/src/endpoints.ts +++ b/clients/client-service-catalog-appregistry/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "servicecatalog", diff --git a/clients/client-service-catalog-appregistry/src/runtimeConfig.browser.ts b/clients/client-service-catalog-appregistry/src/runtimeConfig.browser.ts index 279629cb4ef4..70fba213007c 100644 --- a/clients/client-service-catalog-appregistry/src/runtimeConfig.browser.ts +++ b/clients/client-service-catalog-appregistry/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ServiceCatalogAppRegistryClientConfig) retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-service-catalog-appregistry/src/runtimeConfig.ts b/clients/client-service-catalog-appregistry/src/runtimeConfig.ts index b4df1a0b326f..4b60ff910963 100644 --- a/clients/client-service-catalog-appregistry/src/runtimeConfig.ts +++ b/clients/client-service-catalog-appregistry/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ServiceCatalogAppRegistryClientConfig) retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-service-catalog/src/ServiceCatalogClient.ts b/clients/client-service-catalog/src/ServiceCatalogClient.ts index 43191ed44267..94d3bd3caf2c 100644 --- a/clients/client-service-catalog/src/ServiceCatalogClient.ts +++ b/clients/client-service-catalog/src/ServiceCatalogClient.ts @@ -584,6 +584,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-service-catalog/src/endpoints.ts b/clients/client-service-catalog/src/endpoints.ts index c254963a28d7..6fd7b75764f3 100644 --- a/clients/client-service-catalog/src/endpoints.ts +++ b/clients/client-service-catalog/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "servicecatalog", diff --git a/clients/client-service-catalog/src/runtimeConfig.browser.ts b/clients/client-service-catalog/src/runtimeConfig.browser.ts index 0e324c042b6f..8c8392e2f116 100644 --- a/clients/client-service-catalog/src/runtimeConfig.browser.ts +++ b/clients/client-service-catalog/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ServiceCatalogClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-service-catalog/src/runtimeConfig.ts b/clients/client-service-catalog/src/runtimeConfig.ts index f2338766c79e..f3cddf8b0080 100644 --- a/clients/client-service-catalog/src/runtimeConfig.ts +++ b/clients/client-service-catalog/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ServiceCatalogClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-service-quotas/src/ServiceQuotasClient.ts b/clients/client-service-quotas/src/ServiceQuotasClient.ts index 005bef4b4565..46fdd9e7c5b1 100644 --- a/clients/client-service-quotas/src/ServiceQuotasClient.ts +++ b/clients/client-service-quotas/src/ServiceQuotasClient.ts @@ -236,6 +236,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-service-quotas/src/endpoints.ts b/clients/client-service-quotas/src/endpoints.ts index 6b52c0d68a7e..a0f4103f696b 100644 --- a/clients/client-service-quotas/src/endpoints.ts +++ b/clients/client-service-quotas/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-gov-east-1": { @@ -62,7 +62,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "servicequotas", diff --git a/clients/client-service-quotas/src/runtimeConfig.browser.ts b/clients/client-service-quotas/src/runtimeConfig.browser.ts index 0a8acb9bd6e7..42a7a1be61c1 100644 --- a/clients/client-service-quotas/src/runtimeConfig.browser.ts +++ b/clients/client-service-quotas/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ServiceQuotasClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-service-quotas/src/runtimeConfig.ts b/clients/client-service-quotas/src/runtimeConfig.ts index f9711f060575..21d0e8714405 100644 --- a/clients/client-service-quotas/src/runtimeConfig.ts +++ b/clients/client-service-quotas/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ServiceQuotasClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-servicediscovery/src/ServiceDiscoveryClient.ts b/clients/client-servicediscovery/src/ServiceDiscoveryClient.ts index 42131639df05..115ed82bee4c 100644 --- a/clients/client-servicediscovery/src/ServiceDiscoveryClient.ts +++ b/clients/client-servicediscovery/src/ServiceDiscoveryClient.ts @@ -242,6 +242,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-servicediscovery/src/endpoints.ts b/clients/client-servicediscovery/src/endpoints.ts index 8303b39f9bdf..4a46356b5585 100644 --- a/clients/client-servicediscovery/src/endpoints.ts +++ b/clients/client-servicediscovery/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "servicediscovery-fips": { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "servicediscovery", diff --git a/clients/client-servicediscovery/src/runtimeConfig.browser.ts b/clients/client-servicediscovery/src/runtimeConfig.browser.ts index 73c82252d9c5..db211dc2d3f3 100644 --- a/clients/client-servicediscovery/src/runtimeConfig.browser.ts +++ b/clients/client-servicediscovery/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ServiceDiscoveryClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-servicediscovery/src/runtimeConfig.ts b/clients/client-servicediscovery/src/runtimeConfig.ts index 9b3e25410665..def66e4eb748 100644 --- a/clients/client-servicediscovery/src/runtimeConfig.ts +++ b/clients/client-servicediscovery/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ServiceDiscoveryClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ses/src/SESClient.ts b/clients/client-ses/src/SESClient.ts index 5748600f7e7b..448c811e5bac 100644 --- a/clients/client-ses/src/SESClient.ts +++ b/clients/client-ses/src/SESClient.ts @@ -500,6 +500,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ses/src/endpoints.ts b/clients/client-ses/src/endpoints.ts index 7e35e642de08..fd64fb343c7f 100644 --- a/clients/client-ses/src/endpoints.ts +++ b/clients/client-ses/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-gov-west-1": { @@ -58,7 +58,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ses", diff --git a/clients/client-ses/src/runtimeConfig.browser.ts b/clients/client-ses/src/runtimeConfig.browser.ts index 718802339855..b58c6a7add59 100644 --- a/clients/client-ses/src/runtimeConfig.browser.ts +++ b/clients/client-ses/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SESClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ses/src/runtimeConfig.ts b/clients/client-ses/src/runtimeConfig.ts index 6df9f5673511..b5b727b95dd8 100644 --- a/clients/client-ses/src/runtimeConfig.ts +++ b/clients/client-ses/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SESClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sesv2/src/SESv2Client.ts b/clients/client-sesv2/src/SESv2Client.ts index ef5128364138..9d0675053476 100644 --- a/clients/client-sesv2/src/SESv2Client.ts +++ b/clients/client-sesv2/src/SESv2Client.ts @@ -551,6 +551,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sesv2/src/endpoints.ts b/clients/client-sesv2/src/endpoints.ts index 7e35e642de08..fd64fb343c7f 100644 --- a/clients/client-sesv2/src/endpoints.ts +++ b/clients/client-sesv2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-gov-west-1": { @@ -58,7 +58,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ses", diff --git a/clients/client-sesv2/src/runtimeConfig.browser.ts b/clients/client-sesv2/src/runtimeConfig.browser.ts index 9723820aa2df..bacefba5ce5f 100644 --- a/clients/client-sesv2/src/runtimeConfig.browser.ts +++ b/clients/client-sesv2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SESv2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sesv2/src/runtimeConfig.ts b/clients/client-sesv2/src/runtimeConfig.ts index d6168e5ec179..f37a474d6dd8 100644 --- a/clients/client-sesv2/src/runtimeConfig.ts +++ b/clients/client-sesv2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SESv2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sfn/src/SFNClient.ts b/clients/client-sfn/src/SFNClient.ts index 4b06f885a7a8..9d87ebcc5e68 100644 --- a/clients/client-sfn/src/SFNClient.ts +++ b/clients/client-sfn/src/SFNClient.ts @@ -218,6 +218,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sfn/src/endpoints.ts b/clients/client-sfn/src/endpoints.ts index f1c112d1cf80..807910f2f7e5 100644 --- a/clients/client-sfn/src/endpoints.ts +++ b/clients/client-sfn/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "states", diff --git a/clients/client-sfn/src/runtimeConfig.browser.ts b/clients/client-sfn/src/runtimeConfig.browser.ts index aa0302d57454..fcc085bf083a 100644 --- a/clients/client-sfn/src/runtimeConfig.browser.ts +++ b/clients/client-sfn/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SFNClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sfn/src/runtimeConfig.ts b/clients/client-sfn/src/runtimeConfig.ts index 44b1a0c5f563..dfdbce67a394 100644 --- a/clients/client-sfn/src/runtimeConfig.ts +++ b/clients/client-sfn/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SFNClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-shield/src/ShieldClient.ts b/clients/client-shield/src/ShieldClient.ts index f7f4adac3b81..59b022992de4 100644 --- a/clients/client-shield/src/ShieldClient.ts +++ b/clients/client-shield/src/ShieldClient.ts @@ -296,6 +296,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-shield/src/endpoints.ts b/clients/client-shield/src/endpoints.ts index 77d9f1ddb27a..bb3bf3cb4ce6 100644 --- a/clients/client-shield/src/endpoints.ts +++ b/clients/client-shield/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-global": { @@ -64,7 +64,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "shield", diff --git a/clients/client-shield/src/runtimeConfig.browser.ts b/clients/client-shield/src/runtimeConfig.browser.ts index 064cb3dfd0a9..29ba93a8c2ea 100644 --- a/clients/client-shield/src/runtimeConfig.browser.ts +++ b/clients/client-shield/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: ShieldClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-shield/src/runtimeConfig.ts b/clients/client-shield/src/runtimeConfig.ts index 4633b738529c..40008a122ae8 100644 --- a/clients/client-shield/src/runtimeConfig.ts +++ b/clients/client-shield/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: ShieldClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-signer/src/SignerClient.ts b/clients/client-signer/src/SignerClient.ts index ca1118cdf878..a806a5bd1199 100644 --- a/clients/client-signer/src/SignerClient.ts +++ b/clients/client-signer/src/SignerClient.ts @@ -212,6 +212,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-signer/src/endpoints.ts b/clients/client-signer/src/endpoints.ts index 88a7a95eedf4..df0b713f1ccc 100644 --- a/clients/client-signer/src/endpoints.ts +++ b/clients/client-signer/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "signer", diff --git a/clients/client-signer/src/runtimeConfig.browser.ts b/clients/client-signer/src/runtimeConfig.browser.ts index 566af9d475ac..6e59850f5a5a 100644 --- a/clients/client-signer/src/runtimeConfig.browser.ts +++ b/clients/client-signer/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SignerClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-signer/src/runtimeConfig.ts b/clients/client-signer/src/runtimeConfig.ts index f7caae40c00c..758e02fd90bb 100644 --- a/clients/client-signer/src/runtimeConfig.ts +++ b/clients/client-signer/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SignerClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sms/src/SMSClient.ts b/clients/client-sms/src/SMSClient.ts index f3042cd67714..36a70ed3930d 100644 --- a/clients/client-sms/src/SMSClient.ts +++ b/clients/client-sms/src/SMSClient.ts @@ -302,6 +302,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sms/src/endpoints.ts b/clients/client-sms/src/endpoints.ts index ff434eefdd6b..822e2bb54c94 100644 --- a/clients/client-sms/src/endpoints.ts +++ b/clients/client-sms/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sms", diff --git a/clients/client-sms/src/runtimeConfig.browser.ts b/clients/client-sms/src/runtimeConfig.browser.ts index d3414b8ad68b..9e040a47a3cb 100644 --- a/clients/client-sms/src/runtimeConfig.browser.ts +++ b/clients/client-sms/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SMSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sms/src/runtimeConfig.ts b/clients/client-sms/src/runtimeConfig.ts index 87b0b85026a9..e8a4db91b114 100644 --- a/clients/client-sms/src/runtimeConfig.ts +++ b/clients/client-sms/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SMSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-snow-device-management/src/SnowDeviceManagementClient.ts b/clients/client-snow-device-management/src/SnowDeviceManagementClient.ts index c54833d4a001..387bffba4586 100644 --- a/clients/client-snow-device-management/src/SnowDeviceManagementClient.ts +++ b/clients/client-snow-device-management/src/SnowDeviceManagementClient.ts @@ -185,6 +185,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-snow-device-management/src/endpoints.ts b/clients/client-snow-device-management/src/endpoints.ts index 28482867e40c..b90bf1e817b5 100644 --- a/clients/client-snow-device-management/src/endpoints.ts +++ b/clients/client-snow-device-management/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "snow-device-management", diff --git a/clients/client-snow-device-management/src/runtimeConfig.browser.ts b/clients/client-snow-device-management/src/runtimeConfig.browser.ts index 9ee6ed8561d2..229bfd4f32d5 100644 --- a/clients/client-snow-device-management/src/runtimeConfig.browser.ts +++ b/clients/client-snow-device-management/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SnowDeviceManagementClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-snow-device-management/src/runtimeConfig.ts b/clients/client-snow-device-management/src/runtimeConfig.ts index 35644cf72d6e..c0853d901868 100644 --- a/clients/client-snow-device-management/src/runtimeConfig.ts +++ b/clients/client-snow-device-management/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SnowDeviceManagementClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-snowball/src/SnowballClient.ts b/clients/client-snowball/src/SnowballClient.ts index 6c39cf287e58..4f8ac9c6c146 100644 --- a/clients/client-snowball/src/SnowballClient.ts +++ b/clients/client-snowball/src/SnowballClient.ts @@ -233,6 +233,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-snowball/src/endpoints.ts b/clients/client-snowball/src/endpoints.ts index 16d0ceb0a39c..1c02a1b031f2 100644 --- a/clients/client-snowball/src/endpoints.ts +++ b/clients/client-snowball/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ap-northeast-1": { @@ -150,7 +150,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "snowball", diff --git a/clients/client-snowball/src/runtimeConfig.browser.ts b/clients/client-snowball/src/runtimeConfig.browser.ts index b9cfd4fa01fb..eb6d47aed001 100644 --- a/clients/client-snowball/src/runtimeConfig.browser.ts +++ b/clients/client-snowball/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SnowballClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-snowball/src/runtimeConfig.ts b/clients/client-snowball/src/runtimeConfig.ts index 4263fc57cc73..bab7b256122e 100644 --- a/clients/client-snowball/src/runtimeConfig.ts +++ b/clients/client-snowball/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SnowballClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sns/src/SNSClient.ts b/clients/client-sns/src/SNSClient.ts index 6e4abe9b8a80..05f7d429be05 100644 --- a/clients/client-sns/src/SNSClient.ts +++ b/clients/client-sns/src/SNSClient.ts @@ -320,6 +320,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sns/src/endpoints.ts b/clients/client-sns/src/endpoints.ts index 5d5abe9fb941..900feee5a24c 100644 --- a/clients/client-sns/src/endpoints.ts +++ b/clients/client-sns/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sns", diff --git a/clients/client-sns/src/runtimeConfig.browser.ts b/clients/client-sns/src/runtimeConfig.browser.ts index 005d3d818cd7..7c29f98b082c 100644 --- a/clients/client-sns/src/runtimeConfig.browser.ts +++ b/clients/client-sns/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SNSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sns/src/runtimeConfig.ts b/clients/client-sns/src/runtimeConfig.ts index b6b2c44f3d89..ead9684ca3a8 100644 --- a/clients/client-sns/src/runtimeConfig.ts +++ b/clients/client-sns/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SNSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sqs/src/SQSClient.ts b/clients/client-sqs/src/SQSClient.ts index 919e9c9ebfcc..0d324a0be766 100644 --- a/clients/client-sqs/src/SQSClient.ts +++ b/clients/client-sqs/src/SQSClient.ts @@ -206,6 +206,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sqs/src/endpoints.ts b/clients/client-sqs/src/endpoints.ts index 94d4a6ee282d..13c287e24884 100644 --- a/clients/client-sqs/src/endpoints.ts +++ b/clients/client-sqs/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sqs", diff --git a/clients/client-sqs/src/runtimeConfig.browser.ts b/clients/client-sqs/src/runtimeConfig.browser.ts index ada5b89794ff..0f45aedc6f78 100644 --- a/clients/client-sqs/src/runtimeConfig.browser.ts +++ b/clients/client-sqs/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { Md5 } from "@aws-sdk/md5-js"; @@ -37,6 +38,8 @@ export const getRuntimeConfig = (config: SQSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sqs/src/runtimeConfig.ts b/clients/client-sqs/src/runtimeConfig.ts index 58e8fe76edfe..3b942fbfbbc4 100644 --- a/clients/client-sqs/src/runtimeConfig.ts +++ b/clients/client-sqs/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -42,6 +47,8 @@ export const getRuntimeConfig = (config: SQSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ssm-contacts/src/SSMContactsClient.ts b/clients/client-ssm-contacts/src/SSMContactsClient.ts index b219bf71bff6..59466d28cbd9 100644 --- a/clients/client-ssm-contacts/src/SSMContactsClient.ts +++ b/clients/client-ssm-contacts/src/SSMContactsClient.ts @@ -242,6 +242,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ssm-contacts/src/endpoints.ts b/clients/client-ssm-contacts/src/endpoints.ts index 57148ab0c38d..b621894a9e77 100644 --- a/clients/client-ssm-contacts/src/endpoints.ts +++ b/clients/client-ssm-contacts/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ssm-contacts", diff --git a/clients/client-ssm-contacts/src/runtimeConfig.browser.ts b/clients/client-ssm-contacts/src/runtimeConfig.browser.ts index 89e880a50aec..1cba1cda3591 100644 --- a/clients/client-ssm-contacts/src/runtimeConfig.browser.ts +++ b/clients/client-ssm-contacts/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SSMContactsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ssm-contacts/src/runtimeConfig.ts b/clients/client-ssm-contacts/src/runtimeConfig.ts index ba8689dad451..e37092e8d6c2 100644 --- a/clients/client-ssm-contacts/src/runtimeConfig.ts +++ b/clients/client-ssm-contacts/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SSMContactsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ssm-incidents/src/SSMIncidentsClient.ts b/clients/client-ssm-incidents/src/SSMIncidentsClient.ts index 535631531662..dd2fff87dfd6 100644 --- a/clients/client-ssm-incidents/src/SSMIncidentsClient.ts +++ b/clients/client-ssm-incidents/src/SSMIncidentsClient.ts @@ -266,6 +266,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ssm-incidents/src/endpoints.ts b/clients/client-ssm-incidents/src/endpoints.ts index 86fb0d1bb0ca..dce80d292270 100644 --- a/clients/client-ssm-incidents/src/endpoints.ts +++ b/clients/client-ssm-incidents/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ssm-incidents", diff --git a/clients/client-ssm-incidents/src/runtimeConfig.browser.ts b/clients/client-ssm-incidents/src/runtimeConfig.browser.ts index aadbb906b041..22b72834e3bd 100644 --- a/clients/client-ssm-incidents/src/runtimeConfig.browser.ts +++ b/clients/client-ssm-incidents/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SSMIncidentsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ssm-incidents/src/runtimeConfig.ts b/clients/client-ssm-incidents/src/runtimeConfig.ts index 4f770ded81f4..0ab3a37e04c3 100644 --- a/clients/client-ssm-incidents/src/runtimeConfig.ts +++ b/clients/client-ssm-incidents/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SSMIncidentsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ssm/src/SSMClient.ts b/clients/client-ssm/src/SSMClient.ts index 8fb793759c59..2f906ba8bb5d 100644 --- a/clients/client-ssm/src/SSMClient.ts +++ b/clients/client-ssm/src/SSMClient.ts @@ -812,6 +812,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-ssm/src/endpoints.ts b/clients/client-ssm/src/endpoints.ts index eb2c4b6cb0a6..6d407424a24c 100644 --- a/clients/client-ssm/src/endpoints.ts +++ b/clients/client-ssm/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "ssm", diff --git a/clients/client-ssm/src/runtimeConfig.browser.ts b/clients/client-ssm/src/runtimeConfig.browser.ts index c4ba04667ca9..4a75aae2ea0e 100644 --- a/clients/client-ssm/src/runtimeConfig.browser.ts +++ b/clients/client-ssm/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SSMClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-ssm/src/runtimeConfig.ts b/clients/client-ssm/src/runtimeConfig.ts index 88a982ea5e78..339a09717d4b 100644 --- a/clients/client-ssm/src/runtimeConfig.ts +++ b/clients/client-ssm/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SSMClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sso-admin/src/SSOAdminClient.ts b/clients/client-sso-admin/src/SSOAdminClient.ts index eec73267eb3f..1176e7355cdb 100644 --- a/clients/client-sso-admin/src/SSOAdminClient.ts +++ b/clients/client-sso-admin/src/SSOAdminClient.ts @@ -311,6 +311,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sso-admin/src/endpoints.ts b/clients/client-sso-admin/src/endpoints.ts index 1cf480502f09..bb954dba649e 100644 --- a/clients/client-sso-admin/src/endpoints.ts +++ b/clients/client-sso-admin/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sso", diff --git a/clients/client-sso-admin/src/runtimeConfig.browser.ts b/clients/client-sso-admin/src/runtimeConfig.browser.ts index 4c0037d29802..54a76b4decfc 100644 --- a/clients/client-sso-admin/src/runtimeConfig.browser.ts +++ b/clients/client-sso-admin/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SSOAdminClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sso-admin/src/runtimeConfig.ts b/clients/client-sso-admin/src/runtimeConfig.ts index 9056a902bb52..f4ab7f69759e 100644 --- a/clients/client-sso-admin/src/runtimeConfig.ts +++ b/clients/client-sso-admin/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SSOAdminClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sso-oidc/src/SSOOIDCClient.ts b/clients/client-sso-oidc/src/SSOOIDCClient.ts index 6740ec4e3914..d8c16ff49bfd 100644 --- a/clients/client-sso-oidc/src/SSOOIDCClient.ts +++ b/clients/client-sso-oidc/src/SSOOIDCClient.ts @@ -142,6 +142,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sso-oidc/src/endpoints.ts b/clients/client-sso-oidc/src/endpoints.ts index 404808b2d5e3..b8723fce752d 100644 --- a/clients/client-sso-oidc/src/endpoints.ts +++ b/clients/client-sso-oidc/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "ap-northeast-1": { @@ -118,7 +118,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "awsssooidc", diff --git a/clients/client-sso-oidc/src/runtimeConfig.browser.ts b/clients/client-sso-oidc/src/runtimeConfig.browser.ts index a7d0cfa0b799..9fdbb1c24860 100644 --- a/clients/client-sso-oidc/src/runtimeConfig.browser.ts +++ b/clients/client-sso-oidc/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -33,6 +34,8 @@ export const getRuntimeConfig = (config: SSOOIDCClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sso-oidc/src/runtimeConfig.ts b/clients/client-sso-oidc/src/runtimeConfig.ts index 4665d2eb9a8f..1e4e64683a0b 100644 --- a/clients/client-sso-oidc/src/runtimeConfig.ts +++ b/clients/client-sso-oidc/src/runtimeConfig.ts @@ -1,7 +1,12 @@ // @ts-ignore: package.json will be imported from dist folders import packageInfo from "../package.json"; // eslint-disable-line -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; @@ -36,6 +41,8 @@ export const getRuntimeConfig = (config: SSOOIDCClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sso/src/SSOClient.ts b/clients/client-sso/src/SSOClient.ts index 7e687633b68f..e37211b00d88 100644 --- a/clients/client-sso/src/SSOClient.ts +++ b/clients/client-sso/src/SSOClient.ts @@ -142,6 +142,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sso/src/endpoints.ts b/clients/client-sso/src/endpoints.ts index 1b19abc72e15..428e1c79dd5f 100644 --- a/clients/client-sso/src/endpoints.ts +++ b/clients/client-sso/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "ap-southeast-1": { @@ -90,7 +90,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "awsssoportal", diff --git a/clients/client-sso/src/runtimeConfig.browser.ts b/clients/client-sso/src/runtimeConfig.browser.ts index 9f123fc4ab92..89c9b161fa71 100644 --- a/clients/client-sso/src/runtimeConfig.browser.ts +++ b/clients/client-sso/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -33,6 +34,8 @@ export const getRuntimeConfig = (config: SSOClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sso/src/runtimeConfig.ts b/clients/client-sso/src/runtimeConfig.ts index a2f94d40246d..61f19262e2e9 100644 --- a/clients/client-sso/src/runtimeConfig.ts +++ b/clients/client-sso/src/runtimeConfig.ts @@ -1,7 +1,12 @@ // @ts-ignore: package.json will be imported from dist folders import packageInfo from "../package.json"; // eslint-disable-line -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; @@ -36,6 +41,8 @@ export const getRuntimeConfig = (config: SSOClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-storage-gateway/src/StorageGatewayClient.ts b/clients/client-storage-gateway/src/StorageGatewayClient.ts index 45eb68abfa4a..3950970346d7 100644 --- a/clients/client-storage-gateway/src/StorageGatewayClient.ts +++ b/clients/client-storage-gateway/src/StorageGatewayClient.ts @@ -560,6 +560,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-storage-gateway/src/endpoints.ts b/clients/client-storage-gateway/src/endpoints.ts index d468818ec6fd..79792c629c09 100644 --- a/clients/client-storage-gateway/src/endpoints.ts +++ b/clients/client-storage-gateway/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { fips: { @@ -59,7 +59,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "storagegateway", diff --git a/clients/client-storage-gateway/src/runtimeConfig.browser.ts b/clients/client-storage-gateway/src/runtimeConfig.browser.ts index 16d5f5f4ffaa..39900e3cd567 100644 --- a/clients/client-storage-gateway/src/runtimeConfig.browser.ts +++ b/clients/client-storage-gateway/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: StorageGatewayClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-storage-gateway/src/runtimeConfig.ts b/clients/client-storage-gateway/src/runtimeConfig.ts index 6e334064d310..88e499afbffa 100644 --- a/clients/client-storage-gateway/src/runtimeConfig.ts +++ b/clients/client-storage-gateway/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: StorageGatewayClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sts/src/STSClient.ts b/clients/client-sts/src/STSClient.ts index 3668cd8ff3ac..13d9e542b522 100644 --- a/clients/client-sts/src/STSClient.ts +++ b/clients/client-sts/src/STSClient.ts @@ -162,6 +162,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-sts/src/endpoints.ts b/clients/client-sts/src/endpoints.ts index 490818a92821..66dda5bf9ad6 100644 --- a/clients/client-sts/src/endpoints.ts +++ b/clients/client-sts/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-global": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "sts", diff --git a/clients/client-sts/src/runtimeConfig.browser.ts b/clients/client-sts/src/runtimeConfig.browser.ts index 40dbfec2d637..f2c7dbf03cc7 100644 --- a/clients/client-sts/src/runtimeConfig.browser.ts +++ b/clients/client-sts/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: STSClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-sts/src/runtimeConfig.ts b/clients/client-sts/src/runtimeConfig.ts index 6bb7fb1e93f7..5d85d391d648 100644 --- a/clients/client-sts/src/runtimeConfig.ts +++ b/clients/client-sts/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "./defaultStsRoleAssumers"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: STSClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-support/src/SupportClient.ts b/clients/client-support/src/SupportClient.ts index b68b77f83ca7..e25d5c2b10c5 100644 --- a/clients/client-support/src/SupportClient.ts +++ b/clients/client-support/src/SupportClient.ts @@ -206,6 +206,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-support/src/endpoints.ts b/clients/client-support/src/endpoints.ts index 6b4cd3d45dc6..2f31b2dafdb0 100644 --- a/clients/client-support/src/endpoints.ts +++ b/clients/client-support/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-cn-global": { @@ -79,7 +79,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "support", diff --git a/clients/client-support/src/runtimeConfig.browser.ts b/clients/client-support/src/runtimeConfig.browser.ts index 6298e1e25691..725c44f6e049 100644 --- a/clients/client-support/src/runtimeConfig.browser.ts +++ b/clients/client-support/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SupportClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-support/src/runtimeConfig.ts b/clients/client-support/src/runtimeConfig.ts index efea4c3c483a..c60b9054f1b3 100644 --- a/clients/client-support/src/runtimeConfig.ts +++ b/clients/client-support/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SupportClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-swf/src/SWFClient.ts b/clients/client-swf/src/SWFClient.ts index 8e478bdc9498..b7431a7f67c6 100644 --- a/clients/client-swf/src/SWFClient.ts +++ b/clients/client-swf/src/SWFClient.ts @@ -332,6 +332,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-swf/src/endpoints.ts b/clients/client-swf/src/endpoints.ts index 6b83176541d7..4e8331b9d98d 100644 --- a/clients/client-swf/src/endpoints.ts +++ b/clients/client-swf/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "swf", diff --git a/clients/client-swf/src/runtimeConfig.browser.ts b/clients/client-swf/src/runtimeConfig.browser.ts index f38d2bd5418b..7de8451c55ca 100644 --- a/clients/client-swf/src/runtimeConfig.browser.ts +++ b/clients/client-swf/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SWFClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-swf/src/runtimeConfig.ts b/clients/client-swf/src/runtimeConfig.ts index 1cb96628d993..18605e9a7d3b 100644 --- a/clients/client-swf/src/runtimeConfig.ts +++ b/clients/client-swf/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SWFClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-synthetics/src/SyntheticsClient.ts b/clients/client-synthetics/src/SyntheticsClient.ts index b9b9d26febe2..2f0e10548251 100644 --- a/clients/client-synthetics/src/SyntheticsClient.ts +++ b/clients/client-synthetics/src/SyntheticsClient.ts @@ -185,6 +185,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-synthetics/src/endpoints.ts b/clients/client-synthetics/src/endpoints.ts index 97fe9ac99788..bae44c2aa9ca 100644 --- a/clients/client-synthetics/src/endpoints.ts +++ b/clients/client-synthetics/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "synthetics", diff --git a/clients/client-synthetics/src/runtimeConfig.browser.ts b/clients/client-synthetics/src/runtimeConfig.browser.ts index e9922cd0f989..b7b477603d54 100644 --- a/clients/client-synthetics/src/runtimeConfig.browser.ts +++ b/clients/client-synthetics/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: SyntheticsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-synthetics/src/runtimeConfig.ts b/clients/client-synthetics/src/runtimeConfig.ts index bb0240da5b66..7a449791fd45 100644 --- a/clients/client-synthetics/src/runtimeConfig.ts +++ b/clients/client-synthetics/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: SyntheticsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-textract/src/TextractClient.ts b/clients/client-textract/src/TextractClient.ts index 7cf69a9da6d5..79cd5922c0c0 100644 --- a/clients/client-textract/src/TextractClient.ts +++ b/clients/client-textract/src/TextractClient.ts @@ -179,6 +179,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-textract/src/endpoints.ts b/clients/client-textract/src/endpoints.ts index 71335c4f95f8..86d7d2e75b42 100644 --- a/clients/client-textract/src/endpoints.ts +++ b/clients/client-textract/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "textract", diff --git a/clients/client-textract/src/runtimeConfig.browser.ts b/clients/client-textract/src/runtimeConfig.browser.ts index edf765344ef4..4aaab6089a3b 100644 --- a/clients/client-textract/src/runtimeConfig.browser.ts +++ b/clients/client-textract/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: TextractClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-textract/src/runtimeConfig.ts b/clients/client-textract/src/runtimeConfig.ts index f2f3462de29f..e3c6f9eefb78 100644 --- a/clients/client-textract/src/runtimeConfig.ts +++ b/clients/client-textract/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: TextractClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-timestream-query/src/TimestreamQueryClient.ts b/clients/client-timestream-query/src/TimestreamQueryClient.ts index 4fa77d7412c1..7fedc1967851 100644 --- a/clients/client-timestream-query/src/TimestreamQueryClient.ts +++ b/clients/client-timestream-query/src/TimestreamQueryClient.ts @@ -149,6 +149,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-timestream-query/src/endpoints.ts b/clients/client-timestream-query/src/endpoints.ts index 90f0885d544b..87f3f056dc8c 100644 --- a/clients/client-timestream-query/src/endpoints.ts +++ b/clients/client-timestream-query/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "timestream", diff --git a/clients/client-timestream-query/src/runtimeConfig.browser.ts b/clients/client-timestream-query/src/runtimeConfig.browser.ts index 9438205c172d..402118941344 100644 --- a/clients/client-timestream-query/src/runtimeConfig.browser.ts +++ b/clients/client-timestream-query/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -36,6 +37,8 @@ export const getRuntimeConfig = (config: TimestreamQueryClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-timestream-query/src/runtimeConfig.ts b/clients/client-timestream-query/src/runtimeConfig.ts index 53f297391fdc..33ddba079acb 100644 --- a/clients/client-timestream-query/src/runtimeConfig.ts +++ b/clients/client-timestream-query/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS } from "@aws-sdk/middleware-endpoint-discovery"; @@ -43,6 +48,8 @@ export const getRuntimeConfig = (config: TimestreamQueryClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-timestream-write/src/TimestreamWriteClient.ts b/clients/client-timestream-write/src/TimestreamWriteClient.ts index 2c51d5ba437e..83252e637207 100644 --- a/clients/client-timestream-write/src/TimestreamWriteClient.ts +++ b/clients/client-timestream-write/src/TimestreamWriteClient.ts @@ -194,6 +194,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-timestream-write/src/endpoints.ts b/clients/client-timestream-write/src/endpoints.ts index ed3347037782..cc9b8ebdf545 100644 --- a/clients/client-timestream-write/src/endpoints.ts +++ b/clients/client-timestream-write/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "timestream", diff --git a/clients/client-timestream-write/src/runtimeConfig.browser.ts b/clients/client-timestream-write/src/runtimeConfig.browser.ts index 96828430ea41..3ecb56e0cec9 100644 --- a/clients/client-timestream-write/src/runtimeConfig.browser.ts +++ b/clients/client-timestream-write/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -36,6 +37,8 @@ export const getRuntimeConfig = (config: TimestreamWriteClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-timestream-write/src/runtimeConfig.ts b/clients/client-timestream-write/src/runtimeConfig.ts index 5c87e517ce56..041637fefa3c 100644 --- a/clients/client-timestream-write/src/runtimeConfig.ts +++ b/clients/client-timestream-write/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS } from "@aws-sdk/middleware-endpoint-discovery"; @@ -43,6 +48,8 @@ export const getRuntimeConfig = (config: TimestreamWriteClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts b/clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts index 7b93ab1f6899..650030192057 100644 --- a/clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts +++ b/clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts @@ -163,6 +163,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-transcribe-streaming/src/endpoints.ts b/clients/client-transcribe-streaming/src/endpoints.ts index 2fd090652a56..7bc450345c8c 100644 --- a/clients/client-transcribe-streaming/src/endpoints.ts +++ b/clients/client-transcribe-streaming/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "transcribestreaming-fips-ca-central-1": { @@ -74,7 +74,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "transcribe", diff --git a/clients/client-transcribe-streaming/src/runtimeConfig.browser.ts b/clients/client-transcribe-streaming/src/runtimeConfig.browser.ts index d6985d6fcf21..50e9b5b7f6d1 100644 --- a/clients/client-transcribe-streaming/src/runtimeConfig.browser.ts +++ b/clients/client-transcribe-streaming/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser"; import { streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; @@ -39,6 +40,8 @@ export const getRuntimeConfig = (config: TranscribeStreamingClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-transcribe-streaming/src/runtimeConfig.ts b/clients/client-transcribe-streaming/src/runtimeConfig.ts index fc3798456939..50d30a82416c 100644 --- a/clients/client-transcribe-streaming/src/runtimeConfig.ts +++ b/clients/client-transcribe-streaming/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { eventStreamPayloadHandlerProvider } from "@aws-sdk/eventstream-handler-node"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-node"; @@ -44,6 +49,8 @@ export const getRuntimeConfig = (config: TranscribeStreamingClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-transcribe/src/TranscribeClient.ts b/clients/client-transcribe/src/TranscribeClient.ts index ce77fba24be8..5b90936f78d7 100644 --- a/clients/client-transcribe/src/TranscribeClient.ts +++ b/clients/client-transcribe/src/TranscribeClient.ts @@ -347,6 +347,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-transcribe/src/endpoints.ts b/clients/client-transcribe/src/endpoints.ts index 08ef84f2c63c..2d9c82b6ffcf 100644 --- a/clients/client-transcribe/src/endpoints.ts +++ b/clients/client-transcribe/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "cn-north-1": { @@ -90,7 +90,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "transcribe", diff --git a/clients/client-transcribe/src/runtimeConfig.browser.ts b/clients/client-transcribe/src/runtimeConfig.browser.ts index 32ce09e53ffc..04e24c0bb2bd 100644 --- a/clients/client-transcribe/src/runtimeConfig.browser.ts +++ b/clients/client-transcribe/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: TranscribeClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-transcribe/src/runtimeConfig.ts b/clients/client-transcribe/src/runtimeConfig.ts index 368ea47a874a..5e609f49eabc 100644 --- a/clients/client-transcribe/src/runtimeConfig.ts +++ b/clients/client-transcribe/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: TranscribeClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-transfer/src/TransferClient.ts b/clients/client-transfer/src/TransferClient.ts index 6168d2d32d5a..38f8f3a6c702 100644 --- a/clients/client-transfer/src/TransferClient.ts +++ b/clients/client-transfer/src/TransferClient.ts @@ -248,6 +248,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-transfer/src/endpoints.ts b/clients/client-transfer/src/endpoints.ts index 02bccec521da..931566f8f041 100644 --- a/clients/client-transfer/src/endpoints.ts +++ b/clients/client-transfer/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-ca-central-1": { @@ -87,7 +87,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "transfer", diff --git a/clients/client-transfer/src/runtimeConfig.browser.ts b/clients/client-transfer/src/runtimeConfig.browser.ts index f92e21dbd12a..3289d61bcf54 100644 --- a/clients/client-transfer/src/runtimeConfig.browser.ts +++ b/clients/client-transfer/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: TransferClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-transfer/src/runtimeConfig.ts b/clients/client-transfer/src/runtimeConfig.ts index d831c4e59045..ae95c6a428b6 100644 --- a/clients/client-transfer/src/runtimeConfig.ts +++ b/clients/client-transfer/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: TransferClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-translate/src/TranslateClient.ts b/clients/client-translate/src/TranslateClient.ts index 0657a6521650..2fa837b4b220 100644 --- a/clients/client-translate/src/TranslateClient.ts +++ b/clients/client-translate/src/TranslateClient.ts @@ -191,6 +191,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-translate/src/endpoints.ts b/clients/client-translate/src/endpoints.ts index 69f51cfe52aa..46c870c68e90 100644 --- a/clients/client-translate/src/endpoints.ts +++ b/clients/client-translate/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "us-east-1-fips": { @@ -73,7 +73,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "translate", diff --git a/clients/client-translate/src/runtimeConfig.browser.ts b/clients/client-translate/src/runtimeConfig.browser.ts index 1337b5490914..25d0405051d4 100644 --- a/clients/client-translate/src/runtimeConfig.browser.ts +++ b/clients/client-translate/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: TranslateClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-translate/src/runtimeConfig.ts b/clients/client-translate/src/runtimeConfig.ts index 3aa1f0e2ee74..07f6eae466a7 100644 --- a/clients/client-translate/src/runtimeConfig.ts +++ b/clients/client-translate/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: TranslateClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-voice-id/src/VoiceIDClient.ts b/clients/client-voice-id/src/VoiceIDClient.ts index 10591304a314..c08975385606 100644 --- a/clients/client-voice-id/src/VoiceIDClient.ts +++ b/clients/client-voice-id/src/VoiceIDClient.ts @@ -221,6 +221,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-voice-id/src/endpoints.ts b/clients/client-voice-id/src/endpoints.ts index 07e4f42ecd5e..b8d4a6c247ef 100644 --- a/clients/client-voice-id/src/endpoints.ts +++ b/clients/client-voice-id/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "voiceid", diff --git a/clients/client-voice-id/src/runtimeConfig.browser.ts b/clients/client-voice-id/src/runtimeConfig.browser.ts index 6965ac998aae..f05d348f3c1f 100644 --- a/clients/client-voice-id/src/runtimeConfig.browser.ts +++ b/clients/client-voice-id/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: VoiceIDClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-voice-id/src/runtimeConfig.ts b/clients/client-voice-id/src/runtimeConfig.ts index 6d41c3cfd2ca..0e94b0fbea8b 100644 --- a/clients/client-voice-id/src/runtimeConfig.ts +++ b/clients/client-voice-id/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: VoiceIDClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-waf-regional/src/WAFRegionalClient.ts b/clients/client-waf-regional/src/WAFRegionalClient.ts index 8b011b3f85c3..dff248273934 100644 --- a/clients/client-waf-regional/src/WAFRegionalClient.ts +++ b/clients/client-waf-regional/src/WAFRegionalClient.ts @@ -485,6 +485,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-waf-regional/src/endpoints.ts b/clients/client-waf-regional/src/endpoints.ts index 7650d5a0bd54..6158d97df487 100644 --- a/clients/client-waf-regional/src/endpoints.ts +++ b/clients/client-waf-regional/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "af-south-1": { @@ -275,7 +275,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "waf-regional", diff --git a/clients/client-waf-regional/src/runtimeConfig.browser.ts b/clients/client-waf-regional/src/runtimeConfig.browser.ts index 6f9c95cd3130..bcaca369f5ed 100644 --- a/clients/client-waf-regional/src/runtimeConfig.browser.ts +++ b/clients/client-waf-regional/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WAFRegionalClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-waf-regional/src/runtimeConfig.ts b/clients/client-waf-regional/src/runtimeConfig.ts index b7ecee0ff1fa..7e292135c518 100644 --- a/clients/client-waf-regional/src/runtimeConfig.ts +++ b/clients/client-waf-regional/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WAFRegionalClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-waf/src/WAFClient.ts b/clients/client-waf/src/WAFClient.ts index 49ea255d6808..1836192a0ea7 100644 --- a/clients/client-waf/src/WAFClient.ts +++ b/clients/client-waf/src/WAFClient.ts @@ -467,6 +467,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-waf/src/endpoints.ts b/clients/client-waf/src/endpoints.ts index 804f6e61174f..0b3f36d0f93c 100644 --- a/clients/client-waf/src/endpoints.ts +++ b/clients/client-waf/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "aws-fips": { @@ -64,7 +64,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "waf", diff --git a/clients/client-waf/src/runtimeConfig.browser.ts b/clients/client-waf/src/runtimeConfig.browser.ts index c85c34cc7882..0b8f77c332c2 100644 --- a/clients/client-waf/src/runtimeConfig.browser.ts +++ b/clients/client-waf/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WAFClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-waf/src/runtimeConfig.ts b/clients/client-waf/src/runtimeConfig.ts index 5be8b27fb43e..a53aa1e42f8e 100644 --- a/clients/client-waf/src/runtimeConfig.ts +++ b/clients/client-waf/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WAFClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-wafv2/src/WAFV2Client.ts b/clients/client-wafv2/src/WAFV2Client.ts index 1e1a58f168c4..248abe62a0a0 100644 --- a/clients/client-wafv2/src/WAFV2Client.ts +++ b/clients/client-wafv2/src/WAFV2Client.ts @@ -338,6 +338,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-wafv2/src/endpoints.ts b/clients/client-wafv2/src/endpoints.ts index 44f3d32250a6..942ba3bd0f8d 100644 --- a/clients/client-wafv2/src/endpoints.ts +++ b/clients/client-wafv2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "wafv2", diff --git a/clients/client-wafv2/src/runtimeConfig.browser.ts b/clients/client-wafv2/src/runtimeConfig.browser.ts index c3ce08d2efd3..bc93af58bc0d 100644 --- a/clients/client-wafv2/src/runtimeConfig.browser.ts +++ b/clients/client-wafv2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WAFV2ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-wafv2/src/runtimeConfig.ts b/clients/client-wafv2/src/runtimeConfig.ts index 4ff95193f7ff..2bf994084f16 100644 --- a/clients/client-wafv2/src/runtimeConfig.ts +++ b/clients/client-wafv2/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WAFV2ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-wellarchitected/src/WellArchitectedClient.ts b/clients/client-wellarchitected/src/WellArchitectedClient.ts index bf5cc189a1c2..1e6630e6aa11 100644 --- a/clients/client-wellarchitected/src/WellArchitectedClient.ts +++ b/clients/client-wellarchitected/src/WellArchitectedClient.ts @@ -257,6 +257,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-wellarchitected/src/endpoints.ts b/clients/client-wellarchitected/src/endpoints.ts index e840f2f102f4..6fb1791bc195 100644 --- a/clients/client-wellarchitected/src/endpoints.ts +++ b/clients/client-wellarchitected/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "wellarchitected", diff --git a/clients/client-wellarchitected/src/runtimeConfig.browser.ts b/clients/client-wellarchitected/src/runtimeConfig.browser.ts index 7056f182b69a..bcce07d0153d 100644 --- a/clients/client-wellarchitected/src/runtimeConfig.browser.ts +++ b/clients/client-wellarchitected/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WellArchitectedClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-wellarchitected/src/runtimeConfig.ts b/clients/client-wellarchitected/src/runtimeConfig.ts index f6786664c2d6..ec869619b820 100644 --- a/clients/client-wellarchitected/src/runtimeConfig.ts +++ b/clients/client-wellarchitected/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WellArchitectedClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-wisdom/src/WisdomClient.ts b/clients/client-wisdom/src/WisdomClient.ts index c1afc63ab35e..98354162acf4 100644 --- a/clients/client-wisdom/src/WisdomClient.ts +++ b/clients/client-wisdom/src/WisdomClient.ts @@ -260,6 +260,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-wisdom/src/endpoints.ts b/clients/client-wisdom/src/endpoints.ts index dfa42a758b0c..1c6423223975 100644 --- a/clients/client-wisdom/src/endpoints.ts +++ b/clients/client-wisdom/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "wisdom", diff --git a/clients/client-wisdom/src/runtimeConfig.browser.ts b/clients/client-wisdom/src/runtimeConfig.browser.ts index 2a2c68938fa5..9a12090b8eb3 100644 --- a/clients/client-wisdom/src/runtimeConfig.browser.ts +++ b/clients/client-wisdom/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WisdomClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-wisdom/src/runtimeConfig.ts b/clients/client-wisdom/src/runtimeConfig.ts index 8ac4380f0f9e..328285bb55ad 100644 --- a/clients/client-wisdom/src/runtimeConfig.ts +++ b/clients/client-wisdom/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WisdomClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-workdocs/src/WorkDocsClient.ts b/clients/client-workdocs/src/WorkDocsClient.ts index 55c889e69d15..f485834dab39 100644 --- a/clients/client-workdocs/src/WorkDocsClient.ts +++ b/clients/client-workdocs/src/WorkDocsClient.ts @@ -308,6 +308,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-workdocs/src/endpoints.ts b/clients/client-workdocs/src/endpoints.ts index 48f0ca1ea9f3..d7ff6fcad41d 100644 --- a/clients/client-workdocs/src/endpoints.ts +++ b/clients/client-workdocs/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -64,7 +64,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "workdocs", diff --git a/clients/client-workdocs/src/runtimeConfig.browser.ts b/clients/client-workdocs/src/runtimeConfig.browser.ts index 00abb57271c9..205a1eaa547a 100644 --- a/clients/client-workdocs/src/runtimeConfig.browser.ts +++ b/clients/client-workdocs/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WorkDocsClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-workdocs/src/runtimeConfig.ts b/clients/client-workdocs/src/runtimeConfig.ts index f196dbe5c668..5ccb5990fb9b 100644 --- a/clients/client-workdocs/src/runtimeConfig.ts +++ b/clients/client-workdocs/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WorkDocsClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-worklink/src/WorkLinkClient.ts b/clients/client-worklink/src/WorkLinkClient.ts index 093dfa9187a1..14e4c74f158d 100644 --- a/clients/client-worklink/src/WorkLinkClient.ts +++ b/clients/client-worklink/src/WorkLinkClient.ts @@ -296,6 +296,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-worklink/src/endpoints.ts b/clients/client-worklink/src/endpoints.ts index e72f4f571bc6..f9feee42a4b2 100644 --- a/clients/client-worklink/src/endpoints.ts +++ b/clients/client-worklink/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "worklink", diff --git a/clients/client-worklink/src/runtimeConfig.browser.ts b/clients/client-worklink/src/runtimeConfig.browser.ts index b6977557daba..f90aa9571ef8 100644 --- a/clients/client-worklink/src/runtimeConfig.browser.ts +++ b/clients/client-worklink/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WorkLinkClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-worklink/src/runtimeConfig.ts b/clients/client-worklink/src/runtimeConfig.ts index 685314ef23ef..516ea88461e3 100644 --- a/clients/client-worklink/src/runtimeConfig.ts +++ b/clients/client-worklink/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WorkLinkClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-workmail/src/WorkMailClient.ts b/clients/client-workmail/src/WorkMailClient.ts index ec335c2a881e..a9c2c0b17ae4 100644 --- a/clients/client-workmail/src/WorkMailClient.ts +++ b/clients/client-workmail/src/WorkMailClient.ts @@ -437,6 +437,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-workmail/src/endpoints.ts b/clients/client-workmail/src/endpoints.ts index cb07fab2a42f..627030b02bec 100644 --- a/clients/client-workmail/src/endpoints.ts +++ b/clients/client-workmail/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "workmail", diff --git a/clients/client-workmail/src/runtimeConfig.browser.ts b/clients/client-workmail/src/runtimeConfig.browser.ts index bebd768b74ea..1e3787f11a93 100644 --- a/clients/client-workmail/src/runtimeConfig.browser.ts +++ b/clients/client-workmail/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WorkMailClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-workmail/src/runtimeConfig.ts b/clients/client-workmail/src/runtimeConfig.ts index 49232d802a14..4730c7c3e161 100644 --- a/clients/client-workmail/src/runtimeConfig.ts +++ b/clients/client-workmail/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WorkMailClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-workmailmessageflow/src/WorkMailMessageFlowClient.ts b/clients/client-workmailmessageflow/src/WorkMailMessageFlowClient.ts index a6ee1d4e2c13..7d810aea4077 100644 --- a/clients/client-workmailmessageflow/src/WorkMailMessageFlowClient.ts +++ b/clients/client-workmailmessageflow/src/WorkMailMessageFlowClient.ts @@ -145,6 +145,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-workmailmessageflow/src/endpoints.ts b/clients/client-workmailmessageflow/src/endpoints.ts index ce50b2483b94..9e5127896fc3 100644 --- a/clients/client-workmailmessageflow/src/endpoints.ts +++ b/clients/client-workmailmessageflow/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "workmailmessageflow", diff --git a/clients/client-workmailmessageflow/src/runtimeConfig.browser.ts b/clients/client-workmailmessageflow/src/runtimeConfig.browser.ts index c108ff971cac..a324023e24f3 100644 --- a/clients/client-workmailmessageflow/src/runtimeConfig.browser.ts +++ b/clients/client-workmailmessageflow/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WorkMailMessageFlowClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-workmailmessageflow/src/runtimeConfig.ts b/clients/client-workmailmessageflow/src/runtimeConfig.ts index acf4607c372a..6496d672167a 100644 --- a/clients/client-workmailmessageflow/src/runtimeConfig.ts +++ b/clients/client-workmailmessageflow/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WorkMailMessageFlowClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-workspaces/src/WorkSpacesClient.ts b/clients/client-workspaces/src/WorkSpacesClient.ts index 35eb01265d26..8897e062bd63 100644 --- a/clients/client-workspaces/src/WorkSpacesClient.ts +++ b/clients/client-workspaces/src/WorkSpacesClient.ts @@ -401,6 +401,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-workspaces/src/endpoints.ts b/clients/client-workspaces/src/endpoints.ts index 35b5fa07c9e3..b40d7232ffb3 100644 --- a/clients/client-workspaces/src/endpoints.ts +++ b/clients/client-workspaces/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -68,7 +68,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "workspaces", diff --git a/clients/client-workspaces/src/runtimeConfig.browser.ts b/clients/client-workspaces/src/runtimeConfig.browser.ts index 69610b421887..7104391e891c 100644 --- a/clients/client-workspaces/src/runtimeConfig.browser.ts +++ b/clients/client-workspaces/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: WorkSpacesClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-workspaces/src/runtimeConfig.ts b/clients/client-workspaces/src/runtimeConfig.ts index ede42556634e..d7dc39a067dc 100644 --- a/clients/client-workspaces/src/runtimeConfig.ts +++ b/clients/client-workspaces/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: WorkSpacesClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-xray/src/XRayClient.ts b/clients/client-xray/src/XRayClient.ts index e60dc78276fd..5b1d74712490 100644 --- a/clients/client-xray/src/XRayClient.ts +++ b/clients/client-xray/src/XRayClient.ts @@ -242,6 +242,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/clients/client-xray/src/endpoints.ts b/clients/client-xray/src/endpoints.ts index 38e09c779ec6..33fe2dd967a7 100644 --- a/clients/client-xray/src/endpoints.ts +++ b/clients/client-xray/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = { "fips-us-east-1": { @@ -82,7 +82,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "xray", diff --git a/clients/client-xray/src/runtimeConfig.browser.ts b/clients/client-xray/src/runtimeConfig.browser.ts index 058133e7e087..ba2da7ad0d38 100644 --- a/clients/client-xray/src/runtimeConfig.browser.ts +++ b/clients/client-xray/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: XRayClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/clients/client-xray/src/runtimeConfig.ts b/clients/client-xray/src/runtimeConfig.ts index 9d02ea2be19f..d9831678f3fb 100644 --- a/clients/client-xray/src/runtimeConfig.ts +++ b/clients/client-xray/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: XRayClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddClientRuntimeConfig.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddClientRuntimeConfig.java index 6b89fc3b9dd3..8e16e01eb42f 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddClientRuntimeConfig.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddClientRuntimeConfig.java @@ -39,6 +39,8 @@ * made at most in case of retry. *
  • retryMode: Specifies which retry algorithm to use.
  • *
  • logger: Optional logger for logging debug/info/warn/error.
  • + *
  • useDualstackEndpoint: Enables IPv6/IPv4 dualstack endpoint.
  • + *
  • useFipsEndpoint: Enables FIPS compatible endpoints.
  • * * *

    This plugin adds the following Node runtime specific values: @@ -47,7 +49,9 @@ *

  • maxAttempts: Uses the default maxAttempts provider that checks things * like environment variables and the AWS config file.
  • *
  • retryMode: Specifies which retry algorithm to use.
  • - *
  • logger: Sets to empty as logger is passed in client configuration
  • + *
  • logger: Sets to empty as logger is passed in client configuration.
  • + *
  • useDualstackEndpoint: Uses default useDualstackEndpoint provider.
  • + *
  • useFipsEndpoint: Uses default useFipsEndpoint provider.
  • * * *

    This plugin adds the following Browser runtime specific values: @@ -55,7 +59,9 @@ *

      *
    • maxAttempts: Returns default value of 3.
    • *
    • retryMode: Provider which returns DEFAULT_RETRY_MODE.
    • - *
    • logger: Sets to empty as logger is passed in client configuration
    • + *
    • logger: Sets to empty as logger is passed in client configuration.
    • + *
    • useDualstackEndpoint: Sets to false.
    • + *
    • useFipsEndpoint: Sets to false.
    • *
    */ @SmithyInternalApi @@ -77,6 +83,10 @@ public void addConfigInterfaceFields( .write("retryMode?: string | __Provider;\n"); writer.writeDocs("Optional logger for logging debug/info/warn/error.") .write("logger?: __Logger;\n"); + writer.writeDocs("Enables IPv6/IPv4 dualstack endpoint.") + .write("useDualstackEndpoint?: boolean | __Provider;\n"); + writer.writeDocs("Enables FIPS compatible endpoints.") + .write("useFipsEndpoint?: boolean | __Provider;\n"); } @Override @@ -107,6 +117,18 @@ public Map> getRuntimeConfigWriters( writer.addImport("DEFAULT_RETRY_MODE", "DEFAULT_RETRY_MODE", TypeScriptDependency.MIDDLEWARE_RETRY.packageName); writer.write("(() => Promise.resolve(DEFAULT_RETRY_MODE))"); + }, + "useDualstackEndpoint", writer -> { + writer.addDependency(TypeScriptDependency.CONFIG_RESOLVER); + writer.addImport("DEFAULT_USE_DUALSTACK_ENDPOINT", "DEFAULT_USE_DUALSTACK_ENDPOINT", + TypeScriptDependency.CONFIG_RESOLVER.packageName); + writer.write("(() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT))"); + }, + "useFipsEndpoint", writer -> { + writer.addDependency(TypeScriptDependency.CONFIG_RESOLVER); + writer.addImport("DEFAULT_USE_FIPS_ENDPOINT", "DEFAULT_USE_FIPS_ENDPOINT", + TypeScriptDependency.CONFIG_RESOLVER.packageName); + writer.write("(() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))"); } ); case NODE: @@ -127,6 +149,26 @@ public Map> getRuntimeConfigWriters( writer.addImport("NODE_RETRY_MODE_CONFIG_OPTIONS", "NODE_RETRY_MODE_CONFIG_OPTIONS", TypeScriptDependency.MIDDLEWARE_RETRY.packageName); writer.write("loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS)"); + }, + "useDualstackEndpoint", writer -> { + writer.addDependency(AwsDependency.NODE_CONFIG_PROVIDER); + writer.addImport("loadConfig", "loadNodeConfig", + AwsDependency.NODE_CONFIG_PROVIDER.packageName); + writer.addDependency(TypeScriptDependency.CONFIG_RESOLVER); + writer.addImport("NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS", + "NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS", + TypeScriptDependency.CONFIG_RESOLVER.packageName); + writer.write("loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS)"); + }, + "useFipsEndpoint", writer -> { + writer.addDependency(AwsDependency.NODE_CONFIG_PROVIDER); + writer.addImport("loadConfig", "loadNodeConfig", + AwsDependency.NODE_CONFIG_PROVIDER.packageName); + writer.addDependency(TypeScriptDependency.CONFIG_RESOLVER); + writer.addImport("NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS", + "NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS", + TypeScriptDependency.CONFIG_RESOLVER.packageName); + writer.write("loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)"); } ); default: diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/EndpointGenerator.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/EndpointGenerator.java index 5dd9dfeb1d67..a0bf9682a9c5 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/EndpointGenerator.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/EndpointGenerator.java @@ -142,10 +142,12 @@ private void writePartitionHash() { private void writeEndpointProviderFunction() { writer.addImport("RegionInfoProvider", "RegionInfoProvider", TypeScriptDependency.AWS_SDK_TYPES.packageName); + writer.addImport("RegionInfoProviderOptions", "RegionInfoProviderOptions", + TypeScriptDependency.AWS_SDK_TYPES.packageName); writer.addImport("getRegionInfo", "getRegionInfo", TypeScriptDependency.CONFIG_RESOLVER.packageName); writer.openBlock("export const defaultRegionInfoProvider: RegionInfoProvider = async (\n" + " region: string,\n" - + " options?: any\n" + + " options?: RegionInfoProviderOptions\n" + ") => ", ";", () -> { writer.openBlock("getRegionInfo(region, {", "})", () -> { writer.write("...options,"); diff --git a/packages/config-resolver/package.json b/packages/config-resolver/package.json index d4cf5da74718..c2ce74b16aa2 100644 --- a/packages/config-resolver/package.json +++ b/packages/config-resolver/package.json @@ -17,17 +17,17 @@ "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "devDependencies": { - "@aws-sdk/node-config-provider": "3.39.0", - "@types/jest": "^26.0.4", - "jest": "^26.1.0", - "typescript": "~4.3.5" - }, "dependencies": { + "@aws-sdk/node-config-provider": "3.39.0", "@aws-sdk/signature-v4": "3.39.0", "@aws-sdk/types": "3.38.0", "tslib": "^2.3.0" }, + "devDependencies": { + "@types/jest": "^26.0.4", + "jest": "^26.1.0", + "typescript": "~4.3.5" + }, "engines": { "node": ">= 10.0.0" }, diff --git a/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.spec.ts b/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.spec.ts new file mode 100644 index 000000000000..661f4ba8b56f --- /dev/null +++ b/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.spec.ts @@ -0,0 +1,51 @@ +import { booleanSelector, SelectorType } from "@aws-sdk/node-config-provider"; + +import { + CONFIG_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT, + ENV_USE_DUALSTACK_ENDPOINT, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, +} from "./NodeUseDualstackEndpointConfigOptions"; + +jest.mock("@aws-sdk/node-config-provider"); + +describe("NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS", () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + const test = (func: Function, obj: { [key: string]: string }, key: string, type: SelectorType) => { + it.each([true, false, undefined])("returns %s", (output) => { + (booleanSelector as jest.Mock).mockReturnValueOnce(output); + expect(func(obj)).toEqual(output); + expect(booleanSelector).toBeCalledWith(obj, key, type); + }); + + it("throws error", () => { + const mockError = new Error("error"); + (booleanSelector as jest.Mock).mockImplementationOnce(() => { + throw mockError; + }); + expect(() => { + func(obj); + }).toThrow(mockError); + }); + }; + + describe("calls booleanSelector for environmentVariableSelector", () => { + const env: { [ENV_USE_DUALSTACK_ENDPOINT]: any } = {} as any; + const { environmentVariableSelector } = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS; + test(environmentVariableSelector, env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV); + }); + + describe("calls booleanSelector for configFileSelector", () => { + const profileContent: { [CONFIG_USE_DUALSTACK_ENDPOINT]: any } = {} as any; + const { configFileSelector } = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS; + test(configFileSelector, profileContent, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG); + }); + + it("returns false for default", () => { + const { default: defaultValue } = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS; + expect(defaultValue).toEqual(DEFAULT_USE_DUALSTACK_ENDPOINT); + }); +}); diff --git a/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts b/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts new file mode 100644 index 000000000000..b1f96b08e3d7 --- /dev/null +++ b/packages/config-resolver/src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts @@ -0,0 +1,13 @@ +import { LoadedConfigSelectors } from "@aws-sdk/node-config-provider"; +import { booleanSelector, SelectorType } from "@aws-sdk/node-config-provider"; + +export const ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +export const CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +export const DEFAULT_USE_DUALSTACK_ENDPOINT = false; + +export const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors = { + environmentVariableSelector: (env: NodeJS.ProcessEnv) => + booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG), + default: false, +}; diff --git a/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.spec.ts b/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.spec.ts new file mode 100644 index 000000000000..908393472cf7 --- /dev/null +++ b/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.spec.ts @@ -0,0 +1,51 @@ +import { booleanSelector, SelectorType } from "@aws-sdk/node-config-provider"; + +import { + CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT, + ENV_USE_FIPS_ENDPOINT, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "./NodeUseFipsEndpointConfigOptions"; + +jest.mock("@aws-sdk/node-config-provider"); + +describe("NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS", () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + const test = (func: Function, obj: { [key: string]: string }, key: string, type: SelectorType) => { + it.each([true, false, undefined])("returns %s", (output) => { + (booleanSelector as jest.Mock).mockReturnValueOnce(output); + expect(func(obj)).toEqual(output); + expect(booleanSelector).toBeCalledWith(obj, key, type); + }); + + it("throws error", () => { + const mockError = new Error("error"); + (booleanSelector as jest.Mock).mockImplementationOnce(() => { + throw mockError; + }); + expect(() => { + func(obj); + }).toThrow(mockError); + }); + }; + + describe("calls booleanSelector for environmentVariableSelector", () => { + const env: { [ENV_USE_FIPS_ENDPOINT]: any } = {} as any; + const { environmentVariableSelector } = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS; + test(environmentVariableSelector, env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV); + }); + + describe("calls booleanSelector for configFileSelector", () => { + const profileContent: { [CONFIG_USE_FIPS_ENDPOINT]: any } = {} as any; + const { configFileSelector } = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS; + test(configFileSelector, profileContent, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG); + }); + + it("returns false for default", () => { + const { default: defaultValue } = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS; + expect(defaultValue).toEqual(DEFAULT_USE_FIPS_ENDPOINT); + }); +}); diff --git a/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts b/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts new file mode 100644 index 000000000000..4bea5ebf88d4 --- /dev/null +++ b/packages/config-resolver/src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts @@ -0,0 +1,13 @@ +import { LoadedConfigSelectors } from "@aws-sdk/node-config-provider"; +import { booleanSelector, SelectorType } from "@aws-sdk/node-config-provider"; + +export const ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +export const CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +export const DEFAULT_USE_FIPS_ENDPOINT = false; + +export const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors = { + environmentVariableSelector: (env: NodeJS.ProcessEnv) => + booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG), + default: false, +}; diff --git a/packages/config-resolver/src/endpointsConfig/index.ts b/packages/config-resolver/src/endpointsConfig/index.ts index ed5fcc449018..1424c22f2a2f 100644 --- a/packages/config-resolver/src/endpointsConfig/index.ts +++ b/packages/config-resolver/src/endpointsConfig/index.ts @@ -1,2 +1,4 @@ +export * from "./NodeUseDualstackEndpointConfigOptions"; +export * from "./NodeUseFipsEndpointConfigOptions"; export * from "./resolveCustomEndpointsConfig"; export * from "./resolveEndpointsConfig"; diff --git a/packages/config-resolver/src/endpointsConfig/resolveCustomEndpointsConfig.ts b/packages/config-resolver/src/endpointsConfig/resolveCustomEndpointsConfig.ts index 1ba9c8d812c7..3118029e50c8 100644 --- a/packages/config-resolver/src/endpointsConfig/resolveCustomEndpointsConfig.ts +++ b/packages/config-resolver/src/endpointsConfig/resolveCustomEndpointsConfig.ts @@ -1,6 +1,7 @@ import { Endpoint, Provider, UrlParser } from "@aws-sdk/types"; import { EndpointsInputConfig, EndpointsResolvedConfig } from "./resolveEndpointsConfig"; +import { normalizeBoolean } from "./utils/normalizeBoolean"; import { normalizeEndpoint } from "./utils/normalizeEndpoint"; export interface CustomEndpointsInputConfig extends EndpointsInputConfig { @@ -29,4 +30,6 @@ export const resolveCustomEndpointsConfig = ( tls: input.tls ?? true, endpoint: normalizeEndpoint(input), isCustomEndpoint: true, + useDualstackEndpoint: normalizeBoolean(input.useDualstackEndpoint!), + useFipsEndpoint: normalizeBoolean(input.useFipsEndpoint!), }); diff --git a/packages/config-resolver/src/endpointsConfig/resolveEndpointsConfig.ts b/packages/config-resolver/src/endpointsConfig/resolveEndpointsConfig.ts index 8f286bd22cd6..0167e1cddd8e 100644 --- a/packages/config-resolver/src/endpointsConfig/resolveEndpointsConfig.ts +++ b/packages/config-resolver/src/endpointsConfig/resolveEndpointsConfig.ts @@ -1,6 +1,7 @@ import { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@aws-sdk/types"; import { getEndpointFromRegion } from "./utils/getEndpointFromRegion"; +import { normalizeBoolean } from "./utils/normalizeBoolean"; import { normalizeEndpoint } from "./utils/normalizeEndpoint"; export interface EndpointsInputConfig { @@ -13,6 +14,16 @@ export interface EndpointsInputConfig { * Whether TLS is enabled for requests. */ tls?: boolean; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | Provider; } interface PreviouslyResolved { @@ -23,7 +34,7 @@ interface PreviouslyResolved { export interface EndpointsResolvedConfig extends Required { /** - * Resolved value for input {@link EndpointsResolvedConfig.endpoint} + * Resolved value for input {@link EndpointsInputConfig.endpoint} */ endpoint: Provider; @@ -32,6 +43,16 @@ export interface EndpointsResolvedConfig extends Required * @internal */ isCustomEndpoint: boolean; + + /** + * Resolved value for input {@link EndpointsInputConfig.useDualstackEndpoint} + */ + useDualstackEndpoint: Provider; + + /** + * Resolved value for input {@link EndpointsInputConfig.useFipsEndpoint} + */ + useFipsEndpoint: Provider; } export const resolveEndpointsConfig = ( @@ -43,4 +64,6 @@ export const resolveEndpointsConfig = ( ? normalizeEndpoint({ ...input, endpoint: input.endpoint }) : () => getEndpointFromRegion(input), isCustomEndpoint: input.endpoint ? true : false, + useDualstackEndpoint: normalizeBoolean(input.useDualstackEndpoint!), + useFipsEndpoint: normalizeBoolean(input.useFipsEndpoint!), }); diff --git a/packages/config-resolver/src/endpointsConfig/utils/normalizeBoolean.spec.ts b/packages/config-resolver/src/endpointsConfig/utils/normalizeBoolean.spec.ts new file mode 100644 index 000000000000..6165f59166ca --- /dev/null +++ b/packages/config-resolver/src/endpointsConfig/utils/normalizeBoolean.spec.ts @@ -0,0 +1,13 @@ +import { normalizeBoolean } from "./normalizeBoolean"; + +describe(normalizeBoolean.name, () => { + it.each([true, false])("returns Provider if value is boolean: %s", async (value) => { + const output = normalizeBoolean(value); + expect(await output()).toEqual(value); + }); + + it.each([true, false])("returns Provider if it's a Provider which returns %s", (value) => { + const mockBooleanProvider = () => Promise.resolve(value); + expect(normalizeBoolean(mockBooleanProvider)).toBe(mockBooleanProvider); + }); +}); diff --git a/packages/config-resolver/src/endpointsConfig/utils/normalizeBoolean.ts b/packages/config-resolver/src/endpointsConfig/utils/normalizeBoolean.ts new file mode 100644 index 000000000000..4c0a93cb622d --- /dev/null +++ b/packages/config-resolver/src/endpointsConfig/utils/normalizeBoolean.ts @@ -0,0 +1,10 @@ +import { Provider } from "@aws-sdk/types"; + +// TODO: Move to a utility file which can be used across packages +export const normalizeBoolean = (value: boolean | Provider): Provider => { + if (typeof value === "boolean") { + const promisified = Promise.resolve(value); + return () => promisified; + } + return value as Provider; +}; diff --git a/packages/middleware-bucket-endpoint/src/bucketEndpointMiddleware.spec.ts b/packages/middleware-bucket-endpoint/src/bucketEndpointMiddleware.spec.ts index b7ff22808770..77c0f3376499 100644 --- a/packages/middleware-bucket-endpoint/src/bucketEndpointMiddleware.spec.ts +++ b/packages/middleware-bucket-endpoint/src/bucketEndpointMiddleware.spec.ts @@ -34,6 +34,7 @@ describe("bucketEndpointMiddleware", () => { .fn() .mockResolvedValue({ hostname: "foo.us-foo-2.amazonaws.com", partition: "aws-foo", signingRegion: mockRegion }), useArnRegion: jest.fn().mockResolvedValue(false), + useDualstackEndpoint: () => Promise.resolve(false), }; afterEach(() => { @@ -79,7 +80,7 @@ describe("bucketEndpointMiddleware", () => { resolveBucketEndpointConfig({ ...previouslyResolvedConfig, useAccelerateEndpoint: true, - useDualstackEndpoint: true, + useDualstackEndpoint: () => Promise.resolve(true), forcePathStyle: true, isCustomEndpoint: true, }) diff --git a/packages/middleware-bucket-endpoint/src/bucketEndpointMiddleware.ts b/packages/middleware-bucket-endpoint/src/bucketEndpointMiddleware.ts index 30e39cf465be..3a01e05e4ed6 100644 --- a/packages/middleware-bucket-endpoint/src/bucketEndpointMiddleware.ts +++ b/packages/middleware-bucket-endpoint/src/bucketEndpointMiddleware.ts @@ -15,76 +15,84 @@ import { bucketHostname } from "./bucketHostname"; import { getPseudoRegion } from "./bucketHostnameUtils"; import { BucketEndpointResolvedConfig } from "./configurations"; -export const bucketEndpointMiddleware = (options: BucketEndpointResolvedConfig): BuildMiddleware => < - Output extends MetadataBearer ->( - next: BuildHandler, - context: HandlerExecutionContext -): BuildHandler => async (args: BuildHandlerArguments): Promise> => { - const { Bucket: bucketName } = args.input as { Bucket: string }; - let replaceBucketInPath = options.bucketEndpoint; - const request = args.request; - if (HttpRequest.isInstance(request)) { - if (options.bucketEndpoint) { - request.hostname = bucketName; - } else if (validateArn(bucketName)) { - const bucketArn = parseArn(bucketName); - const clientRegion = getPseudoRegion(await options.region()); - const { partition, signingRegion = clientRegion } = (await options.regionInfoProvider(clientRegion)) || {}; - const useArnRegion = await options.useArnRegion(); - const { hostname, bucketEndpoint, signingRegion: modifiedSigningRegion, signingService } = bucketHostname({ - bucketName: bucketArn, - baseHostname: request.hostname, - accelerateEndpoint: options.useAccelerateEndpoint, - dualstackEndpoint: options.useDualstackEndpoint, - pathStyleEndpoint: options.forcePathStyle, - tlsCompatible: request.protocol === "https:", - useArnRegion, - clientPartition: partition, - clientSigningRegion: signingRegion, - clientRegion: clientRegion, - isCustomEndpoint: options.isCustomEndpoint, - disableMultiregionAccessPoints: await options.disableMultiregionAccessPoints(), - }); +export const bucketEndpointMiddleware = + (options: BucketEndpointResolvedConfig): BuildMiddleware => + ( + next: BuildHandler, + context: HandlerExecutionContext + ): BuildHandler => + async (args: BuildHandlerArguments): Promise> => { + const { Bucket: bucketName } = args.input as { Bucket: string }; + let replaceBucketInPath = options.bucketEndpoint; + const request = args.request; + if (HttpRequest.isInstance(request)) { + if (options.bucketEndpoint) { + request.hostname = bucketName; + } else if (validateArn(bucketName)) { + const bucketArn = parseArn(bucketName); + const clientRegion = getPseudoRegion(await options.region()); + const { partition, signingRegion = clientRegion } = (await options.regionInfoProvider(clientRegion)) || {}; + const useArnRegion = await options.useArnRegion(); + const dualstackEndpoint = await options.useDualstackEndpoint(); + const { + hostname, + bucketEndpoint, + signingRegion: modifiedSigningRegion, + signingService, + } = bucketHostname({ + bucketName: bucketArn, + baseHostname: request.hostname, + accelerateEndpoint: options.useAccelerateEndpoint, + dualstackEndpoint, + pathStyleEndpoint: options.forcePathStyle, + tlsCompatible: request.protocol === "https:", + useArnRegion, + clientPartition: partition, + clientSigningRegion: signingRegion, + clientRegion: clientRegion, + isCustomEndpoint: options.isCustomEndpoint, + disableMultiregionAccessPoints: await options.disableMultiregionAccessPoints(), + }); - // If the request needs to use a region or service name inferred from ARN that different from client region, we - // need to set them in the handler context so the signer will use them - if (modifiedSigningRegion && modifiedSigningRegion !== signingRegion) { - context["signing_region"] = modifiedSigningRegion; - } - if (signingService && signingService !== "s3") { - context["signing_service"] = signingService; - } + // If the request needs to use a region or service name inferred from ARN that different from client region, we + // need to set them in the handler context so the signer will use them + if (modifiedSigningRegion && modifiedSigningRegion !== signingRegion) { + context["signing_region"] = modifiedSigningRegion; + } + if (signingService && signingService !== "s3") { + context["signing_service"] = signingService; + } - request.hostname = hostname; - replaceBucketInPath = bucketEndpoint; - } else { - const clientRegion = getPseudoRegion(await options.region()); - const { hostname, bucketEndpoint } = bucketHostname({ - bucketName, - clientRegion, - baseHostname: request.hostname, - accelerateEndpoint: options.useAccelerateEndpoint, - dualstackEndpoint: options.useDualstackEndpoint, - pathStyleEndpoint: options.forcePathStyle, - tlsCompatible: request.protocol === "https:", - isCustomEndpoint: options.isCustomEndpoint, - }); + request.hostname = hostname; + replaceBucketInPath = bucketEndpoint; + } else { + const clientRegion = getPseudoRegion(await options.region()); + const dualstackEndpoint = await options.useDualstackEndpoint(); + const { hostname, bucketEndpoint } = bucketHostname({ + bucketName, + clientRegion, + baseHostname: request.hostname, + accelerateEndpoint: options.useAccelerateEndpoint, + dualstackEndpoint, + pathStyleEndpoint: options.forcePathStyle, + tlsCompatible: request.protocol === "https:", + isCustomEndpoint: options.isCustomEndpoint, + }); - request.hostname = hostname; - replaceBucketInPath = bucketEndpoint; - } + request.hostname = hostname; + replaceBucketInPath = bucketEndpoint; + } - if (replaceBucketInPath) { - request.path = request.path.replace(/^(\/)?[^\/]+/, ""); - if (request.path === "") { - request.path = "/"; + if (replaceBucketInPath) { + request.path = request.path.replace(/^(\/)?[^\/]+/, ""); + if (request.path === "") { + request.path = "/"; + } } } - } - return next({ ...args, request }); -}; + return next({ ...args, request }); + }; export const bucketEndpointMiddlewareOptions: RelativeMiddlewareOptions = { tags: ["BUCKET_ENDPOINT"], diff --git a/packages/middleware-bucket-endpoint/src/configurations.ts b/packages/middleware-bucket-endpoint/src/configurations.ts index 059fce339dea..562ae72534df 100644 --- a/packages/middleware-bucket-endpoint/src/configurations.ts +++ b/packages/middleware-bucket-endpoint/src/configurations.ts @@ -14,13 +14,6 @@ export interface BucketEndpointInputConfig { * Whether to use the S3 Transfer Acceleration endpoint by default */ useAccelerateEndpoint?: boolean; - /** - * Enables IPv6/IPv4 dualstack endpoint. When a DNS lookup is performed on an endpoint of this type, it returns an “A” - * record with an IPv4 address and an “AAAA” record with an IPv6 address. In most cases the network stack in the - * client environment will automatically prefer the AAAA record and make a connection using the IPv6 address. Note, - * however, that currently on Windows, the IPv4 address will be preferred. - */ - useDualstackEndpoint?: boolean; /** * Whether to override the request region with the region inferred from requested resource's ARN. Defaults to false */ @@ -36,6 +29,7 @@ interface PreviouslyResolved { isCustomEndpoint: boolean; region: Provider; regionInfoProvider: RegionInfoProvider; + useDualstackEndpoint: Provider; } export interface BucketEndpointResolvedConfig { @@ -57,9 +51,9 @@ export interface BucketEndpointResolvedConfig { */ useAccelerateEndpoint: boolean; /** - * Resolved value for input config {@link BucketEndpointInputConfig.useDualstackEndpoint} + * Enables IPv6/IPv4 dualstack endpoint. */ - useDualstackEndpoint: boolean; + useDualstackEndpoint: Provider; /** * Resolved value for input config {@link BucketEndpointInputConfig.useArnRegion} */ @@ -83,7 +77,6 @@ export function resolveBucketEndpointConfig( bucketEndpoint = false, forcePathStyle = false, useAccelerateEndpoint = false, - useDualstackEndpoint = false, useArnRegion = false, disableMultiregionAccessPoints = false, } = input; @@ -92,7 +85,6 @@ export function resolveBucketEndpointConfig( bucketEndpoint, forcePathStyle, useAccelerateEndpoint, - useDualstackEndpoint, useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion), disableMultiregionAccessPoints: typeof disableMultiregionAccessPoints === "function" diff --git a/packages/middleware-sdk-s3-control/src/configurations.ts b/packages/middleware-sdk-s3-control/src/configurations.ts index 52c49567d537..96bdf7a0f873 100644 --- a/packages/middleware-sdk-s3-control/src/configurations.ts +++ b/packages/middleware-sdk-s3-control/src/configurations.ts @@ -2,10 +2,6 @@ import { Provider, RegionInfoProvider } from "@aws-sdk/types"; export { NODE_USE_ARN_REGION_CONFIG_OPTIONS } from "@aws-sdk/middleware-bucket-endpoint"; export interface S3ControlInputConfig { - /** - * Enables IPv6/IPv4 dualstack endpoint. When a DNS lookup is performed on an endpoint of this type, it returns an “A” record with an IPv4 address and an “AAAA” record with an IPv6 address. In most cases the network stack in the client environment will automatically prefer the AAAA record and make a connection using the IPv6 address. Note, however, that currently on Windows, the IPv4 address will be preferred. - */ - useDualstackEndpoint?: boolean; /** * Whether to override the request region with the region inferred from requested resource's ARN. Defaults to false */ @@ -16,6 +12,7 @@ interface PreviouslyResolved { isCustomEndpoint: boolean; region: Provider; regionInfoProvider: RegionInfoProvider; + useDualstackEndpoint: Provider; } export interface S3ControlResolvedConfig { @@ -25,9 +22,9 @@ export interface S3ControlResolvedConfig { */ isCustomEndpoint: boolean; /** - * Resolved value for input config {@link S3ControlInputConfig.useDualstackEndpoint} + * Enables IPv6/IPv4 dualstack endpoint. */ - useDualstackEndpoint: boolean; + useDualstackEndpoint: Provider; /** * Resolved value for input config {@link S3ControlInputConfig.useArnRegion} */ @@ -46,10 +43,9 @@ export interface S3ControlResolvedConfig { export function resolveS3ControlConfig( input: T & PreviouslyResolved & S3ControlInputConfig ): T & S3ControlResolvedConfig { - const { useDualstackEndpoint = false, useArnRegion = false } = input; + const { useArnRegion = false } = input; return { ...input, - useDualstackEndpoint, useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion), }; } diff --git a/packages/middleware-sdk-s3-control/src/process-arnables-plugin/parse-outpost-arnables.ts b/packages/middleware-sdk-s3-control/src/process-arnables-plugin/parse-outpost-arnables.ts index bbf6ad0c5c6c..21b3bc2194d6 100644 --- a/packages/middleware-sdk-s3-control/src/process-arnables-plugin/parse-outpost-arnables.ts +++ b/packages/middleware-sdk-s3-control/src/process-arnables-plugin/parse-outpost-arnables.ts @@ -38,10 +38,11 @@ export const parseOutpostArnablesMiddleaware = const clientRegion = await options.region(); const { regionInfoProvider } = options; const useArnRegion = await options.useArnRegion(); + const useDualstackEndpoint = await options.useDualstackEndpoint(); const baseRegion = getPseudoRegion(clientRegion); const { partition: clientPartition, signingRegion = baseRegion } = (await regionInfoProvider(baseRegion))!; const validatorOptions: ValidateOutpostsArnOptions = { - useDualstackEndpoint: options.useDualstackEndpoint, + useDualstackEndpoint, clientRegion, clientPartition, signingRegion, diff --git a/packages/middleware-sdk-s3-control/src/process-arnables-plugin/plugin.spec.ts b/packages/middleware-sdk-s3-control/src/process-arnables-plugin/plugin.spec.ts index d1d7c50ddc75..bb69e89238ff 100644 --- a/packages/middleware-sdk-s3-control/src/process-arnables-plugin/plugin.spec.ts +++ b/packages/middleware-sdk-s3-control/src/process-arnables-plugin/plugin.spec.ts @@ -10,12 +10,12 @@ describe("getProcessArnablesMiddleware", () => { region: string; regionInfoProvider?: Provider; useAccelerateEndpoint?: boolean; - useDualstackEndpoint?: boolean; + useDualstackEndpoint?: Provider; useArnRegion?: boolean; }; const setupPluginOptions = (options: FakeOptions): S3ControlResolvedConfig => { return { - useDualstackEndpoint: false, + useDualstackEndpoint: () => Promise.resolve(false), ...options, regionInfoProvider: options.regionInfoProvider ?? jest.fn().mockResolvedValue({ partition: "aws" }), region: jest.fn().mockResolvedValue(options.region), @@ -239,7 +239,7 @@ describe("getProcessArnablesMiddleware", () => { const clientRegion = "us-west-2"; const options = setupPluginOptions({ region: clientRegion, - useDualstackEndpoint: true, + useDualstackEndpoint: () => Promise.resolve(true), }); const stack = getStack(`s3-control.${clientRegion}.amazonaws.com`, options); const handler = stack.resolve((() => {}) as any, {}); @@ -483,7 +483,7 @@ describe("getProcessArnablesMiddleware", () => { const clientRegion = "us-west-2"; const options = setupPluginOptions({ region: clientRegion, - useDualstackEndpoint: true, + useDualstackEndpoint: () => Promise.resolve(true), }); const stack = getStack(`s3-control.${clientRegion}.amazonaws.com`, options); const handler = stack.resolve((() => {}) as any, {}); diff --git a/packages/types/src/util.ts b/packages/types/src/util.ts index 3f1889cf4cf8..9b87d502d3e5 100644 --- a/packages/types/src/util.ts +++ b/packages/types/src/util.ts @@ -92,6 +92,22 @@ export interface RegionInfo { signingRegion?: string; } +/** + * Options to pass when calling {@link RegionInfoProvider} + */ +export interface RegionInfoProviderOptions { + /** + * Enables IPv6/IPv4 dualstack endpoint. + * @default false + */ + useDualstackEndpoint: boolean; + /** + * Enables FIPS compatible endpoints. + * @default false + */ + useFipsEndpoint: boolean; +} + /** * Function returns designated service's regionalization * information from given region. Each service client @@ -99,7 +115,7 @@ export interface RegionInfo { * to provide the default values of related configurations */ export interface RegionInfoProvider { - (region: string, options?: any): Promise; + (region: string, options?: RegionInfoProviderOptions): Promise; } /** diff --git a/private/aws-echo-service/src/EchoServiceClient.ts b/private/aws-echo-service/src/EchoServiceClient.ts index 19a591c790ee..d3cd2f6792a1 100644 --- a/private/aws-echo-service/src/EchoServiceClient.ts +++ b/private/aws-echo-service/src/EchoServiceClient.ts @@ -127,6 +127,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header * @internal diff --git a/private/aws-echo-service/src/runtimeConfig.browser.ts b/private/aws-echo-service/src/runtimeConfig.browser.ts index 3ae8628dd97b..819319bf299a 100644 --- a/private/aws-echo-service/src/runtimeConfig.browser.ts +++ b/private/aws-echo-service/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; @@ -30,6 +31,8 @@ export const getRuntimeConfig = (config: EchoServiceClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-echo-service/src/runtimeConfig.ts b/private/aws-echo-service/src/runtimeConfig.ts index 6de63577e8b3..26f5db2eccf1 100644 --- a/private/aws-echo-service/src/runtimeConfig.ts +++ b/private/aws-echo-service/src/runtimeConfig.ts @@ -1,6 +1,10 @@ // @ts-ignore: package.json will be imported from dist folders import packageInfo from "../package.json"; // eslint-disable-line +import { + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; @@ -33,6 +37,8 @@ export const getRuntimeConfig = (config: EchoServiceClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-ec2/src/EC2ProtocolClient.ts b/private/aws-protocoltests-ec2/src/EC2ProtocolClient.ts index 85e7dacae8b0..4c879ce2a39b 100644 --- a/private/aws-protocoltests-ec2/src/EC2ProtocolClient.ts +++ b/private/aws-protocoltests-ec2/src/EC2ProtocolClient.ts @@ -211,6 +211,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/private/aws-protocoltests-ec2/src/endpoints.ts b/private/aws-protocoltests-ec2/src/endpoints.ts index 1dff9bfbb8cb..0e85dfecc22c 100644 --- a/private/aws-protocoltests-ec2/src/endpoints.ts +++ b/private/aws-protocoltests-ec2/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "awsec2", diff --git a/private/aws-protocoltests-ec2/src/runtimeConfig.browser.ts b/private/aws-protocoltests-ec2/src/runtimeConfig.browser.ts index aa5e0b059e47..455ab30a7713 100644 --- a/private/aws-protocoltests-ec2/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-ec2/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; @@ -31,6 +32,8 @@ export const getRuntimeConfig = (config: EC2ProtocolClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-ec2/src/runtimeConfig.ts b/private/aws-protocoltests-ec2/src/runtimeConfig.ts index ca6e2ed871b4..a40ed3f27004 100644 --- a/private/aws-protocoltests-ec2/src/runtimeConfig.ts +++ b/private/aws-protocoltests-ec2/src/runtimeConfig.ts @@ -1,6 +1,10 @@ // @ts-ignore: package.json will be imported from dist folders import packageInfo from "../package.json"; // eslint-disable-line +import { + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; @@ -34,6 +38,8 @@ export const getRuntimeConfig = (config: EC2ProtocolClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-json-10/src/JSONRPC10Client.ts b/private/aws-protocoltests-json-10/src/JSONRPC10Client.ts index 439cac743957..1eb2809c4ec9 100644 --- a/private/aws-protocoltests-json-10/src/JSONRPC10Client.ts +++ b/private/aws-protocoltests-json-10/src/JSONRPC10Client.ts @@ -169,6 +169,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/private/aws-protocoltests-json-10/src/endpoints.ts b/private/aws-protocoltests-json-10/src/endpoints.ts index 113b0b9ec77f..bd6726b853d2 100644 --- a/private/aws-protocoltests-json-10/src/endpoints.ts +++ b/private/aws-protocoltests-json-10/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "jsonrpc10", diff --git a/private/aws-protocoltests-json-10/src/runtimeConfig.browser.ts b/private/aws-protocoltests-json-10/src/runtimeConfig.browser.ts index df129702b088..c8355cc8af7f 100644 --- a/private/aws-protocoltests-json-10/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-json-10/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; @@ -31,6 +32,8 @@ export const getRuntimeConfig = (config: JSONRPC10ClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-json-10/src/runtimeConfig.ts b/private/aws-protocoltests-json-10/src/runtimeConfig.ts index 15c436103384..32cb3fe36919 100644 --- a/private/aws-protocoltests-json-10/src/runtimeConfig.ts +++ b/private/aws-protocoltests-json-10/src/runtimeConfig.ts @@ -1,6 +1,10 @@ // @ts-ignore: package.json will be imported from dist folders import packageInfo from "../package.json"; // eslint-disable-line +import { + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; @@ -34,6 +38,8 @@ export const getRuntimeConfig = (config: JSONRPC10ClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-json/src/JsonProtocolClient.ts b/private/aws-protocoltests-json/src/JsonProtocolClient.ts index 373b4829272a..f5761d4a492b 100644 --- a/private/aws-protocoltests-json/src/JsonProtocolClient.ts +++ b/private/aws-protocoltests-json/src/JsonProtocolClient.ts @@ -191,6 +191,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/private/aws-protocoltests-json/src/endpoints.ts b/private/aws-protocoltests-json/src/endpoints.ts index 5b52f205dd6a..28532a196b26 100644 --- a/private/aws-protocoltests-json/src/endpoints.ts +++ b/private/aws-protocoltests-json/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "foo", diff --git a/private/aws-protocoltests-json/src/runtimeConfig.browser.ts b/private/aws-protocoltests-json/src/runtimeConfig.browser.ts index dfe2f7ddc1ab..1c484a40bc69 100644 --- a/private/aws-protocoltests-json/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-json/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: JsonProtocolClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-json/src/runtimeConfig.ts b/private/aws-protocoltests-json/src/runtimeConfig.ts index 579a5ba379b9..ec2c30c39934 100644 --- a/private/aws-protocoltests-json/src/runtimeConfig.ts +++ b/private/aws-protocoltests-json/src/runtimeConfig.ts @@ -2,7 +2,12 @@ import packageInfo from "../package.json"; // eslint-disable-line import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; -import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -40,6 +45,8 @@ export const getRuntimeConfig = (config: JsonProtocolClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-query/src/QueryProtocolClient.ts b/private/aws-protocoltests-query/src/QueryProtocolClient.ts index 11b2e19a4359..c67ff8a812d5 100644 --- a/private/aws-protocoltests-query/src/QueryProtocolClient.ts +++ b/private/aws-protocoltests-query/src/QueryProtocolClient.ts @@ -241,6 +241,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/private/aws-protocoltests-query/src/endpoints.ts b/private/aws-protocoltests-query/src/endpoints.ts index fff1593194be..1320d847af71 100644 --- a/private/aws-protocoltests-query/src/endpoints.ts +++ b/private/aws-protocoltests-query/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "awsquery", diff --git a/private/aws-protocoltests-query/src/runtimeConfig.browser.ts b/private/aws-protocoltests-query/src/runtimeConfig.browser.ts index 2caa43a22cee..3ab2533e386c 100644 --- a/private/aws-protocoltests-query/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-query/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; @@ -31,6 +32,8 @@ export const getRuntimeConfig = (config: QueryProtocolClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-query/src/runtimeConfig.ts b/private/aws-protocoltests-query/src/runtimeConfig.ts index 95c1994a9e2b..fadeba69209d 100644 --- a/private/aws-protocoltests-query/src/runtimeConfig.ts +++ b/private/aws-protocoltests-query/src/runtimeConfig.ts @@ -1,6 +1,10 @@ // @ts-ignore: package.json will be imported from dist folders import packageInfo from "../package.json"; // eslint-disable-line +import { + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; @@ -34,6 +38,8 @@ export const getRuntimeConfig = (config: QueryProtocolClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts b/private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts index c59738cacb33..7526f599fad4 100644 --- a/private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts +++ b/private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts @@ -507,6 +507,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/private/aws-protocoltests-restjson/src/endpoints.ts b/private/aws-protocoltests-restjson/src/endpoints.ts index cb7b16a70f63..e6a29f890801 100644 --- a/private/aws-protocoltests-restjson/src/endpoints.ts +++ b/private/aws-protocoltests-restjson/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "restjson", diff --git a/private/aws-protocoltests-restjson/src/runtimeConfig.browser.ts b/private/aws-protocoltests-restjson/src/runtimeConfig.browser.ts index eb22e57df908..7a4aee61954a 100644 --- a/private/aws-protocoltests-restjson/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-restjson/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { blobHasher as streamHasher } from "@aws-sdk/hash-blob-browser"; import { Md5 } from "@aws-sdk/md5-js"; @@ -35,6 +36,8 @@ export const getRuntimeConfig = (config: RestJsonProtocolClientConfig) => { sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, streamHasher: config?.streamHasher ?? streamHasher, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-restjson/src/runtimeConfig.ts b/private/aws-protocoltests-restjson/src/runtimeConfig.ts index 5fce08d94ec8..db17f88ff1d4 100644 --- a/private/aws-protocoltests-restjson/src/runtimeConfig.ts +++ b/private/aws-protocoltests-restjson/src/runtimeConfig.ts @@ -1,6 +1,10 @@ // @ts-ignore: package.json will be imported from dist folders import packageInfo from "../package.json"; // eslint-disable-line +import { + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { Hash } from "@aws-sdk/hash-node"; import { fileStreamHasher as streamHasher } from "@aws-sdk/hash-stream-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; @@ -38,6 +42,8 @@ export const getRuntimeConfig = (config: RestJsonProtocolClientConfig) => { sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, streamHasher: config?.streamHasher ?? streamHasher, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-restxml/src/RestXmlProtocolClient.ts b/private/aws-protocoltests-restxml/src/RestXmlProtocolClient.ts index 55afbed456ac..86373148e5f7 100644 --- a/private/aws-protocoltests-restxml/src/RestXmlProtocolClient.ts +++ b/private/aws-protocoltests-restxml/src/RestXmlProtocolClient.ts @@ -373,6 +373,16 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** * Unique service identifier. * @internal diff --git a/private/aws-protocoltests-restxml/src/endpoints.ts b/private/aws-protocoltests-restxml/src/endpoints.ts index f06accf756de..5625ad0d337b 100644 --- a/private/aws-protocoltests-restxml/src/endpoints.ts +++ b/private/aws-protocoltests-restxml/src/endpoints.ts @@ -1,5 +1,5 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; -import { RegionInfoProvider } from "@aws-sdk/types"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; const regionHash: RegionHash = {}; @@ -53,7 +53,10 @@ const partitionHash: PartitionHash = { }, }; -export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) => +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => getRegionInfo(region, { ...options, signingService: "restxml", diff --git a/private/aws-protocoltests-restxml/src/runtimeConfig.browser.ts b/private/aws-protocoltests-restxml/src/runtimeConfig.browser.ts index c57b26caa429..ca7fbb8a12af 100644 --- a/private/aws-protocoltests-restxml/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-restxml/src/runtimeConfig.browser.ts @@ -2,6 +2,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; @@ -31,6 +32,8 @@ export const getRuntimeConfig = (config: RestXmlProtocolClientConfig) => { retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, }; diff --git a/private/aws-protocoltests-restxml/src/runtimeConfig.ts b/private/aws-protocoltests-restxml/src/runtimeConfig.ts index 5b405c2b22a5..a5e0820420b7 100644 --- a/private/aws-protocoltests-restxml/src/runtimeConfig.ts +++ b/private/aws-protocoltests-restxml/src/runtimeConfig.ts @@ -1,6 +1,10 @@ // @ts-ignore: package.json will be imported from dist folders import packageInfo from "../package.json"; // eslint-disable-line +import { + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; import { Hash } from "@aws-sdk/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; @@ -34,6 +38,8 @@ export const getRuntimeConfig = (config: RestXmlProtocolClientConfig) => { retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: config?.sha256 ?? Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, };